From 9131e7b5a57082340475da6da288762c8019489d Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Thu, 19 Dec 2024 19:48:59 +0300 Subject: [PATCH 01/10] PMM-13629 Fix pmm-managed npe issue. --- .../pmm/server/docker/mock_functions_test.go | 416 ------------------ agent/agentlocal/mock_client_test.go | 115 ----- agent/agentlocal/mock_supervisor_test.go | 69 --- agent/client/mock_connection_checker_test.go | 51 --- agent/client/mock_service_info_broker_test.go | 51 --- agent/client/mock_supervisor_test.go | 146 ------ agent/versioner/mock_exec_functions_test.go | 84 ---- api/accesscontrol/v1beta1/accesscontrol.pb.go | 44 +- .../v1beta1/accesscontrol.pb.gw.go | 48 +- .../v1beta1/accesscontrol.pb.validate.go | 2 + .../v1beta1/accesscontrol_grpc.pb.go | 7 - .../assign_roles_parameters.go | 2 + .../assign_roles_responses.go | 10 + .../create_role_parameters.go | 2 + .../create_role_responses.go | 11 + .../delete_role_parameters.go | 3 + .../delete_role_responses.go | 9 + .../get_role_parameters.go | 2 + .../get_role_responses.go | 10 + .../list_roles_parameters.go | 1 + .../list_roles_responses.go | 14 + .../set_default_role_parameters.go | 2 + .../set_default_role_responses.go | 10 + .../update_role_parameters.go | 2 + .../update_role_responses.go | 10 + api/actions/v1/actions.pb.go | 82 ++-- api/actions/v1/actions.pb.gw.go | 32 +- api/actions/v1/actions_grpc.pb.go | 4 - .../cancel_action_parameters.go | 2 + .../cancel_action_responses.go | 10 + .../actions_service/get_action_parameters.go | 2 + .../actions_service/get_action_responses.go | 10 + .../start_pt_summary_action_parameters.go | 2 + .../start_pt_summary_action_responses.go | 11 + .../start_service_action_parameters.go | 2 + .../start_service_action_responses.go | 59 +++ api/advisors/v1/advisors.pb.go | 65 ++- api/advisors/v1/advisors.pb.gw.go | 44 +- api/advisors/v1/advisors.pb.validate.go | 4 + api/advisors/v1/advisors_grpc.pb.go | 6 - .../change_advisor_checks_parameters.go | 2 + .../change_advisor_checks_responses.go | 14 + .../get_failed_checks_parameters.go | 5 + .../get_failed_checks_responses.go | 14 + .../list_advisor_checks_parameters.go | 1 + .../list_advisor_checks_responses.go | 14 + .../list_advisors_parameters.go | 1 + .../list_advisors_responses.go | 18 + .../list_failed_services_parameters.go | 1 + .../list_failed_services_responses.go | 14 + .../start_advisor_checks_parameters.go | 2 + .../start_advisor_checks_responses.go | 10 + api/agent/pb/agent.pb.go | 7 +- api/agent/pb/agent_grpc.pb.go | 4 +- api/agent/v1/agent.pb.go | 227 +++++----- api/agent/v1/agent.pb.validate.go | 1 + api/agent/v1/agent_grpc.pb.go | 1 - api/agent/v1/collector.pb.go | 39 +- api/agentlocal/v1/agentlocal.pb.go | 37 +- api/agentlocal/v1/agentlocal.pb.gw.go | 32 +- api/agentlocal/v1/agentlocal_grpc.pb.go | 2 - .../agent_local_service/reload_parameters.go | 2 + .../agent_local_service/reload_responses.go | 9 + .../agent_local_service/status2_parameters.go | 3 + .../agent_local_service/status2_responses.go | 16 + .../agent_local_service/status_parameters.go | 2 + .../agent_local_service/status_responses.go | 17 + api/alerting/v1/alerting.pb.go | 73 ++- api/alerting/v1/alerting.pb.gw.go | 38 +- api/alerting/v1/alerting.pb.validate.go | 4 + api/alerting/v1/alerting_grpc.pb.go | 5 - .../create_rule_parameters.go | 2 + .../alerting_service/create_rule_responses.go | 18 + .../create_template_parameters.go | 2 + .../create_template_responses.go | 10 + .../delete_template_parameters.go | 2 + .../delete_template_responses.go | 9 + .../list_templates_parameters.go | 5 + .../list_templates_responses.go | 24 + .../update_template_parameters.go | 2 + .../update_template_responses.go | 10 + api/alerting/v1/params.pb.go | 18 +- api/backup/v1/artifacts.pb.go | 42 +- api/backup/v1/backup.pb.go | 73 ++- api/backup/v1/backup.pb.gw.go | 64 ++- api/backup/v1/backup_grpc.pb.go | 10 - api/backup/v1/common.pb.go | 30 +- api/backup/v1/errors.pb.go | 20 +- .../change_scheduled_backup_parameters.go | 2 + .../change_scheduled_backup_responses.go | 10 + .../delete_artifact_parameters.go | 3 + .../delete_artifact_responses.go | 9 + .../backup_service/get_logs_parameters.go | 4 + .../backup_service/get_logs_responses.go | 14 + ...artifact_compatible_services_parameters.go | 2 + ..._artifact_compatible_services_responses.go | 18 + .../list_artifacts_parameters.go | 1 + .../list_artifacts_responses.go | 24 + .../list_pitr_timeranges_parameters.go | 2 + .../list_pitr_timeranges_responses.go | 14 + .../list_scheduled_backups_parameters.go | 1 + .../list_scheduled_backups_responses.go | 14 + .../remove_scheduled_backup_parameters.go | 2 + .../remove_scheduled_backup_responses.go | 9 + .../schedule_backup_parameters.go | 2 + .../schedule_backup_responses.go | 11 + .../backup_service/start_backup_parameters.go | 2 + .../backup_service/start_backup_responses.go | 11 + .../add_location_parameters.go | 2 + .../add_location_responses.go | 15 + .../change_location_parameters.go | 2 + .../change_location_responses.go | 14 + .../list_locations_parameters.go | 1 + .../list_locations_responses.go | 18 + .../remove_location_parameters.go | 3 + .../remove_location_responses.go | 9 + .../test_location_config_parameters.go | 2 + .../test_location_config_responses.go | 14 + .../get_logs_mixin5_parameters.go | 4 + .../get_logs_mixin5_responses.go | 14 + .../list_restores_parameters.go | 1 + .../list_restores_responses.go | 14 + .../restore_backup_parameters.go | 2 + .../restore_backup_responses.go | 11 + api/backup/v1/locations.pb.go | 40 +- api/backup/v1/locations.pb.gw.go | 40 +- api/backup/v1/locations_grpc.pb.go | 5 - api/backup/v1/restores.pb.go | 38 +- api/backup/v1/restores.pb.gw.go | 32 +- api/backup/v1/restores_grpc.pb.go | 3 - api/common/common.pb.go | 20 +- api/common/metrics_resolutions.pb.go | 18 +- api/dump/v1beta1/dump.pb.go | 46 +- api/dump/v1beta1/dump.pb.gw.go | 40 +- api/dump/v1beta1/dump_grpc.pb.go | 5 - .../dump_service/delete_dump_parameters.go | 2 + .../dump_service/delete_dump_responses.go | 10 + .../dump_service/get_dump_logs_parameters.go | 4 + .../dump_service/get_dump_logs_responses.go | 14 + .../dump_service/list_dumps_parameters.go | 1 + .../dump_service/list_dumps_responses.go | 14 + .../dump_service/start_dump_parameters.go | 2 + .../dump_service/start_dump_responses.go | 11 + .../dump_service/upload_dump_parameters.go | 2 + .../dump_service/upload_dump_responses.go | 12 + api/inventory/v1/agent_status.pb.go | 16 +- api/inventory/v1/agents.pb.go | 195 ++++---- api/inventory/v1/agents.pb.gw.go | 50 ++- api/inventory/v1/agents.pb.validate.go | 28 ++ api/inventory/v1/agents_grpc.pb.go | 6 - .../agents_service/add_agent_parameters.go | 2 + .../agents_service/add_agent_responses.go | 83 ++++ .../agents_service/change_agent_parameters.go | 2 + .../agents_service/change_agent_responses.go | 131 ++++++ .../get_agent_logs_parameters.go | 3 + .../get_agent_logs_responses.go | 10 + .../agents_service/get_agent_parameters.go | 2 + .../agents_service/get_agent_responses.go | 56 +++ .../agents_service/list_agents_parameters.go | 10 +- .../agents_service/list_agents_responses.go | 86 ++++ .../agents_service/remove_agent_parameters.go | 3 + .../agents_service/remove_agent_responses.go | 9 + .../nodes_service/add_node_parameters.go | 2 + .../nodes_service/add_node_responses.go | 31 ++ .../nodes_service/get_node_parameters.go | 2 + .../nodes_service/get_node_responses.go | 20 + .../nodes_service/list_nodes_parameters.go | 7 +- .../nodes_service/list_nodes_responses.go | 30 ++ .../nodes_service/remove_node_parameters.go | 3 + .../nodes_service/remove_node_responses.go | 9 + .../add_service_parameters.go | 2 + .../services_service/add_service_responses.go | 35 ++ .../change_service_parameters.go | 2 + .../change_service_responses.go | 25 ++ .../get_service_parameters.go | 2 + .../services_service/get_service_responses.go | 22 + .../list_active_service_types_parameters.go | 2 + .../list_active_service_types_responses.go | 10 + .../list_services_parameters.go | 9 +- .../list_services_responses.go | 34 ++ .../remove_service_parameters.go | 3 + .../remove_service_responses.go | 9 + api/inventory/v1/log_level.pb.go | 16 +- api/inventory/v1/nodes.pb.go | 74 ++-- api/inventory/v1/nodes.pb.gw.go | 38 +- api/inventory/v1/nodes_grpc.pb.go | 4 - api/inventory/v1/services.pb.go | 95 ++-- api/inventory/v1/services.pb.gw.go | 46 +- api/inventory/v1/services.pb.validate.go | 2 + api/inventory/v1/services_grpc.pb.go | 6 - api/management/v1/agent.pb.go | 47 +- api/management/v1/annotation.pb.go | 18 +- api/management/v1/azure.pb.go | 30 +- api/management/v1/external.pb.go | 31 +- api/management/v1/haproxy.pb.go | 31 +- .../add_annotation_parameters.go | 2 + .../add_annotation_responses.go | 10 + .../add_azure_database_parameters.go | 2 + .../add_azure_database_responses.go | 10 + .../add_service_parameters.go | 2 + .../add_service_responses.go | 119 +++++ .../discover_azure_database_parameters.go | 2 + .../discover_azure_database_responses.go | 15 + .../discover_rds_parameters.go | 2 + .../discover_rds_responses.go | 15 + .../management_service/get_node_parameters.go | 2 + .../management_service/get_node_responses.go | 20 + .../list_agent_versions_parameters.go | 1 + .../list_agent_versions_responses.go | 14 + .../list_agents_parameters.go | 4 + .../list_agents_responses.go | 22 + .../list_nodes_parameters.go | 7 +- .../list_nodes_responses.go | 22 + .../list_services_parameters.go | 9 +- .../list_services_responses.go | 26 ++ .../register_node_parameters.go | 2 + .../register_node_responses.go | 17 + .../remove_service_parameters.go | 7 +- .../remove_service_responses.go | 9 + .../unregister_node_parameters.go | 3 + .../unregister_node_responses.go | 10 + api/management/v1/metrics.pb.go | 16 +- api/management/v1/mongodb.pb.go | 35 +- api/management/v1/mysql.pb.go | 37 +- api/management/v1/node.pb.go | 63 ++- api/management/v1/postgresql.pb.go | 37 +- api/management/v1/proxysql.pb.go | 33 +- api/management/v1/rds.pb.go | 51 +-- api/management/v1/service.pb.go | 111 +++-- api/management/v1/service.pb.gw.go | 88 +++- api/management/v1/service_grpc.pb.go | 13 - api/management/v1/severity.pb.go | 16 +- .../platform_service/connect_parameters.go | 2 + .../platform_service/connect_responses.go | 10 + .../platform_service/disconnect_parameters.go | 2 + .../platform_service/disconnect_responses.go | 10 + .../get_contact_information_parameters.go | 1 + .../get_contact_information_responses.go | 12 + ...ch_organization_entitlements_parameters.go | 1 + ...rch_organization_entitlements_responses.go | 16 + .../search_organization_tickets_parameters.go | 1 + .../search_organization_tickets_responses.go | 14 + .../server_info_parameters.go | 1 + .../platform_service/server_info_responses.go | 10 + .../user_status_parameters.go | 1 + .../platform_service/user_status_responses.go | 10 + api/platform/v1/platform.pb.go | 52 +-- api/platform/v1/platform.pb.gw.go | 44 +- api/platform/v1/platform_grpc.pb.go | 7 - api/qan/v1/collector.pb.go | 33 +- api/qan/v1/collector_grpc.pb.go | 1 - api/qan/v1/filters.pb.go | 28 +- ...lain_fingerprint_by_query_id_parameters.go | 2 + ...plain_fingerprint_by_query_id_responses.go | 11 + .../get_filtered_metrics_names_parameters.go | 2 + .../get_filtered_metrics_names_responses.go | 23 + .../qan_service/get_histogram_parameters.go | 2 + .../qan_service/get_histogram_responses.go | 19 + .../qan_service/get_labels_parameters.go | 2 + .../qan_service/get_labels_responses.go | 15 + .../get_metrics_names_parameters.go | 2 + .../get_metrics_names_responses.go | 10 + .../qan_service/get_metrics_parameters.go | 2 + .../qan_service/get_metrics_responses.go | 29 ++ .../get_query_example_parameters.go | 2 + .../get_query_example_responses.go | 19 + .../qan_service/get_query_plan_parameters.go | 2 + .../qan_service/get_query_plan_responses.go | 10 + .../qan_service/get_report_parameters.go | 2 + .../qan_service/get_report_responses.go | 29 ++ .../qan_service/query_exists_parameters.go | 2 + .../qan_service/query_exists_responses.go | 11 + .../schema_by_query_id_parameters.go | 2 + .../schema_by_query_id_responses.go | 11 + api/qan/v1/object_details.pb.go | 74 ++-- api/qan/v1/profile.pb.go | 32 +- api/qan/v1/qan.pb.go | 22 +- api/qan/v1/service.pb.go | 60 ++- api/qan/v1/service.pb.gw.go | 60 ++- api/qan/v1/service_grpc.pb.go | 11 - api/server/v1/httperror.pb.go | 18 +- .../change_settings_parameters.go | 2 + .../change_settings_responses.go | 23 + .../check_updates_parameters.go | 4 + .../server_service/check_updates_responses.go | 14 + .../server_service/get_settings_parameters.go | 1 + .../server_service/get_settings_responses.go | 16 + .../leader_health_check_parameters.go | 1 + .../leader_health_check_responses.go | 9 + .../list_change_logs_parameters.go | 1 + .../list_change_logs_responses.go | 14 + .../client/server_service/logs_parameters.go | 3 + .../client/server_service/logs_responses.go | 4 + .../server_service/readiness_parameters.go | 1 + .../server_service/readiness_responses.go | 9 + .../server_service/start_update_parameters.go | 2 + .../server_service/start_update_responses.go | 11 + .../update_status_parameters.go | 2 + .../server_service/update_status_responses.go | 11 + .../server_service/version_parameters.go | 3 + .../server_service/version_responses.go | 14 + api/server/v1/server.pb.go | 73 ++- api/server/v1/server.pb.gw.go | 58 ++- api/server/v1/server.pb.validate.go | 2 + api/server/v1/server_grpc.pb.go | 9 - api/uievents/v1/server.pb.go | 28 +- api/uievents/v1/server.pb.gw.go | 28 +- api/uievents/v1/server_grpc.pb.go | 1 - .../user_service/get_user_parameters.go | 1 + .../client/user_service/get_user_responses.go | 10 + .../user_service/list_users_parameters.go | 1 + .../user_service/list_users_responses.go | 14 + .../user_service/update_user_parameters.go | 2 + .../user_service/update_user_responses.go | 11 + api/user/v1/user.pb.go | 28 +- api/user/v1/user.pb.gw.go | 28 +- api/user/v1/user_grpc.pb.go | 3 - get-pmm.sh | 2 +- managed/models/agent_helpers.go | 96 ++-- managed/models/agent_helpers_test.go | 166 +++---- managed/models/agent_model.go | 72 ++- managed/models/agent_model_reform.go | 14 +- managed/models/agent_model_test.go | 76 ++-- managed/models/database.go | 4 +- managed/models/dsn_helpers_test.go | 4 +- managed/models/encryption_helpers.go | 10 +- managed/services/agents/agents.go | 36 +- managed/services/agents/agents_test.go | 8 +- managed/services/agents/azure_database.go | 2 +- .../services/agents/azure_database_test.go | 2 +- managed/services/agents/handler.go | 2 + managed/services/agents/mongodb_test.go | 66 +-- managed/services/agents/mysql_test.go | 14 +- managed/services/agents/node_test.go | 12 +- managed/services/agents/postgresql_test.go | 92 ++-- managed/services/agents/proxysql_test.go | 6 +- managed/services/agents/rds_test.go | 4 +- managed/services/agents/registry.go | 2 +- managed/services/agents/roster_test.go | 4 +- .../alerting/mock_grafana_client_test.go | 108 ----- .../backup/mock_agent_service_test.go | 47 -- .../backup/mock_compatibility_service_test.go | 75 ---- .../services/backup/mock_jobs_service_test.go | 121 ----- .../backup/mock_pbm_pitr_service_test.go | 92 ---- .../backup/mock_removal_service_test.go | 61 --- managed/services/backup/mock_storage_test.go | 125 ------ .../services/backup/mock_versioner_test.go | 59 --- .../checks/mock_agents_registry_test.go | 193 -------- managed/services/inventory/agents.go | 24 +- .../inventory/mock_agent_service_test.go | 66 --- .../inventory/mock_agents_registry_test.go | 52 --- .../mock_agents_state_updater_test.go | 34 -- .../inventory/mock_connection_checker_test.go | 50 --- .../inventory/mock_inventory_metrics_test.go | 119 ----- .../inventory/mock_prometheus_service_test.go | 30 -- .../mock_service_info_broker_test.go | 50 --- .../inventory/mock_version_cache_test.go | 30 -- managed/services/management/agent.go | 50 +-- managed/services/management/azure_database.go | 4 +- .../management/backup/mock_aws_s3_test.go | 103 ----- .../backup/mock_backup_service_test.go | 106 ----- .../backup/mock_pbm_pitr_service_test.go | 62 --- .../backup/mock_removal_service_test.go | 47 -- .../backup/mock_schedule_service_test.go | 103 ----- .../management/dump/mock_dump_service_test.go | 105 ----- .../management/mock_agents_registry_test.go | 52 --- .../mock_agents_state_updater_test.go | 34 -- .../management/mock_checks_service_test.go | 224 ---------- .../mock_connection_checker_test.go | 50 --- .../management/mock_grafana_client_test.go | 121 ----- .../management/mock_jobs_service_test.go | 43 -- .../mock_prometheus_service_test.go | 30 -- .../mock_service_info_broker_test.go | 50 --- .../management/mock_version_cache_test.go | 30 -- .../mock_victoria_metrics_client_test.go | 78 ---- managed/services/management/mongodb.go | 4 +- managed/services/management/mysql.go | 6 +- managed/services/management/postgresql.go | 6 +- managed/services/management/proxysql.go | 2 +- managed/services/management/rds.go | 18 +- .../qan/mock_qan_collector_client_test.go | 69 --- .../scheduler/mock_backup_service_test.go | 59 --- .../server/mock_agents_state_updater_test.go | 47 -- .../server/mock_checks_service_test.go | 63 --- .../server/mock_grafana_client_test.go | 47 -- .../server/mock_prometheus_service_test.go | 52 --- .../server/mock_supervisord_service_test.go | 47 -- .../server/mock_telemetry_service_test.go | 67 --- .../server/mock_templates_service_test.go | 34 -- .../mock_vm_alert_external_rules_test.go | 111 ----- .../mock_data_source_locator_test.go | 55 --- .../telemetry/mock_data_source_test.go | 114 ----- .../mock_distribution_util_service_test.go | 65 --- .../services/telemetry/mock_sender_test.go | 48 -- .../versioncache/mock_versioner_test.go | 59 --- .../victoriametrics/scrape_configs_test.go | 38 +- .../victoriametrics/victoriametrics_test.go | 10 +- 397 files changed, 4425 insertions(+), 6397 deletions(-) delete mode 100644 admin/commands/pmm/server/docker/mock_functions_test.go delete mode 100644 agent/agentlocal/mock_client_test.go delete mode 100644 agent/agentlocal/mock_supervisor_test.go delete mode 100644 agent/client/mock_connection_checker_test.go delete mode 100644 agent/client/mock_service_info_broker_test.go delete mode 100644 agent/client/mock_supervisor_test.go delete mode 100644 agent/versioner/mock_exec_functions_test.go delete mode 100644 managed/services/alerting/mock_grafana_client_test.go delete mode 100644 managed/services/backup/mock_agent_service_test.go delete mode 100644 managed/services/backup/mock_compatibility_service_test.go delete mode 100644 managed/services/backup/mock_jobs_service_test.go delete mode 100644 managed/services/backup/mock_pbm_pitr_service_test.go delete mode 100644 managed/services/backup/mock_removal_service_test.go delete mode 100644 managed/services/backup/mock_storage_test.go delete mode 100644 managed/services/backup/mock_versioner_test.go delete mode 100644 managed/services/checks/mock_agents_registry_test.go delete mode 100644 managed/services/inventory/mock_agent_service_test.go delete mode 100644 managed/services/inventory/mock_agents_registry_test.go delete mode 100644 managed/services/inventory/mock_agents_state_updater_test.go delete mode 100644 managed/services/inventory/mock_connection_checker_test.go delete mode 100644 managed/services/inventory/mock_inventory_metrics_test.go delete mode 100644 managed/services/inventory/mock_prometheus_service_test.go delete mode 100644 managed/services/inventory/mock_service_info_broker_test.go delete mode 100644 managed/services/inventory/mock_version_cache_test.go delete mode 100644 managed/services/management/backup/mock_aws_s3_test.go delete mode 100644 managed/services/management/backup/mock_backup_service_test.go delete mode 100644 managed/services/management/backup/mock_pbm_pitr_service_test.go delete mode 100644 managed/services/management/backup/mock_removal_service_test.go delete mode 100644 managed/services/management/backup/mock_schedule_service_test.go delete mode 100644 managed/services/management/dump/mock_dump_service_test.go delete mode 100644 managed/services/management/mock_agents_registry_test.go delete mode 100644 managed/services/management/mock_agents_state_updater_test.go delete mode 100644 managed/services/management/mock_checks_service_test.go delete mode 100644 managed/services/management/mock_connection_checker_test.go delete mode 100644 managed/services/management/mock_grafana_client_test.go delete mode 100644 managed/services/management/mock_jobs_service_test.go delete mode 100644 managed/services/management/mock_prometheus_service_test.go delete mode 100644 managed/services/management/mock_service_info_broker_test.go delete mode 100644 managed/services/management/mock_version_cache_test.go delete mode 100644 managed/services/management/mock_victoria_metrics_client_test.go delete mode 100644 managed/services/qan/mock_qan_collector_client_test.go delete mode 100644 managed/services/scheduler/mock_backup_service_test.go delete mode 100644 managed/services/server/mock_agents_state_updater_test.go delete mode 100644 managed/services/server/mock_checks_service_test.go delete mode 100644 managed/services/server/mock_grafana_client_test.go delete mode 100644 managed/services/server/mock_prometheus_service_test.go delete mode 100644 managed/services/server/mock_supervisord_service_test.go delete mode 100644 managed/services/server/mock_telemetry_service_test.go delete mode 100644 managed/services/server/mock_templates_service_test.go delete mode 100644 managed/services/server/mock_vm_alert_external_rules_test.go delete mode 100644 managed/services/telemetry/mock_data_source_locator_test.go delete mode 100644 managed/services/telemetry/mock_data_source_test.go delete mode 100644 managed/services/telemetry/mock_distribution_util_service_test.go delete mode 100644 managed/services/telemetry/mock_sender_test.go delete mode 100644 managed/services/versioncache/mock_versioner_test.go diff --git a/admin/commands/pmm/server/docker/mock_functions_test.go b/admin/commands/pmm/server/docker/mock_functions_test.go deleted file mode 100644 index 0e9b42168a..0000000000 --- a/admin/commands/pmm/server/docker/mock_functions_test.go +++ /dev/null @@ -1,416 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package docker - -import ( - context "context" - io "io" - - tea "github.com/charmbracelet/bubbletea" - types "github.com/docker/docker/api/types" - container "github.com/docker/docker/api/types/container" - image "github.com/docker/docker/api/types/image" - volume "github.com/docker/docker/api/types/volume" - client "github.com/docker/docker/client" - mock "github.com/stretchr/testify/mock" - - pkgdocker "github.com/percona/pmm/admin/pkg/docker" -) - -// MockFunctions is an autogenerated mock type for the Functions type -type MockFunctions struct { - mock.Mock -} - -// ChangeServerPassword provides a mock function with given fields: ctx, containerID, newPassword -func (_m *MockFunctions) ChangeServerPassword(ctx context.Context, containerID string, newPassword string) error { - ret := _m.Called(ctx, containerID, newPassword) - - if len(ret) == 0 { - panic("no return value specified for ChangeServerPassword") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { - r0 = rf(ctx, containerID, newPassword) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ContainerInspect provides a mock function with given fields: ctx, containerID -func (_m *MockFunctions) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) { - ret := _m.Called(ctx, containerID) - - if len(ret) == 0 { - panic("no return value specified for ContainerInspect") - } - - var r0 types.ContainerJSON - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerJSON, error)); ok { - return rf(ctx, containerID) - } - if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerJSON); ok { - r0 = rf(ctx, containerID) - } else { - r0 = ret.Get(0).(types.ContainerJSON) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, containerID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ContainerStop provides a mock function with given fields: ctx, containerID, timeout -func (_m *MockFunctions) ContainerStop(ctx context.Context, containerID string, timeout *int) error { - ret := _m.Called(ctx, containerID, timeout) - - if len(ret) == 0 { - panic("no return value specified for ContainerStop") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, *int) error); ok { - r0 = rf(ctx, containerID, timeout) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ContainerUpdate provides a mock function with given fields: ctx, containerID, updateConfig -func (_m *MockFunctions) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) { - ret := _m.Called(ctx, containerID, updateConfig) - - if len(ret) == 0 { - panic("no return value specified for ContainerUpdate") - } - - var r0 container.ContainerUpdateOKBody - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) (container.ContainerUpdateOKBody, error)); ok { - return rf(ctx, containerID, updateConfig) - } - if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) container.ContainerUpdateOKBody); ok { - r0 = rf(ctx, containerID, updateConfig) - } else { - r0 = ret.Get(0).(container.ContainerUpdateOKBody) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, container.UpdateConfig) error); ok { - r1 = rf(ctx, containerID, updateConfig) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ContainerWait provides a mock function with given fields: ctx, containerID, condition -func (_m *MockFunctions) ContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error) { - ret := _m.Called(ctx, containerID, condition) - - if len(ret) == 0 { - panic("no return value specified for ContainerWait") - } - - var r0 <-chan container.WaitResponse - var r1 <-chan error - if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) (<-chan container.WaitResponse, <-chan error)); ok { - return rf(ctx, containerID, condition) - } - if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) <-chan container.WaitResponse); ok { - r0 = rf(ctx, containerID, condition) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan container.WaitResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, container.WaitCondition) <-chan error); ok { - r1 = rf(ctx, containerID, condition) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(<-chan error) - } - } - - return r0, r1 -} - -// CreateVolume provides a mock function with given fields: ctx, volumeName, labels -func (_m *MockFunctions) CreateVolume(ctx context.Context, volumeName string, labels map[string]string) (*volume.Volume, error) { - ret := _m.Called(ctx, volumeName, labels) - - if len(ret) == 0 { - panic("no return value specified for CreateVolume") - } - - var r0 *volume.Volume - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, map[string]string) (*volume.Volume, error)); ok { - return rf(ctx, volumeName, labels) - } - if rf, ok := ret.Get(0).(func(context.Context, string, map[string]string) *volume.Volume); ok { - r0 = rf(ctx, volumeName, labels) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*volume.Volume) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, map[string]string) error); ok { - r1 = rf(ctx, volumeName, labels) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// FindServerContainers provides a mock function with given fields: ctx -func (_m *MockFunctions) FindServerContainers(ctx context.Context) ([]types.Container, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for FindServerContainers") - } - - var r0 []types.Container - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]types.Container, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []types.Container); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]types.Container) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDockerClient provides a mock function with given fields: -func (_m *MockFunctions) GetDockerClient() *client.Client { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDockerClient") - } - - var r0 *client.Client - if rf, ok := ret.Get(0).(func() *client.Client); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*client.Client) - } - } - - return r0 -} - -// HaveDockerAccess provides a mock function with given fields: ctx -func (_m *MockFunctions) HaveDockerAccess(ctx context.Context) bool { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for HaveDockerAccess") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(context.Context) bool); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// InstallDocker provides a mock function with given fields: ctx -func (_m *MockFunctions) InstallDocker(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for InstallDocker") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// IsDockerInstalled provides a mock function with given fields: -func (_m *MockFunctions) IsDockerInstalled() (bool, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for IsDockerInstalled") - } - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func() (bool, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ParsePullImageProgress provides a mock function with given fields: r, p -func (_m *MockFunctions) ParsePullImageProgress(r io.Reader, p *tea.Program) (<-chan struct{}, <-chan error) { - ret := _m.Called(r, p) - - if len(ret) == 0 { - panic("no return value specified for ParsePullImageProgress") - } - - var r0 <-chan struct{} - var r1 <-chan error - if rf, ok := ret.Get(0).(func(io.Reader, *tea.Program) (<-chan struct{}, <-chan error)); ok { - return rf(r, p) - } - if rf, ok := ret.Get(0).(func(io.Reader, *tea.Program) <-chan struct{}); ok { - r0 = rf(r, p) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan struct{}) - } - } - - if rf, ok := ret.Get(1).(func(io.Reader, *tea.Program) <-chan error); ok { - r1 = rf(r, p) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(<-chan error) - } - } - - return r0, r1 -} - -// PullImage provides a mock function with given fields: ctx, dockerImage, opts -func (_m *MockFunctions) PullImage(ctx context.Context, dockerImage string, opts image.PullOptions) (io.Reader, error) { - ret := _m.Called(ctx, dockerImage, opts) - - if len(ret) == 0 { - panic("no return value specified for PullImage") - } - - var r0 io.Reader - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, image.PullOptions) (io.Reader, error)); ok { - return rf(ctx, dockerImage, opts) - } - if rf, ok := ret.Get(0).(func(context.Context, string, image.PullOptions) io.Reader); ok { - r0 = rf(ctx, dockerImage, opts) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(io.Reader) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, image.PullOptions) error); ok { - r1 = rf(ctx, dockerImage, opts) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RunContainer provides a mock function with given fields: ctx, config, hostConfig, containerName -func (_m *MockFunctions) RunContainer(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, containerName string) (string, error) { - ret := _m.Called(ctx, config, hostConfig, containerName) - - if len(ret) == 0 { - panic("no return value specified for RunContainer") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, string) (string, error)); ok { - return rf(ctx, config, hostConfig, containerName) - } - if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, string) string); ok { - r0 = rf(ctx, config, hostConfig, containerName) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, *container.Config, *container.HostConfig, string) error); ok { - r1 = rf(ctx, config, hostConfig, containerName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// WaitForHealthyContainer provides a mock function with given fields: ctx, containerID -func (_m *MockFunctions) WaitForHealthyContainer(ctx context.Context, containerID string) <-chan pkgdocker.WaitHealthyResponse { - ret := _m.Called(ctx, containerID) - - if len(ret) == 0 { - panic("no return value specified for WaitForHealthyContainer") - } - - var r0 <-chan pkgdocker.WaitHealthyResponse - if rf, ok := ret.Get(0).(func(context.Context, string) <-chan pkgdocker.WaitHealthyResponse); ok { - r0 = rf(ctx, containerID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan pkgdocker.WaitHealthyResponse) - } - } - - return r0 -} - -// NewMockFunctions creates a new instance of MockFunctions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockFunctions(t interface { - mock.TestingT - Cleanup(func()) -}, -) *MockFunctions { - mock := &MockFunctions{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/agentlocal/mock_client_test.go b/agent/agentlocal/mock_client_test.go deleted file mode 100644 index 3214180af4..0000000000 --- a/agent/agentlocal/mock_client_test.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package agentlocal - -import ( - time "time" - - prometheus "github.com/prometheus/client_golang/prometheus" - mock "github.com/stretchr/testify/mock" - - agentv1 "github.com/percona/pmm/api/agent/v1" -) - -// mockClient is an autogenerated mock type for the client type -type mockClient struct { - mock.Mock -} - -// Collect provides a mock function with given fields: _a0 -func (_m *mockClient) Collect(_a0 chan<- prometheus.Metric) { - _m.Called(_a0) -} - -// Describe provides a mock function with given fields: _a0 -func (_m *mockClient) Describe(_a0 chan<- *prometheus.Desc) { - _m.Called(_a0) -} - -// GetConnectionUpTime provides a mock function with given fields: -func (_m *mockClient) GetConnectionUpTime() float32 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetConnectionUpTime") - } - - var r0 float32 - if rf, ok := ret.Get(0).(func() float32); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(float32) - } - - return r0 -} - -// GetNetworkInformation provides a mock function with given fields: -func (_m *mockClient) GetNetworkInformation() (time.Duration, time.Duration, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetNetworkInformation") - } - - var r0 time.Duration - var r1 time.Duration - var r2 error - if rf, ok := ret.Get(0).(func() (time.Duration, time.Duration, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - if rf, ok := ret.Get(1).(func() time.Duration); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(time.Duration) - } - - if rf, ok := ret.Get(2).(func() error); ok { - r2 = rf() - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// GetServerConnectMetadata provides a mock function with given fields: -func (_m *mockClient) GetServerConnectMetadata() *agentv1.ServerConnectMetadata { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetServerConnectMetadata") - } - - var r0 *agentv1.ServerConnectMetadata - if rf, ok := ret.Get(0).(func() *agentv1.ServerConnectMetadata); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*agentv1.ServerConnectMetadata) - } - } - - return r0 -} - -// newMockClient creates a new instance of mockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockClient { - mock := &mockClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/agentlocal/mock_supervisor_test.go b/agent/agentlocal/mock_supervisor_test.go deleted file mode 100644 index c587060ef7..0000000000 --- a/agent/agentlocal/mock_supervisor_test.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package agentlocal - -import ( - mock "github.com/stretchr/testify/mock" - - agentlocalv1 "github.com/percona/pmm/api/agentlocal/v1" -) - -// mockSupervisor is an autogenerated mock type for the supervisor type -type mockSupervisor struct { - mock.Mock -} - -// AgentsList provides a mock function with given fields: -func (_m *mockSupervisor) AgentsList() []*agentlocalv1.AgentInfo { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AgentsList") - } - - var r0 []*agentlocalv1.AgentInfo - if rf, ok := ret.Get(0).(func() []*agentlocalv1.AgentInfo); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*agentlocalv1.AgentInfo) - } - } - - return r0 -} - -// AgentsLogs provides a mock function with given fields: -func (_m *mockSupervisor) AgentsLogs() map[string][]string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AgentsLogs") - } - - var r0 map[string][]string - if rf, ok := ret.Get(0).(func() map[string][]string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string][]string) - } - } - - return r0 -} - -// newMockSupervisor creates a new instance of mockSupervisor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockSupervisor(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockSupervisor { - mock := &mockSupervisor{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/client/mock_connection_checker_test.go b/agent/client/mock_connection_checker_test.go deleted file mode 100644 index df8e1879d5..0000000000 --- a/agent/client/mock_connection_checker_test.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package client - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - agentv1 "github.com/percona/pmm/api/agent/v1" -) - -// mockConnectionChecker is an autogenerated mock type for the connectionChecker type -type mockConnectionChecker struct { - mock.Mock -} - -// Check provides a mock function with given fields: ctx, req, id -func (_m *mockConnectionChecker) Check(ctx context.Context, req *agentv1.CheckConnectionRequest, id uint32) *agentv1.CheckConnectionResponse { - ret := _m.Called(ctx, req, id) - - if len(ret) == 0 { - panic("no return value specified for Check") - } - - var r0 *agentv1.CheckConnectionResponse - if rf, ok := ret.Get(0).(func(context.Context, *agentv1.CheckConnectionRequest, uint32) *agentv1.CheckConnectionResponse); ok { - r0 = rf(ctx, req, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*agentv1.CheckConnectionResponse) - } - } - - return r0 -} - -// newMockConnectionChecker creates a new instance of mockConnectionChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockConnectionChecker(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockConnectionChecker { - mock := &mockConnectionChecker{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/client/mock_service_info_broker_test.go b/agent/client/mock_service_info_broker_test.go deleted file mode 100644 index 0421daa1d3..0000000000 --- a/agent/client/mock_service_info_broker_test.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package client - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - agentv1 "github.com/percona/pmm/api/agent/v1" -) - -// mockServiceInfoBroker is an autogenerated mock type for the serviceInfoBroker type -type mockServiceInfoBroker struct { - mock.Mock -} - -// GetInfoFromService provides a mock function with given fields: ctx, req, id -func (_m *mockServiceInfoBroker) GetInfoFromService(ctx context.Context, req *agentv1.ServiceInfoRequest, id uint32) *agentv1.ServiceInfoResponse { - ret := _m.Called(ctx, req, id) - - if len(ret) == 0 { - panic("no return value specified for GetInfoFromService") - } - - var r0 *agentv1.ServiceInfoResponse - if rf, ok := ret.Get(0).(func(context.Context, *agentv1.ServiceInfoRequest, uint32) *agentv1.ServiceInfoResponse); ok { - r0 = rf(ctx, req, id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*agentv1.ServiceInfoResponse) - } - } - - return r0 -} - -// newMockServiceInfoBroker creates a new instance of mockServiceInfoBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockServiceInfoBroker(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockServiceInfoBroker { - mock := &mockServiceInfoBroker{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/client/mock_supervisor_test.go b/agent/client/mock_supervisor_test.go deleted file mode 100644 index d1b0d1c079..0000000000 --- a/agent/client/mock_supervisor_test.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package client - -import ( - prometheus "github.com/prometheus/client_golang/prometheus" - mock "github.com/stretchr/testify/mock" - - agentv1 "github.com/percona/pmm/api/agent/v1" - agentlocalv1 "github.com/percona/pmm/api/agentlocal/v1" -) - -// mockSupervisor is an autogenerated mock type for the supervisor type -type mockSupervisor struct { - mock.Mock -} - -// AgentLogByID provides a mock function with given fields: _a0 -func (_m *mockSupervisor) AgentLogByID(_a0 string) ([]string, uint) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for AgentLogByID") - } - - var r0 []string - var r1 uint - if rf, ok := ret.Get(0).(func(string) ([]string, uint)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(string) []string); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - if rf, ok := ret.Get(1).(func(string) uint); ok { - r1 = rf(_a0) - } else { - r1 = ret.Get(1).(uint) - } - - return r0, r1 -} - -// AgentsList provides a mock function with given fields: -func (_m *mockSupervisor) AgentsList() []*agentlocalv1.AgentInfo { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AgentsList") - } - - var r0 []*agentlocalv1.AgentInfo - if rf, ok := ret.Get(0).(func() []*agentlocalv1.AgentInfo); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*agentlocalv1.AgentInfo) - } - } - - return r0 -} - -// Changes provides a mock function with given fields: -func (_m *mockSupervisor) Changes() <-chan *agentv1.StateChangedRequest { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Changes") - } - - var r0 <-chan *agentv1.StateChangedRequest - if rf, ok := ret.Get(0).(func() <-chan *agentv1.StateChangedRequest); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan *agentv1.StateChangedRequest) - } - } - - return r0 -} - -// ClearChangesChannel provides a mock function with given fields: -func (_m *mockSupervisor) ClearChangesChannel() { - _m.Called() -} - -// Collect provides a mock function with given fields: _a0 -func (_m *mockSupervisor) Collect(_a0 chan<- prometheus.Metric) { - _m.Called(_a0) -} - -// Describe provides a mock function with given fields: _a0 -func (_m *mockSupervisor) Describe(_a0 chan<- *prometheus.Desc) { - _m.Called(_a0) -} - -// QANRequests provides a mock function with given fields: -func (_m *mockSupervisor) QANRequests() <-chan *agentv1.QANCollectRequest { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for QANRequests") - } - - var r0 <-chan *agentv1.QANCollectRequest - if rf, ok := ret.Get(0).(func() <-chan *agentv1.QANCollectRequest); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(<-chan *agentv1.QANCollectRequest) - } - } - - return r0 -} - -// RestartAgents provides a mock function with given fields: -func (_m *mockSupervisor) RestartAgents() { - _m.Called() -} - -// SetState provides a mock function with given fields: _a0 -func (_m *mockSupervisor) SetState(_a0 *agentv1.SetStateRequest) { - _m.Called(_a0) -} - -// newMockSupervisor creates a new instance of mockSupervisor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockSupervisor(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockSupervisor { - mock := &mockSupervisor{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/agent/versioner/mock_exec_functions_test.go b/agent/versioner/mock_exec_functions_test.go deleted file mode 100644 index 2a1fc08539..0000000000 --- a/agent/versioner/mock_exec_functions_test.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package versioner - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// MockExecFunctions is an autogenerated mock type for the ExecFunctions type -type MockExecFunctions struct { - mock.Mock -} - -// CommandContext provides a mock function with given fields: ctx, name, arg -func (_m *MockExecFunctions) CommandContext(ctx context.Context, name string, arg ...string) CombinedOutputer { - _va := make([]interface{}, len(arg)) - for _i := range arg { - _va[_i] = arg[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, name) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for CommandContext") - } - - var r0 CombinedOutputer - if rf, ok := ret.Get(0).(func(context.Context, string, ...string) CombinedOutputer); ok { - r0 = rf(ctx, name, arg...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(CombinedOutputer) - } - } - - return r0 -} - -// LookPath provides a mock function with given fields: file -func (_m *MockExecFunctions) LookPath(file string) (string, error) { - ret := _m.Called(file) - - if len(ret) == 0 { - panic("no return value specified for LookPath") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(string) (string, error)); ok { - return rf(file) - } - if rf, ok := ret.Get(0).(func(string) string); ok { - r0 = rf(file) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(file) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewMockExecFunctions creates a new instance of MockExecFunctions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockExecFunctions(t interface { - mock.TestingT - Cleanup(func()) -}, -) *MockExecFunctions { - mock := &MockExecFunctions{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.go b/api/accesscontrol/v1beta1/accesscontrol.pb.go index d7b9d135fa..9fbeb4fb4c 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.go @@ -7,14 +7,13 @@ package accesscontrolv1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -955,27 +954,24 @@ func file_accesscontrol_v1beta1_accesscontrol_proto_rawDescGZIP() []byte { return file_accesscontrol_v1beta1_accesscontrol_proto_rawDescData } -var ( - file_accesscontrol_v1beta1_accesscontrol_proto_msgTypes = make([]protoimpl.MessageInfo, 15) - file_accesscontrol_v1beta1_accesscontrol_proto_goTypes = []any{ - (*CreateRoleRequest)(nil), // 0: accesscontrol.v1beta1.CreateRoleRequest - (*CreateRoleResponse)(nil), // 1: accesscontrol.v1beta1.CreateRoleResponse - (*UpdateRoleRequest)(nil), // 2: accesscontrol.v1beta1.UpdateRoleRequest - (*UpdateRoleResponse)(nil), // 3: accesscontrol.v1beta1.UpdateRoleResponse - (*DeleteRoleRequest)(nil), // 4: accesscontrol.v1beta1.DeleteRoleRequest - (*DeleteRoleResponse)(nil), // 5: accesscontrol.v1beta1.DeleteRoleResponse - (*GetRoleRequest)(nil), // 6: accesscontrol.v1beta1.GetRoleRequest - (*GetRoleResponse)(nil), // 7: accesscontrol.v1beta1.GetRoleResponse - (*SetDefaultRoleRequest)(nil), // 8: accesscontrol.v1beta1.SetDefaultRoleRequest - (*SetDefaultRoleResponse)(nil), // 9: accesscontrol.v1beta1.SetDefaultRoleResponse - (*AssignRolesRequest)(nil), // 10: accesscontrol.v1beta1.AssignRolesRequest - (*AssignRolesResponse)(nil), // 11: accesscontrol.v1beta1.AssignRolesResponse - (*ListRolesRequest)(nil), // 12: accesscontrol.v1beta1.ListRolesRequest - (*ListRolesResponse)(nil), // 13: accesscontrol.v1beta1.ListRolesResponse - (*ListRolesResponse_RoleData)(nil), // 14: accesscontrol.v1beta1.ListRolesResponse.RoleData - } -) - +var file_accesscontrol_v1beta1_accesscontrol_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_accesscontrol_v1beta1_accesscontrol_proto_goTypes = []any{ + (*CreateRoleRequest)(nil), // 0: accesscontrol.v1beta1.CreateRoleRequest + (*CreateRoleResponse)(nil), // 1: accesscontrol.v1beta1.CreateRoleResponse + (*UpdateRoleRequest)(nil), // 2: accesscontrol.v1beta1.UpdateRoleRequest + (*UpdateRoleResponse)(nil), // 3: accesscontrol.v1beta1.UpdateRoleResponse + (*DeleteRoleRequest)(nil), // 4: accesscontrol.v1beta1.DeleteRoleRequest + (*DeleteRoleResponse)(nil), // 5: accesscontrol.v1beta1.DeleteRoleResponse + (*GetRoleRequest)(nil), // 6: accesscontrol.v1beta1.GetRoleRequest + (*GetRoleResponse)(nil), // 7: accesscontrol.v1beta1.GetRoleResponse + (*SetDefaultRoleRequest)(nil), // 8: accesscontrol.v1beta1.SetDefaultRoleRequest + (*SetDefaultRoleResponse)(nil), // 9: accesscontrol.v1beta1.SetDefaultRoleResponse + (*AssignRolesRequest)(nil), // 10: accesscontrol.v1beta1.AssignRolesRequest + (*AssignRolesResponse)(nil), // 11: accesscontrol.v1beta1.AssignRolesResponse + (*ListRolesRequest)(nil), // 12: accesscontrol.v1beta1.ListRolesRequest + (*ListRolesResponse)(nil), // 13: accesscontrol.v1beta1.ListRolesResponse + (*ListRolesResponse_RoleData)(nil), // 14: accesscontrol.v1beta1.ListRolesResponse.RoleData +} var file_accesscontrol_v1beta1_accesscontrol_proto_depIdxs = []int32{ 14, // 0: accesscontrol.v1beta1.ListRolesResponse.roles:type_name -> accesscontrol.v1beta1.ListRolesResponse.RoleData 0, // 1: accesscontrol.v1beta1.AccessControlService.CreateRole:input_type -> accesscontrol.v1beta1.CreateRoleRequest diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go b/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go index 8f10784f9d..68e1aeb768 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_AccessControlService_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateRoleRequest @@ -43,6 +41,7 @@ func request_AccessControlService_CreateRole_0(ctx context.Context, marshaler ru msg, err := client.CreateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AccessControlService_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -55,6 +54,7 @@ func local_request_AccessControlService_CreateRole_0(ctx context.Context, marsha msg, err := server.CreateRole(ctx, &protoReq) return msg, metadata, err + } func request_AccessControlService_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -84,6 +84,7 @@ func request_AccessControlService_UpdateRole_0(ctx context.Context, marshaler ru msg, err := client.UpdateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AccessControlService_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,9 +114,12 @@ func local_request_AccessControlService_UpdateRole_0(ctx context.Context, marsha msg, err := server.UpdateRole(ctx, &protoReq) return msg, metadata, err + } -var filter_AccessControlService_DeleteRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"role_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_AccessControlService_DeleteRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"role_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_AccessControlService_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteRoleRequest @@ -147,6 +151,7 @@ func request_AccessControlService_DeleteRole_0(ctx context.Context, marshaler ru msg, err := client.DeleteRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AccessControlService_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -179,6 +184,7 @@ func local_request_AccessControlService_DeleteRole_0(ctx context.Context, marsha msg, err := server.DeleteRole(ctx, &protoReq) return msg, metadata, err + } func request_AccessControlService_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -204,6 +210,7 @@ func request_AccessControlService_GetRole_0(ctx context.Context, marshaler runti msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AccessControlService_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -229,6 +236,7 @@ func local_request_AccessControlService_GetRole_0(ctx context.Context, marshaler msg, err := server.GetRole(ctx, &protoReq) return msg, metadata, err + } func request_AccessControlService_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -237,6 +245,7 @@ func request_AccessControlService_ListRoles_0(ctx context.Context, marshaler run msg, err := client.ListRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AccessControlService_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -245,6 +254,7 @@ func local_request_AccessControlService_ListRoles_0(ctx context.Context, marshal msg, err := server.ListRoles(ctx, &protoReq) return msg, metadata, err + } func request_AccessControlService_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -257,6 +267,7 @@ func request_AccessControlService_AssignRoles_0(ctx context.Context, marshaler r msg, err := client.AssignRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AccessControlService_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -269,6 +280,7 @@ func local_request_AccessControlService_AssignRoles_0(ctx context.Context, marsh msg, err := server.AssignRoles(ctx, &protoReq) return msg, metadata, err + } func request_AccessControlService_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -281,6 +293,7 @@ func request_AccessControlService_SetDefaultRole_0(ctx context.Context, marshale msg, err := client.SetDefaultRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AccessControlService_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -293,6 +306,7 @@ func local_request_AccessControlService_SetDefaultRole_0(ctx context.Context, ma msg, err := server.SetDefaultRole(ctx, &protoReq) return msg, metadata, err + } // RegisterAccessControlServiceHandlerServer registers the http handlers for service AccessControlService to "mux". @@ -301,6 +315,7 @@ func local_request_AccessControlService_SetDefaultRole_0(ctx context.Context, ma // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccessControlServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccessControlServiceServer) error { + mux.Handle("POST", pattern_AccessControlService_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -323,6 +338,7 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_CreateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_AccessControlService_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -347,6 +363,7 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_UpdateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_AccessControlService_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -371,6 +388,7 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_DeleteRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AccessControlService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -395,6 +413,7 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AccessControlService_ListRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -419,6 +438,7 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_ListRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AccessControlService_AssignRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -443,6 +463,7 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_AssignRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AccessControlService_SetDefaultRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -467,6 +488,7 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_SetDefaultRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -509,6 +531,7 @@ func RegisterAccessControlServiceHandler(ctx context.Context, mux *runtime.Serve // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AccessControlServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccessControlServiceClient) error { + mux.Handle("POST", pattern_AccessControlService_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -528,6 +551,7 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_CreateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_AccessControlService_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -549,6 +573,7 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_UpdateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_AccessControlService_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -570,6 +595,7 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_DeleteRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AccessControlService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -591,6 +617,7 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AccessControlService_ListRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -612,6 +639,7 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_ListRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AccessControlService_AssignRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -633,6 +661,7 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_AssignRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AccessControlService_SetDefaultRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -654,6 +683,7 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_SetDefaultRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go b/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go index 583b94b1da..100708f30e 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go @@ -290,6 +290,7 @@ func (m *UpdateRoleRequest) validate(all bool) error { } if m.Title != nil { + if utf8.RuneCountInString(m.GetTitle()) < 1 { err := UpdateRoleRequestValidationError{ field: "Title", @@ -300,6 +301,7 @@ func (m *UpdateRoleRequest) validate(all bool) error { } errors = append(errors, err) } + } if m.Filter != nil { diff --git a/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go b/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go index d35749a17e..9ac384238c 100644 --- a/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go +++ b/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go @@ -8,7 +8,6 @@ package accesscontrolv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -162,27 +161,21 @@ type UnimplementedAccessControlServiceServer struct{} func (UnimplementedAccessControlServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented") } - func (UnimplementedAccessControlServiceServer) UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") } - func (UnimplementedAccessControlServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") } - func (UnimplementedAccessControlServiceServer) GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") } - func (UnimplementedAccessControlServiceServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRoles not implemented") } - func (UnimplementedAccessControlServiceServer) AssignRoles(context.Context, *AssignRolesRequest) (*AssignRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AssignRoles not implemented") } - func (UnimplementedAccessControlServiceServer) SetDefaultRole(context.Context, *SetDefaultRoleRequest) (*SetDefaultRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetDefaultRole not implemented") } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go index 382f7922a2..cb993665cc 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go @@ -60,6 +60,7 @@ AssignRolesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AssignRolesParams struct { + // Body. Body AssignRolesBody @@ -129,6 +130,7 @@ func (o *AssignRolesParams) SetBody(body AssignRolesBody) { // WriteToRequest writes these params to a swagger request func (o *AssignRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go index 5d749c01eb..e1c030914e 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go @@ -103,6 +103,7 @@ func (o *AssignRolesOK) GetPayload() interface{} { } func (o *AssignRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *AssignRolesDefault) GetPayload() *AssignRolesDefaultBody { } func (o *AssignRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AssignRolesDefaultBody) // response payload @@ -189,6 +191,7 @@ AssignRolesBody assign roles body swagger:model AssignRolesBody */ type AssignRolesBody struct { + // role ids RoleIds []int64 `json:"role_ids"` @@ -229,6 +232,7 @@ AssignRolesDefaultBody assign roles default body swagger:model AssignRolesDefaultBody */ type AssignRolesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -294,7 +298,9 @@ func (o *AssignRolesDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -310,6 +316,7 @@ func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -338,6 +345,7 @@ AssignRolesDefaultBodyDetailsItems0 assign roles default body details items0 swagger:model AssignRolesDefaultBodyDetailsItems0 */ type AssignRolesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -349,6 +357,7 @@ type AssignRolesDefaultBodyDetailsItems0 struct { func (o *AssignRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -386,6 +395,7 @@ func (o *AssignRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AssignRolesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go index b938a07958..1bb3460182 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go @@ -60,6 +60,7 @@ CreateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRoleParams struct { + // Body. Body CreateRoleBody @@ -129,6 +130,7 @@ func (o *CreateRoleParams) SetBody(body CreateRoleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go index bd2bed681f..b293e2541f 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go @@ -103,6 +103,7 @@ func (o *CreateRoleOK) GetPayload() *CreateRoleOKBody { } func (o *CreateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRoleOKBody) // response payload @@ -176,6 +177,7 @@ func (o *CreateRoleDefault) GetPayload() *CreateRoleDefaultBody { } func (o *CreateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRoleDefaultBody) // response payload @@ -191,6 +193,7 @@ CreateRoleBody create role body swagger:model CreateRoleBody */ type CreateRoleBody struct { + // title Title string `json:"title,omitempty"` @@ -234,6 +237,7 @@ CreateRoleDefaultBody create role default body swagger:model CreateRoleDefaultBody */ type CreateRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -299,7 +303,9 @@ func (o *CreateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -315,6 +321,7 @@ func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -343,6 +350,7 @@ CreateRoleDefaultBodyDetailsItems0 create role default body details items0 swagger:model CreateRoleDefaultBodyDetailsItems0 */ type CreateRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -354,6 +362,7 @@ type CreateRoleDefaultBodyDetailsItems0 struct { func (o *CreateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -391,6 +400,7 @@ func (o *CreateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -454,6 +464,7 @@ CreateRoleOKBody create role OK body swagger:model CreateRoleOKBody */ type CreateRoleOKBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go index 7e502e8dcd..0b1b7b1af7 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go @@ -61,6 +61,7 @@ DeleteRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteRoleParams struct { + /* ReplacementRoleID. Role ID to be used as a replacement for the role. Additional logic applies. @@ -151,6 +152,7 @@ func (o *DeleteRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -166,6 +168,7 @@ func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qReplacementRoleID := swag.FormatInt64(qrReplacementRoleID) if qReplacementRoleID != "" { + if err := r.SetQueryParam("replacement_role_id", qReplacementRoleID); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go index 89f7242b79..a934b67811 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go @@ -103,6 +103,7 @@ func (o *DeleteRoleOK) GetPayload() interface{} { } func (o *DeleteRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *DeleteRoleDefault) GetPayload() *DeleteRoleDefaultBody { } func (o *DeleteRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteRoleDefaultBody) // response payload @@ -189,6 +191,7 @@ DeleteRoleDefaultBody delete role default body swagger:model DeleteRoleDefaultBody */ type DeleteRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *DeleteRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -298,6 +304,7 @@ DeleteRoleDefaultBodyDetailsItems0 delete role default body details items0 swagger:model DeleteRoleDefaultBodyDetailsItems0 */ type DeleteRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type DeleteRoleDefaultBodyDetailsItems0 struct { func (o *DeleteRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *DeleteRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go index 31a018c004..609e5c621e 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go @@ -61,6 +61,7 @@ GetRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetRoleParams struct { + // RoleID. // // Format: int64 @@ -132,6 +133,7 @@ func (o *GetRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *GetRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go index 5dbc75feaa..d8e70b22b6 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go @@ -103,6 +103,7 @@ func (o *GetRoleOK) GetPayload() *GetRoleOKBody { } func (o *GetRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetRoleOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetRoleDefault) GetPayload() *GetRoleDefaultBody { } func (o *GetRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetRoleDefaultBody) // response payload @@ -191,6 +193,7 @@ GetRoleDefaultBody get role default body swagger:model GetRoleDefaultBody */ type GetRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetRoleDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -300,6 +306,7 @@ GetRoleDefaultBodyDetailsItems0 get role default body details items0 swagger:model GetRoleDefaultBodyDetailsItems0 */ type GetRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetRoleDefaultBodyDetailsItems0 struct { func (o *GetRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetRoleOKBody get role OK body swagger:model GetRoleOKBody */ type GetRoleOKBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go index 0fb513e0af..2d886057c5 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go @@ -115,6 +115,7 @@ func (o *ListRolesParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go index 114b44f570..0df2f353a8 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go @@ -103,6 +103,7 @@ func (o *ListRolesOK) GetPayload() *ListRolesOKBody { } func (o *ListRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRolesOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ListRolesDefault) GetPayload() *ListRolesDefaultBody { } func (o *ListRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRolesDefaultBody) // response payload @@ -191,6 +193,7 @@ ListRolesDefaultBody list roles default body swagger:model ListRolesDefaultBody */ type ListRolesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *ListRolesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -300,6 +306,7 @@ ListRolesDefaultBodyDetailsItems0 list roles default body details items0 swagger:model ListRolesDefaultBodyDetailsItems0 */ type ListRolesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type ListRolesDefaultBodyDetailsItems0 struct { func (o *ListRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *ListRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListRolesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ ListRolesOKBody list roles OK body swagger:model ListRolesOKBody */ type ListRolesOKBody struct { + // roles Roles []*ListRolesOKBodyRolesItems0 `json:"roles"` } @@ -470,7 +480,9 @@ func (o *ListRolesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Roles); i++ { + if o.Roles[i] != nil { if swag.IsZero(o.Roles[i]) { // not required @@ -486,6 +498,7 @@ func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strf return err } } + } return nil @@ -514,6 +527,7 @@ ListRolesOKBodyRolesItems0 list roles OK body roles items0 swagger:model ListRolesOKBodyRolesItems0 */ type ListRolesOKBodyRolesItems0 struct { + // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go index 516a1543b1..858d855c7e 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go @@ -60,6 +60,7 @@ SetDefaultRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SetDefaultRoleParams struct { + // Body. Body SetDefaultRoleBody @@ -129,6 +130,7 @@ func (o *SetDefaultRoleParams) SetBody(body SetDefaultRoleBody) { // WriteToRequest writes these params to a swagger request func (o *SetDefaultRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go index b22481f772..3202b505f5 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go @@ -103,6 +103,7 @@ func (o *SetDefaultRoleOK) GetPayload() interface{} { } func (o *SetDefaultRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *SetDefaultRoleDefault) GetPayload() *SetDefaultRoleDefaultBody { } func (o *SetDefaultRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SetDefaultRoleDefaultBody) // response payload @@ -189,6 +191,7 @@ SetDefaultRoleBody set default role body swagger:model SetDefaultRoleBody */ type SetDefaultRoleBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` } @@ -226,6 +229,7 @@ SetDefaultRoleDefaultBody set default role default body swagger:model SetDefaultRoleDefaultBody */ type SetDefaultRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +295,9 @@ func (o *SetDefaultRoleDefaultBody) ContextValidate(ctx context.Context, formats } func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -307,6 +313,7 @@ func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -335,6 +342,7 @@ SetDefaultRoleDefaultBodyDetailsItems0 set default role default body details ite swagger:model SetDefaultRoleDefaultBodyDetailsItems0 */ type SetDefaultRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -346,6 +354,7 @@ type SetDefaultRoleDefaultBodyDetailsItems0 struct { func (o *SetDefaultRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -383,6 +392,7 @@ func (o *SetDefaultRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o SetDefaultRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go index c5724145e1..234a65456d 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go @@ -61,6 +61,7 @@ UpdateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateRoleParams struct { + // Body. Body UpdateRoleBody @@ -146,6 +147,7 @@ func (o *UpdateRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *UpdateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go index 3ef93cd3af..8140eb548f 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go @@ -103,6 +103,7 @@ func (o *UpdateRoleOK) GetPayload() interface{} { } func (o *UpdateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *UpdateRoleDefault) GetPayload() *UpdateRoleDefaultBody { } func (o *UpdateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateRoleDefaultBody) // response payload @@ -189,6 +191,7 @@ UpdateRoleBody update role body swagger:model UpdateRoleBody */ type UpdateRoleBody struct { + // title Title *string `json:"title,omitempty"` @@ -232,6 +235,7 @@ UpdateRoleDefaultBody update role default body swagger:model UpdateRoleDefaultBody */ type UpdateRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -297,7 +301,9 @@ func (o *UpdateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,6 +319,7 @@ func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -341,6 +348,7 @@ UpdateRoleDefaultBodyDetailsItems0 update role default body details items0 swagger:model UpdateRoleDefaultBodyDetailsItems0 */ type UpdateRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -352,6 +360,7 @@ type UpdateRoleDefaultBodyDetailsItems0 struct { func (o *UpdateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -389,6 +398,7 @@ func (o *UpdateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/actions/v1/actions.pb.go b/api/actions/v1/actions.pb.go index 74abcba4fb..901ea2b681 100644 --- a/api/actions/v1/actions.pb.go +++ b/api/actions/v1/actions.pb.go @@ -7,14 +7,13 @@ package actionsv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -2861,46 +2860,43 @@ func file_actions_v1_actions_proto_rawDescGZIP() []byte { return file_actions_v1_actions_proto_rawDescData } -var ( - file_actions_v1_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_actions_v1_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 32) - file_actions_v1_actions_proto_goTypes = []any{ - (ActionType)(0), // 0: actions.v1.ActionType - (*GetActionRequest)(nil), // 1: actions.v1.GetActionRequest - (*GetActionResponse)(nil), // 2: actions.v1.GetActionResponse - (*StartMySQLExplainActionParams)(nil), // 3: actions.v1.StartMySQLExplainActionParams - (*StartMySQLExplainActionResult)(nil), // 4: actions.v1.StartMySQLExplainActionResult - (*StartMySQLExplainJSONActionParams)(nil), // 5: actions.v1.StartMySQLExplainJSONActionParams - (*StartMySQLExplainJSONActionResult)(nil), // 6: actions.v1.StartMySQLExplainJSONActionResult - (*StartMySQLExplainTraditionalJSONActionParams)(nil), // 7: actions.v1.StartMySQLExplainTraditionalJSONActionParams - (*StartMySQLExplainTraditionalJSONActionResult)(nil), // 8: actions.v1.StartMySQLExplainTraditionalJSONActionResult - (*StartMySQLShowCreateTableActionParams)(nil), // 9: actions.v1.StartMySQLShowCreateTableActionParams - (*StartMySQLShowCreateTableActionResult)(nil), // 10: actions.v1.StartMySQLShowCreateTableActionResult - (*StartMySQLShowTableStatusActionParams)(nil), // 11: actions.v1.StartMySQLShowTableStatusActionParams - (*StartMySQLShowTableStatusActionResult)(nil), // 12: actions.v1.StartMySQLShowTableStatusActionResult - (*StartMySQLShowIndexActionParams)(nil), // 13: actions.v1.StartMySQLShowIndexActionParams - (*StartMySQLShowIndexActionResult)(nil), // 14: actions.v1.StartMySQLShowIndexActionResult - (*StartPostgreSQLShowCreateTableActionParams)(nil), // 15: actions.v1.StartPostgreSQLShowCreateTableActionParams - (*StartPostgreSQLShowCreateTableActionResult)(nil), // 16: actions.v1.StartPostgreSQLShowCreateTableActionResult - (*StartPostgreSQLShowIndexActionParams)(nil), // 17: actions.v1.StartPostgreSQLShowIndexActionParams - (*StartPostgreSQLShowIndexActionResult)(nil), // 18: actions.v1.StartPostgreSQLShowIndexActionResult - (*StartMongoDBExplainActionParams)(nil), // 19: actions.v1.StartMongoDBExplainActionParams - (*StartMongoDBExplainActionResult)(nil), // 20: actions.v1.StartMongoDBExplainActionResult - (*StartPTPgSummaryActionParams)(nil), // 21: actions.v1.StartPTPgSummaryActionParams - (*StartPTPgSummaryActionResult)(nil), // 22: actions.v1.StartPTPgSummaryActionResult - (*StartPTMongoDBSummaryActionParams)(nil), // 23: actions.v1.StartPTMongoDBSummaryActionParams - (*StartPTMongoDBSummaryActionResult)(nil), // 24: actions.v1.StartPTMongoDBSummaryActionResult - (*StartPTMySQLSummaryActionParams)(nil), // 25: actions.v1.StartPTMySQLSummaryActionParams - (*StartPTMySQLSummaryActionResult)(nil), // 26: actions.v1.StartPTMySQLSummaryActionResult - (*StartPTSummaryActionRequest)(nil), // 27: actions.v1.StartPTSummaryActionRequest - (*StartPTSummaryActionResponse)(nil), // 28: actions.v1.StartPTSummaryActionResponse - (*CancelActionRequest)(nil), // 29: actions.v1.CancelActionRequest - (*CancelActionResponse)(nil), // 30: actions.v1.CancelActionResponse - (*StartServiceActionRequest)(nil), // 31: actions.v1.StartServiceActionRequest - (*StartServiceActionResponse)(nil), // 32: actions.v1.StartServiceActionResponse - } -) - +var file_actions_v1_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_actions_v1_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_actions_v1_actions_proto_goTypes = []any{ + (ActionType)(0), // 0: actions.v1.ActionType + (*GetActionRequest)(nil), // 1: actions.v1.GetActionRequest + (*GetActionResponse)(nil), // 2: actions.v1.GetActionResponse + (*StartMySQLExplainActionParams)(nil), // 3: actions.v1.StartMySQLExplainActionParams + (*StartMySQLExplainActionResult)(nil), // 4: actions.v1.StartMySQLExplainActionResult + (*StartMySQLExplainJSONActionParams)(nil), // 5: actions.v1.StartMySQLExplainJSONActionParams + (*StartMySQLExplainJSONActionResult)(nil), // 6: actions.v1.StartMySQLExplainJSONActionResult + (*StartMySQLExplainTraditionalJSONActionParams)(nil), // 7: actions.v1.StartMySQLExplainTraditionalJSONActionParams + (*StartMySQLExplainTraditionalJSONActionResult)(nil), // 8: actions.v1.StartMySQLExplainTraditionalJSONActionResult + (*StartMySQLShowCreateTableActionParams)(nil), // 9: actions.v1.StartMySQLShowCreateTableActionParams + (*StartMySQLShowCreateTableActionResult)(nil), // 10: actions.v1.StartMySQLShowCreateTableActionResult + (*StartMySQLShowTableStatusActionParams)(nil), // 11: actions.v1.StartMySQLShowTableStatusActionParams + (*StartMySQLShowTableStatusActionResult)(nil), // 12: actions.v1.StartMySQLShowTableStatusActionResult + (*StartMySQLShowIndexActionParams)(nil), // 13: actions.v1.StartMySQLShowIndexActionParams + (*StartMySQLShowIndexActionResult)(nil), // 14: actions.v1.StartMySQLShowIndexActionResult + (*StartPostgreSQLShowCreateTableActionParams)(nil), // 15: actions.v1.StartPostgreSQLShowCreateTableActionParams + (*StartPostgreSQLShowCreateTableActionResult)(nil), // 16: actions.v1.StartPostgreSQLShowCreateTableActionResult + (*StartPostgreSQLShowIndexActionParams)(nil), // 17: actions.v1.StartPostgreSQLShowIndexActionParams + (*StartPostgreSQLShowIndexActionResult)(nil), // 18: actions.v1.StartPostgreSQLShowIndexActionResult + (*StartMongoDBExplainActionParams)(nil), // 19: actions.v1.StartMongoDBExplainActionParams + (*StartMongoDBExplainActionResult)(nil), // 20: actions.v1.StartMongoDBExplainActionResult + (*StartPTPgSummaryActionParams)(nil), // 21: actions.v1.StartPTPgSummaryActionParams + (*StartPTPgSummaryActionResult)(nil), // 22: actions.v1.StartPTPgSummaryActionResult + (*StartPTMongoDBSummaryActionParams)(nil), // 23: actions.v1.StartPTMongoDBSummaryActionParams + (*StartPTMongoDBSummaryActionResult)(nil), // 24: actions.v1.StartPTMongoDBSummaryActionResult + (*StartPTMySQLSummaryActionParams)(nil), // 25: actions.v1.StartPTMySQLSummaryActionParams + (*StartPTMySQLSummaryActionResult)(nil), // 26: actions.v1.StartPTMySQLSummaryActionResult + (*StartPTSummaryActionRequest)(nil), // 27: actions.v1.StartPTSummaryActionRequest + (*StartPTSummaryActionResponse)(nil), // 28: actions.v1.StartPTSummaryActionResponse + (*CancelActionRequest)(nil), // 29: actions.v1.CancelActionRequest + (*CancelActionResponse)(nil), // 30: actions.v1.CancelActionResponse + (*StartServiceActionRequest)(nil), // 31: actions.v1.StartServiceActionRequest + (*StartServiceActionResponse)(nil), // 32: actions.v1.StartServiceActionResponse +} var file_actions_v1_actions_proto_depIdxs = []int32{ 3, // 0: actions.v1.StartServiceActionRequest.mysql_explain:type_name -> actions.v1.StartMySQLExplainActionParams 5, // 1: actions.v1.StartServiceActionRequest.mysql_explain_json:type_name -> actions.v1.StartMySQLExplainJSONActionParams diff --git a/api/actions/v1/actions.pb.gw.go b/api/actions/v1/actions.pb.gw.go index c84fd58bf9..4651dc6ff1 100644 --- a/api/actions/v1/actions.pb.gw.go +++ b/api/actions/v1/actions.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_ActionsService_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetActionRequest @@ -56,6 +54,7 @@ func request_ActionsService_GetAction_0(ctx context.Context, marshaler runtime.M msg, err := client.GetAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ActionsService_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -81,6 +80,7 @@ func local_request_ActionsService_GetAction_0(ctx context.Context, marshaler run msg, err := server.GetAction(ctx, &protoReq) return msg, metadata, err + } func request_ActionsService_StartServiceAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -93,6 +93,7 @@ func request_ActionsService_StartServiceAction_0(ctx context.Context, marshaler msg, err := client.StartServiceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ActionsService_StartServiceAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -105,6 +106,7 @@ func local_request_ActionsService_StartServiceAction_0(ctx context.Context, mars msg, err := server.StartServiceAction(ctx, &protoReq) return msg, metadata, err + } func request_ActionsService_StartPTSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -117,6 +119,7 @@ func request_ActionsService_StartPTSummaryAction_0(ctx context.Context, marshale msg, err := client.StartPTSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ActionsService_StartPTSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -129,6 +132,7 @@ func local_request_ActionsService_StartPTSummaryAction_0(ctx context.Context, ma msg, err := server.StartPTSummaryAction(ctx, &protoReq) return msg, metadata, err + } func request_ActionsService_CancelAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -141,6 +145,7 @@ func request_ActionsService_CancelAction_0(ctx context.Context, marshaler runtim msg, err := client.CancelAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ActionsService_CancelAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -153,6 +158,7 @@ func local_request_ActionsService_CancelAction_0(ctx context.Context, marshaler msg, err := server.CancelAction(ctx, &protoReq) return msg, metadata, err + } // RegisterActionsServiceHandlerServer registers the http handlers for service ActionsService to "mux". @@ -161,6 +167,7 @@ func local_request_ActionsService_CancelAction_0(ctx context.Context, marshaler // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterActionsServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ActionsServiceServer) error { + mux.Handle("GET", pattern_ActionsService_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -183,6 +190,7 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_ActionsService_GetAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ActionsService_StartServiceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -207,6 +215,7 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_ActionsService_StartServiceAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ActionsService_StartPTSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -231,6 +240,7 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_ActionsService_StartPTSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ActionsService_CancelAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -255,6 +265,7 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_ActionsService_CancelAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -297,6 +308,7 @@ func RegisterActionsServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ActionsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ActionsServiceClient) error { + mux.Handle("GET", pattern_ActionsService_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -316,6 +328,7 @@ func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_ActionsService_GetAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ActionsService_StartServiceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -337,6 +350,7 @@ func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_ActionsService_StartServiceAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ActionsService_StartPTSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -358,6 +372,7 @@ func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_ActionsService_StartPTSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ActionsService_CancelAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -379,6 +394,7 @@ func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_ActionsService_CancelAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/actions/v1/actions_grpc.pb.go b/api/actions/v1/actions_grpc.pb.go index e540a425a3..980d161a39 100644 --- a/api/actions/v1/actions_grpc.pb.go +++ b/api/actions/v1/actions_grpc.pb.go @@ -8,7 +8,6 @@ package actionsv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -117,15 +116,12 @@ type UnimplementedActionsServiceServer struct{} func (UnimplementedActionsServiceServer) GetAction(context.Context, *GetActionRequest) (*GetActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAction not implemented") } - func (UnimplementedActionsServiceServer) StartServiceAction(context.Context, *StartServiceActionRequest) (*StartServiceActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartServiceAction not implemented") } - func (UnimplementedActionsServiceServer) StartPTSummaryAction(context.Context, *StartPTSummaryActionRequest) (*StartPTSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTSummaryAction not implemented") } - func (UnimplementedActionsServiceServer) CancelAction(context.Context, *CancelActionRequest) (*CancelActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelAction not implemented") } diff --git a/api/actions/v1/json/client/actions_service/cancel_action_parameters.go b/api/actions/v1/json/client/actions_service/cancel_action_parameters.go index 6348e7d94e..212f1d60d2 100644 --- a/api/actions/v1/json/client/actions_service/cancel_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/cancel_action_parameters.go @@ -60,6 +60,7 @@ CancelActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CancelActionParams struct { + // Body. Body CancelActionBody @@ -129,6 +130,7 @@ func (o *CancelActionParams) SetBody(body CancelActionBody) { // WriteToRequest writes these params to a swagger request func (o *CancelActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/cancel_action_responses.go b/api/actions/v1/json/client/actions_service/cancel_action_responses.go index 0ab037b9b1..93a520101d 100644 --- a/api/actions/v1/json/client/actions_service/cancel_action_responses.go +++ b/api/actions/v1/json/client/actions_service/cancel_action_responses.go @@ -103,6 +103,7 @@ func (o *CancelActionOK) GetPayload() interface{} { } func (o *CancelActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *CancelActionDefault) GetPayload() *CancelActionDefaultBody { } func (o *CancelActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CancelActionDefaultBody) // response payload @@ -189,6 +191,7 @@ CancelActionBody cancel action body swagger:model CancelActionBody */ type CancelActionBody struct { + // Unique Action ID. Required. ActionID string `json:"action_id,omitempty"` } @@ -226,6 +229,7 @@ CancelActionDefaultBody cancel action default body swagger:model CancelActionDefaultBody */ type CancelActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +295,9 @@ func (o *CancelActionDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -307,6 +313,7 @@ func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -335,6 +342,7 @@ CancelActionDefaultBodyDetailsItems0 cancel action default body details items0 swagger:model CancelActionDefaultBodyDetailsItems0 */ type CancelActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -346,6 +354,7 @@ type CancelActionDefaultBodyDetailsItems0 struct { func (o *CancelActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -383,6 +392,7 @@ func (o *CancelActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o CancelActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/actions/v1/json/client/actions_service/get_action_parameters.go b/api/actions/v1/json/client/actions_service/get_action_parameters.go index 260fc6822b..6b0d82f9ee 100644 --- a/api/actions/v1/json/client/actions_service/get_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/get_action_parameters.go @@ -60,6 +60,7 @@ GetActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetActionParams struct { + /* ActionID. Unique Action ID. @@ -132,6 +133,7 @@ func (o *GetActionParams) SetActionID(actionID string) { // WriteToRequest writes these params to a swagger request func (o *GetActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/get_action_responses.go b/api/actions/v1/json/client/actions_service/get_action_responses.go index d6f93f8c90..abccf2b5ef 100644 --- a/api/actions/v1/json/client/actions_service/get_action_responses.go +++ b/api/actions/v1/json/client/actions_service/get_action_responses.go @@ -103,6 +103,7 @@ func (o *GetActionOK) GetPayload() *GetActionOKBody { } func (o *GetActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetActionOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetActionDefault) GetPayload() *GetActionDefaultBody { } func (o *GetActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetActionDefaultBody) // response payload @@ -191,6 +193,7 @@ GetActionDefaultBody get action default body swagger:model GetActionDefaultBody */ type GetActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetActionDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -300,6 +306,7 @@ GetActionDefaultBodyDetailsItems0 get action default body details items0 swagger:model GetActionDefaultBodyDetailsItems0 */ type GetActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetActionDefaultBodyDetailsItems0 struct { func (o *GetActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetActionOKBody get action OK body swagger:model GetActionOKBody */ type GetActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go b/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go index 968ef894f1..5b8ccd3118 100644 --- a/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go @@ -60,6 +60,7 @@ StartPTSummaryActionParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type StartPTSummaryActionParams struct { + // Body. Body StartPTSummaryActionBody @@ -129,6 +130,7 @@ func (o *StartPTSummaryActionParams) SetBody(body StartPTSummaryActionBody) { // WriteToRequest writes these params to a swagger request func (o *StartPTSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go b/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go index 654358c52b..d37b4d299d 100644 --- a/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go +++ b/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go @@ -103,6 +103,7 @@ func (o *StartPTSummaryActionOK) GetPayload() *StartPTSummaryActionOKBody { } func (o *StartPTSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTSummaryActionOKBody) // response payload @@ -176,6 +177,7 @@ func (o *StartPTSummaryActionDefault) GetPayload() *StartPTSummaryActionDefaultB } func (o *StartPTSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTSummaryActionDefaultBody) // response payload @@ -191,6 +193,7 @@ StartPTSummaryActionBody start PT summary action body swagger:model StartPTSummaryActionBody */ type StartPTSummaryActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -231,6 +234,7 @@ StartPTSummaryActionDefaultBody start PT summary action default body swagger:model StartPTSummaryActionDefaultBody */ type StartPTSummaryActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *StartPTSummaryActionDefaultBody) ContextValidate(ctx context.Context, f } func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -312,6 +318,7 @@ func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -340,6 +347,7 @@ StartPTSummaryActionDefaultBodyDetailsItems0 start PT summary action default bod swagger:model StartPTSummaryActionDefaultBodyDetailsItems0 */ type StartPTSummaryActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -351,6 +359,7 @@ type StartPTSummaryActionDefaultBodyDetailsItems0 struct { func (o *StartPTSummaryActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -388,6 +397,7 @@ func (o *StartPTSummaryActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte // MarshalJSON marshals this object with additional properties into a JSON object func (o StartPTSummaryActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -451,6 +461,7 @@ StartPTSummaryActionOKBody start PT summary action OK body swagger:model StartPTSummaryActionOKBody */ type StartPTSummaryActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/actions/v1/json/client/actions_service/start_service_action_parameters.go b/api/actions/v1/json/client/actions_service/start_service_action_parameters.go index efc1acb5eb..9aa53446c0 100644 --- a/api/actions/v1/json/client/actions_service/start_service_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/start_service_action_parameters.go @@ -60,6 +60,7 @@ StartServiceActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartServiceActionParams struct { + // Body. Body StartServiceActionBody @@ -129,6 +130,7 @@ func (o *StartServiceActionParams) SetBody(body StartServiceActionBody) { // WriteToRequest writes these params to a swagger request func (o *StartServiceActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/start_service_action_responses.go b/api/actions/v1/json/client/actions_service/start_service_action_responses.go index 812ae79151..c9760fa49d 100644 --- a/api/actions/v1/json/client/actions_service/start_service_action_responses.go +++ b/api/actions/v1/json/client/actions_service/start_service_action_responses.go @@ -103,6 +103,7 @@ func (o *StartServiceActionOK) GetPayload() *StartServiceActionOKBody { } func (o *StartServiceActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartServiceActionOKBody) // response payload @@ -176,6 +177,7 @@ func (o *StartServiceActionDefault) GetPayload() *StartServiceActionDefaultBody } func (o *StartServiceActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartServiceActionDefaultBody) // response payload @@ -191,6 +193,7 @@ StartServiceActionBody start service action body swagger:model StartServiceActionBody */ type StartServiceActionBody struct { + // mongodb explain MongodbExplain *StartServiceActionParamsBodyMongodbExplain `json:"mongodb_explain,omitempty"` @@ -573,6 +576,7 @@ func (o *StartServiceActionBody) ContextValidate(ctx context.Context, formats st } func (o *StartServiceActionBody) contextValidateMongodbExplain(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExplain != nil { if swag.IsZero(o.MongodbExplain) { // not required @@ -593,6 +597,7 @@ func (o *StartServiceActionBody) contextValidateMongodbExplain(ctx context.Conte } func (o *StartServiceActionBody) contextValidateMysqlExplain(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplain != nil { if swag.IsZero(o.MysqlExplain) { // not required @@ -613,6 +618,7 @@ func (o *StartServiceActionBody) contextValidateMysqlExplain(ctx context.Context } func (o *StartServiceActionBody) contextValidateMysqlExplainJSON(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplainJSON != nil { if swag.IsZero(o.MysqlExplainJSON) { // not required @@ -633,6 +639,7 @@ func (o *StartServiceActionBody) contextValidateMysqlExplainJSON(ctx context.Con } func (o *StartServiceActionBody) contextValidateMysqlExplainTraditionalJSON(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplainTraditionalJSON != nil { if swag.IsZero(o.MysqlExplainTraditionalJSON) { // not required @@ -653,6 +660,7 @@ func (o *StartServiceActionBody) contextValidateMysqlExplainTraditionalJSON(ctx } func (o *StartServiceActionBody) contextValidateMysqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowCreateTable != nil { if swag.IsZero(o.MysqlShowCreateTable) { // not required @@ -673,6 +681,7 @@ func (o *StartServiceActionBody) contextValidateMysqlShowCreateTable(ctx context } func (o *StartServiceActionBody) contextValidateMysqlShowIndex(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowIndex != nil { if swag.IsZero(o.MysqlShowIndex) { // not required @@ -693,6 +702,7 @@ func (o *StartServiceActionBody) contextValidateMysqlShowIndex(ctx context.Conte } func (o *StartServiceActionBody) contextValidateMysqlShowTableStatus(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowTableStatus != nil { if swag.IsZero(o.MysqlShowTableStatus) { // not required @@ -713,6 +723,7 @@ func (o *StartServiceActionBody) contextValidateMysqlShowTableStatus(ctx context } func (o *StartServiceActionBody) contextValidatePostgresShowCreateTable(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresShowCreateTable != nil { if swag.IsZero(o.PostgresShowCreateTable) { // not required @@ -733,6 +744,7 @@ func (o *StartServiceActionBody) contextValidatePostgresShowCreateTable(ctx cont } func (o *StartServiceActionBody) contextValidatePostgresShowIndex(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresShowIndex != nil { if swag.IsZero(o.PostgresShowIndex) { // not required @@ -753,6 +765,7 @@ func (o *StartServiceActionBody) contextValidatePostgresShowIndex(ctx context.Co } func (o *StartServiceActionBody) contextValidatePTMongodbSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTMongodbSummary != nil { if swag.IsZero(o.PTMongodbSummary) { // not required @@ -773,6 +786,7 @@ func (o *StartServiceActionBody) contextValidatePTMongodbSummary(ctx context.Con } func (o *StartServiceActionBody) contextValidatePTMysqlSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTMysqlSummary != nil { if swag.IsZero(o.PTMysqlSummary) { // not required @@ -793,6 +807,7 @@ func (o *StartServiceActionBody) contextValidatePTMysqlSummary(ctx context.Conte } func (o *StartServiceActionBody) contextValidatePTPostgresSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTPostgresSummary != nil { if swag.IsZero(o.PTPostgresSummary) { // not required @@ -835,6 +850,7 @@ StartServiceActionDefaultBody start service action default body swagger:model StartServiceActionDefaultBody */ type StartServiceActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -900,7 +916,9 @@ func (o *StartServiceActionDefaultBody) ContextValidate(ctx context.Context, for } func (o *StartServiceActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -916,6 +934,7 @@ func (o *StartServiceActionDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -944,6 +963,7 @@ StartServiceActionDefaultBodyDetailsItems0 start service action default body det swagger:model StartServiceActionDefaultBodyDetailsItems0 */ type StartServiceActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -955,6 +975,7 @@ type StartServiceActionDefaultBodyDetailsItems0 struct { func (o *StartServiceActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -992,6 +1013,7 @@ func (o *StartServiceActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o StartServiceActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1055,6 +1077,7 @@ StartServiceActionOKBody start service action OK body swagger:model StartServiceActionOKBody */ type StartServiceActionOKBody struct { + // mongodb explain MongodbExplain *StartServiceActionOKBodyMongodbExplain `json:"mongodb_explain,omitempty"` @@ -1437,6 +1460,7 @@ func (o *StartServiceActionOKBody) ContextValidate(ctx context.Context, formats } func (o *StartServiceActionOKBody) contextValidateMongodbExplain(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExplain != nil { if swag.IsZero(o.MongodbExplain) { // not required @@ -1457,6 +1481,7 @@ func (o *StartServiceActionOKBody) contextValidateMongodbExplain(ctx context.Con } func (o *StartServiceActionOKBody) contextValidateMysqlExplain(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplain != nil { if swag.IsZero(o.MysqlExplain) { // not required @@ -1477,6 +1502,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplain(ctx context.Conte } func (o *StartServiceActionOKBody) contextValidateMysqlExplainJSON(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplainJSON != nil { if swag.IsZero(o.MysqlExplainJSON) { // not required @@ -1497,6 +1523,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplainJSON(ctx context.C } func (o *StartServiceActionOKBody) contextValidateMysqlExplainTraditionalJSON(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplainTraditionalJSON != nil { if swag.IsZero(o.MysqlExplainTraditionalJSON) { // not required @@ -1517,6 +1544,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplainTraditionalJSON(ct } func (o *StartServiceActionOKBody) contextValidateMysqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowCreateTable != nil { if swag.IsZero(o.MysqlShowCreateTable) { // not required @@ -1537,6 +1565,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowCreateTable(ctx conte } func (o *StartServiceActionOKBody) contextValidateMysqlShowIndex(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowIndex != nil { if swag.IsZero(o.MysqlShowIndex) { // not required @@ -1557,6 +1586,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowIndex(ctx context.Con } func (o *StartServiceActionOKBody) contextValidateMysqlShowTableStatus(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowTableStatus != nil { if swag.IsZero(o.MysqlShowTableStatus) { // not required @@ -1577,6 +1607,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowTableStatus(ctx conte } func (o *StartServiceActionOKBody) contextValidatePostgresqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlShowCreateTable != nil { if swag.IsZero(o.PostgresqlShowCreateTable) { // not required @@ -1597,6 +1628,7 @@ func (o *StartServiceActionOKBody) contextValidatePostgresqlShowCreateTable(ctx } func (o *StartServiceActionOKBody) contextValidatePostgresqlShowIndex(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlShowIndex != nil { if swag.IsZero(o.PostgresqlShowIndex) { // not required @@ -1617,6 +1649,7 @@ func (o *StartServiceActionOKBody) contextValidatePostgresqlShowIndex(ctx contex } func (o *StartServiceActionOKBody) contextValidatePTMongodbSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTMongodbSummary != nil { if swag.IsZero(o.PTMongodbSummary) { // not required @@ -1637,6 +1670,7 @@ func (o *StartServiceActionOKBody) contextValidatePTMongodbSummary(ctx context.C } func (o *StartServiceActionOKBody) contextValidatePTMysqlSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTMysqlSummary != nil { if swag.IsZero(o.PTMysqlSummary) { // not required @@ -1657,6 +1691,7 @@ func (o *StartServiceActionOKBody) contextValidatePTMysqlSummary(ctx context.Con } func (o *StartServiceActionOKBody) contextValidatePTPostgresSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTPostgresSummary != nil { if swag.IsZero(o.PTPostgresSummary) { // not required @@ -1699,6 +1734,7 @@ StartServiceActionOKBodyMongodbExplain start service action OK body mongodb expl swagger:model StartServiceActionOKBodyMongodbExplain */ type StartServiceActionOKBodyMongodbExplain struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1739,6 +1775,7 @@ StartServiceActionOKBodyMysqlExplain start service action OK body mysql explain swagger:model StartServiceActionOKBodyMysqlExplain */ type StartServiceActionOKBodyMysqlExplain struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1779,6 +1816,7 @@ StartServiceActionOKBodyMysqlExplainJSON start service action OK body mysql expl swagger:model StartServiceActionOKBodyMysqlExplainJSON */ type StartServiceActionOKBodyMysqlExplainJSON struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1819,6 +1857,7 @@ StartServiceActionOKBodyMysqlExplainTraditionalJSON start service action OK body swagger:model StartServiceActionOKBodyMysqlExplainTraditionalJSON */ type StartServiceActionOKBodyMysqlExplainTraditionalJSON struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1859,6 +1898,7 @@ StartServiceActionOKBodyMysqlShowCreateTable start service action OK body mysql swagger:model StartServiceActionOKBodyMysqlShowCreateTable */ type StartServiceActionOKBodyMysqlShowCreateTable struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1899,6 +1939,7 @@ StartServiceActionOKBodyMysqlShowIndex start service action OK body mysql show i swagger:model StartServiceActionOKBodyMysqlShowIndex */ type StartServiceActionOKBodyMysqlShowIndex struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1939,6 +1980,7 @@ StartServiceActionOKBodyMysqlShowTableStatus start service action OK body mysql swagger:model StartServiceActionOKBodyMysqlShowTableStatus */ type StartServiceActionOKBodyMysqlShowTableStatus struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1979,6 +2021,7 @@ StartServiceActionOKBodyPTMongodbSummary Message to retrieve the prepared pt-mon swagger:model StartServiceActionOKBodyPTMongodbSummary */ type StartServiceActionOKBodyPTMongodbSummary struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2019,6 +2062,7 @@ StartServiceActionOKBodyPTMysqlSummary Message to retrieve the prepared pt-mysql swagger:model StartServiceActionOKBodyPTMysqlSummary */ type StartServiceActionOKBodyPTMysqlSummary struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2059,6 +2103,7 @@ StartServiceActionOKBodyPTPostgresSummary Message to retrieve the prepared pt-pg swagger:model StartServiceActionOKBodyPTPostgresSummary */ type StartServiceActionOKBodyPTPostgresSummary struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2099,6 +2144,7 @@ StartServiceActionOKBodyPostgresqlShowCreateTable start service action OK body p swagger:model StartServiceActionOKBodyPostgresqlShowCreateTable */ type StartServiceActionOKBodyPostgresqlShowCreateTable struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2139,6 +2185,7 @@ StartServiceActionOKBodyPostgresqlShowIndex start service action OK body postgre swagger:model StartServiceActionOKBodyPostgresqlShowIndex */ type StartServiceActionOKBodyPostgresqlShowIndex struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2179,6 +2226,7 @@ StartServiceActionParamsBodyMongodbExplain start service action params body mong swagger:model StartServiceActionParamsBodyMongodbExplain */ type StartServiceActionParamsBodyMongodbExplain struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2222,6 +2270,7 @@ StartServiceActionParamsBodyMysqlExplain start service action params body mysql swagger:model StartServiceActionParamsBodyMysqlExplain */ type StartServiceActionParamsBodyMysqlExplain struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2271,6 +2320,7 @@ StartServiceActionParamsBodyMysqlExplainJSON start service action params body my swagger:model StartServiceActionParamsBodyMysqlExplainJSON */ type StartServiceActionParamsBodyMysqlExplainJSON struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2320,6 +2370,7 @@ StartServiceActionParamsBodyMysqlExplainTraditionalJSON start service action par swagger:model StartServiceActionParamsBodyMysqlExplainTraditionalJSON */ type StartServiceActionParamsBodyMysqlExplainTraditionalJSON struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2369,6 +2420,7 @@ StartServiceActionParamsBodyMysqlShowCreateTable start service action params bod swagger:model StartServiceActionParamsBodyMysqlShowCreateTable */ type StartServiceActionParamsBodyMysqlShowCreateTable struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2415,6 +2467,7 @@ StartServiceActionParamsBodyMysqlShowIndex start service action params body mysq swagger:model StartServiceActionParamsBodyMysqlShowIndex */ type StartServiceActionParamsBodyMysqlShowIndex struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2461,6 +2514,7 @@ StartServiceActionParamsBodyMysqlShowTableStatus start service action params bod swagger:model StartServiceActionParamsBodyMysqlShowTableStatus */ type StartServiceActionParamsBodyMysqlShowTableStatus struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2507,6 +2561,7 @@ StartServiceActionParamsBodyPTMongodbSummary Message to prepare pt-mongodb-summa swagger:model StartServiceActionParamsBodyPTMongodbSummary */ type StartServiceActionParamsBodyPTMongodbSummary struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2547,6 +2602,7 @@ StartServiceActionParamsBodyPTMysqlSummary Message to prepare pt-mysql-summary d swagger:model StartServiceActionParamsBodyPTMysqlSummary */ type StartServiceActionParamsBodyPTMysqlSummary struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2587,6 +2643,7 @@ StartServiceActionParamsBodyPTPostgresSummary Message to prepare pt-pg-summary d swagger:model StartServiceActionParamsBodyPTPostgresSummary */ type StartServiceActionParamsBodyPTPostgresSummary struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2627,6 +2684,7 @@ StartServiceActionParamsBodyPostgresShowCreateTable start service action params swagger:model StartServiceActionParamsBodyPostgresShowCreateTable */ type StartServiceActionParamsBodyPostgresShowCreateTable struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2673,6 +2731,7 @@ StartServiceActionParamsBodyPostgresShowIndex start service action params body p swagger:model StartServiceActionParamsBodyPostgresShowIndex */ type StartServiceActionParamsBodyPostgresShowIndex struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` diff --git a/api/advisors/v1/advisors.pb.go b/api/advisors/v1/advisors.pb.go index 51703e2cbe..6ae7f6996b 100644 --- a/api/advisors/v1/advisors.pb.go +++ b/api/advisors/v1/advisors.pb.go @@ -7,16 +7,14 @@ package advisorsv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/percona/pmm/api/management/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/management/v1" + reflect "reflect" + sync "sync" ) const ( @@ -1548,36 +1546,33 @@ func file_advisors_v1_advisors_proto_rawDescGZIP() []byte { return file_advisors_v1_advisors_proto_rawDescData } -var ( - file_advisors_v1_advisors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_advisors_v1_advisors_proto_msgTypes = make([]protoimpl.MessageInfo, 20) - file_advisors_v1_advisors_proto_goTypes = []any{ - (AdvisorCheckInterval)(0), // 0: advisors.v1.AdvisorCheckInterval - (AdvisorCheckFamily)(0), // 1: advisors.v1.AdvisorCheckFamily - (*AdvisorCheckResult)(nil), // 2: advisors.v1.AdvisorCheckResult - (*CheckResultSummary)(nil), // 3: advisors.v1.CheckResultSummary - (*CheckResult)(nil), // 4: advisors.v1.CheckResult - (*AdvisorCheck)(nil), // 5: advisors.v1.AdvisorCheck - (*Advisor)(nil), // 6: advisors.v1.Advisor - (*ChangeAdvisorCheckParams)(nil), // 7: advisors.v1.ChangeAdvisorCheckParams - (*StartAdvisorChecksRequest)(nil), // 8: advisors.v1.StartAdvisorChecksRequest - (*StartAdvisorChecksResponse)(nil), // 9: advisors.v1.StartAdvisorChecksResponse - (*ListAdvisorChecksRequest)(nil), // 10: advisors.v1.ListAdvisorChecksRequest - (*ListAdvisorChecksResponse)(nil), // 11: advisors.v1.ListAdvisorChecksResponse - (*ListAdvisorsRequest)(nil), // 12: advisors.v1.ListAdvisorsRequest - (*ListAdvisorsResponse)(nil), // 13: advisors.v1.ListAdvisorsResponse - (*ChangeAdvisorChecksRequest)(nil), // 14: advisors.v1.ChangeAdvisorChecksRequest - (*ChangeAdvisorChecksResponse)(nil), // 15: advisors.v1.ChangeAdvisorChecksResponse - (*ListFailedServicesRequest)(nil), // 16: advisors.v1.ListFailedServicesRequest - (*ListFailedServicesResponse)(nil), // 17: advisors.v1.ListFailedServicesResponse - (*GetFailedChecksRequest)(nil), // 18: advisors.v1.GetFailedChecksRequest - (*GetFailedChecksResponse)(nil), // 19: advisors.v1.GetFailedChecksResponse - nil, // 20: advisors.v1.AdvisorCheckResult.LabelsEntry - nil, // 21: advisors.v1.CheckResult.LabelsEntry - (v1.Severity)(0), // 22: management.v1.Severity - } -) - +var file_advisors_v1_advisors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_advisors_v1_advisors_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_advisors_v1_advisors_proto_goTypes = []any{ + (AdvisorCheckInterval)(0), // 0: advisors.v1.AdvisorCheckInterval + (AdvisorCheckFamily)(0), // 1: advisors.v1.AdvisorCheckFamily + (*AdvisorCheckResult)(nil), // 2: advisors.v1.AdvisorCheckResult + (*CheckResultSummary)(nil), // 3: advisors.v1.CheckResultSummary + (*CheckResult)(nil), // 4: advisors.v1.CheckResult + (*AdvisorCheck)(nil), // 5: advisors.v1.AdvisorCheck + (*Advisor)(nil), // 6: advisors.v1.Advisor + (*ChangeAdvisorCheckParams)(nil), // 7: advisors.v1.ChangeAdvisorCheckParams + (*StartAdvisorChecksRequest)(nil), // 8: advisors.v1.StartAdvisorChecksRequest + (*StartAdvisorChecksResponse)(nil), // 9: advisors.v1.StartAdvisorChecksResponse + (*ListAdvisorChecksRequest)(nil), // 10: advisors.v1.ListAdvisorChecksRequest + (*ListAdvisorChecksResponse)(nil), // 11: advisors.v1.ListAdvisorChecksResponse + (*ListAdvisorsRequest)(nil), // 12: advisors.v1.ListAdvisorsRequest + (*ListAdvisorsResponse)(nil), // 13: advisors.v1.ListAdvisorsResponse + (*ChangeAdvisorChecksRequest)(nil), // 14: advisors.v1.ChangeAdvisorChecksRequest + (*ChangeAdvisorChecksResponse)(nil), // 15: advisors.v1.ChangeAdvisorChecksResponse + (*ListFailedServicesRequest)(nil), // 16: advisors.v1.ListFailedServicesRequest + (*ListFailedServicesResponse)(nil), // 17: advisors.v1.ListFailedServicesResponse + (*GetFailedChecksRequest)(nil), // 18: advisors.v1.GetFailedChecksRequest + (*GetFailedChecksResponse)(nil), // 19: advisors.v1.GetFailedChecksResponse + nil, // 20: advisors.v1.AdvisorCheckResult.LabelsEntry + nil, // 21: advisors.v1.CheckResult.LabelsEntry + (v1.Severity)(0), // 22: management.v1.Severity +} var file_advisors_v1_advisors_proto_depIdxs = []int32{ 22, // 0: advisors.v1.AdvisorCheckResult.severity:type_name -> management.v1.Severity 20, // 1: advisors.v1.AdvisorCheckResult.labels:type_name -> advisors.v1.AdvisorCheckResult.LabelsEntry diff --git a/api/advisors/v1/advisors.pb.gw.go b/api/advisors/v1/advisors.pb.gw.go index bff3437706..f61871ab1f 100644 --- a/api/advisors/v1/advisors.pb.gw.go +++ b/api/advisors/v1/advisors.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_AdvisorService_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListFailedServicesRequest @@ -39,6 +37,7 @@ func request_AdvisorService_ListFailedServices_0(ctx context.Context, marshaler msg, err := client.ListFailedServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AdvisorService_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -47,9 +46,12 @@ func local_request_AdvisorService_ListFailedServices_0(ctx context.Context, mars msg, err := server.ListFailedServices(ctx, &protoReq) return msg, metadata, err + } -var filter_AdvisorService_GetFailedChecks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_AdvisorService_GetFailedChecks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetFailedChecksRequest @@ -64,6 +66,7 @@ func request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshaler run msg, err := client.GetFailedChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +82,7 @@ func local_request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshal msg, err := server.GetFailedChecks(ctx, &protoReq) return msg, metadata, err + } func request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -91,6 +95,7 @@ func request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, marshaler msg, err := client.StartAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -103,6 +108,7 @@ func local_request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, mars msg, err := server.StartAdvisorChecks(ctx, &protoReq) return msg, metadata, err + } func request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +117,7 @@ func request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marshaler r msg, err := client.ListAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -119,6 +126,7 @@ func local_request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marsh msg, err := server.ListAdvisorChecks(ctx, &protoReq) return msg, metadata, err + } func request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +135,7 @@ func request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler runtim msg, err := client.ListAdvisors(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -135,6 +144,7 @@ func local_request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler msg, err := server.ListAdvisors(ctx, &protoReq) return msg, metadata, err + } func request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -147,6 +157,7 @@ func request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, marshaler msg, err := client.ChangeAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +170,7 @@ func local_request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, mar msg, err := server.ChangeAdvisorChecks(ctx, &protoReq) return msg, metadata, err + } // RegisterAdvisorServiceHandlerServer registers the http handlers for service AdvisorService to "mux". @@ -167,6 +179,7 @@ func local_request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, mar // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAdvisorServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdvisorServiceServer) error { + mux.Handle("GET", pattern_AdvisorService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -189,6 +202,7 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AdvisorService_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -213,6 +227,7 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AdvisorService_StartAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -237,6 +252,7 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_StartAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AdvisorService_ListAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -261,6 +277,7 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AdvisorService_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -285,6 +302,7 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AdvisorService_ChangeAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -309,6 +327,7 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ChangeAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -351,6 +370,7 @@ func RegisterAdvisorServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AdvisorServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdvisorServiceClient) error { + mux.Handle("GET", pattern_AdvisorService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -370,6 +390,7 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AdvisorService_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -391,6 +412,7 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AdvisorService_StartAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -412,6 +434,7 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_StartAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AdvisorService_ListAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -433,6 +456,7 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AdvisorService_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -454,6 +478,7 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AdvisorService_ChangeAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -475,6 +500,7 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ChangeAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/advisors/v1/advisors.pb.validate.go b/api/advisors/v1/advisors.pb.validate.go index 9c9bdff982..75a00437b6 100644 --- a/api/advisors/v1/advisors.pb.validate.go +++ b/api/advisors/v1/advisors.pb.validate.go @@ -1937,6 +1937,7 @@ func (m *GetFailedChecksRequest) validate(all bool) error { // no validation rules for ServiceId if m.PageSize != nil { + if m.GetPageSize() < 1 { err := GetFailedChecksRequestValidationError{ field: "PageSize", @@ -1947,9 +1948,11 @@ func (m *GetFailedChecksRequest) validate(all bool) error { } errors = append(errors, err) } + } if m.PageIndex != nil { + if m.GetPageIndex() < 0 { err := GetFailedChecksRequestValidationError{ field: "PageIndex", @@ -1960,6 +1963,7 @@ func (m *GetFailedChecksRequest) validate(all bool) error { } errors = append(errors, err) } + } if len(errors) > 0 { diff --git a/api/advisors/v1/advisors_grpc.pb.go b/api/advisors/v1/advisors_grpc.pb.go index ad91ee616f..b2852af313 100644 --- a/api/advisors/v1/advisors_grpc.pb.go +++ b/api/advisors/v1/advisors_grpc.pb.go @@ -8,7 +8,6 @@ package advisorsv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -147,23 +146,18 @@ type UnimplementedAdvisorServiceServer struct{} func (UnimplementedAdvisorServiceServer) ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFailedServices not implemented") } - func (UnimplementedAdvisorServiceServer) GetFailedChecks(context.Context, *GetFailedChecksRequest) (*GetFailedChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFailedChecks not implemented") } - func (UnimplementedAdvisorServiceServer) StartAdvisorChecks(context.Context, *StartAdvisorChecksRequest) (*StartAdvisorChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartAdvisorChecks not implemented") } - func (UnimplementedAdvisorServiceServer) ListAdvisorChecks(context.Context, *ListAdvisorChecksRequest) (*ListAdvisorChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAdvisorChecks not implemented") } - func (UnimplementedAdvisorServiceServer) ListAdvisors(context.Context, *ListAdvisorsRequest) (*ListAdvisorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAdvisors not implemented") } - func (UnimplementedAdvisorServiceServer) ChangeAdvisorChecks(context.Context, *ChangeAdvisorChecksRequest) (*ChangeAdvisorChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeAdvisorChecks not implemented") } diff --git a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go index 9f9ee29908..a6f9670f4d 100644 --- a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go @@ -60,6 +60,7 @@ ChangeAdvisorChecksParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type ChangeAdvisorChecksParams struct { + // Body. Body ChangeAdvisorChecksBody @@ -129,6 +130,7 @@ func (o *ChangeAdvisorChecksParams) SetBody(body ChangeAdvisorChecksBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go index 5da5b5cced..781c1860ef 100644 --- a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go @@ -104,6 +104,7 @@ func (o *ChangeAdvisorChecksOK) GetPayload() interface{} { } func (o *ChangeAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,6 +176,7 @@ func (o *ChangeAdvisorChecksDefault) GetPayload() *ChangeAdvisorChecksDefaultBod } func (o *ChangeAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAdvisorChecksDefaultBody) // response payload @@ -190,6 +192,7 @@ ChangeAdvisorChecksBody change advisor checks body swagger:model ChangeAdvisorChecksBody */ type ChangeAdvisorChecksBody struct { + // params Params []*ChangeAdvisorChecksParamsBodyParamsItems0 `json:"params"` } @@ -249,7 +252,9 @@ func (o *ChangeAdvisorChecksBody) ContextValidate(ctx context.Context, formats s } func (o *ChangeAdvisorChecksBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -265,6 +270,7 @@ func (o *ChangeAdvisorChecksBody) contextValidateParams(ctx context.Context, for return err } } + } return nil @@ -293,6 +299,7 @@ ChangeAdvisorChecksDefaultBody change advisor checks default body swagger:model ChangeAdvisorChecksDefaultBody */ type ChangeAdvisorChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -358,7 +365,9 @@ func (o *ChangeAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, fo } func (o *ChangeAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -374,6 +383,7 @@ func (o *ChangeAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Cont return err } } + } return nil @@ -402,6 +412,7 @@ ChangeAdvisorChecksDefaultBodyDetailsItems0 change advisor checks default body d swagger:model ChangeAdvisorChecksDefaultBodyDetailsItems0 */ type ChangeAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -413,6 +424,7 @@ type ChangeAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -450,6 +462,7 @@ func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -513,6 +526,7 @@ ChangeAdvisorChecksParamsBodyParamsItems0 ChangeAdvisorCheckParams specifies a s swagger:model ChangeAdvisorChecksParamsBodyParamsItems0 */ type ChangeAdvisorChecksParamsBodyParamsItems0 struct { + // The name of the check to change. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go index 0248b1355a..87eedd930e 100644 --- a/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go @@ -61,6 +61,7 @@ GetFailedChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetFailedChecksParams struct { + /* PageIndex. Index of the requested page, starts from 0. @@ -171,6 +172,7 @@ func (o *GetFailedChecksParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -186,6 +188,7 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qPageIndex := swag.FormatInt32(qrPageIndex) if qPageIndex != "" { + if err := r.SetQueryParam("page_index", qPageIndex); err != nil { return err } @@ -202,6 +205,7 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } @@ -218,6 +222,7 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qServiceID := qrServiceID if qServiceID != "" { + if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go b/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go index 1d6b0bda83..c4752a4c96 100644 --- a/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go @@ -104,6 +104,7 @@ func (o *GetFailedChecksOK) GetPayload() *GetFailedChecksOKBody { } func (o *GetFailedChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFailedChecksOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetFailedChecksDefault) GetPayload() *GetFailedChecksDefaultBody { } func (o *GetFailedChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFailedChecksDefaultBody) // response payload @@ -192,6 +194,7 @@ GetFailedChecksDefaultBody get failed checks default body swagger:model GetFailedChecksDefaultBody */ type GetFailedChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *GetFailedChecksDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -301,6 +307,7 @@ GetFailedChecksDefaultBodyDetailsItems0 get failed checks default body details i swagger:model GetFailedChecksDefaultBodyDetailsItems0 */ type GetFailedChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type GetFailedChecksDefaultBodyDetailsItems0 struct { func (o *GetFailedChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *GetFailedChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetFailedChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ GetFailedChecksOKBody get failed checks OK body swagger:model GetFailedChecksOKBody */ type GetFailedChecksOKBody struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -477,7 +487,9 @@ func (o *GetFailedChecksOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Results); i++ { + if o.Results[i] != nil { if swag.IsZero(o.Results[i]) { // not required @@ -493,6 +505,7 @@ func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, form return err } } + } return nil @@ -521,6 +534,7 @@ GetFailedChecksOKBodyResultsItems0 CheckResult represents the check results for swagger:model GetFailedChecksOKBodyResultsItems0 */ type GetFailedChecksOKBodyResultsItems0 struct { + // summary Summary string `json:"summary,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go index 23e2a16e65..4718c378e1 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go @@ -115,6 +115,7 @@ func (o *ListAdvisorChecksParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go index ca4d6614bf..85a853c748 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go @@ -104,6 +104,7 @@ func (o *ListAdvisorChecksOK) GetPayload() *ListAdvisorChecksOKBody { } func (o *ListAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorChecksOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListAdvisorChecksDefault) GetPayload() *ListAdvisorChecksDefaultBody { } func (o *ListAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorChecksDefaultBody) // response payload @@ -192,6 +194,7 @@ ListAdvisorChecksDefaultBody list advisor checks default body swagger:model ListAdvisorChecksDefaultBody */ type ListAdvisorChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, form } func (o *ListAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -301,6 +307,7 @@ ListAdvisorChecksDefaultBodyDetailsItems0 list advisor checks default body detai swagger:model ListAdvisorChecksDefaultBodyDetailsItems0 */ type ListAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *ListAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListAdvisorChecksOKBody list advisor checks OK body swagger:model ListAdvisorChecksOKBody */ type ListAdvisorChecksOKBody struct { + // checks Checks []*ListAdvisorChecksOKBodyChecksItems0 `json:"checks"` } @@ -471,7 +481,9 @@ func (o *ListAdvisorChecksOKBody) ContextValidate(ctx context.Context, formats s } func (o *ListAdvisorChecksOKBody) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Checks); i++ { + if o.Checks[i] != nil { if swag.IsZero(o.Checks[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListAdvisorChecksOKBody) contextValidateChecks(ctx context.Context, for return err } } + } return nil @@ -515,6 +528,7 @@ ListAdvisorChecksOKBodyChecksItems0 AdvisorCheck contains check name and status. swagger:model ListAdvisorChecksOKBodyChecksItems0 */ type ListAdvisorChecksOKBodyChecksItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go b/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go index 214b86b095..375bb68b89 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go @@ -115,6 +115,7 @@ func (o *ListAdvisorsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAdvisorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go b/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go index 1e5f50e351..6b886cfc14 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go @@ -104,6 +104,7 @@ func (o *ListAdvisorsOK) GetPayload() *ListAdvisorsOKBody { } func (o *ListAdvisorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListAdvisorsDefault) GetPayload() *ListAdvisorsDefaultBody { } func (o *ListAdvisorsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListAdvisorsDefaultBody list advisors default body swagger:model ListAdvisorsDefaultBody */ type ListAdvisorsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListAdvisorsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -301,6 +307,7 @@ ListAdvisorsDefaultBodyDetailsItems0 list advisors default body details items0 swagger:model ListAdvisorsDefaultBodyDetailsItems0 */ type ListAdvisorsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListAdvisorsDefaultBodyDetailsItems0 struct { func (o *ListAdvisorsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListAdvisorsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAdvisorsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListAdvisorsOKBody list advisors OK body swagger:model ListAdvisorsOKBody */ type ListAdvisorsOKBody struct { + // advisors Advisors []*ListAdvisorsOKBodyAdvisorsItems0 `json:"advisors"` } @@ -471,7 +481,9 @@ func (o *ListAdvisorsOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Advisors); i++ { + if o.Advisors[i] != nil { if swag.IsZero(o.Advisors[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, format return err } } + } return nil @@ -515,6 +528,7 @@ ListAdvisorsOKBodyAdvisorsItems0 list advisors OK body advisors items0 swagger:model ListAdvisorsOKBodyAdvisorsItems0 */ type ListAdvisorsOKBodyAdvisorsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -589,7 +603,9 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) ContextValidate(ctx context.Context, } func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Checks); i++ { + if o.Checks[i] != nil { if swag.IsZero(o.Checks[i]) { // not required @@ -605,6 +621,7 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Con return err } } + } return nil @@ -633,6 +650,7 @@ ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 AdvisorCheck contains check name an swagger:model ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 */ type ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go b/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go index 7b386ac01a..579c66ebda 100644 --- a/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go @@ -115,6 +115,7 @@ func (o *ListFailedServicesParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListFailedServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go b/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go index b14fd06338..688c87c27f 100644 --- a/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go @@ -103,6 +103,7 @@ func (o *ListFailedServicesOK) GetPayload() *ListFailedServicesOKBody { } func (o *ListFailedServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListFailedServicesOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ListFailedServicesDefault) GetPayload() *ListFailedServicesDefaultBody } func (o *ListFailedServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListFailedServicesDefaultBody) // response payload @@ -191,6 +193,7 @@ ListFailedServicesDefaultBody list failed services default body swagger:model ListFailedServicesDefaultBody */ type ListFailedServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *ListFailedServicesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -300,6 +306,7 @@ ListFailedServicesDefaultBodyDetailsItems0 list failed services default body det swagger:model ListFailedServicesDefaultBodyDetailsItems0 */ type ListFailedServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type ListFailedServicesDefaultBodyDetailsItems0 struct { func (o *ListFailedServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *ListFailedServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ListFailedServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ ListFailedServicesOKBody list failed services OK body swagger:model ListFailedServicesOKBody */ type ListFailedServicesOKBody struct { + // result Result []*ListFailedServicesOKBodyResultItems0 `json:"result"` } @@ -470,7 +480,9 @@ func (o *ListFailedServicesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Result); i++ { + if o.Result[i] != nil { if swag.IsZero(o.Result[i]) { // not required @@ -486,6 +498,7 @@ func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, fo return err } } + } return nil @@ -514,6 +527,7 @@ ListFailedServicesOKBodyResultItems0 CheckResultSummary is a summary of check re swagger:model ListFailedServicesOKBodyResultItems0 */ type ListFailedServicesOKBodyResultItems0 struct { + // service name ServiceName string `json:"service_name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go index 879f8418f6..9a9d66c843 100644 --- a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go @@ -60,6 +60,7 @@ StartAdvisorChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartAdvisorChecksParams struct { + // Body. Body StartAdvisorChecksBody @@ -129,6 +130,7 @@ func (o *StartAdvisorChecksParams) SetBody(body StartAdvisorChecksBody) { // WriteToRequest writes these params to a swagger request func (o *StartAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go index 4454786167..4b1802b166 100644 --- a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go @@ -103,6 +103,7 @@ func (o *StartAdvisorChecksOK) GetPayload() interface{} { } func (o *StartAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *StartAdvisorChecksDefault) GetPayload() *StartAdvisorChecksDefaultBody } func (o *StartAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartAdvisorChecksDefaultBody) // response payload @@ -189,6 +191,7 @@ StartAdvisorChecksBody start advisor checks body swagger:model StartAdvisorChecksBody */ type StartAdvisorChecksBody struct { + // Names of the checks that should be started. Names []string `json:"names"` } @@ -226,6 +229,7 @@ StartAdvisorChecksDefaultBody start advisor checks default body swagger:model StartAdvisorChecksDefaultBody */ type StartAdvisorChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +295,9 @@ func (o *StartAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, for } func (o *StartAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -307,6 +313,7 @@ func (o *StartAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -335,6 +342,7 @@ StartAdvisorChecksDefaultBodyDetailsItems0 start advisor checks default body det swagger:model StartAdvisorChecksDefaultBodyDetailsItems0 */ type StartAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -346,6 +354,7 @@ type StartAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *StartAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -383,6 +392,7 @@ func (o *StartAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o StartAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/agent/pb/agent.pb.go b/api/agent/pb/agent.pb.go index cafc2136d8..b211a6bfcb 100644 --- a/api/agent/pb/agent.pb.go +++ b/api/agent/pb/agent.pb.go @@ -7,12 +7,10 @@ package pb import ( - reflect "reflect" - + v1 "github.com/percona/pmm/api/agent/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/agent/v1" + reflect "reflect" ) const ( @@ -47,7 +45,6 @@ var file_agent_pb_agent_proto_goTypes = []any{ (*v1.AgentMessage)(nil), // 0: agent.v1.AgentMessage (*v1.ServerMessage)(nil), // 1: agent.v1.ServerMessage } - var file_agent_pb_agent_proto_depIdxs = []int32{ 0, // 0: agent.Agent.Connect:input_type -> agent.v1.AgentMessage 1, // 1: agent.Agent.Connect:output_type -> agent.v1.ServerMessage diff --git a/api/agent/pb/agent_grpc.pb.go b/api/agent/pb/agent_grpc.pb.go index e976dce0f5..3b8f6d840a 100644 --- a/api/agent/pb/agent_grpc.pb.go +++ b/api/agent/pb/agent_grpc.pb.go @@ -8,12 +8,10 @@ package pb import ( context "context" - + v1 "github.com/percona/pmm/api/agent/v1" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - - v1 "github.com/percona/pmm/api/agent/v1" ) // This is a compile-time assertion to ensure that this generated file diff --git a/api/agent/v1/agent.pb.go b/api/agent/v1/agent.pb.go index dbfad1aec7..8df40b04ae 100644 --- a/api/agent/v1/agent.pb.go +++ b/api/agent/v1/agent.pb.go @@ -7,17 +7,15 @@ package agentv1 import ( - reflect "reflect" - sync "sync" - + v11 "github.com/percona/pmm/api/backup/v1" + v1 "github.com/percona/pmm/api/inventory/v1" status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v11 "github.com/percona/pmm/api/backup/v1" - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -7513,116 +7511,113 @@ func file_agent_v1_agent_proto_rawDescGZIP() []byte { return file_agent_v1_agent_proto_rawDescData } -var ( - file_agent_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 91) - file_agent_v1_agent_proto_goTypes = []any{ - (MysqlExplainOutputFormat)(0), // 0: agent.v1.MysqlExplainOutputFormat - (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService - (*TextFiles)(nil), // 2: agent.v1.TextFiles - (*Ping)(nil), // 3: agent.v1.Ping - (*Pong)(nil), // 4: agent.v1.Pong - (*QANCollectRequest)(nil), // 5: agent.v1.QANCollectRequest - (*QANCollectResponse)(nil), // 6: agent.v1.QANCollectResponse - (*StateChangedRequest)(nil), // 7: agent.v1.StateChangedRequest - (*StateChangedResponse)(nil), // 8: agent.v1.StateChangedResponse - (*SetStateRequest)(nil), // 9: agent.v1.SetStateRequest - (*SetStateResponse)(nil), // 10: agent.v1.SetStateResponse - (*QueryActionValue)(nil), // 11: agent.v1.QueryActionValue - (*QueryActionSlice)(nil), // 12: agent.v1.QueryActionSlice - (*QueryActionMap)(nil), // 13: agent.v1.QueryActionMap - (*QueryActionBinary)(nil), // 14: agent.v1.QueryActionBinary - (*QueryActionResult)(nil), // 15: agent.v1.QueryActionResult - (*StartActionRequest)(nil), // 16: agent.v1.StartActionRequest - (*StartActionResponse)(nil), // 17: agent.v1.StartActionResponse - (*StopActionRequest)(nil), // 18: agent.v1.StopActionRequest - (*StopActionResponse)(nil), // 19: agent.v1.StopActionResponse - (*ActionResultRequest)(nil), // 20: agent.v1.ActionResultRequest - (*ActionResultResponse)(nil), // 21: agent.v1.ActionResultResponse - (*PBMSwitchPITRRequest)(nil), // 22: agent.v1.PBMSwitchPITRRequest - (*PBMSwitchPITRResponse)(nil), // 23: agent.v1.PBMSwitchPITRResponse - (*AgentLogsRequest)(nil), // 24: agent.v1.AgentLogsRequest - (*AgentLogsResponse)(nil), // 25: agent.v1.AgentLogsResponse - (*CheckConnectionRequest)(nil), // 26: agent.v1.CheckConnectionRequest - (*CheckConnectionResponse)(nil), // 27: agent.v1.CheckConnectionResponse - (*ServiceInfoRequest)(nil), // 28: agent.v1.ServiceInfoRequest - (*ServiceInfoResponse)(nil), // 29: agent.v1.ServiceInfoResponse - (*JobStatusRequest)(nil), // 30: agent.v1.JobStatusRequest - (*JobStatusResponse)(nil), // 31: agent.v1.JobStatusResponse - (*S3LocationConfig)(nil), // 32: agent.v1.S3LocationConfig - (*FilesystemLocationConfig)(nil), // 33: agent.v1.FilesystemLocationConfig - (*StartJobRequest)(nil), // 34: agent.v1.StartJobRequest - (*StartJobResponse)(nil), // 35: agent.v1.StartJobResponse - (*StopJobRequest)(nil), // 36: agent.v1.StopJobRequest - (*StopJobResponse)(nil), // 37: agent.v1.StopJobResponse - (*JobResult)(nil), // 38: agent.v1.JobResult - (*JobProgress)(nil), // 39: agent.v1.JobProgress - (*GetVersionsRequest)(nil), // 40: agent.v1.GetVersionsRequest - (*GetVersionsResponse)(nil), // 41: agent.v1.GetVersionsResponse - (*AgentMessage)(nil), // 42: agent.v1.AgentMessage - (*ServerMessage)(nil), // 43: agent.v1.ServerMessage - nil, // 44: agent.v1.TextFiles.FilesEntry - (*SetStateRequest_AgentProcess)(nil), // 45: agent.v1.SetStateRequest.AgentProcess - nil, // 46: agent.v1.SetStateRequest.AgentProcessesEntry - (*SetStateRequest_BuiltinAgent)(nil), // 47: agent.v1.SetStateRequest.BuiltinAgent - nil, // 48: agent.v1.SetStateRequest.BuiltinAgentsEntry - nil, // 49: agent.v1.SetStateRequest.AgentProcess.TextFilesEntry - nil, // 50: agent.v1.QueryActionMap.MapEntry - (*StartActionRequest_MySQLExplainParams)(nil), // 51: agent.v1.StartActionRequest.MySQLExplainParams - (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 52: agent.v1.StartActionRequest.MySQLShowCreateTableParams - (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 53: agent.v1.StartActionRequest.MySQLShowTableStatusParams - (*StartActionRequest_MySQLShowIndexParams)(nil), // 54: agent.v1.StartActionRequest.MySQLShowIndexParams - (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 55: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams - (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 56: agent.v1.StartActionRequest.PostgreSQLShowIndexParams - (*StartActionRequest_MongoDBExplainParams)(nil), // 57: agent.v1.StartActionRequest.MongoDBExplainParams - (*StartActionRequest_PTSummaryParams)(nil), // 58: agent.v1.StartActionRequest.PTSummaryParams - (*StartActionRequest_PTPgSummaryParams)(nil), // 59: agent.v1.StartActionRequest.PTPgSummaryParams - (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 60: agent.v1.StartActionRequest.PTMongoDBSummaryParams - (*StartActionRequest_PTMySQLSummaryParams)(nil), // 61: agent.v1.StartActionRequest.PTMySQLSummaryParams - (*StartActionRequest_MySQLQueryShowParams)(nil), // 62: agent.v1.StartActionRequest.MySQLQueryShowParams - (*StartActionRequest_MySQLQuerySelectParams)(nil), // 63: agent.v1.StartActionRequest.MySQLQuerySelectParams - (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 64: agent.v1.StartActionRequest.PostgreSQLQueryShowParams - (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 65: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams - (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 66: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams - (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 67: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams - (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 68: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 69: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams - (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 70: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams - (*StartActionRequest_RestartSystemServiceParams)(nil), // 71: agent.v1.StartActionRequest.RestartSystemServiceParams - (*CheckConnectionResponse_Stats)(nil), // 72: agent.v1.CheckConnectionResponse.Stats - (*StartJobRequest_MySQLBackup)(nil), // 73: agent.v1.StartJobRequest.MySQLBackup - (*StartJobRequest_MySQLRestoreBackup)(nil), // 74: agent.v1.StartJobRequest.MySQLRestoreBackup - (*StartJobRequest_MongoDBBackup)(nil), // 75: agent.v1.StartJobRequest.MongoDBBackup - (*StartJobRequest_MongoDBRestoreBackup)(nil), // 76: agent.v1.StartJobRequest.MongoDBRestoreBackup - (*JobResult_Error)(nil), // 77: agent.v1.JobResult.Error - (*JobResult_MongoDBBackup)(nil), // 78: agent.v1.JobResult.MongoDBBackup - (*JobResult_MySQLBackup)(nil), // 79: agent.v1.JobResult.MySQLBackup - (*JobResult_MySQLRestoreBackup)(nil), // 80: agent.v1.JobResult.MySQLRestoreBackup - (*JobResult_MongoDBRestoreBackup)(nil), // 81: agent.v1.JobResult.MongoDBRestoreBackup - (*JobProgress_MySQLBackup)(nil), // 82: agent.v1.JobProgress.MySQLBackup - (*JobProgress_MySQLRestoreBackup)(nil), // 83: agent.v1.JobProgress.MySQLRestoreBackup - (*JobProgress_Logs)(nil), // 84: agent.v1.JobProgress.Logs - (*GetVersionsRequest_MySQLd)(nil), // 85: agent.v1.GetVersionsRequest.MySQLd - (*GetVersionsRequest_Xtrabackup)(nil), // 86: agent.v1.GetVersionsRequest.Xtrabackup - (*GetVersionsRequest_Xbcloud)(nil), // 87: agent.v1.GetVersionsRequest.Xbcloud - (*GetVersionsRequest_Qpress)(nil), // 88: agent.v1.GetVersionsRequest.Qpress - (*GetVersionsRequest_MongoDB)(nil), // 89: agent.v1.GetVersionsRequest.MongoDB - (*GetVersionsRequest_PBM)(nil), // 90: agent.v1.GetVersionsRequest.PBM - (*GetVersionsRequest_Software)(nil), // 91: agent.v1.GetVersionsRequest.Software - (*GetVersionsResponse_Version)(nil), // 92: agent.v1.GetVersionsResponse.Version - (*timestamppb.Timestamp)(nil), // 93: google.protobuf.Timestamp - (*MetricsBucket)(nil), // 94: agent.v1.MetricsBucket - (v1.AgentStatus)(0), // 95: inventory.v1.AgentStatus - (*durationpb.Duration)(nil), // 96: google.protobuf.Duration - (v1.ServiceType)(0), // 97: inventory.v1.ServiceType - (*status.Status)(nil), // 98: google.rpc.Status - (v1.AgentType)(0), // 99: inventory.v1.AgentType - (v11.DataModel)(0), // 100: backup.v1.DataModel - (*v11.PbmMetadata)(nil), // 101: backup.v1.PbmMetadata - (*v11.Metadata)(nil), // 102: backup.v1.Metadata - } -) - +var file_agent_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 91) +var file_agent_v1_agent_proto_goTypes = []any{ + (MysqlExplainOutputFormat)(0), // 0: agent.v1.MysqlExplainOutputFormat + (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService + (*TextFiles)(nil), // 2: agent.v1.TextFiles + (*Ping)(nil), // 3: agent.v1.Ping + (*Pong)(nil), // 4: agent.v1.Pong + (*QANCollectRequest)(nil), // 5: agent.v1.QANCollectRequest + (*QANCollectResponse)(nil), // 6: agent.v1.QANCollectResponse + (*StateChangedRequest)(nil), // 7: agent.v1.StateChangedRequest + (*StateChangedResponse)(nil), // 8: agent.v1.StateChangedResponse + (*SetStateRequest)(nil), // 9: agent.v1.SetStateRequest + (*SetStateResponse)(nil), // 10: agent.v1.SetStateResponse + (*QueryActionValue)(nil), // 11: agent.v1.QueryActionValue + (*QueryActionSlice)(nil), // 12: agent.v1.QueryActionSlice + (*QueryActionMap)(nil), // 13: agent.v1.QueryActionMap + (*QueryActionBinary)(nil), // 14: agent.v1.QueryActionBinary + (*QueryActionResult)(nil), // 15: agent.v1.QueryActionResult + (*StartActionRequest)(nil), // 16: agent.v1.StartActionRequest + (*StartActionResponse)(nil), // 17: agent.v1.StartActionResponse + (*StopActionRequest)(nil), // 18: agent.v1.StopActionRequest + (*StopActionResponse)(nil), // 19: agent.v1.StopActionResponse + (*ActionResultRequest)(nil), // 20: agent.v1.ActionResultRequest + (*ActionResultResponse)(nil), // 21: agent.v1.ActionResultResponse + (*PBMSwitchPITRRequest)(nil), // 22: agent.v1.PBMSwitchPITRRequest + (*PBMSwitchPITRResponse)(nil), // 23: agent.v1.PBMSwitchPITRResponse + (*AgentLogsRequest)(nil), // 24: agent.v1.AgentLogsRequest + (*AgentLogsResponse)(nil), // 25: agent.v1.AgentLogsResponse + (*CheckConnectionRequest)(nil), // 26: agent.v1.CheckConnectionRequest + (*CheckConnectionResponse)(nil), // 27: agent.v1.CheckConnectionResponse + (*ServiceInfoRequest)(nil), // 28: agent.v1.ServiceInfoRequest + (*ServiceInfoResponse)(nil), // 29: agent.v1.ServiceInfoResponse + (*JobStatusRequest)(nil), // 30: agent.v1.JobStatusRequest + (*JobStatusResponse)(nil), // 31: agent.v1.JobStatusResponse + (*S3LocationConfig)(nil), // 32: agent.v1.S3LocationConfig + (*FilesystemLocationConfig)(nil), // 33: agent.v1.FilesystemLocationConfig + (*StartJobRequest)(nil), // 34: agent.v1.StartJobRequest + (*StartJobResponse)(nil), // 35: agent.v1.StartJobResponse + (*StopJobRequest)(nil), // 36: agent.v1.StopJobRequest + (*StopJobResponse)(nil), // 37: agent.v1.StopJobResponse + (*JobResult)(nil), // 38: agent.v1.JobResult + (*JobProgress)(nil), // 39: agent.v1.JobProgress + (*GetVersionsRequest)(nil), // 40: agent.v1.GetVersionsRequest + (*GetVersionsResponse)(nil), // 41: agent.v1.GetVersionsResponse + (*AgentMessage)(nil), // 42: agent.v1.AgentMessage + (*ServerMessage)(nil), // 43: agent.v1.ServerMessage + nil, // 44: agent.v1.TextFiles.FilesEntry + (*SetStateRequest_AgentProcess)(nil), // 45: agent.v1.SetStateRequest.AgentProcess + nil, // 46: agent.v1.SetStateRequest.AgentProcessesEntry + (*SetStateRequest_BuiltinAgent)(nil), // 47: agent.v1.SetStateRequest.BuiltinAgent + nil, // 48: agent.v1.SetStateRequest.BuiltinAgentsEntry + nil, // 49: agent.v1.SetStateRequest.AgentProcess.TextFilesEntry + nil, // 50: agent.v1.QueryActionMap.MapEntry + (*StartActionRequest_MySQLExplainParams)(nil), // 51: agent.v1.StartActionRequest.MySQLExplainParams + (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 52: agent.v1.StartActionRequest.MySQLShowCreateTableParams + (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 53: agent.v1.StartActionRequest.MySQLShowTableStatusParams + (*StartActionRequest_MySQLShowIndexParams)(nil), // 54: agent.v1.StartActionRequest.MySQLShowIndexParams + (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 55: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams + (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 56: agent.v1.StartActionRequest.PostgreSQLShowIndexParams + (*StartActionRequest_MongoDBExplainParams)(nil), // 57: agent.v1.StartActionRequest.MongoDBExplainParams + (*StartActionRequest_PTSummaryParams)(nil), // 58: agent.v1.StartActionRequest.PTSummaryParams + (*StartActionRequest_PTPgSummaryParams)(nil), // 59: agent.v1.StartActionRequest.PTPgSummaryParams + (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 60: agent.v1.StartActionRequest.PTMongoDBSummaryParams + (*StartActionRequest_PTMySQLSummaryParams)(nil), // 61: agent.v1.StartActionRequest.PTMySQLSummaryParams + (*StartActionRequest_MySQLQueryShowParams)(nil), // 62: agent.v1.StartActionRequest.MySQLQueryShowParams + (*StartActionRequest_MySQLQuerySelectParams)(nil), // 63: agent.v1.StartActionRequest.MySQLQuerySelectParams + (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 64: agent.v1.StartActionRequest.PostgreSQLQueryShowParams + (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 65: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams + (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 66: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams + (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 67: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams + (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 68: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 69: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams + (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 70: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams + (*StartActionRequest_RestartSystemServiceParams)(nil), // 71: agent.v1.StartActionRequest.RestartSystemServiceParams + (*CheckConnectionResponse_Stats)(nil), // 72: agent.v1.CheckConnectionResponse.Stats + (*StartJobRequest_MySQLBackup)(nil), // 73: agent.v1.StartJobRequest.MySQLBackup + (*StartJobRequest_MySQLRestoreBackup)(nil), // 74: agent.v1.StartJobRequest.MySQLRestoreBackup + (*StartJobRequest_MongoDBBackup)(nil), // 75: agent.v1.StartJobRequest.MongoDBBackup + (*StartJobRequest_MongoDBRestoreBackup)(nil), // 76: agent.v1.StartJobRequest.MongoDBRestoreBackup + (*JobResult_Error)(nil), // 77: agent.v1.JobResult.Error + (*JobResult_MongoDBBackup)(nil), // 78: agent.v1.JobResult.MongoDBBackup + (*JobResult_MySQLBackup)(nil), // 79: agent.v1.JobResult.MySQLBackup + (*JobResult_MySQLRestoreBackup)(nil), // 80: agent.v1.JobResult.MySQLRestoreBackup + (*JobResult_MongoDBRestoreBackup)(nil), // 81: agent.v1.JobResult.MongoDBRestoreBackup + (*JobProgress_MySQLBackup)(nil), // 82: agent.v1.JobProgress.MySQLBackup + (*JobProgress_MySQLRestoreBackup)(nil), // 83: agent.v1.JobProgress.MySQLRestoreBackup + (*JobProgress_Logs)(nil), // 84: agent.v1.JobProgress.Logs + (*GetVersionsRequest_MySQLd)(nil), // 85: agent.v1.GetVersionsRequest.MySQLd + (*GetVersionsRequest_Xtrabackup)(nil), // 86: agent.v1.GetVersionsRequest.Xtrabackup + (*GetVersionsRequest_Xbcloud)(nil), // 87: agent.v1.GetVersionsRequest.Xbcloud + (*GetVersionsRequest_Qpress)(nil), // 88: agent.v1.GetVersionsRequest.Qpress + (*GetVersionsRequest_MongoDB)(nil), // 89: agent.v1.GetVersionsRequest.MongoDB + (*GetVersionsRequest_PBM)(nil), // 90: agent.v1.GetVersionsRequest.PBM + (*GetVersionsRequest_Software)(nil), // 91: agent.v1.GetVersionsRequest.Software + (*GetVersionsResponse_Version)(nil), // 92: agent.v1.GetVersionsResponse.Version + (*timestamppb.Timestamp)(nil), // 93: google.protobuf.Timestamp + (*MetricsBucket)(nil), // 94: agent.v1.MetricsBucket + (v1.AgentStatus)(0), // 95: inventory.v1.AgentStatus + (*durationpb.Duration)(nil), // 96: google.protobuf.Duration + (v1.ServiceType)(0), // 97: inventory.v1.ServiceType + (*status.Status)(nil), // 98: google.rpc.Status + (v1.AgentType)(0), // 99: inventory.v1.AgentType + (v11.DataModel)(0), // 100: backup.v1.DataModel + (*v11.PbmMetadata)(nil), // 101: backup.v1.PbmMetadata + (*v11.Metadata)(nil), // 102: backup.v1.Metadata +} var file_agent_v1_agent_proto_depIdxs = []int32{ 44, // 0: agent.v1.TextFiles.files:type_name -> agent.v1.TextFiles.FilesEntry 93, // 1: agent.v1.Pong.current_time:type_name -> google.protobuf.Timestamp diff --git a/api/agent/v1/agent.pb.validate.go b/api/agent/v1/agent.pb.validate.go index a6fb4bda41..e54b957d64 100644 --- a/api/agent/v1/agent.pb.validate.go +++ b/api/agent/v1/agent.pb.validate.go @@ -19,6 +19,7 @@ import ( "google.golang.org/protobuf/types/known/anypb" backupv1 "github.com/percona/pmm/api/backup/v1" + inventoryv1 "github.com/percona/pmm/api/inventory/v1" ) diff --git a/api/agent/v1/agent_grpc.pb.go b/api/agent/v1/agent_grpc.pb.go index 7b0cdc51b8..b0b67a591b 100644 --- a/api/agent/v1/agent_grpc.pb.go +++ b/api/agent/v1/agent_grpc.pb.go @@ -8,7 +8,6 @@ package agentv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/agent/v1/collector.pb.go b/api/agent/v1/collector.pb.go index 48b83564be..41a7cb1ea3 100644 --- a/api/agent/v1/collector.pb.go +++ b/api/agent/v1/collector.pb.go @@ -7,13 +7,11 @@ package agentv1 import ( - reflect "reflect" - sync "sync" - + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -2805,23 +2803,20 @@ func file_agent_v1_collector_proto_rawDescGZIP() []byte { return file_agent_v1_collector_proto_rawDescData } -var ( - file_agent_v1_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_agent_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_agent_v1_collector_proto_goTypes = []any{ - (ExampleType)(0), // 0: agent.v1.ExampleType - (*MetricsBucket)(nil), // 1: agent.v1.MetricsBucket - (*HistogramItem)(nil), // 2: agent.v1.HistogramItem - (*MetricsBucket_Common)(nil), // 3: agent.v1.MetricsBucket.Common - (*MetricsBucket_MySQL)(nil), // 4: agent.v1.MetricsBucket.MySQL - (*MetricsBucket_MongoDB)(nil), // 5: agent.v1.MetricsBucket.MongoDB - (*MetricsBucket_PostgreSQL)(nil), // 6: agent.v1.MetricsBucket.PostgreSQL - nil, // 7: agent.v1.MetricsBucket.Common.CommentsEntry - nil, // 8: agent.v1.MetricsBucket.Common.ErrorsEntry - (v1.AgentType)(0), // 9: inventory.v1.AgentType - } -) - +var file_agent_v1_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_agent_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_agent_v1_collector_proto_goTypes = []any{ + (ExampleType)(0), // 0: agent.v1.ExampleType + (*MetricsBucket)(nil), // 1: agent.v1.MetricsBucket + (*HistogramItem)(nil), // 2: agent.v1.HistogramItem + (*MetricsBucket_Common)(nil), // 3: agent.v1.MetricsBucket.Common + (*MetricsBucket_MySQL)(nil), // 4: agent.v1.MetricsBucket.MySQL + (*MetricsBucket_MongoDB)(nil), // 5: agent.v1.MetricsBucket.MongoDB + (*MetricsBucket_PostgreSQL)(nil), // 6: agent.v1.MetricsBucket.PostgreSQL + nil, // 7: agent.v1.MetricsBucket.Common.CommentsEntry + nil, // 8: agent.v1.MetricsBucket.Common.ErrorsEntry + (v1.AgentType)(0), // 9: inventory.v1.AgentType +} var file_agent_v1_collector_proto_depIdxs = []int32{ 3, // 0: agent.v1.MetricsBucket.common:type_name -> agent.v1.MetricsBucket.Common 4, // 1: agent.v1.MetricsBucket.mysql:type_name -> agent.v1.MetricsBucket.MySQL diff --git a/api/agentlocal/v1/agentlocal.pb.go b/api/agentlocal/v1/agentlocal.pb.go index c8bc022a48..a2a1bc0ef9 100644 --- a/api/agentlocal/v1/agentlocal.pb.go +++ b/api/agentlocal/v1/agentlocal.pb.go @@ -7,15 +7,13 @@ package agentlocalv1 import ( - reflect "reflect" - sync "sync" - + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -249,7 +247,7 @@ type StatusResponse struct { unknownFields protoimpl.UnknownFields AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` - RunsOnNodeId string `protobuf:"bytes,2,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` // TODO: rename to node_id + RunsOnNodeId string `protobuf:"bytes,2,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` //TODO: rename to node_id NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` ServerInfo *ServerInfo `protobuf:"bytes,4,opt,name=server_info,json=serverInfo,proto3" json:"server_info,omitempty"` AgentsInfo []*AgentInfo `protobuf:"bytes,5,rep,name=agents_info,json=agentsInfo,proto3" json:"agents_info,omitempty"` @@ -531,21 +529,18 @@ func file_agentlocal_v1_agentlocal_proto_rawDescGZIP() []byte { return file_agentlocal_v1_agentlocal_proto_rawDescData } -var ( - file_agentlocal_v1_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_agentlocal_v1_agentlocal_proto_goTypes = []any{ - (*ServerInfo)(nil), // 0: agentlocal.v1.ServerInfo - (*AgentInfo)(nil), // 1: agentlocal.v1.AgentInfo - (*StatusRequest)(nil), // 2: agentlocal.v1.StatusRequest - (*StatusResponse)(nil), // 3: agentlocal.v1.StatusResponse - (*ReloadRequest)(nil), // 4: agentlocal.v1.ReloadRequest - (*ReloadResponse)(nil), // 5: agentlocal.v1.ReloadResponse - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration - (v1.AgentType)(0), // 7: inventory.v1.AgentType - (v1.AgentStatus)(0), // 8: inventory.v1.AgentStatus - } -) - +var file_agentlocal_v1_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_agentlocal_v1_agentlocal_proto_goTypes = []any{ + (*ServerInfo)(nil), // 0: agentlocal.v1.ServerInfo + (*AgentInfo)(nil), // 1: agentlocal.v1.AgentInfo + (*StatusRequest)(nil), // 2: agentlocal.v1.StatusRequest + (*StatusResponse)(nil), // 3: agentlocal.v1.StatusResponse + (*ReloadRequest)(nil), // 4: agentlocal.v1.ReloadRequest + (*ReloadResponse)(nil), // 5: agentlocal.v1.ReloadResponse + (*durationpb.Duration)(nil), // 6: google.protobuf.Duration + (v1.AgentType)(0), // 7: inventory.v1.AgentType + (v1.AgentStatus)(0), // 8: inventory.v1.AgentStatus +} var file_agentlocal_v1_agentlocal_proto_depIdxs = []int32{ 6, // 0: agentlocal.v1.ServerInfo.latency:type_name -> google.protobuf.Duration 6, // 1: agentlocal.v1.ServerInfo.clock_drift:type_name -> google.protobuf.Duration diff --git a/api/agentlocal/v1/agentlocal.pb.gw.go b/api/agentlocal/v1/agentlocal.pb.gw.go index f8795a8ff4..3fba88ed36 100644 --- a/api/agentlocal/v1/agentlocal.pb.gw.go +++ b/api/agentlocal/v1/agentlocal.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_AgentLocalService_Status_0(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StatusRequest @@ -43,6 +41,7 @@ func request_AgentLocalService_Status_0(ctx context.Context, marshaler runtime.M msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentLocalService_Status_0(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -55,9 +54,12 @@ func local_request_AgentLocalService_Status_0(ctx context.Context, marshaler run msg, err := server.Status(ctx, &protoReq) return msg, metadata, err + } -var filter_AgentLocalService_Status_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_AgentLocalService_Status_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_AgentLocalService_Status_1(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StatusRequest @@ -72,6 +74,7 @@ func request_AgentLocalService_Status_1(ctx context.Context, marshaler runtime.M msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentLocalService_Status_1(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -87,6 +90,7 @@ func local_request_AgentLocalService_Status_1(ctx context.Context, marshaler run msg, err := server.Status(ctx, &protoReq) return msg, metadata, err + } func request_AgentLocalService_Reload_0(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -99,6 +103,7 @@ func request_AgentLocalService_Reload_0(ctx context.Context, marshaler runtime.M msg, err := client.Reload(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentLocalService_Reload_0(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +116,7 @@ func local_request_AgentLocalService_Reload_0(ctx context.Context, marshaler run msg, err := server.Reload(ctx, &protoReq) return msg, metadata, err + } // RegisterAgentLocalServiceHandlerServer registers the http handlers for service AgentLocalService to "mux". @@ -119,6 +125,7 @@ func local_request_AgentLocalService_Reload_0(ctx context.Context, marshaler run // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentLocalServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentLocalServiceServer) error { + mux.Handle("POST", pattern_AgentLocalService_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -141,6 +148,7 @@ func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AgentLocalService_Status_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -165,6 +173,7 @@ func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Status_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AgentLocalService_Reload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -189,6 +198,7 @@ func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Reload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -231,6 +241,7 @@ func RegisterAgentLocalServiceHandler(ctx context.Context, mux *runtime.ServeMux // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentLocalServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentLocalServiceClient) error { + mux.Handle("POST", pattern_AgentLocalService_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -250,6 +261,7 @@ func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AgentLocalService_Status_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -271,6 +283,7 @@ func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Status_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AgentLocalService_Reload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -292,6 +305,7 @@ func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Reload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/agentlocal/v1/agentlocal_grpc.pb.go b/api/agentlocal/v1/agentlocal_grpc.pb.go index caaffdd9ea..9f965320fe 100644 --- a/api/agentlocal/v1/agentlocal_grpc.pb.go +++ b/api/agentlocal/v1/agentlocal_grpc.pb.go @@ -8,7 +8,6 @@ package agentlocalv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -87,7 +86,6 @@ type UnimplementedAgentLocalServiceServer struct{} func (UnimplementedAgentLocalServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") } - func (UnimplementedAgentLocalServiceServer) Reload(context.Context, *ReloadRequest) (*ReloadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Reload not implemented") } diff --git a/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go index 5869239735..86815ac806 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go @@ -60,6 +60,7 @@ ReloadParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ReloadParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ReloadParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ReloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go b/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go index 50b09a75b1..129dd918aa 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go @@ -103,6 +103,7 @@ func (o *ReloadOK) GetPayload() interface{} { } func (o *ReloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *ReloadDefault) GetPayload() *ReloadDefaultBody { } func (o *ReloadDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ReloadDefaultBody) // response payload @@ -189,6 +191,7 @@ ReloadDefaultBody reload default body swagger:model ReloadDefaultBody */ type ReloadDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *ReloadDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -298,6 +304,7 @@ ReloadDefaultBodyDetailsItems0 reload default body details items0 swagger:model ReloadDefaultBodyDetailsItems0 */ type ReloadDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type ReloadDefaultBodyDetailsItems0 struct { func (o *ReloadDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *ReloadDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ReloadDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go index 220d4c5bba..e1a0f18fb7 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go @@ -61,6 +61,7 @@ Status2Params contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type Status2Params struct { + /* GetNetworkInfo. Returns network info (latency and clock_drift) if true. @@ -133,6 +134,7 @@ func (o *Status2Params) SetGetNetworkInfo(getNetworkInfo *bool) { // WriteToRequest writes these params to a swagger request func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -148,6 +150,7 @@ func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qGetNetworkInfo := swag.FormatBool(qrGetNetworkInfo) if qGetNetworkInfo != "" { + if err := r.SetQueryParam("get_network_info", qGetNetworkInfo); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go b/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go index fe7d34ef26..4ca25a86a3 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go @@ -104,6 +104,7 @@ func (o *Status2OK) GetPayload() *Status2OKBody { } func (o *Status2OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(Status2OKBody) // response payload @@ -177,6 +178,7 @@ func (o *Status2Default) GetPayload() *Status2DefaultBody { } func (o *Status2Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(Status2DefaultBody) // response payload @@ -192,6 +194,7 @@ Status2DefaultBody status2 default body swagger:model Status2DefaultBody */ type Status2DefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *Status2DefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -301,6 +307,7 @@ Status2DefaultBodyDetailsItems0 status2 default body details items0 swagger:model Status2DefaultBodyDetailsItems0 */ type Status2DefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type Status2DefaultBodyDetailsItems0 struct { func (o *Status2DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *Status2DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o Status2DefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ Status2OKBody status2 OK body swagger:model Status2OKBody */ type Status2OKBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -519,7 +529,9 @@ func (o *Status2OKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AgentsInfo); i++ { + if o.AgentsInfo[i] != nil { if swag.IsZero(o.AgentsInfo[i]) { // not required @@ -535,12 +547,14 @@ func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats s return err } } + } return nil } func (o *Status2OKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { + if o.ServerInfo != nil { if swag.IsZero(o.ServerInfo) { // not required @@ -583,6 +597,7 @@ Status2OKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model Status2OKBodyAgentsInfoItems0 */ type Status2OKBodyAgentsInfoItems0 struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -803,6 +818,7 @@ Status2OKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model Status2OKBodyServerInfo */ type Status2OKBodyServerInfo struct { + // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go index f522c46829..56301866cc 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go @@ -60,6 +60,7 @@ StatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StatusParams struct { + // Body. Body StatusBody @@ -129,6 +130,7 @@ func (o *StatusParams) SetBody(body StatusBody) { // WriteToRequest writes these params to a swagger request func (o *StatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status_responses.go b/api/agentlocal/v1/json/client/agent_local_service/status_responses.go index aa335f6d48..3629f9e9bc 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status_responses.go @@ -104,6 +104,7 @@ func (o *StatusOK) GetPayload() *StatusOKBody { } func (o *StatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StatusOKBody) // response payload @@ -177,6 +178,7 @@ func (o *StatusDefault) GetPayload() *StatusDefaultBody { } func (o *StatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StatusDefaultBody) // response payload @@ -192,6 +194,7 @@ StatusBody status body swagger:model StatusBody */ type StatusBody struct { + // Returns network info (latency and clock_drift) if true. GetNetworkInfo bool `json:"get_network_info,omitempty"` } @@ -229,6 +232,7 @@ StatusDefaultBody status default body swagger:model StatusDefaultBody */ type StatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -294,7 +298,9 @@ func (o *StatusDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -310,6 +316,7 @@ func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -338,6 +345,7 @@ StatusDefaultBodyDetailsItems0 status default body details items0 swagger:model StatusDefaultBodyDetailsItems0 */ type StatusDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -349,6 +357,7 @@ type StatusDefaultBodyDetailsItems0 struct { func (o *StatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -386,6 +395,7 @@ func (o *StatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -449,6 +459,7 @@ StatusOKBody status OK body swagger:model StatusOKBody */ type StatusOKBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -556,7 +567,9 @@ func (o *StatusOKBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AgentsInfo); i++ { + if o.AgentsInfo[i] != nil { if swag.IsZero(o.AgentsInfo[i]) { // not required @@ -572,12 +585,14 @@ func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats st return err } } + } return nil } func (o *StatusOKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { + if o.ServerInfo != nil { if swag.IsZero(o.ServerInfo) { // not required @@ -620,6 +635,7 @@ StatusOKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model StatusOKBodyAgentsInfoItems0 */ type StatusOKBodyAgentsInfoItems0 struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -840,6 +856,7 @@ StatusOKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model StatusOKBodyServerInfo */ type StatusOKBodyServerInfo struct { + // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/alerting/v1/alerting.pb.go b/api/alerting/v1/alerting.pb.go index 5d599a55c2..ff9e34ce4f 100644 --- a/api/alerting/v1/alerting.pb.go +++ b/api/alerting/v1/alerting.pb.go @@ -7,17 +7,15 @@ package alertingv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/management/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/management/v1" + reflect "reflect" + sync "sync" ) const ( @@ -1554,40 +1552,37 @@ func file_alerting_v1_alerting_proto_rawDescGZIP() []byte { return file_alerting_v1_alerting_proto_rawDescData } -var ( - file_alerting_v1_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_alerting_v1_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) - file_alerting_v1_alerting_proto_goTypes = []any{ - (TemplateSource)(0), // 0: alerting.v1.TemplateSource - (FilterType)(0), // 1: alerting.v1.FilterType - (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition - (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition - (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition - (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition - (*Template)(nil), // 6: alerting.v1.Template - (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest - (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse - (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest - (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse - (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest - (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse - (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest - (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse - (*Filter)(nil), // 15: alerting.v1.Filter - (*ParamValue)(nil), // 16: alerting.v1.ParamValue - (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest - (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse - nil, // 19: alerting.v1.Template.LabelsEntry - nil, // 20: alerting.v1.Template.AnnotationsEntry - nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry - (ParamUnit)(0), // 22: alerting.v1.ParamUnit - (ParamType)(0), // 23: alerting.v1.ParamType - (*durationpb.Duration)(nil), // 24: google.protobuf.Duration - (v1.Severity)(0), // 25: management.v1.Severity - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - } -) - +var file_alerting_v1_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_alerting_v1_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_alerting_v1_alerting_proto_goTypes = []any{ + (TemplateSource)(0), // 0: alerting.v1.TemplateSource + (FilterType)(0), // 1: alerting.v1.FilterType + (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition + (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition + (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition + (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition + (*Template)(nil), // 6: alerting.v1.Template + (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest + (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse + (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest + (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse + (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest + (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse + (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest + (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse + (*Filter)(nil), // 15: alerting.v1.Filter + (*ParamValue)(nil), // 16: alerting.v1.ParamValue + (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest + (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse + nil, // 19: alerting.v1.Template.LabelsEntry + nil, // 20: alerting.v1.Template.AnnotationsEntry + nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry + (ParamUnit)(0), // 22: alerting.v1.ParamUnit + (ParamType)(0), // 23: alerting.v1.ParamType + (*durationpb.Duration)(nil), // 24: google.protobuf.Duration + (v1.Severity)(0), // 25: management.v1.Severity + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp +} var file_alerting_v1_alerting_proto_depIdxs = []int32{ 22, // 0: alerting.v1.ParamDefinition.unit:type_name -> alerting.v1.ParamUnit 23, // 1: alerting.v1.ParamDefinition.type:type_name -> alerting.v1.ParamType diff --git a/api/alerting/v1/alerting.pb.gw.go b/api/alerting/v1/alerting.pb.gw.go index 8edb3ca048..c139cb91a0 100644 --- a/api/alerting/v1/alerting.pb.gw.go +++ b/api/alerting/v1/alerting.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join + filter_AlertingService_ListTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -var filter_AlertingService_ListTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - func request_AlertingService_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListTemplatesRequest var metadata runtime.ServerMetadata @@ -48,6 +48,7 @@ func request_AlertingService_ListTemplates_0(ctx context.Context, marshaler runt msg, err := client.ListTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AlertingService_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +64,7 @@ func local_request_AlertingService_ListTemplates_0(ctx context.Context, marshale msg, err := server.ListTemplates(ctx, &protoReq) return msg, metadata, err + } func request_AlertingService_CreateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -75,6 +77,7 @@ func request_AlertingService_CreateTemplate_0(ctx context.Context, marshaler run msg, err := client.CreateTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AlertingService_CreateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -87,6 +90,7 @@ func local_request_AlertingService_CreateTemplate_0(ctx context.Context, marshal msg, err := server.CreateTemplate(ctx, &protoReq) return msg, metadata, err + } func request_AlertingService_UpdateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,6 +120,7 @@ func request_AlertingService_UpdateTemplate_0(ctx context.Context, marshaler run msg, err := client.UpdateTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AlertingService_UpdateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -145,6 +150,7 @@ func local_request_AlertingService_UpdateTemplate_0(ctx context.Context, marshal msg, err := server.UpdateTemplate(ctx, &protoReq) return msg, metadata, err + } func request_AlertingService_DeleteTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -170,6 +176,7 @@ func request_AlertingService_DeleteTemplate_0(ctx context.Context, marshaler run msg, err := client.DeleteTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AlertingService_DeleteTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -195,6 +202,7 @@ func local_request_AlertingService_DeleteTemplate_0(ctx context.Context, marshal msg, err := server.DeleteTemplate(ctx, &protoReq) return msg, metadata, err + } func request_AlertingService_CreateRule_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_AlertingService_CreateRule_0(ctx context.Context, marshaler runtime msg, err := client.CreateRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AlertingService_CreateRule_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -219,6 +228,7 @@ func local_request_AlertingService_CreateRule_0(ctx context.Context, marshaler r msg, err := server.CreateRule(ctx, &protoReq) return msg, metadata, err + } // RegisterAlertingServiceHandlerServer registers the http handlers for service AlertingService to "mux". @@ -227,6 +237,7 @@ func local_request_AlertingService_CreateRule_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAlertingServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertingServiceServer) error { + mux.Handle("GET", pattern_AlertingService_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -249,6 +260,7 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AlertingService_CreateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -273,6 +285,7 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_CreateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_AlertingService_UpdateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -297,6 +310,7 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_UpdateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_AlertingService_DeleteTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -321,6 +335,7 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_DeleteTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AlertingService_CreateRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -345,6 +360,7 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_CreateRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -387,6 +403,7 @@ func RegisterAlertingServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AlertingServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertingServiceClient) error { + mux.Handle("GET", pattern_AlertingService_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -406,6 +423,7 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AlertingService_CreateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -427,6 +445,7 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_CreateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_AlertingService_UpdateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -448,6 +467,7 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_UpdateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_AlertingService_DeleteTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -469,6 +489,7 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_DeleteTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AlertingService_CreateRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -490,6 +511,7 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_CreateRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/alerting/v1/alerting.pb.validate.go b/api/alerting/v1/alerting.pb.validate.go index 8c49e99a95..36cc3811bf 100644 --- a/api/alerting/v1/alerting.pb.validate.go +++ b/api/alerting/v1/alerting.pb.validate.go @@ -851,6 +851,7 @@ func (m *ListTemplatesRequest) validate(all bool) error { // no validation rules for Reload if m.PageSize != nil { + if m.GetPageSize() < 1 { err := ListTemplatesRequestValidationError{ field: "PageSize", @@ -861,9 +862,11 @@ func (m *ListTemplatesRequest) validate(all bool) error { } errors = append(errors, err) } + } if m.PageIndex != nil { + if m.GetPageIndex() < 0 { err := ListTemplatesRequestValidationError{ field: "PageIndex", @@ -874,6 +877,7 @@ func (m *ListTemplatesRequest) validate(all bool) error { } errors = append(errors, err) } + } if len(errors) > 0 { diff --git a/api/alerting/v1/alerting_grpc.pb.go b/api/alerting/v1/alerting_grpc.pb.go index 94c17b63db..cff5e646ff 100644 --- a/api/alerting/v1/alerting_grpc.pb.go +++ b/api/alerting/v1/alerting_grpc.pb.go @@ -8,7 +8,6 @@ package alertingv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -132,19 +131,15 @@ type UnimplementedAlertingServiceServer struct{} func (UnimplementedAlertingServiceServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTemplates not implemented") } - func (UnimplementedAlertingServiceServer) CreateTemplate(context.Context, *CreateTemplateRequest) (*CreateTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTemplate not implemented") } - func (UnimplementedAlertingServiceServer) UpdateTemplate(context.Context, *UpdateTemplateRequest) (*UpdateTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateTemplate not implemented") } - func (UnimplementedAlertingServiceServer) DeleteTemplate(context.Context, *DeleteTemplateRequest) (*DeleteTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTemplate not implemented") } - func (UnimplementedAlertingServiceServer) CreateRule(context.Context, *CreateRuleRequest) (*CreateRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRule not implemented") } diff --git a/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go b/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go index d99404fc94..dc970ceafc 100644 --- a/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go @@ -60,6 +60,7 @@ CreateRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRuleParams struct { + // Body. Body CreateRuleBody @@ -129,6 +130,7 @@ func (o *CreateRuleParams) SetBody(body CreateRuleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/create_rule_responses.go b/api/alerting/v1/json/client/alerting_service/create_rule_responses.go index e5f44dd29a..550001ba20 100644 --- a/api/alerting/v1/json/client/alerting_service/create_rule_responses.go +++ b/api/alerting/v1/json/client/alerting_service/create_rule_responses.go @@ -104,6 +104,7 @@ func (o *CreateRuleOK) GetPayload() interface{} { } func (o *CreateRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,6 +176,7 @@ func (o *CreateRuleDefault) GetPayload() *CreateRuleDefaultBody { } func (o *CreateRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRuleDefaultBody) // response payload @@ -190,6 +192,7 @@ CreateRuleBody create rule body swagger:model CreateRuleBody */ type CreateRuleBody struct { + // Template name. TemplateName string `json:"template_name,omitempty"` @@ -378,7 +381,9 @@ func (o *CreateRuleBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -394,13 +399,16 @@ func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strf return err } } + } return nil } func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Filters); i++ { + if o.Filters[i] != nil { if swag.IsZero(o.Filters[i]) { // not required @@ -416,6 +424,7 @@ func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats str return err } } + } return nil @@ -444,6 +453,7 @@ CreateRuleDefaultBody create rule default body swagger:model CreateRuleDefaultBody */ type CreateRuleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -509,7 +519,9 @@ func (o *CreateRuleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -525,6 +537,7 @@ func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -553,6 +566,7 @@ CreateRuleDefaultBodyDetailsItems0 create rule default body details items0 swagger:model CreateRuleDefaultBodyDetailsItems0 */ type CreateRuleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -564,6 +578,7 @@ type CreateRuleDefaultBodyDetailsItems0 struct { func (o *CreateRuleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -601,6 +616,7 @@ func (o *CreateRuleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateRuleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -664,6 +680,7 @@ CreateRuleParamsBodyFiltersItems0 Filter represents a single filter condition. swagger:model CreateRuleParamsBodyFiltersItems0 */ type CreateRuleParamsBodyFiltersItems0 struct { + // FilterType represents filter matching type. // Enum: ["FILTER_TYPE_UNSPECIFIED","FILTER_TYPE_MATCH","FILTER_TYPE_MISMATCH"] Type *string `json:"type,omitempty"` @@ -762,6 +779,7 @@ CreateRuleParamsBodyParamsItems0 ParamValue represents a single rule parameter v swagger:model CreateRuleParamsBodyParamsItems0 */ type CreateRuleParamsBodyParamsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/alerting/v1/json/client/alerting_service/create_template_parameters.go b/api/alerting/v1/json/client/alerting_service/create_template_parameters.go index 7af56c3584..266ab9b7c4 100644 --- a/api/alerting/v1/json/client/alerting_service/create_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/create_template_parameters.go @@ -60,6 +60,7 @@ CreateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateTemplateParams struct { + // Body. Body CreateTemplateBody @@ -129,6 +130,7 @@ func (o *CreateTemplateParams) SetBody(body CreateTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *CreateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/create_template_responses.go b/api/alerting/v1/json/client/alerting_service/create_template_responses.go index 1c6b1a57ff..43f4a1fa3d 100644 --- a/api/alerting/v1/json/client/alerting_service/create_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/create_template_responses.go @@ -103,6 +103,7 @@ func (o *CreateTemplateOK) GetPayload() interface{} { } func (o *CreateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *CreateTemplateDefault) GetPayload() *CreateTemplateDefaultBody { } func (o *CreateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateTemplateDefaultBody) // response payload @@ -189,6 +191,7 @@ CreateTemplateBody create template body swagger:model CreateTemplateBody */ type CreateTemplateBody struct { + // YAML template file content. Yaml string `json:"yaml,omitempty"` } @@ -226,6 +229,7 @@ CreateTemplateDefaultBody create template default body swagger:model CreateTemplateDefaultBody */ type CreateTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +295,9 @@ func (o *CreateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -307,6 +313,7 @@ func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -335,6 +342,7 @@ CreateTemplateDefaultBodyDetailsItems0 create template default body details item swagger:model CreateTemplateDefaultBodyDetailsItems0 */ type CreateTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -346,6 +354,7 @@ type CreateTemplateDefaultBodyDetailsItems0 struct { func (o *CreateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -383,6 +392,7 @@ func (o *CreateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go b/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go index 12c5e9f70f..08d19304dc 100644 --- a/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go @@ -60,6 +60,7 @@ DeleteTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteTemplateParams struct { + // Name. Name string @@ -129,6 +130,7 @@ func (o *DeleteTemplateParams) SetName(name string) { // WriteToRequest writes these params to a swagger request func (o *DeleteTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/delete_template_responses.go b/api/alerting/v1/json/client/alerting_service/delete_template_responses.go index 6dd0166a32..ee1fc470a1 100644 --- a/api/alerting/v1/json/client/alerting_service/delete_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/delete_template_responses.go @@ -103,6 +103,7 @@ func (o *DeleteTemplateOK) GetPayload() interface{} { } func (o *DeleteTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *DeleteTemplateDefault) GetPayload() *DeleteTemplateDefaultBody { } func (o *DeleteTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteTemplateDefaultBody) // response payload @@ -189,6 +191,7 @@ DeleteTemplateDefaultBody delete template default body swagger:model DeleteTemplateDefaultBody */ type DeleteTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *DeleteTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -298,6 +304,7 @@ DeleteTemplateDefaultBodyDetailsItems0 delete template default body details item swagger:model DeleteTemplateDefaultBodyDetailsItems0 */ type DeleteTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type DeleteTemplateDefaultBodyDetailsItems0 struct { func (o *DeleteTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *DeleteTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go b/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go index 54f826721d..a13fd2e40a 100644 --- a/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go @@ -61,6 +61,7 @@ ListTemplatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListTemplatesParams struct { + /* PageIndex. Index of the requested page, starts from 0. @@ -171,6 +172,7 @@ func (o *ListTemplatesParams) SetReload(reload *bool) { // WriteToRequest writes these params to a swagger request func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -186,6 +188,7 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qPageIndex := swag.FormatInt32(qrPageIndex) if qPageIndex != "" { + if err := r.SetQueryParam("page_index", qPageIndex); err != nil { return err } @@ -202,6 +205,7 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } @@ -218,6 +222,7 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qReload := swag.FormatBool(qrReload) if qReload != "" { + if err := r.SetQueryParam("reload", qReload); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/list_templates_responses.go b/api/alerting/v1/json/client/alerting_service/list_templates_responses.go index 3e74113148..ad823f1a6f 100644 --- a/api/alerting/v1/json/client/alerting_service/list_templates_responses.go +++ b/api/alerting/v1/json/client/alerting_service/list_templates_responses.go @@ -104,6 +104,7 @@ func (o *ListTemplatesOK) GetPayload() *ListTemplatesOKBody { } func (o *ListTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListTemplatesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListTemplatesDefault) GetPayload() *ListTemplatesDefaultBody { } func (o *ListTemplatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListTemplatesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListTemplatesDefaultBody list templates default body swagger:model ListTemplatesDefaultBody */ type ListTemplatesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListTemplatesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -301,6 +307,7 @@ ListTemplatesDefaultBodyDetailsItems0 list templates default body details items0 swagger:model ListTemplatesDefaultBodyDetailsItems0 */ type ListTemplatesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListTemplatesDefaultBodyDetailsItems0 struct { func (o *ListTemplatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListTemplatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListTemplatesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListTemplatesOKBody list templates OK body swagger:model ListTemplatesOKBody */ type ListTemplatesOKBody struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -477,7 +487,9 @@ func (o *ListTemplatesOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Templates); i++ { + if o.Templates[i] != nil { if swag.IsZero(o.Templates[i]) { // not required @@ -493,6 +505,7 @@ func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, form return err } } + } return nil @@ -521,6 +534,7 @@ ListTemplatesOKBodyTemplatesItems0 Template represents Alert Template that is us swagger:model ListTemplatesOKBodyTemplatesItems0 */ type ListTemplatesOKBodyTemplatesItems0 struct { + // Machine-readable name (ID). Name string `json:"name,omitempty"` @@ -756,7 +770,9 @@ func (o *ListTemplatesOKBodyTemplatesItems0) ContextValidate(ctx context.Context } func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -772,6 +788,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.C return err } } + } return nil @@ -800,6 +817,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0 ParamDefinition represents a sing swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0 */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -1031,6 +1049,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) ContextValidate(ctx con } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { + if o.Bool != nil { if swag.IsZero(o.Bool) { // not required @@ -1051,6 +1070,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { + if o.Float != nil { if swag.IsZero(o.Float) { // not required @@ -1071,6 +1091,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ct } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { + if o.String != nil { if swag.IsZero(o.String) { // not required @@ -1113,6 +1134,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool BoolParamDefinition represent swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool struct { + // default Default *bool `json:"default,omitempty"` } @@ -1150,6 +1172,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Float FloatParamDefinition represe swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Float */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Float struct { + // Default value. Default *float64 `json:"default,omitempty"` @@ -1193,6 +1216,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0String StringParamDefinition repre swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0String */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0String struct { + // Default value. Default *string `json:"default,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/update_template_parameters.go b/api/alerting/v1/json/client/alerting_service/update_template_parameters.go index 531cd4e36b..8d019495ca 100644 --- a/api/alerting/v1/json/client/alerting_service/update_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/update_template_parameters.go @@ -60,6 +60,7 @@ UpdateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateTemplateParams struct { + // Body. Body UpdateTemplateBody @@ -146,6 +147,7 @@ func (o *UpdateTemplateParams) SetName(name string) { // WriteToRequest writes these params to a swagger request func (o *UpdateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/update_template_responses.go b/api/alerting/v1/json/client/alerting_service/update_template_responses.go index 8bf605f957..df26f7b843 100644 --- a/api/alerting/v1/json/client/alerting_service/update_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/update_template_responses.go @@ -103,6 +103,7 @@ func (o *UpdateTemplateOK) GetPayload() interface{} { } func (o *UpdateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *UpdateTemplateDefault) GetPayload() *UpdateTemplateDefaultBody { } func (o *UpdateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateTemplateDefaultBody) // response payload @@ -189,6 +191,7 @@ UpdateTemplateBody update template body swagger:model UpdateTemplateBody */ type UpdateTemplateBody struct { + // YAML template file content. Yaml string `json:"yaml,omitempty"` } @@ -226,6 +229,7 @@ UpdateTemplateDefaultBody update template default body swagger:model UpdateTemplateDefaultBody */ type UpdateTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +295,9 @@ func (o *UpdateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -307,6 +313,7 @@ func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -335,6 +342,7 @@ UpdateTemplateDefaultBodyDetailsItems0 update template default body details item swagger:model UpdateTemplateDefaultBodyDetailsItems0 */ type UpdateTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -346,6 +354,7 @@ type UpdateTemplateDefaultBodyDetailsItems0 struct { func (o *UpdateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -383,6 +392,7 @@ func (o *UpdateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/params.pb.go b/api/alerting/v1/params.pb.go index 80c9f6c43d..9b63baccfe 100644 --- a/api/alerting/v1/params.pb.go +++ b/api/alerting/v1/params.pb.go @@ -7,11 +7,10 @@ package alertingv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -170,14 +169,11 @@ func file_alerting_v1_params_proto_rawDescGZIP() []byte { return file_alerting_v1_params_proto_rawDescData } -var ( - file_alerting_v1_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_alerting_v1_params_proto_goTypes = []any{ - (ParamUnit)(0), // 0: alerting.v1.ParamUnit - (ParamType)(0), // 1: alerting.v1.ParamType - } -) - +var file_alerting_v1_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_alerting_v1_params_proto_goTypes = []any{ + (ParamUnit)(0), // 0: alerting.v1.ParamUnit + (ParamType)(0), // 1: alerting.v1.ParamType +} var file_alerting_v1_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/backup/v1/artifacts.pb.go b/api/backup/v1/artifacts.pb.go index 0d5056a189..5cc4187f30 100644 --- a/api/backup/v1/artifacts.pb.go +++ b/api/backup/v1/artifacts.pb.go @@ -7,13 +7,12 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -694,26 +693,23 @@ func file_backup_v1_artifacts_proto_rawDescGZIP() []byte { return file_backup_v1_artifacts_proto_rawDescData } -var ( - file_backup_v1_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_backup_v1_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_backup_v1_artifacts_proto_goTypes = []any{ - (BackupStatus)(0), // 0: backup.v1.BackupStatus - (*Artifact)(nil), // 1: backup.v1.Artifact - (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest - (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse - (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest - (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse - (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange - (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest - (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse - (DataModel)(0), // 9: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp - (BackupMode)(0), // 11: backup.v1.BackupMode - (*Metadata)(nil), // 12: backup.v1.Metadata - } -) - +var file_backup_v1_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_backup_v1_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_backup_v1_artifacts_proto_goTypes = []any{ + (BackupStatus)(0), // 0: backup.v1.BackupStatus + (*Artifact)(nil), // 1: backup.v1.Artifact + (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest + (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse + (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest + (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse + (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange + (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest + (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse + (DataModel)(0), // 9: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (BackupMode)(0), // 11: backup.v1.BackupMode + (*Metadata)(nil), // 12: backup.v1.Metadata +} var file_backup_v1_artifacts_proto_depIdxs = []int32{ 9, // 0: backup.v1.Artifact.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.Artifact.status:type_name -> backup.v1.BackupStatus diff --git a/api/backup/v1/backup.pb.go b/api/backup/v1/backup.pb.go index ffe4df804c..9e4aecfdac 100644 --- a/api/backup/v1/backup.pb.go +++ b/api/backup/v1/backup.pb.go @@ -7,18 +7,16 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -1497,40 +1495,37 @@ func file_backup_v1_backup_proto_rawDescGZIP() []byte { return file_backup_v1_backup_proto_rawDescData } -var ( - file_backup_v1_backup_proto_msgTypes = make([]protoimpl.MessageInfo, 15) - file_backup_v1_backup_proto_goTypes = []any{ - (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest - (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse - (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest - (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse - (*ScheduledBackup)(nil), // 4: backup.v1.ScheduledBackup - (*ScheduleBackupRequest)(nil), // 5: backup.v1.ScheduleBackupRequest - (*ScheduleBackupResponse)(nil), // 6: backup.v1.ScheduleBackupResponse - (*ListScheduledBackupsRequest)(nil), // 7: backup.v1.ListScheduledBackupsRequest - (*ListScheduledBackupsResponse)(nil), // 8: backup.v1.ListScheduledBackupsResponse - (*ChangeScheduledBackupRequest)(nil), // 9: backup.v1.ChangeScheduledBackupRequest - (*ChangeScheduledBackupResponse)(nil), // 10: backup.v1.ChangeScheduledBackupResponse - (*RemoveScheduledBackupRequest)(nil), // 11: backup.v1.RemoveScheduledBackupRequest - (*RemoveScheduledBackupResponse)(nil), // 12: backup.v1.RemoveScheduledBackupResponse - (*GetLogsRequest)(nil), // 13: backup.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 14: backup.v1.GetLogsResponse - (*durationpb.Duration)(nil), // 15: google.protobuf.Duration - (DataModel)(0), // 16: backup.v1.DataModel - (*v1.MySQLService)(nil), // 17: inventory.v1.MySQLService - (*v1.MongoDBService)(nil), // 18: inventory.v1.MongoDBService - (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp - (BackupMode)(0), // 20: backup.v1.BackupMode - (*LogChunk)(nil), // 21: backup.v1.LogChunk - (*ListArtifactsRequest)(nil), // 22: backup.v1.ListArtifactsRequest - (*DeleteArtifactRequest)(nil), // 23: backup.v1.DeleteArtifactRequest - (*ListPitrTimerangesRequest)(nil), // 24: backup.v1.ListPitrTimerangesRequest - (*ListArtifactsResponse)(nil), // 25: backup.v1.ListArtifactsResponse - (*DeleteArtifactResponse)(nil), // 26: backup.v1.DeleteArtifactResponse - (*ListPitrTimerangesResponse)(nil), // 27: backup.v1.ListPitrTimerangesResponse - } -) - +var file_backup_v1_backup_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_backup_v1_backup_proto_goTypes = []any{ + (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest + (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse + (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest + (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse + (*ScheduledBackup)(nil), // 4: backup.v1.ScheduledBackup + (*ScheduleBackupRequest)(nil), // 5: backup.v1.ScheduleBackupRequest + (*ScheduleBackupResponse)(nil), // 6: backup.v1.ScheduleBackupResponse + (*ListScheduledBackupsRequest)(nil), // 7: backup.v1.ListScheduledBackupsRequest + (*ListScheduledBackupsResponse)(nil), // 8: backup.v1.ListScheduledBackupsResponse + (*ChangeScheduledBackupRequest)(nil), // 9: backup.v1.ChangeScheduledBackupRequest + (*ChangeScheduledBackupResponse)(nil), // 10: backup.v1.ChangeScheduledBackupResponse + (*RemoveScheduledBackupRequest)(nil), // 11: backup.v1.RemoveScheduledBackupRequest + (*RemoveScheduledBackupResponse)(nil), // 12: backup.v1.RemoveScheduledBackupResponse + (*GetLogsRequest)(nil), // 13: backup.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 14: backup.v1.GetLogsResponse + (*durationpb.Duration)(nil), // 15: google.protobuf.Duration + (DataModel)(0), // 16: backup.v1.DataModel + (*v1.MySQLService)(nil), // 17: inventory.v1.MySQLService + (*v1.MongoDBService)(nil), // 18: inventory.v1.MongoDBService + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (BackupMode)(0), // 20: backup.v1.BackupMode + (*LogChunk)(nil), // 21: backup.v1.LogChunk + (*ListArtifactsRequest)(nil), // 22: backup.v1.ListArtifactsRequest + (*DeleteArtifactRequest)(nil), // 23: backup.v1.DeleteArtifactRequest + (*ListPitrTimerangesRequest)(nil), // 24: backup.v1.ListPitrTimerangesRequest + (*ListArtifactsResponse)(nil), // 25: backup.v1.ListArtifactsResponse + (*DeleteArtifactResponse)(nil), // 26: backup.v1.DeleteArtifactResponse + (*ListPitrTimerangesResponse)(nil), // 27: backup.v1.ListPitrTimerangesResponse +} var file_backup_v1_backup_proto_depIdxs = []int32{ 15, // 0: backup.v1.StartBackupRequest.retry_interval:type_name -> google.protobuf.Duration 16, // 1: backup.v1.StartBackupRequest.data_model:type_name -> backup.v1.DataModel diff --git a/api/backup/v1/backup.pb.gw.go b/api/backup/v1/backup.pb.gw.go index 65d84b9c88..7583991fb5 100644 --- a/api/backup/v1/backup.pb.gw.go +++ b/api/backup/v1/backup.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_BackupService_StartBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartBackupRequest @@ -43,6 +41,7 @@ func request_BackupService_StartBackup_0(ctx context.Context, marshaler runtime. msg, err := client.StartBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_StartBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -55,6 +54,7 @@ func local_request_BackupService_StartBackup_0(ctx context.Context, marshaler ru msg, err := server.StartBackup(ctx, &protoReq) return msg, metadata, err + } func request_BackupService_ListArtifactCompatibleServices_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -80,6 +80,7 @@ func request_BackupService_ListArtifactCompatibleServices_0(ctx context.Context, msg, err := client.ListArtifactCompatibleServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_ListArtifactCompatibleServices_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -105,6 +106,7 @@ func local_request_BackupService_ListArtifactCompatibleServices_0(ctx context.Co msg, err := server.ListArtifactCompatibleServices(ctx, &protoReq) return msg, metadata, err + } func request_BackupService_ScheduleBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -117,6 +119,7 @@ func request_BackupService_ScheduleBackup_0(ctx context.Context, marshaler runti msg, err := client.ScheduleBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_ScheduleBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -129,6 +132,7 @@ func local_request_BackupService_ScheduleBackup_0(ctx context.Context, marshaler msg, err := server.ScheduleBackup(ctx, &protoReq) return msg, metadata, err + } func request_BackupService_ListScheduledBackups_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -137,6 +141,7 @@ func request_BackupService_ListScheduledBackups_0(ctx context.Context, marshaler msg, err := client.ListScheduledBackups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_ListScheduledBackups_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -145,6 +150,7 @@ func local_request_BackupService_ListScheduledBackups_0(ctx context.Context, mar msg, err := server.ListScheduledBackups(ctx, &protoReq) return msg, metadata, err + } func request_BackupService_ChangeScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -157,6 +163,7 @@ func request_BackupService_ChangeScheduledBackup_0(ctx context.Context, marshale msg, err := client.ChangeScheduledBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_ChangeScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -169,6 +176,7 @@ func local_request_BackupService_ChangeScheduledBackup_0(ctx context.Context, ma msg, err := server.ChangeScheduledBackup(ctx, &protoReq) return msg, metadata, err + } func request_BackupService_RemoveScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -194,6 +202,7 @@ func request_BackupService_RemoveScheduledBackup_0(ctx context.Context, marshale msg, err := client.RemoveScheduledBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_RemoveScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -219,9 +228,12 @@ func local_request_BackupService_RemoveScheduledBackup_0(ctx context.Context, ma msg, err := server.RemoveScheduledBackup(ctx, &protoReq) return msg, metadata, err + } -var filter_BackupService_GetLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"artifact_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_BackupService_GetLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"artifact_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_BackupService_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetLogsRequest @@ -253,6 +265,7 @@ func request_BackupService_GetLogs_0(ctx context.Context, marshaler runtime.Mars msg, err := client.GetLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -285,6 +298,7 @@ func local_request_BackupService_GetLogs_0(ctx context.Context, marshaler runtim msg, err := server.GetLogs(ctx, &protoReq) return msg, metadata, err + } func request_BackupService_ListArtifacts_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -293,6 +307,7 @@ func request_BackupService_ListArtifacts_0(ctx context.Context, marshaler runtim msg, err := client.ListArtifacts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_ListArtifacts_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -301,9 +316,12 @@ func local_request_BackupService_ListArtifacts_0(ctx context.Context, marshaler msg, err := server.ListArtifacts(ctx, &protoReq) return msg, metadata, err + } -var filter_BackupService_DeleteArtifact_0 = &utilities.DoubleArray{Encoding: map[string]int{"artifact_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_BackupService_DeleteArtifact_0 = &utilities.DoubleArray{Encoding: map[string]int{"artifact_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_BackupService_DeleteArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteArtifactRequest @@ -335,6 +353,7 @@ func request_BackupService_DeleteArtifact_0(ctx context.Context, marshaler runti msg, err := client.DeleteArtifact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_DeleteArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -367,6 +386,7 @@ func local_request_BackupService_DeleteArtifact_0(ctx context.Context, marshaler msg, err := server.DeleteArtifact(ctx, &protoReq) return msg, metadata, err + } func request_BackupService_ListPitrTimeranges_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -392,6 +412,7 @@ func request_BackupService_ListPitrTimeranges_0(ctx context.Context, marshaler r msg, err := client.ListPitrTimeranges(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_BackupService_ListPitrTimeranges_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -417,6 +438,7 @@ func local_request_BackupService_ListPitrTimeranges_0(ctx context.Context, marsh msg, err := server.ListPitrTimeranges(ctx, &protoReq) return msg, metadata, err + } // RegisterBackupServiceHandlerServer registers the http handlers for service BackupService to "mux". @@ -425,6 +447,7 @@ func local_request_BackupService_ListPitrTimeranges_0(ctx context.Context, marsh // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBackupServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BackupServiceServer) error { + mux.Handle("POST", pattern_BackupService_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -447,6 +470,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_StartBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_ListArtifactCompatibleServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -471,6 +495,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListArtifactCompatibleServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_BackupService_ScheduleBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -495,6 +520,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ScheduleBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_ListScheduledBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -519,6 +545,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListScheduledBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_BackupService_ChangeScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -543,6 +570,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ChangeScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_BackupService_RemoveScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -567,6 +595,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_RemoveScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -591,6 +620,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_ListArtifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -615,6 +645,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListArtifacts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_BackupService_DeleteArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -639,6 +670,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_DeleteArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_ListPitrTimeranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -663,6 +695,7 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListPitrTimeranges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -705,6 +738,7 @@ func RegisterBackupServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "BackupServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BackupServiceClient) error { + mux.Handle("POST", pattern_BackupService_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -724,6 +758,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_StartBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_ListArtifactCompatibleServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -745,6 +780,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListArtifactCompatibleServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_BackupService_ScheduleBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -766,6 +802,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ScheduleBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_ListScheduledBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -787,6 +824,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListScheduledBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_BackupService_ChangeScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -808,6 +846,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ChangeScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_BackupService_RemoveScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -829,6 +868,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_RemoveScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -850,6 +890,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_ListArtifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -871,6 +912,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListArtifacts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_BackupService_DeleteArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -892,6 +934,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_DeleteArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_BackupService_ListPitrTimeranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -913,6 +956,7 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListPitrTimeranges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/backup/v1/backup_grpc.pb.go b/api/backup/v1/backup_grpc.pb.go index 42c2f58561..110c37b9c1 100644 --- a/api/backup/v1/backup_grpc.pb.go +++ b/api/backup/v1/backup_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -207,39 +206,30 @@ type UnimplementedBackupServiceServer struct{} func (UnimplementedBackupServiceServer) StartBackup(context.Context, *StartBackupRequest) (*StartBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartBackup not implemented") } - func (UnimplementedBackupServiceServer) ListArtifactCompatibleServices(context.Context, *ListArtifactCompatibleServicesRequest) (*ListArtifactCompatibleServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListArtifactCompatibleServices not implemented") } - func (UnimplementedBackupServiceServer) ScheduleBackup(context.Context, *ScheduleBackupRequest) (*ScheduleBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ScheduleBackup not implemented") } - func (UnimplementedBackupServiceServer) ListScheduledBackups(context.Context, *ListScheduledBackupsRequest) (*ListScheduledBackupsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListScheduledBackups not implemented") } - func (UnimplementedBackupServiceServer) ChangeScheduledBackup(context.Context, *ChangeScheduledBackupRequest) (*ChangeScheduledBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeScheduledBackup not implemented") } - func (UnimplementedBackupServiceServer) RemoveScheduledBackup(context.Context, *RemoveScheduledBackupRequest) (*RemoveScheduledBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveScheduledBackup not implemented") } - func (UnimplementedBackupServiceServer) GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented") } - func (UnimplementedBackupServiceServer) ListArtifacts(context.Context, *ListArtifactsRequest) (*ListArtifactsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListArtifacts not implemented") } - func (UnimplementedBackupServiceServer) DeleteArtifact(context.Context, *DeleteArtifactRequest) (*DeleteArtifactResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteArtifact not implemented") } - func (UnimplementedBackupServiceServer) ListPitrTimeranges(context.Context, *ListPitrTimerangesRequest) (*ListPitrTimerangesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPitrTimeranges not implemented") } diff --git a/api/backup/v1/common.pb.go b/api/backup/v1/common.pb.go index 4e0990d687..4e440ed6b8 100644 --- a/api/backup/v1/common.pb.go +++ b/api/backup/v1/common.pb.go @@ -7,13 +7,12 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -436,20 +435,17 @@ func file_backup_v1_common_proto_rawDescGZIP() []byte { return file_backup_v1_common_proto_rawDescData } -var ( - file_backup_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_backup_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) - file_backup_v1_common_proto_goTypes = []any{ - (DataModel)(0), // 0: backup.v1.DataModel - (BackupMode)(0), // 1: backup.v1.BackupMode - (*File)(nil), // 2: backup.v1.File - (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata - (*Metadata)(nil), // 4: backup.v1.Metadata - (*LogChunk)(nil), // 5: backup.v1.LogChunk - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - } -) - +var file_backup_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_backup_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_backup_v1_common_proto_goTypes = []any{ + (DataModel)(0), // 0: backup.v1.DataModel + (BackupMode)(0), // 1: backup.v1.BackupMode + (*File)(nil), // 2: backup.v1.File + (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata + (*Metadata)(nil), // 4: backup.v1.Metadata + (*LogChunk)(nil), // 5: backup.v1.LogChunk + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} var file_backup_v1_common_proto_depIdxs = []int32{ 2, // 0: backup.v1.Metadata.file_list:type_name -> backup.v1.File 6, // 1: backup.v1.Metadata.restore_to:type_name -> google.protobuf.Timestamp diff --git a/api/backup/v1/errors.pb.go b/api/backup/v1/errors.pb.go index d2ba5a9692..81bb03c92d 100644 --- a/api/backup/v1/errors.pb.go +++ b/api/backup/v1/errors.pb.go @@ -7,11 +7,10 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -180,15 +179,12 @@ func file_backup_v1_errors_proto_rawDescGZIP() []byte { return file_backup_v1_errors_proto_rawDescData } -var ( - file_backup_v1_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_backup_v1_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) - file_backup_v1_errors_proto_goTypes = []any{ - (ErrorCode)(0), // 0: backup.v1.ErrorCode - (*Error)(nil), // 1: backup.v1.Error - } -) - +var file_backup_v1_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_backup_v1_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_backup_v1_errors_proto_goTypes = []any{ + (ErrorCode)(0), // 0: backup.v1.ErrorCode + (*Error)(nil), // 1: backup.v1.Error +} var file_backup_v1_errors_proto_depIdxs = []int32{ 0, // 0: backup.v1.Error.code:type_name -> backup.v1.ErrorCode 1, // [1:1] is the sub-list for method output_type diff --git a/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go b/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go index 484dc341fb..e1e4cbea65 100644 --- a/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go @@ -60,6 +60,7 @@ ChangeScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type ChangeScheduledBackupParams struct { + // Body. Body ChangeScheduledBackupBody @@ -129,6 +130,7 @@ func (o *ChangeScheduledBackupParams) SetBody(body ChangeScheduledBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go b/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go index 0591324fd6..ce02dfdc44 100644 --- a/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go @@ -104,6 +104,7 @@ func (o *ChangeScheduledBackupOK) GetPayload() interface{} { } func (o *ChangeScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,6 +176,7 @@ func (o *ChangeScheduledBackupDefault) GetPayload() *ChangeScheduledBackupDefaul } func (o *ChangeScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeScheduledBackupDefaultBody) // response payload @@ -190,6 +192,7 @@ ChangeScheduledBackupBody change scheduled backup body swagger:model ChangeScheduledBackupBody */ type ChangeScheduledBackupBody struct { + // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` @@ -273,6 +276,7 @@ ChangeScheduledBackupDefaultBody change scheduled backup default body swagger:model ChangeScheduledBackupDefaultBody */ type ChangeScheduledBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -338,7 +342,9 @@ func (o *ChangeScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -354,6 +360,7 @@ func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -382,6 +389,7 @@ ChangeScheduledBackupDefaultBodyDetailsItems0 change scheduled backup default bo swagger:model ChangeScheduledBackupDefaultBodyDetailsItems0 */ type ChangeScheduledBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -393,6 +401,7 @@ type ChangeScheduledBackupDefaultBodyDetailsItems0 struct { func (o *ChangeScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -430,6 +439,7 @@ func (o *ChangeScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeScheduledBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go b/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go index 865c2d1937..0ab18abe2e 100644 --- a/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go +++ b/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go @@ -61,6 +61,7 @@ DeleteArtifactParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteArtifactParams struct { + /* ArtifactID. Machine-readable artifact ID. @@ -150,6 +151,7 @@ func (o *DeleteArtifactParams) SetRemoveFiles(removeFiles *bool) { // WriteToRequest writes these params to a swagger request func (o *DeleteArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -170,6 +172,7 @@ func (o *DeleteArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qRemoveFiles := swag.FormatBool(qrRemoveFiles) if qRemoveFiles != "" { + if err := r.SetQueryParam("remove_files", qRemoveFiles); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/delete_artifact_responses.go b/api/backup/v1/json/client/backup_service/delete_artifact_responses.go index 24dd69fbab..a8cad04bb5 100644 --- a/api/backup/v1/json/client/backup_service/delete_artifact_responses.go +++ b/api/backup/v1/json/client/backup_service/delete_artifact_responses.go @@ -103,6 +103,7 @@ func (o *DeleteArtifactOK) GetPayload() interface{} { } func (o *DeleteArtifactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *DeleteArtifactDefault) GetPayload() *DeleteArtifactDefaultBody { } func (o *DeleteArtifactDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteArtifactDefaultBody) // response payload @@ -189,6 +191,7 @@ DeleteArtifactDefaultBody delete artifact default body swagger:model DeleteArtifactDefaultBody */ type DeleteArtifactDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *DeleteArtifactDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -298,6 +304,7 @@ DeleteArtifactDefaultBodyDetailsItems0 delete artifact default body details item swagger:model DeleteArtifactDefaultBodyDetailsItems0 */ type DeleteArtifactDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type DeleteArtifactDefaultBodyDetailsItems0 struct { func (o *DeleteArtifactDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *DeleteArtifactDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteArtifactDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/get_logs_parameters.go b/api/backup/v1/json/client/backup_service/get_logs_parameters.go index d65124e93d..bf377166c3 100644 --- a/api/backup/v1/json/client/backup_service/get_logs_parameters.go +++ b/api/backup/v1/json/client/backup_service/get_logs_parameters.go @@ -61,6 +61,7 @@ GetLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLogsParams struct { + // ArtifactID. ArtifactID string @@ -162,6 +163,7 @@ func (o *GetLogsParams) SetOffset(offset *int64) { // WriteToRequest writes these params to a swagger request func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -182,6 +184,7 @@ func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -198,6 +201,7 @@ func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/get_logs_responses.go b/api/backup/v1/json/client/backup_service/get_logs_responses.go index 49d409841e..e71957aa00 100644 --- a/api/backup/v1/json/client/backup_service/get_logs_responses.go +++ b/api/backup/v1/json/client/backup_service/get_logs_responses.go @@ -103,6 +103,7 @@ func (o *GetLogsOK) GetPayload() *GetLogsOKBody { } func (o *GetLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetLogsDefault) GetPayload() *GetLogsDefaultBody { } func (o *GetLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsDefaultBody) // response payload @@ -191,6 +193,7 @@ GetLogsDefaultBody get logs default body swagger:model GetLogsDefaultBody */ type GetLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetLogsDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -300,6 +306,7 @@ GetLogsDefaultBodyDetailsItems0 get logs default body details items0 swagger:model GetLogsDefaultBodyDetailsItems0 */ type GetLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetLogsDefaultBodyDetailsItems0 struct { func (o *GetLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetLogsOKBody get logs OK body swagger:model GetLogsOKBody */ type GetLogsOKBody struct { + // logs Logs []*GetLogsOKBodyLogsItems0 `json:"logs"` @@ -473,7 +483,9 @@ func (o *GetLogsOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Logs); i++ { + if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -489,6 +501,7 @@ func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt. return err } } + } return nil @@ -517,6 +530,7 @@ GetLogsOKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetLogsOKBodyLogsItems0 */ type GetLogsOKBodyLogsItems0 struct { + // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go index 77f127caee..aa2fb06549 100644 --- a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go @@ -60,6 +60,7 @@ ListArtifactCompatibleServicesParams contains all the parameters to send to the Typically these are written to a http.Request. */ type ListArtifactCompatibleServicesParams struct { + /* ArtifactID. Artifact id used to determine restore compatibility. @@ -132,6 +133,7 @@ func (o *ListArtifactCompatibleServicesParams) SetArtifactID(artifactID string) // WriteToRequest writes these params to a swagger request func (o *ListArtifactCompatibleServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go index 5be1d1ce6f..0ab19b541f 100644 --- a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go +++ b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go @@ -103,6 +103,7 @@ func (o *ListArtifactCompatibleServicesOK) GetPayload() *ListArtifactCompatibleS } func (o *ListArtifactCompatibleServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactCompatibleServicesOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ListArtifactCompatibleServicesDefault) GetPayload() *ListArtifactCompat } func (o *ListArtifactCompatibleServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactCompatibleServicesDefaultBody) // response payload @@ -191,6 +193,7 @@ ListArtifactCompatibleServicesDefaultBody list artifact compatible services defa swagger:model ListArtifactCompatibleServicesDefaultBody */ type ListArtifactCompatibleServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *ListArtifactCompatibleServicesDefaultBody) ContextValidate(ctx context. } func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx c return err } } + } return nil @@ -300,6 +306,7 @@ ListArtifactCompatibleServicesDefaultBodyDetailsItems0 list artifact compatible swagger:model ListArtifactCompatibleServicesDefaultBodyDetailsItems0 */ type ListArtifactCompatibleServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type ListArtifactCompatibleServicesDefaultBodyDetailsItems0 struct { func (o *ListArtifactCompatibleServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *ListArtifactCompatibleServicesDefaultBodyDetailsItems0) UnmarshalJSON(d // MarshalJSON marshals this object with additional properties into a JSON object func (o ListArtifactCompatibleServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ ListArtifactCompatibleServicesOKBody list artifact compatible services OK body swagger:model ListArtifactCompatibleServicesOKBody */ type ListArtifactCompatibleServicesOKBody struct { + // mysql Mysql []*ListArtifactCompatibleServicesOKBodyMysqlItems0 `json:"mysql"` @@ -507,7 +517,9 @@ func (o *ListArtifactCompatibleServicesOKBody) ContextValidate(ctx context.Conte } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mysql); i++ { + if o.Mysql[i] != nil { if swag.IsZero(o.Mysql[i]) { // not required @@ -523,13 +535,16 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context. return err } } + } return nil } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -545,6 +560,7 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx contex return err } } + } return nil @@ -573,6 +589,7 @@ ListArtifactCompatibleServicesOKBodyMongodbItems0 MongoDBService represents a ge swagger:model ListArtifactCompatibleServicesOKBodyMongodbItems0 */ type ListArtifactCompatibleServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -643,6 +660,7 @@ ListArtifactCompatibleServicesOKBodyMysqlItems0 MySQLService represents a generi swagger:model ListArtifactCompatibleServicesOKBodyMysqlItems0 */ type ListArtifactCompatibleServicesOKBodyMysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go b/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go index c22d126478..158ab869be 100644 --- a/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go @@ -115,6 +115,7 @@ func (o *ListArtifactsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListArtifactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_artifacts_responses.go b/api/backup/v1/json/client/backup_service/list_artifacts_responses.go index 2e7224fc25..395dcdd3ee 100644 --- a/api/backup/v1/json/client/backup_service/list_artifacts_responses.go +++ b/api/backup/v1/json/client/backup_service/list_artifacts_responses.go @@ -104,6 +104,7 @@ func (o *ListArtifactsOK) GetPayload() *ListArtifactsOKBody { } func (o *ListArtifactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListArtifactsDefault) GetPayload() *ListArtifactsDefaultBody { } func (o *ListArtifactsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListArtifactsDefaultBody list artifacts default body swagger:model ListArtifactsDefaultBody */ type ListArtifactsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListArtifactsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -301,6 +307,7 @@ ListArtifactsDefaultBodyDetailsItems0 list artifacts default body details items0 swagger:model ListArtifactsDefaultBodyDetailsItems0 */ type ListArtifactsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListArtifactsDefaultBodyDetailsItems0 struct { func (o *ListArtifactsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListArtifactsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListArtifactsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListArtifactsOKBody list artifacts OK body swagger:model ListArtifactsOKBody */ type ListArtifactsOKBody struct { + // artifacts Artifacts []*ListArtifactsOKBodyArtifactsItems0 `json:"artifacts"` } @@ -471,7 +481,9 @@ func (o *ListArtifactsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Artifacts); i++ { + if o.Artifacts[i] != nil { if swag.IsZero(o.Artifacts[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, form return err } } + } return nil @@ -515,6 +528,7 @@ ListArtifactsOKBodyArtifactsItems0 Artifact represents single backup artifact. swagger:model ListArtifactsOKBodyArtifactsItems0 */ type ListArtifactsOKBodyArtifactsItems0 struct { + // Machine-readable artifact ID. ArtifactID string `json:"artifact_id,omitempty"` @@ -801,7 +815,9 @@ func (o *ListArtifactsOKBodyArtifactsItems0) ContextValidate(ctx context.Context } func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MetadataList); i++ { + if o.MetadataList[i] != nil { if swag.IsZero(o.MetadataList[i]) { // not required @@ -817,6 +833,7 @@ func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx con return err } } + } return nil @@ -845,6 +862,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0 Metadata contains extra art swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0 struct { + // List of files backup consists of. FileList []*ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 `json:"file_list"` @@ -954,7 +972,9 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) ContextValidate(c } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFileList(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.FileList); i++ { + if o.FileList[i] != nil { if swag.IsZero(o.FileList[i]) { // not required @@ -970,12 +990,14 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFi return err } } + } return nil } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidatePbmMetadata(ctx context.Context, formats strfmt.Registry) error { + if o.PbmMetadata != nil { if swag.IsZero(o.PbmMetadata) { // not required @@ -1018,6 +1040,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 File represen swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 struct { + // name Name string `json:"name,omitempty"` @@ -1058,6 +1081,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata PbmMetadata cont swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata struct { + // Name of backup in backup tool representation. Name string `json:"name,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go index 069308b463..9e5c905765 100644 --- a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go @@ -60,6 +60,7 @@ ListPitrTimerangesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListPitrTimerangesParams struct { + /* ArtifactID. Artifact ID represents artifact whose location has PITR timeranges to be retrieved. @@ -132,6 +133,7 @@ func (o *ListPitrTimerangesParams) SetArtifactID(artifactID string) { // WriteToRequest writes these params to a swagger request func (o *ListPitrTimerangesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go index 1c54232029..5f1d16bd92 100644 --- a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go +++ b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go @@ -104,6 +104,7 @@ func (o *ListPitrTimerangesOK) GetPayload() *ListPitrTimerangesOKBody { } func (o *ListPitrTimerangesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListPitrTimerangesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListPitrTimerangesDefault) GetPayload() *ListPitrTimerangesDefaultBody } func (o *ListPitrTimerangesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListPitrTimerangesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListPitrTimerangesDefaultBody list pitr timeranges default body swagger:model ListPitrTimerangesDefaultBody */ type ListPitrTimerangesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListPitrTimerangesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -301,6 +307,7 @@ ListPitrTimerangesDefaultBodyDetailsItems0 list pitr timeranges default body det swagger:model ListPitrTimerangesDefaultBodyDetailsItems0 */ type ListPitrTimerangesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListPitrTimerangesDefaultBodyDetailsItems0 struct { func (o *ListPitrTimerangesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListPitrTimerangesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ListPitrTimerangesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListPitrTimerangesOKBody list pitr timeranges OK body swagger:model ListPitrTimerangesOKBody */ type ListPitrTimerangesOKBody struct { + // timeranges Timeranges []*ListPitrTimerangesOKBodyTimerangesItems0 `json:"timeranges"` } @@ -471,7 +481,9 @@ func (o *ListPitrTimerangesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Timeranges); i++ { + if o.Timeranges[i] != nil { if swag.IsZero(o.Timeranges[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context return err } } + } return nil @@ -515,6 +528,7 @@ ListPitrTimerangesOKBodyTimerangesItems0 list pitr timeranges OK body timeranges swagger:model ListPitrTimerangesOKBodyTimerangesItems0 */ type ListPitrTimerangesOKBodyTimerangesItems0 struct { + // start_timestamp is the time of the first event in the PITR chunk. // Format: date-time StartTimestamp strfmt.DateTime `json:"start_timestamp,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go b/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go index e87207a6d8..43c3c9b0fc 100644 --- a/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go @@ -115,6 +115,7 @@ func (o *ListScheduledBackupsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListScheduledBackupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go b/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go index f54d49aaed..475fe34c0a 100644 --- a/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go +++ b/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go @@ -104,6 +104,7 @@ func (o *ListScheduledBackupsOK) GetPayload() *ListScheduledBackupsOKBody { } func (o *ListScheduledBackupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListScheduledBackupsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListScheduledBackupsDefault) GetPayload() *ListScheduledBackupsDefaultB } func (o *ListScheduledBackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListScheduledBackupsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListScheduledBackupsDefaultBody list scheduled backups default body swagger:model ListScheduledBackupsDefaultBody */ type ListScheduledBackupsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListScheduledBackupsDefaultBody) ContextValidate(ctx context.Context, f } func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -301,6 +307,7 @@ ListScheduledBackupsDefaultBodyDetailsItems0 list scheduled backups default body swagger:model ListScheduledBackupsDefaultBodyDetailsItems0 */ type ListScheduledBackupsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListScheduledBackupsDefaultBodyDetailsItems0 struct { func (o *ListScheduledBackupsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListScheduledBackupsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte // MarshalJSON marshals this object with additional properties into a JSON object func (o ListScheduledBackupsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListScheduledBackupsOKBody list scheduled backups OK body swagger:model ListScheduledBackupsOKBody */ type ListScheduledBackupsOKBody struct { + // scheduled backups ScheduledBackups []*ListScheduledBackupsOKBodyScheduledBackupsItems0 `json:"scheduled_backups"` } @@ -471,7 +481,9 @@ func (o *ListScheduledBackupsOKBody) ContextValidate(ctx context.Context, format } func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ScheduledBackups); i++ { + if o.ScheduledBackups[i] != nil { if swag.IsZero(o.ScheduledBackups[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context return err } } + } return nil @@ -515,6 +528,7 @@ ListScheduledBackupsOKBodyScheduledBackupsItems0 ScheduledBackup represents sche swagger:model ListScheduledBackupsOKBodyScheduledBackupsItems0 */ type ListScheduledBackupsOKBodyScheduledBackupsItems0 struct { + // Machine-readable ID. ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go index d184849501..5e16fc7570 100644 --- a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go @@ -60,6 +60,7 @@ RemoveScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type RemoveScheduledBackupParams struct { + // ScheduledBackupID. ScheduledBackupID string @@ -129,6 +130,7 @@ func (o *RemoveScheduledBackupParams) SetScheduledBackupID(scheduledBackupID str // WriteToRequest writes these params to a swagger request func (o *RemoveScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go index 30625c0735..ac74d91471 100644 --- a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go @@ -103,6 +103,7 @@ func (o *RemoveScheduledBackupOK) GetPayload() interface{} { } func (o *RemoveScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *RemoveScheduledBackupDefault) GetPayload() *RemoveScheduledBackupDefaul } func (o *RemoveScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveScheduledBackupDefaultBody) // response payload @@ -189,6 +191,7 @@ RemoveScheduledBackupDefaultBody remove scheduled backup default body swagger:model RemoveScheduledBackupDefaultBody */ type RemoveScheduledBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *RemoveScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -298,6 +304,7 @@ RemoveScheduledBackupDefaultBodyDetailsItems0 remove scheduled backup default bo swagger:model RemoveScheduledBackupDefaultBodyDetailsItems0 */ type RemoveScheduledBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type RemoveScheduledBackupDefaultBodyDetailsItems0 struct { func (o *RemoveScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *RemoveScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveScheduledBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go b/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go index 843f97f8cd..3a9140d346 100644 --- a/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go @@ -60,6 +60,7 @@ ScheduleBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ScheduleBackupParams struct { + // Body. Body ScheduleBackupBody @@ -129,6 +130,7 @@ func (o *ScheduleBackupParams) SetBody(body ScheduleBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ScheduleBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/schedule_backup_responses.go b/api/backup/v1/json/client/backup_service/schedule_backup_responses.go index a0189c8e4e..7efec04984 100644 --- a/api/backup/v1/json/client/backup_service/schedule_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/schedule_backup_responses.go @@ -104,6 +104,7 @@ func (o *ScheduleBackupOK) GetPayload() *ScheduleBackupOKBody { } func (o *ScheduleBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ScheduleBackupOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ScheduleBackupDefault) GetPayload() *ScheduleBackupDefaultBody { } func (o *ScheduleBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ScheduleBackupDefaultBody) // response payload @@ -192,6 +194,7 @@ ScheduleBackupBody schedule backup body swagger:model ScheduleBackupBody */ type ScheduleBackupBody struct { + // Service identifier where backup should be performed. ServiceID string `json:"service_id,omitempty"` @@ -391,6 +394,7 @@ ScheduleBackupDefaultBody schedule backup default body swagger:model ScheduleBackupDefaultBody */ type ScheduleBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -456,7 +460,9 @@ func (o *ScheduleBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -472,6 +478,7 @@ func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -500,6 +507,7 @@ ScheduleBackupDefaultBodyDetailsItems0 schedule backup default body details item swagger:model ScheduleBackupDefaultBodyDetailsItems0 */ type ScheduleBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -511,6 +519,7 @@ type ScheduleBackupDefaultBodyDetailsItems0 struct { func (o *ScheduleBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -548,6 +557,7 @@ func (o *ScheduleBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ScheduleBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -611,6 +621,7 @@ ScheduleBackupOKBody schedule backup OK body swagger:model ScheduleBackupOKBody */ type ScheduleBackupOKBody struct { + // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/start_backup_parameters.go b/api/backup/v1/json/client/backup_service/start_backup_parameters.go index c886e6520d..f6b1b4020e 100644 --- a/api/backup/v1/json/client/backup_service/start_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/start_backup_parameters.go @@ -60,6 +60,7 @@ StartBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartBackupParams struct { + // Body. Body StartBackupBody @@ -129,6 +130,7 @@ func (o *StartBackupParams) SetBody(body StartBackupBody) { // WriteToRequest writes these params to a swagger request func (o *StartBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/start_backup_responses.go b/api/backup/v1/json/client/backup_service/start_backup_responses.go index 0e924268bb..7780763174 100644 --- a/api/backup/v1/json/client/backup_service/start_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/start_backup_responses.go @@ -104,6 +104,7 @@ func (o *StartBackupOK) GetPayload() *StartBackupOKBody { } func (o *StartBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartBackupOKBody) // response payload @@ -177,6 +178,7 @@ func (o *StartBackupDefault) GetPayload() *StartBackupDefaultBody { } func (o *StartBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartBackupDefaultBody) // response payload @@ -192,6 +194,7 @@ StartBackupBody start backup body swagger:model StartBackupBody */ type StartBackupBody struct { + // Service identifier. ServiceID string `json:"service_id,omitempty"` @@ -305,6 +308,7 @@ StartBackupDefaultBody start backup default body swagger:model StartBackupDefaultBody */ type StartBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -370,7 +374,9 @@ func (o *StartBackupDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -386,6 +392,7 @@ func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -414,6 +421,7 @@ StartBackupDefaultBodyDetailsItems0 start backup default body details items0 swagger:model StartBackupDefaultBodyDetailsItems0 */ type StartBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -425,6 +433,7 @@ type StartBackupDefaultBodyDetailsItems0 struct { func (o *StartBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -462,6 +471,7 @@ func (o *StartBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -525,6 +535,7 @@ StartBackupOKBody start backup OK body swagger:model StartBackupOKBody */ type StartBackupOKBody struct { + // Unique identifier. ArtifactID string `json:"artifact_id,omitempty"` } diff --git a/api/backup/v1/json/client/locations_service/add_location_parameters.go b/api/backup/v1/json/client/locations_service/add_location_parameters.go index a6fe1c1237..f79768e1d2 100644 --- a/api/backup/v1/json/client/locations_service/add_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/add_location_parameters.go @@ -60,6 +60,7 @@ AddLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddLocationParams struct { + // Body. Body AddLocationBody @@ -129,6 +130,7 @@ func (o *AddLocationParams) SetBody(body AddLocationBody) { // WriteToRequest writes these params to a swagger request func (o *AddLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/add_location_responses.go b/api/backup/v1/json/client/locations_service/add_location_responses.go index 4e47f8f422..47685f6e20 100644 --- a/api/backup/v1/json/client/locations_service/add_location_responses.go +++ b/api/backup/v1/json/client/locations_service/add_location_responses.go @@ -103,6 +103,7 @@ func (o *AddLocationOK) GetPayload() *AddLocationOKBody { } func (o *AddLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddLocationOKBody) // response payload @@ -176,6 +177,7 @@ func (o *AddLocationDefault) GetPayload() *AddLocationDefaultBody { } func (o *AddLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddLocationDefaultBody) // response payload @@ -191,6 +193,7 @@ AddLocationBody add location body swagger:model AddLocationBody */ type AddLocationBody struct { + // Location name Name string `json:"name,omitempty"` @@ -279,6 +282,7 @@ func (o *AddLocationBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -299,6 +303,7 @@ func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, f } func (o *AddLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -341,6 +346,7 @@ AddLocationDefaultBody add location default body swagger:model AddLocationDefaultBody */ type AddLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -406,7 +412,9 @@ func (o *AddLocationDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -422,6 +430,7 @@ func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -450,6 +459,7 @@ AddLocationDefaultBodyDetailsItems0 add location default body details items0 swagger:model AddLocationDefaultBodyDetailsItems0 */ type AddLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -461,6 +471,7 @@ type AddLocationDefaultBodyDetailsItems0 struct { func (o *AddLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -498,6 +509,7 @@ func (o *AddLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -561,6 +573,7 @@ AddLocationOKBody add location OK body swagger:model AddLocationOKBody */ type AddLocationOKBody struct { + // Machine-readable ID. LocationID string `json:"location_id,omitempty"` } @@ -598,6 +611,7 @@ AddLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents file s swagger:model AddLocationParamsBodyFilesystemConfig */ type AddLocationParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -635,6 +649,7 @@ AddLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configuratio swagger:model AddLocationParamsBodyS3Config */ type AddLocationParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/change_location_parameters.go b/api/backup/v1/json/client/locations_service/change_location_parameters.go index 1b0e5bef6b..7c817aec1b 100644 --- a/api/backup/v1/json/client/locations_service/change_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/change_location_parameters.go @@ -60,6 +60,7 @@ ChangeLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeLocationParams struct { + // Body. Body ChangeLocationBody @@ -146,6 +147,7 @@ func (o *ChangeLocationParams) SetLocationID(locationID string) { // WriteToRequest writes these params to a swagger request func (o *ChangeLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/change_location_responses.go b/api/backup/v1/json/client/locations_service/change_location_responses.go index 1eb361c97d..9e4c345832 100644 --- a/api/backup/v1/json/client/locations_service/change_location_responses.go +++ b/api/backup/v1/json/client/locations_service/change_location_responses.go @@ -103,6 +103,7 @@ func (o *ChangeLocationOK) GetPayload() interface{} { } func (o *ChangeLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *ChangeLocationDefault) GetPayload() *ChangeLocationDefaultBody { } func (o *ChangeLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeLocationDefaultBody) // response payload @@ -189,6 +191,7 @@ ChangeLocationBody change location body swagger:model ChangeLocationBody */ type ChangeLocationBody struct { + // Location name Name string `json:"name,omitempty"` @@ -277,6 +280,7 @@ func (o *ChangeLocationBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -297,6 +301,7 @@ func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context } func (o *ChangeLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -339,6 +344,7 @@ ChangeLocationDefaultBody change location default body swagger:model ChangeLocationDefaultBody */ type ChangeLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -404,7 +410,9 @@ func (o *ChangeLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -420,6 +428,7 @@ func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -448,6 +457,7 @@ ChangeLocationDefaultBodyDetailsItems0 change location default body details item swagger:model ChangeLocationDefaultBodyDetailsItems0 */ type ChangeLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -459,6 +469,7 @@ type ChangeLocationDefaultBodyDetailsItems0 struct { func (o *ChangeLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -496,6 +507,7 @@ func (o *ChangeLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -559,6 +571,7 @@ ChangeLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents fil swagger:model ChangeLocationParamsBodyFilesystemConfig */ type ChangeLocationParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -596,6 +609,7 @@ ChangeLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configura swagger:model ChangeLocationParamsBodyS3Config */ type ChangeLocationParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/list_locations_parameters.go b/api/backup/v1/json/client/locations_service/list_locations_parameters.go index 263117d982..eb22d06cbc 100644 --- a/api/backup/v1/json/client/locations_service/list_locations_parameters.go +++ b/api/backup/v1/json/client/locations_service/list_locations_parameters.go @@ -115,6 +115,7 @@ func (o *ListLocationsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListLocationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/list_locations_responses.go b/api/backup/v1/json/client/locations_service/list_locations_responses.go index 3ea95f7a24..281254a397 100644 --- a/api/backup/v1/json/client/locations_service/list_locations_responses.go +++ b/api/backup/v1/json/client/locations_service/list_locations_responses.go @@ -103,6 +103,7 @@ func (o *ListLocationsOK) GetPayload() *ListLocationsOKBody { } func (o *ListLocationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListLocationsOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ListLocationsDefault) GetPayload() *ListLocationsDefaultBody { } func (o *ListLocationsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListLocationsDefaultBody) // response payload @@ -191,6 +193,7 @@ ListLocationsDefaultBody list locations default body swagger:model ListLocationsDefaultBody */ type ListLocationsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *ListLocationsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -300,6 +306,7 @@ ListLocationsDefaultBodyDetailsItems0 list locations default body details items0 swagger:model ListLocationsDefaultBodyDetailsItems0 */ type ListLocationsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type ListLocationsDefaultBodyDetailsItems0 struct { func (o *ListLocationsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *ListLocationsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListLocationsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ ListLocationsOKBody list locations OK body swagger:model ListLocationsOKBody */ type ListLocationsOKBody struct { + // locations Locations []*ListLocationsOKBodyLocationsItems0 `json:"locations"` } @@ -470,7 +480,9 @@ func (o *ListLocationsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Locations); i++ { + if o.Locations[i] != nil { if swag.IsZero(o.Locations[i]) { // not required @@ -486,6 +498,7 @@ func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, form return err } } + } return nil @@ -514,6 +527,7 @@ ListLocationsOKBodyLocationsItems0 Location represents single Backup Location. swagger:model ListLocationsOKBodyLocationsItems0 */ type ListLocationsOKBodyLocationsItems0 struct { + // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -605,6 +619,7 @@ func (o *ListLocationsOKBodyLocationsItems0) ContextValidate(ctx context.Context } func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -625,6 +640,7 @@ func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx } func (o *ListLocationsOKBodyLocationsItems0) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -667,6 +683,7 @@ ListLocationsOKBodyLocationsItems0FilesystemConfig FilesystemLocationConfig repr swagger:model ListLocationsOKBodyLocationsItems0FilesystemConfig */ type ListLocationsOKBodyLocationsItems0FilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -704,6 +721,7 @@ ListLocationsOKBodyLocationsItems0S3Config S3LocationConfig represents S3 bucket swagger:model ListLocationsOKBodyLocationsItems0S3Config */ type ListLocationsOKBodyLocationsItems0S3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/remove_location_parameters.go b/api/backup/v1/json/client/locations_service/remove_location_parameters.go index 3a4a644edd..f806c18bdc 100644 --- a/api/backup/v1/json/client/locations_service/remove_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/remove_location_parameters.go @@ -61,6 +61,7 @@ RemoveLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveLocationParams struct { + /* Force. Force mode @@ -150,6 +151,7 @@ func (o *RemoveLocationParams) SetLocationID(locationID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *RemoveLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/remove_location_responses.go b/api/backup/v1/json/client/locations_service/remove_location_responses.go index b71626d1c4..b43522d032 100644 --- a/api/backup/v1/json/client/locations_service/remove_location_responses.go +++ b/api/backup/v1/json/client/locations_service/remove_location_responses.go @@ -103,6 +103,7 @@ func (o *RemoveLocationOK) GetPayload() interface{} { } func (o *RemoveLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *RemoveLocationDefault) GetPayload() *RemoveLocationDefaultBody { } func (o *RemoveLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveLocationDefaultBody) // response payload @@ -189,6 +191,7 @@ RemoveLocationDefaultBody remove location default body swagger:model RemoveLocationDefaultBody */ type RemoveLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *RemoveLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -298,6 +304,7 @@ RemoveLocationDefaultBodyDetailsItems0 remove location default body details item swagger:model RemoveLocationDefaultBodyDetailsItems0 */ type RemoveLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type RemoveLocationDefaultBodyDetailsItems0 struct { func (o *RemoveLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *RemoveLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/locations_service/test_location_config_parameters.go b/api/backup/v1/json/client/locations_service/test_location_config_parameters.go index 1856fe0f36..c930393f8c 100644 --- a/api/backup/v1/json/client/locations_service/test_location_config_parameters.go +++ b/api/backup/v1/json/client/locations_service/test_location_config_parameters.go @@ -60,6 +60,7 @@ TestLocationConfigParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type TestLocationConfigParams struct { + // Body. Body TestLocationConfigBody @@ -129,6 +130,7 @@ func (o *TestLocationConfigParams) SetBody(body TestLocationConfigBody) { // WriteToRequest writes these params to a swagger request func (o *TestLocationConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/test_location_config_responses.go b/api/backup/v1/json/client/locations_service/test_location_config_responses.go index c926f0db5a..9ac68f4ee0 100644 --- a/api/backup/v1/json/client/locations_service/test_location_config_responses.go +++ b/api/backup/v1/json/client/locations_service/test_location_config_responses.go @@ -103,6 +103,7 @@ func (o *TestLocationConfigOK) GetPayload() interface{} { } func (o *TestLocationConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *TestLocationConfigDefault) GetPayload() *TestLocationConfigDefaultBody } func (o *TestLocationConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(TestLocationConfigDefaultBody) // response payload @@ -189,6 +191,7 @@ TestLocationConfigBody test location config body swagger:model TestLocationConfigBody */ type TestLocationConfigBody struct { + // filesystem config FilesystemConfig *TestLocationConfigParamsBodyFilesystemConfig `json:"filesystem_config,omitempty"` @@ -271,6 +274,7 @@ func (o *TestLocationConfigBody) ContextValidate(ctx context.Context, formats st } func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -291,6 +295,7 @@ func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Con } func (o *TestLocationConfigBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -333,6 +338,7 @@ TestLocationConfigDefaultBody test location config default body swagger:model TestLocationConfigDefaultBody */ type TestLocationConfigDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -398,7 +404,9 @@ func (o *TestLocationConfigDefaultBody) ContextValidate(ctx context.Context, for } func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -414,6 +422,7 @@ func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -442,6 +451,7 @@ TestLocationConfigDefaultBodyDetailsItems0 test location config default body det swagger:model TestLocationConfigDefaultBodyDetailsItems0 */ type TestLocationConfigDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -453,6 +463,7 @@ type TestLocationConfigDefaultBodyDetailsItems0 struct { func (o *TestLocationConfigDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -490,6 +501,7 @@ func (o *TestLocationConfigDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o TestLocationConfigDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -553,6 +565,7 @@ TestLocationConfigParamsBodyFilesystemConfig FilesystemLocationConfig represents swagger:model TestLocationConfigParamsBodyFilesystemConfig */ type TestLocationConfigParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -590,6 +603,7 @@ TestLocationConfigParamsBodyS3Config S3LocationConfig represents S3 bucket confi swagger:model TestLocationConfigParamsBodyS3Config */ type TestLocationConfigParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go b/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go index b621fbb680..0e417604cc 100644 --- a/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go +++ b/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go @@ -61,6 +61,7 @@ GetLogsMixin5Params contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLogsMixin5Params struct { + // Limit. // // Format: int64 @@ -162,6 +163,7 @@ func (o *GetLogsMixin5Params) SetRestoreID(restoreID string) { // WriteToRequest writes these params to a swagger request func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -177,6 +179,7 @@ func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -193,6 +196,7 @@ func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go b/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go index a09ede8dde..0a5482f6ba 100644 --- a/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go +++ b/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go @@ -103,6 +103,7 @@ func (o *GetLogsMixin5OK) GetPayload() *GetLogsMixin5OKBody { } func (o *GetLogsMixin5OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsMixin5OKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetLogsMixin5Default) GetPayload() *GetLogsMixin5DefaultBody { } func (o *GetLogsMixin5Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsMixin5DefaultBody) // response payload @@ -191,6 +193,7 @@ GetLogsMixin5DefaultBody get logs mixin5 default body swagger:model GetLogsMixin5DefaultBody */ type GetLogsMixin5DefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetLogsMixin5DefaultBody) ContextValidate(ctx context.Context, formats } func (o *GetLogsMixin5DefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetLogsMixin5DefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -300,6 +306,7 @@ GetLogsMixin5DefaultBodyDetailsItems0 get logs mixin5 default body details items swagger:model GetLogsMixin5DefaultBodyDetailsItems0 */ type GetLogsMixin5DefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetLogsMixin5DefaultBodyDetailsItems0 struct { func (o *GetLogsMixin5DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetLogsMixin5DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLogsMixin5DefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetLogsMixin5OKBody get logs mixin5 OK body swagger:model GetLogsMixin5OKBody */ type GetLogsMixin5OKBody struct { + // logs Logs []*GetLogsMixin5OKBodyLogsItems0 `json:"logs"` @@ -473,7 +483,9 @@ func (o *GetLogsMixin5OKBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetLogsMixin5OKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Logs); i++ { + if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -489,6 +501,7 @@ func (o *GetLogsMixin5OKBody) contextValidateLogs(ctx context.Context, formats s return err } } + } return nil @@ -517,6 +530,7 @@ GetLogsMixin5OKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetLogsMixin5OKBodyLogsItems0 */ type GetLogsMixin5OKBodyLogsItems0 struct { + // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/list_restores_parameters.go b/api/backup/v1/json/client/restore_service/list_restores_parameters.go index d46fd70f9e..fd958787b8 100644 --- a/api/backup/v1/json/client/restore_service/list_restores_parameters.go +++ b/api/backup/v1/json/client/restore_service/list_restores_parameters.go @@ -115,6 +115,7 @@ func (o *ListRestoresParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListRestoresParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/list_restores_responses.go b/api/backup/v1/json/client/restore_service/list_restores_responses.go index d9d2741189..4ac3e7fec9 100644 --- a/api/backup/v1/json/client/restore_service/list_restores_responses.go +++ b/api/backup/v1/json/client/restore_service/list_restores_responses.go @@ -104,6 +104,7 @@ func (o *ListRestoresOK) GetPayload() *ListRestoresOKBody { } func (o *ListRestoresOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRestoresOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListRestoresDefault) GetPayload() *ListRestoresDefaultBody { } func (o *ListRestoresDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRestoresDefaultBody) // response payload @@ -192,6 +194,7 @@ ListRestoresDefaultBody list restores default body swagger:model ListRestoresDefaultBody */ type ListRestoresDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListRestoresDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListRestoresDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListRestoresDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -301,6 +307,7 @@ ListRestoresDefaultBodyDetailsItems0 list restores default body details items0 swagger:model ListRestoresDefaultBodyDetailsItems0 */ type ListRestoresDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListRestoresDefaultBodyDetailsItems0 struct { func (o *ListRestoresDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListRestoresDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListRestoresDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListRestoresOKBody list restores OK body swagger:model ListRestoresOKBody */ type ListRestoresOKBody struct { + // items Items []*ListRestoresOKBodyItemsItems0 `json:"items"` } @@ -471,7 +481,9 @@ func (o *ListRestoresOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListRestoresOKBody) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Items); i++ { + if o.Items[i] != nil { if swag.IsZero(o.Items[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListRestoresOKBody) contextValidateItems(ctx context.Context, formats s return err } } + } return nil @@ -515,6 +528,7 @@ ListRestoresOKBodyItemsItems0 RestoreHistoryItem represents single backup restor swagger:model ListRestoresOKBodyItemsItems0 */ type ListRestoresOKBodyItemsItems0 struct { + // Machine-readable restore id. RestoreID string `json:"restore_id,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/restore_backup_parameters.go b/api/backup/v1/json/client/restore_service/restore_backup_parameters.go index 4d6b7d7f95..343407b601 100644 --- a/api/backup/v1/json/client/restore_service/restore_backup_parameters.go +++ b/api/backup/v1/json/client/restore_service/restore_backup_parameters.go @@ -60,6 +60,7 @@ RestoreBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RestoreBackupParams struct { + // Body. Body RestoreBackupBody @@ -129,6 +130,7 @@ func (o *RestoreBackupParams) SetBody(body RestoreBackupBody) { // WriteToRequest writes these params to a swagger request func (o *RestoreBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/restore_backup_responses.go b/api/backup/v1/json/client/restore_service/restore_backup_responses.go index ed2d534da1..3c27eb73a2 100644 --- a/api/backup/v1/json/client/restore_service/restore_backup_responses.go +++ b/api/backup/v1/json/client/restore_service/restore_backup_responses.go @@ -104,6 +104,7 @@ func (o *RestoreBackupOK) GetPayload() *RestoreBackupOKBody { } func (o *RestoreBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RestoreBackupOKBody) // response payload @@ -177,6 +178,7 @@ func (o *RestoreBackupDefault) GetPayload() *RestoreBackupDefaultBody { } func (o *RestoreBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RestoreBackupDefaultBody) // response payload @@ -192,6 +194,7 @@ RestoreBackupBody restore backup body swagger:model RestoreBackupBody */ type RestoreBackupBody struct { + // Service identifier where backup should be restored. ServiceID string `json:"service_id,omitempty"` @@ -257,6 +260,7 @@ RestoreBackupDefaultBody restore backup default body swagger:model RestoreBackupDefaultBody */ type RestoreBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -322,7 +326,9 @@ func (o *RestoreBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -338,6 +344,7 @@ func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -366,6 +373,7 @@ RestoreBackupDefaultBodyDetailsItems0 restore backup default body details items0 swagger:model RestoreBackupDefaultBodyDetailsItems0 */ type RestoreBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -377,6 +385,7 @@ type RestoreBackupDefaultBodyDetailsItems0 struct { func (o *RestoreBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -414,6 +423,7 @@ func (o *RestoreBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RestoreBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -477,6 +487,7 @@ RestoreBackupOKBody restore backup OK body swagger:model RestoreBackupOKBody */ type RestoreBackupOKBody struct { + // Unique restore identifier. RestoreID string `json:"restore_id,omitempty"` } diff --git a/api/backup/v1/locations.pb.go b/api/backup/v1/locations.pb.go index 66230b030e..8f3ab24671 100644 --- a/api/backup/v1/locations.pb.go +++ b/api/backup/v1/locations.pb.go @@ -7,14 +7,13 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -933,25 +932,22 @@ func file_backup_v1_locations_proto_rawDescGZIP() []byte { return file_backup_v1_locations_proto_rawDescData } -var ( - file_backup_v1_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) - file_backup_v1_locations_proto_goTypes = []any{ - (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig - (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig - (*Location)(nil), // 2: backup.v1.Location - (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest - (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse - (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest - (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse - (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest - (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse - (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest - (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse - (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest - (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse - } -) - +var file_backup_v1_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_backup_v1_locations_proto_goTypes = []any{ + (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig + (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig + (*Location)(nil), // 2: backup.v1.Location + (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest + (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse + (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest + (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse + (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest + (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse + (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest + (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse + (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest + (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse +} var file_backup_v1_locations_proto_depIdxs = []int32{ 0, // 0: backup.v1.Location.filesystem_config:type_name -> backup.v1.FilesystemLocationConfig 1, // 1: backup.v1.Location.s3_config:type_name -> backup.v1.S3LocationConfig diff --git a/api/backup/v1/locations.pb.gw.go b/api/backup/v1/locations.pb.gw.go index 63fe8d8483..b07444fa4c 100644 --- a/api/backup/v1/locations.pb.gw.go +++ b/api/backup/v1/locations.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_LocationsService_ListLocations_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListLocationsRequest @@ -39,6 +37,7 @@ func request_LocationsService_ListLocations_0(ctx context.Context, marshaler run msg, err := client.ListLocations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_LocationsService_ListLocations_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -47,6 +46,7 @@ func local_request_LocationsService_ListLocations_0(ctx context.Context, marshal msg, err := server.ListLocations(ctx, &protoReq) return msg, metadata, err + } func request_LocationsService_AddLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -59,6 +59,7 @@ func request_LocationsService_AddLocation_0(ctx context.Context, marshaler runti msg, err := client.AddLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_LocationsService_AddLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -71,6 +72,7 @@ func local_request_LocationsService_AddLocation_0(ctx context.Context, marshaler msg, err := server.AddLocation(ctx, &protoReq) return msg, metadata, err + } func request_LocationsService_ChangeLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -100,6 +102,7 @@ func request_LocationsService_ChangeLocation_0(ctx context.Context, marshaler ru msg, err := client.ChangeLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_LocationsService_ChangeLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -129,9 +132,12 @@ func local_request_LocationsService_ChangeLocation_0(ctx context.Context, marsha msg, err := server.ChangeLocation(ctx, &protoReq) return msg, metadata, err + } -var filter_LocationsService_RemoveLocation_0 = &utilities.DoubleArray{Encoding: map[string]int{"location_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_LocationsService_RemoveLocation_0 = &utilities.DoubleArray{Encoding: map[string]int{"location_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_LocationsService_RemoveLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveLocationRequest @@ -163,6 +169,7 @@ func request_LocationsService_RemoveLocation_0(ctx context.Context, marshaler ru msg, err := client.RemoveLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_LocationsService_RemoveLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -195,6 +202,7 @@ func local_request_LocationsService_RemoveLocation_0(ctx context.Context, marsha msg, err := server.RemoveLocation(ctx, &protoReq) return msg, metadata, err + } func request_LocationsService_TestLocationConfig_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +215,7 @@ func request_LocationsService_TestLocationConfig_0(ctx context.Context, marshale msg, err := client.TestLocationConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_LocationsService_TestLocationConfig_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -219,6 +228,7 @@ func local_request_LocationsService_TestLocationConfig_0(ctx context.Context, ma msg, err := server.TestLocationConfig(ctx, &protoReq) return msg, metadata, err + } // RegisterLocationsServiceHandlerServer registers the http handlers for service LocationsService to "mux". @@ -227,6 +237,7 @@ func local_request_LocationsService_TestLocationConfig_0(ctx context.Context, ma // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLocationsServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LocationsServiceServer) error { + mux.Handle("GET", pattern_LocationsService_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -249,6 +260,7 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_ListLocations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_LocationsService_AddLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -273,6 +285,7 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_AddLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_LocationsService_ChangeLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -297,6 +310,7 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_ChangeLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_LocationsService_RemoveLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -321,6 +335,7 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_RemoveLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_LocationsService_TestLocationConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -345,6 +360,7 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_TestLocationConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -387,6 +403,7 @@ func RegisterLocationsServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "LocationsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LocationsServiceClient) error { + mux.Handle("GET", pattern_LocationsService_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -406,6 +423,7 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_ListLocations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_LocationsService_AddLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -427,6 +445,7 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_AddLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_LocationsService_ChangeLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -448,6 +467,7 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_ChangeLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_LocationsService_RemoveLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -469,6 +489,7 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_RemoveLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_LocationsService_TestLocationConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -490,6 +511,7 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_TestLocationConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/backup/v1/locations_grpc.pb.go b/api/backup/v1/locations_grpc.pb.go index 748f7a20ad..cbcc055eae 100644 --- a/api/backup/v1/locations_grpc.pb.go +++ b/api/backup/v1/locations_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -132,19 +131,15 @@ type UnimplementedLocationsServiceServer struct{} func (UnimplementedLocationsServiceServer) ListLocations(context.Context, *ListLocationsRequest) (*ListLocationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListLocations not implemented") } - func (UnimplementedLocationsServiceServer) AddLocation(context.Context, *AddLocationRequest) (*AddLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddLocation not implemented") } - func (UnimplementedLocationsServiceServer) ChangeLocation(context.Context, *ChangeLocationRequest) (*ChangeLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeLocation not implemented") } - func (UnimplementedLocationsServiceServer) RemoveLocation(context.Context, *RemoveLocationRequest) (*RemoveLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveLocation not implemented") } - func (UnimplementedLocationsServiceServer) TestLocationConfig(context.Context, *TestLocationConfigRequest) (*TestLocationConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestLocationConfig not implemented") } diff --git a/api/backup/v1/restores.pb.go b/api/backup/v1/restores.pb.go index 245ef2061d..133e31c833 100644 --- a/api/backup/v1/restores.pb.go +++ b/api/backup/v1/restores.pb.go @@ -7,15 +7,14 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -720,24 +719,21 @@ func file_backup_v1_restores_proto_rawDescGZIP() []byte { return file_backup_v1_restores_proto_rawDescData } -var ( - file_backup_v1_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_backup_v1_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_backup_v1_restores_proto_goTypes = []any{ - (RestoreStatus)(0), // 0: backup.v1.RestoreStatus - (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem - (*ListRestoresRequest)(nil), // 2: backup.v1.ListRestoresRequest - (*ListRestoresResponse)(nil), // 3: backup.v1.ListRestoresResponse - (*RestoreServiceGetLogsRequest)(nil), // 4: backup.v1.RestoreServiceGetLogsRequest - (*RestoreServiceGetLogsResponse)(nil), // 5: backup.v1.RestoreServiceGetLogsResponse - (*RestoreBackupRequest)(nil), // 6: backup.v1.RestoreBackupRequest - (*RestoreBackupResponse)(nil), // 7: backup.v1.RestoreBackupResponse - (DataModel)(0), // 8: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp - (*LogChunk)(nil), // 10: backup.v1.LogChunk - } -) - +var file_backup_v1_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_backup_v1_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_backup_v1_restores_proto_goTypes = []any{ + (RestoreStatus)(0), // 0: backup.v1.RestoreStatus + (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem + (*ListRestoresRequest)(nil), // 2: backup.v1.ListRestoresRequest + (*ListRestoresResponse)(nil), // 3: backup.v1.ListRestoresResponse + (*RestoreServiceGetLogsRequest)(nil), // 4: backup.v1.RestoreServiceGetLogsRequest + (*RestoreServiceGetLogsResponse)(nil), // 5: backup.v1.RestoreServiceGetLogsResponse + (*RestoreBackupRequest)(nil), // 6: backup.v1.RestoreBackupRequest + (*RestoreBackupResponse)(nil), // 7: backup.v1.RestoreBackupResponse + (DataModel)(0), // 8: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*LogChunk)(nil), // 10: backup.v1.LogChunk +} var file_backup_v1_restores_proto_depIdxs = []int32{ 8, // 0: backup.v1.RestoreHistoryItem.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.RestoreHistoryItem.status:type_name -> backup.v1.RestoreStatus diff --git a/api/backup/v1/restores.pb.gw.go b/api/backup/v1/restores.pb.gw.go index a23df5f9d3..eff72d5612 100644 --- a/api/backup/v1/restores.pb.gw.go +++ b/api/backup/v1/restores.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_RestoreService_ListRestores_0(ctx context.Context, marshaler runtime.Marshaler, client RestoreServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListRestoresRequest @@ -39,6 +37,7 @@ func request_RestoreService_ListRestores_0(ctx context.Context, marshaler runtim msg, err := client.ListRestores(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_RestoreService_ListRestores_0(ctx context.Context, marshaler runtime.Marshaler, server RestoreServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -47,9 +46,12 @@ func local_request_RestoreService_ListRestores_0(ctx context.Context, marshaler msg, err := server.ListRestores(ctx, &protoReq) return msg, metadata, err + } -var filter_RestoreService_GetLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"restore_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_RestoreService_GetLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"restore_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_RestoreService_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, client RestoreServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RestoreServiceGetLogsRequest @@ -81,6 +83,7 @@ func request_RestoreService_GetLogs_0(ctx context.Context, marshaler runtime.Mar msg, err := client.GetLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_RestoreService_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, server RestoreServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,6 +116,7 @@ func local_request_RestoreService_GetLogs_0(ctx context.Context, marshaler runti msg, err := server.GetLogs(ctx, &protoReq) return msg, metadata, err + } func request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler runtime.Marshaler, client RestoreServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -125,6 +129,7 @@ func request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler runti msg, err := client.RestoreBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler runtime.Marshaler, server RestoreServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -137,6 +142,7 @@ func local_request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler msg, err := server.RestoreBackup(ctx, &protoReq) return msg, metadata, err + } // RegisterRestoreServiceHandlerServer registers the http handlers for service RestoreService to "mux". @@ -145,6 +151,7 @@ func local_request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRestoreServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RestoreServiceServer) error { + mux.Handle("GET", pattern_RestoreService_ListRestores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -167,6 +174,7 @@ func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_RestoreService_ListRestores_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_RestoreService_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -191,6 +199,7 @@ func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_RestoreService_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_RestoreService_RestoreBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -215,6 +224,7 @@ func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_RestoreService_RestoreBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -257,6 +267,7 @@ func RegisterRestoreServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RestoreServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestoreServiceClient) error { + mux.Handle("GET", pattern_RestoreService_ListRestores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -276,6 +287,7 @@ func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_RestoreService_ListRestores_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_RestoreService_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -297,6 +309,7 @@ func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_RestoreService_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_RestoreService_RestoreBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -318,6 +331,7 @@ func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_RestoreService_RestoreBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/backup/v1/restores_grpc.pb.go b/api/backup/v1/restores_grpc.pb.go index e1371c479f..afefd76b99 100644 --- a/api/backup/v1/restores_grpc.pb.go +++ b/api/backup/v1/restores_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -102,11 +101,9 @@ type UnimplementedRestoreServiceServer struct{} func (UnimplementedRestoreServiceServer) ListRestores(context.Context, *ListRestoresRequest) (*ListRestoresResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRestores not implemented") } - func (UnimplementedRestoreServiceServer) GetLogs(context.Context, *RestoreServiceGetLogsRequest) (*RestoreServiceGetLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented") } - func (UnimplementedRestoreServiceServer) RestoreBackup(context.Context, *RestoreBackupRequest) (*RestoreBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RestoreBackup not implemented") } diff --git a/api/common/common.pb.go b/api/common/common.pb.go index e40e872fef..c69ee7bced 100644 --- a/api/common/common.pb.go +++ b/api/common/common.pb.go @@ -7,11 +7,10 @@ package common import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -151,15 +150,12 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var ( - file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_common_common_proto_goTypes = []any{ - (*StringArray)(nil), // 0: common.StringArray - (*StringMap)(nil), // 1: common.StringMap - nil, // 2: common.StringMap.ValuesEntry - } -) - +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_common_common_proto_goTypes = []any{ + (*StringArray)(nil), // 0: common.StringArray + (*StringMap)(nil), // 1: common.StringMap + nil, // 2: common.StringMap.ValuesEntry +} var file_common_common_proto_depIdxs = []int32{ 2, // 0: common.StringMap.values:type_name -> common.StringMap.ValuesEntry 1, // [1:1] is the sub-list for method output_type diff --git a/api/common/metrics_resolutions.pb.go b/api/common/metrics_resolutions.pb.go index b2f0e094c4..26dc389526 100644 --- a/api/common/metrics_resolutions.pb.go +++ b/api/common/metrics_resolutions.pb.go @@ -7,12 +7,11 @@ package common import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" ) const ( @@ -127,14 +126,11 @@ func file_common_metrics_resolutions_proto_rawDescGZIP() []byte { return file_common_metrics_resolutions_proto_rawDescData } -var ( - file_common_metrics_resolutions_proto_msgTypes = make([]protoimpl.MessageInfo, 1) - file_common_metrics_resolutions_proto_goTypes = []any{ - (*MetricsResolutions)(nil), // 0: common.MetricsResolutions - (*durationpb.Duration)(nil), // 1: google.protobuf.Duration - } -) - +var file_common_metrics_resolutions_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_metrics_resolutions_proto_goTypes = []any{ + (*MetricsResolutions)(nil), // 0: common.MetricsResolutions + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration +} var file_common_metrics_resolutions_proto_depIdxs = []int32{ 1, // 0: common.MetricsResolutions.hr:type_name -> google.protobuf.Duration 1, // 1: common.MetricsResolutions.mr:type_name -> google.protobuf.Duration diff --git a/api/dump/v1beta1/dump.pb.go b/api/dump/v1beta1/dump.pb.go index 36fe115123..17cee438ba 100644 --- a/api/dump/v1beta1/dump.pb.go +++ b/api/dump/v1beta1/dump.pb.go @@ -7,15 +7,14 @@ package dumpv1beta1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -951,28 +950,25 @@ func file_dump_v1beta1_dump_proto_rawDescGZIP() []byte { return file_dump_v1beta1_dump_proto_rawDescData } -var ( - file_dump_v1beta1_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_dump_v1beta1_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 13) - file_dump_v1beta1_dump_proto_goTypes = []any{ - (DumpStatus)(0), // 0: dump.v1beta1.DumpStatus - (*Dump)(nil), // 1: dump.v1beta1.Dump - (*StartDumpRequest)(nil), // 2: dump.v1beta1.StartDumpRequest - (*StartDumpResponse)(nil), // 3: dump.v1beta1.StartDumpResponse - (*ListDumpsRequest)(nil), // 4: dump.v1beta1.ListDumpsRequest - (*ListDumpsResponse)(nil), // 5: dump.v1beta1.ListDumpsResponse - (*DeleteDumpRequest)(nil), // 6: dump.v1beta1.DeleteDumpRequest - (*DeleteDumpResponse)(nil), // 7: dump.v1beta1.DeleteDumpResponse - (*GetDumpLogsRequest)(nil), // 8: dump.v1beta1.GetDumpLogsRequest - (*GetDumpLogsResponse)(nil), // 9: dump.v1beta1.GetDumpLogsResponse - (*LogChunk)(nil), // 10: dump.v1beta1.LogChunk - (*SFTPParameters)(nil), // 11: dump.v1beta1.SFTPParameters - (*UploadDumpRequest)(nil), // 12: dump.v1beta1.UploadDumpRequest - (*UploadDumpResponse)(nil), // 13: dump.v1beta1.UploadDumpResponse - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp - } -) - +var file_dump_v1beta1_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_dump_v1beta1_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_dump_v1beta1_dump_proto_goTypes = []any{ + (DumpStatus)(0), // 0: dump.v1beta1.DumpStatus + (*Dump)(nil), // 1: dump.v1beta1.Dump + (*StartDumpRequest)(nil), // 2: dump.v1beta1.StartDumpRequest + (*StartDumpResponse)(nil), // 3: dump.v1beta1.StartDumpResponse + (*ListDumpsRequest)(nil), // 4: dump.v1beta1.ListDumpsRequest + (*ListDumpsResponse)(nil), // 5: dump.v1beta1.ListDumpsResponse + (*DeleteDumpRequest)(nil), // 6: dump.v1beta1.DeleteDumpRequest + (*DeleteDumpResponse)(nil), // 7: dump.v1beta1.DeleteDumpResponse + (*GetDumpLogsRequest)(nil), // 8: dump.v1beta1.GetDumpLogsRequest + (*GetDumpLogsResponse)(nil), // 9: dump.v1beta1.GetDumpLogsResponse + (*LogChunk)(nil), // 10: dump.v1beta1.LogChunk + (*SFTPParameters)(nil), // 11: dump.v1beta1.SFTPParameters + (*UploadDumpRequest)(nil), // 12: dump.v1beta1.UploadDumpRequest + (*UploadDumpResponse)(nil), // 13: dump.v1beta1.UploadDumpResponse + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp +} var file_dump_v1beta1_dump_proto_depIdxs = []int32{ 0, // 0: dump.v1beta1.Dump.status:type_name -> dump.v1beta1.DumpStatus 14, // 1: dump.v1beta1.Dump.start_time:type_name -> google.protobuf.Timestamp diff --git a/api/dump/v1beta1/dump.pb.gw.go b/api/dump/v1beta1/dump.pb.gw.go index 3ffa7d594e..cd26e91f14 100644 --- a/api/dump/v1beta1/dump.pb.gw.go +++ b/api/dump/v1beta1/dump.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_DumpService_StartDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartDumpRequest @@ -43,6 +41,7 @@ func request_DumpService_StartDump_0(ctx context.Context, marshaler runtime.Mars msg, err := client.StartDump(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_DumpService_StartDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -55,6 +54,7 @@ func local_request_DumpService_StartDump_0(ctx context.Context, marshaler runtim msg, err := server.StartDump(ctx, &protoReq) return msg, metadata, err + } func request_DumpService_ListDumps_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +63,7 @@ func request_DumpService_ListDumps_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ListDumps(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_DumpService_ListDumps_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -71,6 +72,7 @@ func local_request_DumpService_ListDumps_0(ctx context.Context, marshaler runtim msg, err := server.ListDumps(ctx, &protoReq) return msg, metadata, err + } func request_DumpService_DeleteDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -83,6 +85,7 @@ func request_DumpService_DeleteDump_0(ctx context.Context, marshaler runtime.Mar msg, err := client.DeleteDump(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_DumpService_DeleteDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,9 +98,12 @@ func local_request_DumpService_DeleteDump_0(ctx context.Context, marshaler runti msg, err := server.DeleteDump(ctx, &protoReq) return msg, metadata, err + } -var filter_DumpService_GetDumpLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"dump_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_DumpService_GetDumpLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"dump_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetDumpLogsRequest @@ -129,6 +135,7 @@ func request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Ma msg, err := client.GetDumpLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -161,6 +168,7 @@ func local_request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runt msg, err := server.GetDumpLogs(ctx, &protoReq) return msg, metadata, err + } func request_DumpService_UploadDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -173,6 +181,7 @@ func request_DumpService_UploadDump_0(ctx context.Context, marshaler runtime.Mar msg, err := client.UploadDump(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_DumpService_UploadDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -185,6 +194,7 @@ func local_request_DumpService_UploadDump_0(ctx context.Context, marshaler runti msg, err := server.UploadDump(ctx, &protoReq) return msg, metadata, err + } // RegisterDumpServiceHandlerServer registers the http handlers for service DumpService to "mux". @@ -193,6 +203,7 @@ func local_request_DumpService_UploadDump_0(ctx context.Context, marshaler runti // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDumpServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DumpServiceServer) error { + mux.Handle("POST", pattern_DumpService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -215,6 +226,7 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_StartDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_DumpService_ListDumps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -239,6 +251,7 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_ListDumps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_DumpService_DeleteDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -263,6 +276,7 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_DeleteDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_DumpService_GetDumpLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -287,6 +301,7 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_GetDumpLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_DumpService_UploadDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -311,6 +326,7 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_UploadDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -353,6 +369,7 @@ func RegisterDumpServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "DumpServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DumpServiceClient) error { + mux.Handle("POST", pattern_DumpService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -372,6 +389,7 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_StartDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_DumpService_ListDumps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -393,6 +411,7 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_ListDumps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_DumpService_DeleteDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -414,6 +433,7 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_DeleteDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_DumpService_GetDumpLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -435,6 +455,7 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_GetDumpLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_DumpService_UploadDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -456,6 +477,7 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_UploadDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/dump/v1beta1/dump_grpc.pb.go b/api/dump/v1beta1/dump_grpc.pb.go index 5b859aafc6..9297a903f3 100644 --- a/api/dump/v1beta1/dump_grpc.pb.go +++ b/api/dump/v1beta1/dump_grpc.pb.go @@ -8,7 +8,6 @@ package dumpv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -128,19 +127,15 @@ type UnimplementedDumpServiceServer struct{} func (UnimplementedDumpServiceServer) StartDump(context.Context, *StartDumpRequest) (*StartDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartDump not implemented") } - func (UnimplementedDumpServiceServer) ListDumps(context.Context, *ListDumpsRequest) (*ListDumpsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDumps not implemented") } - func (UnimplementedDumpServiceServer) DeleteDump(context.Context, *DeleteDumpRequest) (*DeleteDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteDump not implemented") } - func (UnimplementedDumpServiceServer) GetDumpLogs(context.Context, *GetDumpLogsRequest) (*GetDumpLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDumpLogs not implemented") } - func (UnimplementedDumpServiceServer) UploadDump(context.Context, *UploadDumpRequest) (*UploadDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadDump not implemented") } diff --git a/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go index 0c83d67b57..733240643c 100644 --- a/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go @@ -60,6 +60,7 @@ DeleteDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteDumpParams struct { + // Body. Body DeleteDumpBody @@ -129,6 +130,7 @@ func (o *DeleteDumpParams) SetBody(body DeleteDumpBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go index 5d220bc48b..957158dd62 100644 --- a/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go @@ -103,6 +103,7 @@ func (o *DeleteDumpOK) GetPayload() interface{} { } func (o *DeleteDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *DeleteDumpDefault) GetPayload() *DeleteDumpDefaultBody { } func (o *DeleteDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteDumpDefaultBody) // response payload @@ -189,6 +191,7 @@ DeleteDumpBody delete dump body swagger:model DeleteDumpBody */ type DeleteDumpBody struct { + // dump ids DumpIds []string `json:"dump_ids"` } @@ -226,6 +229,7 @@ DeleteDumpDefaultBody delete dump default body swagger:model DeleteDumpDefaultBody */ type DeleteDumpDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +295,9 @@ func (o *DeleteDumpDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DeleteDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -307,6 +313,7 @@ func (o *DeleteDumpDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -335,6 +342,7 @@ DeleteDumpDefaultBodyDetailsItems0 delete dump default body details items0 swagger:model DeleteDumpDefaultBodyDetailsItems0 */ type DeleteDumpDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -346,6 +354,7 @@ type DeleteDumpDefaultBodyDetailsItems0 struct { func (o *DeleteDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -383,6 +392,7 @@ func (o *DeleteDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go index 82ed2997d2..4be2f03898 100644 --- a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go @@ -61,6 +61,7 @@ GetDumpLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetDumpLogsParams struct { + // DumpID. DumpID string @@ -162,6 +163,7 @@ func (o *GetDumpLogsParams) SetOffset(offset *int64) { // WriteToRequest writes these params to a swagger request func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -182,6 +184,7 @@ func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -198,6 +201,7 @@ func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go index 0d9fa17804..1d658bd46c 100644 --- a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go @@ -103,6 +103,7 @@ func (o *GetDumpLogsOK) GetPayload() *GetDumpLogsOKBody { } func (o *GetDumpLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetDumpLogsOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetDumpLogsDefault) GetPayload() *GetDumpLogsDefaultBody { } func (o *GetDumpLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetDumpLogsDefaultBody) // response payload @@ -191,6 +193,7 @@ GetDumpLogsDefaultBody get dump logs default body swagger:model GetDumpLogsDefaultBody */ type GetDumpLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetDumpLogsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *GetDumpLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetDumpLogsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -300,6 +306,7 @@ GetDumpLogsDefaultBodyDetailsItems0 get dump logs default body details items0 swagger:model GetDumpLogsDefaultBodyDetailsItems0 */ type GetDumpLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetDumpLogsDefaultBodyDetailsItems0 struct { func (o *GetDumpLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetDumpLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetDumpLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetDumpLogsOKBody get dump logs OK body swagger:model GetDumpLogsOKBody */ type GetDumpLogsOKBody struct { + // logs Logs []*GetDumpLogsOKBodyLogsItems0 `json:"logs"` @@ -473,7 +483,9 @@ func (o *GetDumpLogsOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetDumpLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Logs); i++ { + if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -489,6 +501,7 @@ func (o *GetDumpLogsOKBody) contextValidateLogs(ctx context.Context, formats str return err } } + } return nil @@ -517,6 +530,7 @@ GetDumpLogsOKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetDumpLogsOKBodyLogsItems0 */ type GetDumpLogsOKBodyLogsItems0 struct { + // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go b/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go index dc28a36ad4..3ca0caf159 100644 --- a/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go @@ -115,6 +115,7 @@ func (o *ListDumpsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListDumpsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go b/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go index 994f89d8d0..4f53ff6de5 100644 --- a/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go @@ -104,6 +104,7 @@ func (o *ListDumpsOK) GetPayload() *ListDumpsOKBody { } func (o *ListDumpsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListDumpsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListDumpsDefault) GetPayload() *ListDumpsDefaultBody { } func (o *ListDumpsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListDumpsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListDumpsDefaultBody list dumps default body swagger:model ListDumpsDefaultBody */ type ListDumpsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListDumpsDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListDumpsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListDumpsDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -301,6 +307,7 @@ ListDumpsDefaultBodyDetailsItems0 list dumps default body details items0 swagger:model ListDumpsDefaultBodyDetailsItems0 */ type ListDumpsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListDumpsDefaultBodyDetailsItems0 struct { func (o *ListDumpsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListDumpsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListDumpsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListDumpsOKBody list dumps OK body swagger:model ListDumpsOKBody */ type ListDumpsOKBody struct { + // dumps Dumps []*ListDumpsOKBodyDumpsItems0 `json:"dumps"` } @@ -471,7 +481,9 @@ func (o *ListDumpsOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListDumpsOKBody) contextValidateDumps(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Dumps); i++ { + if o.Dumps[i] != nil { if swag.IsZero(o.Dumps[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListDumpsOKBody) contextValidateDumps(ctx context.Context, formats strf return err } } + } return nil @@ -515,6 +528,7 @@ ListDumpsOKBodyDumpsItems0 list dumps OK body dumps items0 swagger:model ListDumpsOKBodyDumpsItems0 */ type ListDumpsOKBodyDumpsItems0 struct { + // dump id DumpID string `json:"dump_id,omitempty"` diff --git a/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go index ac9f2ba90e..c456e5f494 100644 --- a/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go @@ -60,6 +60,7 @@ StartDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartDumpParams struct { + // Body. Body StartDumpBody @@ -129,6 +130,7 @@ func (o *StartDumpParams) SetBody(body StartDumpBody) { // WriteToRequest writes these params to a swagger request func (o *StartDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go index 2833719e04..600f3c2d7f 100644 --- a/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go @@ -104,6 +104,7 @@ func (o *StartDumpOK) GetPayload() *StartDumpOKBody { } func (o *StartDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartDumpOKBody) // response payload @@ -177,6 +178,7 @@ func (o *StartDumpDefault) GetPayload() *StartDumpDefaultBody { } func (o *StartDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartDumpDefaultBody) // response payload @@ -192,6 +194,7 @@ StartDumpBody start dump body swagger:model StartDumpBody */ type StartDumpBody struct { + // service names ServiceNames []string `json:"service_names"` @@ -280,6 +283,7 @@ StartDumpDefaultBody start dump default body swagger:model StartDumpDefaultBody */ type StartDumpDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -345,7 +349,9 @@ func (o *StartDumpDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *StartDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -361,6 +367,7 @@ func (o *StartDumpDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -389,6 +396,7 @@ StartDumpDefaultBodyDetailsItems0 start dump default body details items0 swagger:model StartDumpDefaultBodyDetailsItems0 */ type StartDumpDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -400,6 +408,7 @@ type StartDumpDefaultBodyDetailsItems0 struct { func (o *StartDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -437,6 +446,7 @@ func (o *StartDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -500,6 +510,7 @@ StartDumpOKBody start dump OK body swagger:model StartDumpOKBody */ type StartDumpOKBody struct { + // dump id DumpID string `json:"dump_id,omitempty"` } diff --git a/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go index 0be24f481a..0073c54dd7 100644 --- a/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go @@ -60,6 +60,7 @@ UploadDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UploadDumpParams struct { + // Body. Body UploadDumpBody @@ -129,6 +130,7 @@ func (o *UploadDumpParams) SetBody(body UploadDumpBody) { // WriteToRequest writes these params to a swagger request func (o *UploadDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go index d1db708bc7..a42c830d76 100644 --- a/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go @@ -103,6 +103,7 @@ func (o *UploadDumpOK) GetPayload() interface{} { } func (o *UploadDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *UploadDumpDefault) GetPayload() *UploadDumpDefaultBody { } func (o *UploadDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UploadDumpDefaultBody) // response payload @@ -189,6 +191,7 @@ UploadDumpBody upload dump body swagger:model UploadDumpBody */ type UploadDumpBody struct { + // dump ids DumpIds []string `json:"dump_ids"` @@ -244,6 +247,7 @@ func (o *UploadDumpBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *UploadDumpBody) contextValidateSftpParameters(ctx context.Context, formats strfmt.Registry) error { + if o.SftpParameters != nil { if swag.IsZero(o.SftpParameters) { // not required @@ -286,6 +290,7 @@ UploadDumpDefaultBody upload dump default body swagger:model UploadDumpDefaultBody */ type UploadDumpDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -351,7 +356,9 @@ func (o *UploadDumpDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UploadDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -367,6 +374,7 @@ func (o *UploadDumpDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -395,6 +403,7 @@ UploadDumpDefaultBodyDetailsItems0 upload dump default body details items0 swagger:model UploadDumpDefaultBodyDetailsItems0 */ type UploadDumpDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -406,6 +415,7 @@ type UploadDumpDefaultBodyDetailsItems0 struct { func (o *UploadDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -443,6 +453,7 @@ func (o *UploadDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UploadDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -506,6 +517,7 @@ UploadDumpParamsBodySftpParameters upload dump params body sftp parameters swagger:model UploadDumpParamsBodySftpParameters */ type UploadDumpParamsBodySftpParameters struct { + // address Address string `json:"address,omitempty"` diff --git a/api/inventory/v1/agent_status.pb.go b/api/inventory/v1/agent_status.pb.go index b9c28ee4be..8b65e584bd 100644 --- a/api/inventory/v1/agent_status.pb.go +++ b/api/inventory/v1/agent_status.pb.go @@ -7,11 +7,10 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -140,13 +139,10 @@ func file_inventory_v1_agent_status_proto_rawDescGZIP() []byte { return file_inventory_v1_agent_status_proto_rawDescData } -var ( - file_inventory_v1_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_agent_status_proto_goTypes = []any{ - (AgentStatus)(0), // 0: inventory.v1.AgentStatus - } -) - +var file_inventory_v1_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_agent_status_proto_goTypes = []any{ + (AgentStatus)(0), // 0: inventory.v1.AgentStatus +} var file_inventory_v1_agent_status_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventory/v1/agents.pb.go b/api/inventory/v1/agents.pb.go index b7ec1a509a..0d617d36cd 100644 --- a/api/inventory/v1/agents.pb.go +++ b/api/inventory/v1/agents.pb.go @@ -7,16 +7,14 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - common "github.com/percona/pmm/api/common" + reflect "reflect" + sync "sync" ) const ( @@ -9673,101 +9671,98 @@ func file_inventory_v1_agents_proto_rawDescGZIP() []byte { return file_inventory_v1_agents_proto_rawDescData } -var ( - file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 83) - file_inventory_v1_agents_proto_goTypes = []any{ - (AgentType)(0), // 0: inventory.v1.AgentType - (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent - (*VMAgent)(nil), // 2: inventory.v1.VMAgent - (*NodeExporter)(nil), // 3: inventory.v1.NodeExporter - (*MySQLdExporter)(nil), // 4: inventory.v1.MySQLdExporter - (*MongoDBExporter)(nil), // 5: inventory.v1.MongoDBExporter - (*PostgresExporter)(nil), // 6: inventory.v1.PostgresExporter - (*ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter - (*QANMySQLPerfSchemaAgent)(nil), // 8: inventory.v1.QANMySQLPerfSchemaAgent - (*QANMySQLSlowlogAgent)(nil), // 9: inventory.v1.QANMySQLSlowlogAgent - (*QANMongoDBProfilerAgent)(nil), // 10: inventory.v1.QANMongoDBProfilerAgent - (*QANPostgreSQLPgStatementsAgent)(nil), // 11: inventory.v1.QANPostgreSQLPgStatementsAgent - (*QANPostgreSQLPgStatMonitorAgent)(nil), // 12: inventory.v1.QANPostgreSQLPgStatMonitorAgent - (*RDSExporter)(nil), // 13: inventory.v1.RDSExporter - (*ExternalExporter)(nil), // 14: inventory.v1.ExternalExporter - (*AzureDatabaseExporter)(nil), // 15: inventory.v1.AzureDatabaseExporter - (*ChangeCommonAgentParams)(nil), // 16: inventory.v1.ChangeCommonAgentParams - (*ListAgentsRequest)(nil), // 17: inventory.v1.ListAgentsRequest - (*ListAgentsResponse)(nil), // 18: inventory.v1.ListAgentsResponse - (*GetAgentRequest)(nil), // 19: inventory.v1.GetAgentRequest - (*GetAgentResponse)(nil), // 20: inventory.v1.GetAgentResponse - (*GetAgentLogsRequest)(nil), // 21: inventory.v1.GetAgentLogsRequest - (*GetAgentLogsResponse)(nil), // 22: inventory.v1.GetAgentLogsResponse - (*AddAgentRequest)(nil), // 23: inventory.v1.AddAgentRequest - (*AddAgentResponse)(nil), // 24: inventory.v1.AddAgentResponse - (*ChangeAgentRequest)(nil), // 25: inventory.v1.ChangeAgentRequest - (*ChangeAgentResponse)(nil), // 26: inventory.v1.ChangeAgentResponse - (*AddPMMAgentParams)(nil), // 27: inventory.v1.AddPMMAgentParams - (*AddNodeExporterParams)(nil), // 28: inventory.v1.AddNodeExporterParams - (*ChangeNodeExporterParams)(nil), // 29: inventory.v1.ChangeNodeExporterParams - (*AddMySQLdExporterParams)(nil), // 30: inventory.v1.AddMySQLdExporterParams - (*ChangeMySQLdExporterParams)(nil), // 31: inventory.v1.ChangeMySQLdExporterParams - (*AddMongoDBExporterParams)(nil), // 32: inventory.v1.AddMongoDBExporterParams - (*ChangeMongoDBExporterParams)(nil), // 33: inventory.v1.ChangeMongoDBExporterParams - (*AddPostgresExporterParams)(nil), // 34: inventory.v1.AddPostgresExporterParams - (*ChangePostgresExporterParams)(nil), // 35: inventory.v1.ChangePostgresExporterParams - (*AddProxySQLExporterParams)(nil), // 36: inventory.v1.AddProxySQLExporterParams - (*ChangeProxySQLExporterParams)(nil), // 37: inventory.v1.ChangeProxySQLExporterParams - (*AddQANMySQLPerfSchemaAgentParams)(nil), // 38: inventory.v1.AddQANMySQLPerfSchemaAgentParams - (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 39: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams - (*AddQANMySQLSlowlogAgentParams)(nil), // 40: inventory.v1.AddQANMySQLSlowlogAgentParams - (*ChangeQANMySQLSlowlogAgentParams)(nil), // 41: inventory.v1.ChangeQANMySQLSlowlogAgentParams - (*AddQANMongoDBProfilerAgentParams)(nil), // 42: inventory.v1.AddQANMongoDBProfilerAgentParams - (*ChangeQANMongoDBProfilerAgentParams)(nil), // 43: inventory.v1.ChangeQANMongoDBProfilerAgentParams - (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 44: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams - (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 45: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams - (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 46: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams - (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 47: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams - (*AddRDSExporterParams)(nil), // 48: inventory.v1.AddRDSExporterParams - (*ChangeRDSExporterParams)(nil), // 49: inventory.v1.ChangeRDSExporterParams - (*AddExternalExporterParams)(nil), // 50: inventory.v1.AddExternalExporterParams - (*ChangeExternalExporterParams)(nil), // 51: inventory.v1.ChangeExternalExporterParams - (*AddAzureDatabaseExporterParams)(nil), // 52: inventory.v1.AddAzureDatabaseExporterParams - (*ChangeAzureDatabaseExporterParams)(nil), // 53: inventory.v1.ChangeAzureDatabaseExporterParams - (*RemoveAgentRequest)(nil), // 54: inventory.v1.RemoveAgentRequest - (*RemoveAgentResponse)(nil), // 55: inventory.v1.RemoveAgentResponse - nil, // 56: inventory.v1.PMMAgent.CustomLabelsEntry - nil, // 57: inventory.v1.NodeExporter.CustomLabelsEntry - nil, // 58: inventory.v1.MySQLdExporter.CustomLabelsEntry - nil, // 59: inventory.v1.MongoDBExporter.CustomLabelsEntry - nil, // 60: inventory.v1.PostgresExporter.CustomLabelsEntry - nil, // 61: inventory.v1.ProxySQLExporter.CustomLabelsEntry - nil, // 62: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry - nil, // 63: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry - nil, // 64: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry - nil, // 65: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - nil, // 66: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - nil, // 67: inventory.v1.RDSExporter.CustomLabelsEntry - nil, // 68: inventory.v1.ExternalExporter.CustomLabelsEntry - nil, // 69: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry - nil, // 70: inventory.v1.AddPMMAgentParams.CustomLabelsEntry - nil, // 71: inventory.v1.AddNodeExporterParams.CustomLabelsEntry - nil, // 72: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry - nil, // 73: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry - nil, // 74: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry - nil, // 75: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry - nil, // 76: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry - nil, // 77: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry - nil, // 78: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry - nil, // 79: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry - nil, // 80: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry - nil, // 81: inventory.v1.AddRDSExporterParams.CustomLabelsEntry - nil, // 82: inventory.v1.AddExternalExporterParams.CustomLabelsEntry - nil, // 83: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry - (AgentStatus)(0), // 84: inventory.v1.AgentStatus - (LogLevel)(0), // 85: inventory.v1.LogLevel - (*common.MetricsResolutions)(nil), // 86: common.MetricsResolutions - (*common.StringMap)(nil), // 87: common.StringMap - } -) - +var file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 83) +var file_inventory_v1_agents_proto_goTypes = []any{ + (AgentType)(0), // 0: inventory.v1.AgentType + (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent + (*VMAgent)(nil), // 2: inventory.v1.VMAgent + (*NodeExporter)(nil), // 3: inventory.v1.NodeExporter + (*MySQLdExporter)(nil), // 4: inventory.v1.MySQLdExporter + (*MongoDBExporter)(nil), // 5: inventory.v1.MongoDBExporter + (*PostgresExporter)(nil), // 6: inventory.v1.PostgresExporter + (*ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter + (*QANMySQLPerfSchemaAgent)(nil), // 8: inventory.v1.QANMySQLPerfSchemaAgent + (*QANMySQLSlowlogAgent)(nil), // 9: inventory.v1.QANMySQLSlowlogAgent + (*QANMongoDBProfilerAgent)(nil), // 10: inventory.v1.QANMongoDBProfilerAgent + (*QANPostgreSQLPgStatementsAgent)(nil), // 11: inventory.v1.QANPostgreSQLPgStatementsAgent + (*QANPostgreSQLPgStatMonitorAgent)(nil), // 12: inventory.v1.QANPostgreSQLPgStatMonitorAgent + (*RDSExporter)(nil), // 13: inventory.v1.RDSExporter + (*ExternalExporter)(nil), // 14: inventory.v1.ExternalExporter + (*AzureDatabaseExporter)(nil), // 15: inventory.v1.AzureDatabaseExporter + (*ChangeCommonAgentParams)(nil), // 16: inventory.v1.ChangeCommonAgentParams + (*ListAgentsRequest)(nil), // 17: inventory.v1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 18: inventory.v1.ListAgentsResponse + (*GetAgentRequest)(nil), // 19: inventory.v1.GetAgentRequest + (*GetAgentResponse)(nil), // 20: inventory.v1.GetAgentResponse + (*GetAgentLogsRequest)(nil), // 21: inventory.v1.GetAgentLogsRequest + (*GetAgentLogsResponse)(nil), // 22: inventory.v1.GetAgentLogsResponse + (*AddAgentRequest)(nil), // 23: inventory.v1.AddAgentRequest + (*AddAgentResponse)(nil), // 24: inventory.v1.AddAgentResponse + (*ChangeAgentRequest)(nil), // 25: inventory.v1.ChangeAgentRequest + (*ChangeAgentResponse)(nil), // 26: inventory.v1.ChangeAgentResponse + (*AddPMMAgentParams)(nil), // 27: inventory.v1.AddPMMAgentParams + (*AddNodeExporterParams)(nil), // 28: inventory.v1.AddNodeExporterParams + (*ChangeNodeExporterParams)(nil), // 29: inventory.v1.ChangeNodeExporterParams + (*AddMySQLdExporterParams)(nil), // 30: inventory.v1.AddMySQLdExporterParams + (*ChangeMySQLdExporterParams)(nil), // 31: inventory.v1.ChangeMySQLdExporterParams + (*AddMongoDBExporterParams)(nil), // 32: inventory.v1.AddMongoDBExporterParams + (*ChangeMongoDBExporterParams)(nil), // 33: inventory.v1.ChangeMongoDBExporterParams + (*AddPostgresExporterParams)(nil), // 34: inventory.v1.AddPostgresExporterParams + (*ChangePostgresExporterParams)(nil), // 35: inventory.v1.ChangePostgresExporterParams + (*AddProxySQLExporterParams)(nil), // 36: inventory.v1.AddProxySQLExporterParams + (*ChangeProxySQLExporterParams)(nil), // 37: inventory.v1.ChangeProxySQLExporterParams + (*AddQANMySQLPerfSchemaAgentParams)(nil), // 38: inventory.v1.AddQANMySQLPerfSchemaAgentParams + (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 39: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams + (*AddQANMySQLSlowlogAgentParams)(nil), // 40: inventory.v1.AddQANMySQLSlowlogAgentParams + (*ChangeQANMySQLSlowlogAgentParams)(nil), // 41: inventory.v1.ChangeQANMySQLSlowlogAgentParams + (*AddQANMongoDBProfilerAgentParams)(nil), // 42: inventory.v1.AddQANMongoDBProfilerAgentParams + (*ChangeQANMongoDBProfilerAgentParams)(nil), // 43: inventory.v1.ChangeQANMongoDBProfilerAgentParams + (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 44: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams + (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 45: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams + (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 46: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams + (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 47: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams + (*AddRDSExporterParams)(nil), // 48: inventory.v1.AddRDSExporterParams + (*ChangeRDSExporterParams)(nil), // 49: inventory.v1.ChangeRDSExporterParams + (*AddExternalExporterParams)(nil), // 50: inventory.v1.AddExternalExporterParams + (*ChangeExternalExporterParams)(nil), // 51: inventory.v1.ChangeExternalExporterParams + (*AddAzureDatabaseExporterParams)(nil), // 52: inventory.v1.AddAzureDatabaseExporterParams + (*ChangeAzureDatabaseExporterParams)(nil), // 53: inventory.v1.ChangeAzureDatabaseExporterParams + (*RemoveAgentRequest)(nil), // 54: inventory.v1.RemoveAgentRequest + (*RemoveAgentResponse)(nil), // 55: inventory.v1.RemoveAgentResponse + nil, // 56: inventory.v1.PMMAgent.CustomLabelsEntry + nil, // 57: inventory.v1.NodeExporter.CustomLabelsEntry + nil, // 58: inventory.v1.MySQLdExporter.CustomLabelsEntry + nil, // 59: inventory.v1.MongoDBExporter.CustomLabelsEntry + nil, // 60: inventory.v1.PostgresExporter.CustomLabelsEntry + nil, // 61: inventory.v1.ProxySQLExporter.CustomLabelsEntry + nil, // 62: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry + nil, // 63: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry + nil, // 64: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry + nil, // 65: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + nil, // 66: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + nil, // 67: inventory.v1.RDSExporter.CustomLabelsEntry + nil, // 68: inventory.v1.ExternalExporter.CustomLabelsEntry + nil, // 69: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry + nil, // 70: inventory.v1.AddPMMAgentParams.CustomLabelsEntry + nil, // 71: inventory.v1.AddNodeExporterParams.CustomLabelsEntry + nil, // 72: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry + nil, // 73: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry + nil, // 74: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry + nil, // 75: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry + nil, // 76: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry + nil, // 77: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry + nil, // 78: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry + nil, // 79: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry + nil, // 80: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry + nil, // 81: inventory.v1.AddRDSExporterParams.CustomLabelsEntry + nil, // 82: inventory.v1.AddExternalExporterParams.CustomLabelsEntry + nil, // 83: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry + (AgentStatus)(0), // 84: inventory.v1.AgentStatus + (LogLevel)(0), // 85: inventory.v1.LogLevel + (*common.MetricsResolutions)(nil), // 86: common.MetricsResolutions + (*common.StringMap)(nil), // 87: common.StringMap +} var file_inventory_v1_agents_proto_depIdxs = []int32{ 56, // 0: inventory.v1.PMMAgent.custom_labels:type_name -> inventory.v1.PMMAgent.CustomLabelsEntry 84, // 1: inventory.v1.VMAgent.status:type_name -> inventory.v1.AgentStatus diff --git a/api/inventory/v1/agents.pb.gw.go b/api/inventory/v1/agents.pb.gw.go index ea823e5f0f..fa6ffb9150 100644 --- a/api/inventory/v1/agents.pb.gw.go +++ b/api/inventory/v1/agents.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join + filter_AgentsService_ListAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -var filter_AgentsService_ListAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - func request_AgentsService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAgentsRequest var metadata runtime.ServerMetadata @@ -48,6 +48,7 @@ func request_AgentsService_ListAgents_0(ctx context.Context, marshaler runtime.M msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentsService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +64,7 @@ func local_request_AgentsService_ListAgents_0(ctx context.Context, marshaler run msg, err := server.ListAgents(ctx, &protoReq) return msg, metadata, err + } func request_AgentsService_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -88,6 +90,7 @@ func request_AgentsService_GetAgent_0(ctx context.Context, marshaler runtime.Mar msg, err := client.GetAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentsService_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,9 +116,12 @@ func local_request_AgentsService_GetAgent_0(ctx context.Context, marshaler runti msg, err := server.GetAgent(ctx, &protoReq) return msg, metadata, err + } -var filter_AgentsService_GetAgentLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"agent_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_AgentsService_GetAgentLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"agent_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_AgentsService_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetAgentLogsRequest @@ -147,6 +153,7 @@ func request_AgentsService_GetAgentLogs_0(ctx context.Context, marshaler runtime msg, err := client.GetAgentLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentsService_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -179,6 +186,7 @@ func local_request_AgentsService_GetAgentLogs_0(ctx context.Context, marshaler r msg, err := server.GetAgentLogs(ctx, &protoReq) return msg, metadata, err + } func request_AgentsService_AddAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +199,7 @@ func request_AgentsService_AddAgent_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AddAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentsService_AddAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -203,6 +212,7 @@ func local_request_AgentsService_AddAgent_0(ctx context.Context, marshaler runti msg, err := server.AddAgent(ctx, &protoReq) return msg, metadata, err + } func request_AgentsService_ChangeAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -232,6 +242,7 @@ func request_AgentsService_ChangeAgent_0(ctx context.Context, marshaler runtime. msg, err := client.ChangeAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentsService_ChangeAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -261,9 +272,12 @@ func local_request_AgentsService_ChangeAgent_0(ctx context.Context, marshaler ru msg, err := server.ChangeAgent(ctx, &protoReq) return msg, metadata, err + } -var filter_AgentsService_RemoveAgent_0 = &utilities.DoubleArray{Encoding: map[string]int{"agent_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_AgentsService_RemoveAgent_0 = &utilities.DoubleArray{Encoding: map[string]int{"agent_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveAgentRequest @@ -295,6 +309,7 @@ func request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler runtime. msg, err := client.RemoveAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -327,6 +342,7 @@ func local_request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler ru msg, err := server.RemoveAgent(ctx, &protoReq) return msg, metadata, err + } // RegisterAgentsServiceHandlerServer registers the http handlers for service AgentsService to "mux". @@ -335,6 +351,7 @@ func local_request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler ru // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentsServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentsServiceServer) error { + mux.Handle("GET", pattern_AgentsService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -357,6 +374,7 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AgentsService_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -381,6 +399,7 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_GetAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AgentsService_GetAgentLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -405,6 +424,7 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_GetAgentLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AgentsService_AddAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -429,6 +449,7 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_AddAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_AgentsService_ChangeAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -453,6 +474,7 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_ChangeAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_AgentsService_RemoveAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -477,6 +499,7 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_RemoveAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -519,6 +542,7 @@ func RegisterAgentsServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentsServiceClient) error { + mux.Handle("GET", pattern_AgentsService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -538,6 +562,7 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AgentsService_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -559,6 +584,7 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_GetAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_AgentsService_GetAgentLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -580,6 +606,7 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_GetAgentLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_AgentsService_AddAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -601,6 +628,7 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_AddAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_AgentsService_ChangeAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -622,6 +650,7 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_ChangeAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_AgentsService_RemoveAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -643,6 +672,7 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_RemoveAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/inventory/v1/agents.pb.validate.go b/api/inventory/v1/agents.pb.validate.go index e856653f05..59f635daf0 100644 --- a/api/inventory/v1/agents.pb.validate.go +++ b/api/inventory/v1/agents.pb.validate.go @@ -2226,6 +2226,7 @@ func (m *ChangeCommonAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -2254,6 +2255,7 @@ func (m *ChangeCommonAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -7053,6 +7055,7 @@ func (m *ChangeNodeExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -7081,6 +7084,7 @@ func (m *ChangeNodeExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -7384,6 +7388,7 @@ func (m *ChangeMySQLdExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -7412,6 +7417,7 @@ func (m *ChangeMySQLdExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -7710,6 +7716,7 @@ func (m *ChangeMongoDBExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -7738,6 +7745,7 @@ func (m *ChangeMongoDBExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -8044,6 +8052,7 @@ func (m *ChangePostgresExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8072,6 +8081,7 @@ func (m *ChangePostgresExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -8368,6 +8378,7 @@ func (m *ChangeProxySQLExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8396,6 +8407,7 @@ func (m *ChangeProxySQLExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -8702,6 +8714,7 @@ func (m *ChangeQANMySQLPerfSchemaAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8730,6 +8743,7 @@ func (m *ChangeQANMySQLPerfSchemaAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -9037,6 +9051,7 @@ func (m *ChangeQANMySQLSlowlogAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9065,6 +9080,7 @@ func (m *ChangeQANMySQLSlowlogAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -9363,6 +9379,7 @@ func (m *ChangeQANMongoDBProfilerAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9391,6 +9408,7 @@ func (m *ChangeQANMongoDBProfilerAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -9698,6 +9716,7 @@ func (m *ChangeQANPostgreSQLPgStatementsAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9726,6 +9745,7 @@ func (m *ChangeQANPostgreSQLPgStatementsAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10035,6 +10055,7 @@ func (m *ChangeQANPostgreSQLPgStatMonitorAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10063,6 +10084,7 @@ func (m *ChangeQANPostgreSQLPgStatMonitorAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10347,6 +10369,7 @@ func (m *ChangeRDSExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10375,6 +10398,7 @@ func (m *ChangeRDSExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10655,6 +10679,7 @@ func (m *ChangeExternalExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10683,6 +10708,7 @@ func (m *ChangeExternalExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10981,6 +11007,7 @@ func (m *ChangeAzureDatabaseExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -11009,6 +11036,7 @@ func (m *ChangeAzureDatabaseExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { diff --git a/api/inventory/v1/agents_grpc.pb.go b/api/inventory/v1/agents_grpc.pb.go index 5b26504a01..1e95bcf8c9 100644 --- a/api/inventory/v1/agents_grpc.pb.go +++ b/api/inventory/v1/agents_grpc.pb.go @@ -8,7 +8,6 @@ package inventoryv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -147,23 +146,18 @@ type UnimplementedAgentsServiceServer struct{} func (UnimplementedAgentsServiceServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") } - func (UnimplementedAgentsServiceServer) GetAgent(context.Context, *GetAgentRequest) (*GetAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAgent not implemented") } - func (UnimplementedAgentsServiceServer) GetAgentLogs(context.Context, *GetAgentLogsRequest) (*GetAgentLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAgentLogs not implemented") } - func (UnimplementedAgentsServiceServer) AddAgent(context.Context, *AddAgentRequest) (*AddAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAgent not implemented") } - func (UnimplementedAgentsServiceServer) ChangeAgent(context.Context, *ChangeAgentRequest) (*ChangeAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeAgent not implemented") } - func (UnimplementedAgentsServiceServer) RemoveAgent(context.Context, *RemoveAgentRequest) (*RemoveAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveAgent not implemented") } diff --git a/api/inventory/v1/json/client/agents_service/add_agent_parameters.go b/api/inventory/v1/json/client/agents_service/add_agent_parameters.go index eca4592652..cb8c62d2ad 100644 --- a/api/inventory/v1/json/client/agents_service/add_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/add_agent_parameters.go @@ -60,6 +60,7 @@ AddAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAgentParams struct { + // Body. Body AddAgentBody @@ -129,6 +130,7 @@ func (o *AddAgentParams) SetBody(body AddAgentBody) { // WriteToRequest writes these params to a swagger request func (o *AddAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/add_agent_responses.go b/api/inventory/v1/json/client/agents_service/add_agent_responses.go index 8be01beb6a..1db25ef5e0 100644 --- a/api/inventory/v1/json/client/agents_service/add_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/add_agent_responses.go @@ -104,6 +104,7 @@ func (o *AddAgentOK) GetPayload() *AddAgentOKBody { } func (o *AddAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAgentOKBody) // response payload @@ -177,6 +178,7 @@ func (o *AddAgentDefault) GetPayload() *AddAgentDefaultBody { } func (o *AddAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAgentDefaultBody) // response payload @@ -192,6 +194,7 @@ AddAgentBody add agent body swagger:model AddAgentBody */ type AddAgentBody struct { + // azure database exporter AzureDatabaseExporter *AddAgentParamsBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -634,6 +637,7 @@ func (o *AddAgentBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *AddAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -654,6 +658,7 @@ func (o *AddAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, } func (o *AddAgentBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -674,6 +679,7 @@ func (o *AddAgentBody) contextValidateExternalExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -694,6 +700,7 @@ func (o *AddAgentBody) contextValidateMongodbExporter(ctx context.Context, forma } func (o *AddAgentBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -714,6 +721,7 @@ func (o *AddAgentBody) contextValidateMysqldExporter(ctx context.Context, format } func (o *AddAgentBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -734,6 +742,7 @@ func (o *AddAgentBody) contextValidateNodeExporter(ctx context.Context, formats } func (o *AddAgentBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -754,6 +763,7 @@ func (o *AddAgentBody) contextValidatePMMAgent(ctx context.Context, formats strf } func (o *AddAgentBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -774,6 +784,7 @@ func (o *AddAgentBody) contextValidatePostgresExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -794,6 +805,7 @@ func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -814,6 +826,7 @@ func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -834,6 +847,7 @@ func (o *AddAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -854,6 +868,7 @@ func (o *AddAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, } func (o *AddAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -874,6 +889,7 @@ func (o *AddAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context } func (o *AddAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -894,6 +910,7 @@ func (o *AddAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx contex } func (o *AddAgentBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -936,6 +953,7 @@ AddAgentDefaultBody add agent default body swagger:model AddAgentDefaultBody */ type AddAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -1001,7 +1019,9 @@ func (o *AddAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -1017,6 +1037,7 @@ func (o *AddAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } + } return nil @@ -1045,6 +1066,7 @@ AddAgentDefaultBodyDetailsItems0 add agent default body details items0 swagger:model AddAgentDefaultBodyDetailsItems0 */ type AddAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -1056,6 +1078,7 @@ type AddAgentDefaultBodyDetailsItems0 struct { func (o *AddAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1093,6 +1116,7 @@ func (o *AddAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1156,6 +1180,7 @@ AddAgentOKBody add agent OK body swagger:model AddAgentOKBody */ type AddAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *AddAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -1598,6 +1623,7 @@ func (o *AddAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -1618,6 +1644,7 @@ func (o *AddAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *AddAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1638,6 +1665,7 @@ func (o *AddAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -1658,6 +1686,7 @@ func (o *AddAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *AddAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -1678,6 +1707,7 @@ func (o *AddAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *AddAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -1698,6 +1728,7 @@ func (o *AddAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *AddAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -1718,6 +1749,7 @@ func (o *AddAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *AddAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -1738,6 +1770,7 @@ func (o *AddAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -1758,6 +1791,7 @@ func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1778,6 +1812,7 @@ func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1798,6 +1833,7 @@ func (o *AddAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1818,6 +1854,7 @@ func (o *AddAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1838,6 +1875,7 @@ func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1858,6 +1896,7 @@ func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *AddAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1900,6 +1939,7 @@ AddAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model AddAgentOKBodyAzureDatabaseExporter */ type AddAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2122,6 +2162,7 @@ func (o *AddAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Contex } func (o *AddAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2164,6 +2205,7 @@ AddAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represe swagger:model AddAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type AddAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2207,6 +2249,7 @@ AddAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model AddAgentOKBodyExternalExporter */ type AddAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2292,6 +2335,7 @@ func (o *AddAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2334,6 +2378,7 @@ AddAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyExternalExporterMetricsResolutions */ type AddAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2377,6 +2422,7 @@ AddAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model AddAgentOKBodyMongodbExporter */ type AddAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2618,6 +2664,7 @@ func (o *AddAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, for } func (o *AddAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2660,6 +2707,7 @@ AddAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents Pr swagger:model AddAgentOKBodyMongodbExporterMetricsResolutions */ type AddAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2703,6 +2751,7 @@ AddAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model AddAgentOKBodyMysqldExporter */ type AddAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2954,6 +3003,7 @@ func (o *AddAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, form } func (o *AddAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2996,6 +3046,7 @@ AddAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents Pro swagger:model AddAgentOKBodyMysqldExporterMetricsResolutions */ type AddAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3039,6 +3090,7 @@ AddAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model AddAgentOKBodyNodeExporter */ type AddAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3258,6 +3310,7 @@ func (o *AddAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, format } func (o *AddAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3300,6 +3353,7 @@ AddAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Prome swagger:model AddAgentOKBodyNodeExporterMetricsResolutions */ type AddAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3343,6 +3397,7 @@ AddAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model AddAgentOKBodyPMMAgent */ type AddAgentOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3392,6 +3447,7 @@ AddAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model AddAgentOKBodyPostgresExporter */ type AddAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3629,6 +3685,7 @@ func (o *AddAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3671,6 +3728,7 @@ AddAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyPostgresExporterMetricsResolutions */ type AddAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3714,6 +3772,7 @@ AddAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model AddAgentOKBodyProxysqlExporter */ type AddAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3945,6 +4004,7 @@ func (o *AddAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3987,6 +4047,7 @@ AddAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyProxysqlExporterMetricsResolutions */ type AddAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4030,6 +4091,7 @@ AddAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMongodbProfilerAgent */ type AddAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4239,6 +4301,7 @@ AddAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMysqlPerfschemaAgent */ type AddAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4463,6 +4526,7 @@ AddAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model AddAgentOKBodyQANMysqlSlowlogAgent */ type AddAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4690,6 +4754,7 @@ AddAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model AddAgentOKBodyQANPostgresqlPgstatementsAgent */ type AddAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4902,6 +4967,7 @@ AddAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model AddAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type AddAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5117,6 +5183,7 @@ AddAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model AddAgentOKBodyRDSExporter */ type AddAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5345,6 +5412,7 @@ func (o *AddAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, formats } func (o *AddAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5387,6 +5455,7 @@ AddAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Promet swagger:model AddAgentOKBodyRDSExporterMetricsResolutions */ type AddAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5430,6 +5499,7 @@ AddAgentParamsBodyAzureDatabaseExporter add agent params body azure database exp swagger:model AddAgentParamsBodyAzureDatabaseExporter */ type AddAgentParamsBodyAzureDatabaseExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -5566,6 +5636,7 @@ AddAgentParamsBodyExternalExporter add agent params body external exporter swagger:model AddAgentParamsBodyExternalExporter */ type AddAgentParamsBodyExternalExporter struct { + // The node identifier where this instance is run. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -5627,6 +5698,7 @@ AddAgentParamsBodyMongodbExporter add agent params body mongodb exporter swagger:model AddAgentParamsBodyMongodbExporter */ type AddAgentParamsBodyMongodbExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -5790,6 +5862,7 @@ AddAgentParamsBodyMysqldExporter add agent params body mysqld exporter swagger:model AddAgentParamsBodyMysqldExporter */ type AddAgentParamsBodyMysqldExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -5943,6 +6016,7 @@ AddAgentParamsBodyNodeExporter add agent params body node exporter swagger:model AddAgentParamsBodyNodeExporter */ type AddAgentParamsBodyNodeExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6061,6 +6135,7 @@ AddAgentParamsBodyPMMAgent add agent params body PMM agent swagger:model AddAgentParamsBodyPMMAgent */ type AddAgentParamsBodyPMMAgent struct { + // Node identifier where this instance runs. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -6101,6 +6176,7 @@ AddAgentParamsBodyPostgresExporter add agent params body postgres exporter swagger:model AddAgentParamsBodyPostgresExporter */ type AddAgentParamsBodyPostgresExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6255,6 +6331,7 @@ AddAgentParamsBodyProxysqlExporter add agent params body proxysql exporter swagger:model AddAgentParamsBodyProxysqlExporter */ type AddAgentParamsBodyProxysqlExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6394,6 +6471,7 @@ AddAgentParamsBodyQANMongodbProfilerAgent add agent params body QAN mongodb prof swagger:model AddAgentParamsBodyQANMongodbProfilerAgent */ type AddAgentParamsBodyQANMongodbProfilerAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6541,6 +6619,7 @@ AddAgentParamsBodyQANMysqlPerfschemaAgent add agent params body QAN mysql perfsc swagger:model AddAgentParamsBodyQANMysqlPerfschemaAgent */ type AddAgentParamsBodyQANMysqlPerfschemaAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6686,6 +6765,7 @@ AddAgentParamsBodyQANMysqlSlowlogAgent add agent params body QAN mysql slowlog a swagger:model AddAgentParamsBodyQANMysqlSlowlogAgent */ type AddAgentParamsBodyQANMysqlSlowlogAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6835,6 +6915,7 @@ AddAgentParamsBodyQANPostgresqlPgstatementsAgent add agent params body QAN postg swagger:model AddAgentParamsBodyQANPostgresqlPgstatementsAgent */ type AddAgentParamsBodyQANPostgresqlPgstatementsAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6977,6 +7058,7 @@ AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent add agent params body QAN post swagger:model AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent */ type AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7122,6 +7204,7 @@ AddAgentParamsBodyRDSExporter add agent params body RDS exporter swagger:model AddAgentParamsBodyRDSExporter */ type AddAgentParamsBodyRDSExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/change_agent_parameters.go b/api/inventory/v1/json/client/agents_service/change_agent_parameters.go index c683f8aeb0..142e0f5448 100644 --- a/api/inventory/v1/json/client/agents_service/change_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/change_agent_parameters.go @@ -60,6 +60,7 @@ ChangeAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeAgentParams struct { + // AgentID. AgentID string @@ -143,6 +144,7 @@ func (o *ChangeAgentParams) SetBody(body ChangeAgentBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/change_agent_responses.go b/api/inventory/v1/json/client/agents_service/change_agent_responses.go index b9fa681e38..1d2979c561 100644 --- a/api/inventory/v1/json/client/agents_service/change_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/change_agent_responses.go @@ -104,6 +104,7 @@ func (o *ChangeAgentOK) GetPayload() *ChangeAgentOKBody { } func (o *ChangeAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAgentOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ChangeAgentDefault) GetPayload() *ChangeAgentDefaultBody { } func (o *ChangeAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAgentDefaultBody) // response payload @@ -192,6 +194,7 @@ ChangeAgentBody change agent body swagger:model ChangeAgentBody */ type ChangeAgentBody struct { + // azure database exporter AzureDatabaseExporter *ChangeAgentParamsBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -604,6 +607,7 @@ func (o *ChangeAgentBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ChangeAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -624,6 +628,7 @@ func (o *ChangeAgentBody) contextValidateAzureDatabaseExporter(ctx context.Conte } func (o *ChangeAgentBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -644,6 +649,7 @@ func (o *ChangeAgentBody) contextValidateExternalExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -664,6 +670,7 @@ func (o *ChangeAgentBody) contextValidateMongodbExporter(ctx context.Context, fo } func (o *ChangeAgentBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -684,6 +691,7 @@ func (o *ChangeAgentBody) contextValidateMysqldExporter(ctx context.Context, for } func (o *ChangeAgentBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -704,6 +712,7 @@ func (o *ChangeAgentBody) contextValidateNodeExporter(ctx context.Context, forma } func (o *ChangeAgentBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -724,6 +733,7 @@ func (o *ChangeAgentBody) contextValidatePostgresExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -744,6 +754,7 @@ func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -764,6 +775,7 @@ func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -784,6 +796,7 @@ func (o *ChangeAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -804,6 +817,7 @@ func (o *ChangeAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Contex } func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -824,6 +838,7 @@ func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx cont } func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -844,6 +859,7 @@ func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx con } func (o *ChangeAgentBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -886,6 +902,7 @@ ChangeAgentDefaultBody change agent default body swagger:model ChangeAgentDefaultBody */ type ChangeAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -951,7 +968,9 @@ func (o *ChangeAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *ChangeAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -967,6 +986,7 @@ func (o *ChangeAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -995,6 +1015,7 @@ ChangeAgentDefaultBodyDetailsItems0 change agent default body details items0 swagger:model ChangeAgentDefaultBodyDetailsItems0 */ type ChangeAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -1006,6 +1027,7 @@ type ChangeAgentDefaultBodyDetailsItems0 struct { func (o *ChangeAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1043,6 +1065,7 @@ func (o *ChangeAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1106,6 +1129,7 @@ ChangeAgentOKBody change agent OK body swagger:model ChangeAgentOKBody */ type ChangeAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *ChangeAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -1518,6 +1542,7 @@ func (o *ChangeAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -1538,6 +1563,7 @@ func (o *ChangeAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Con } func (o *ChangeAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1558,6 +1584,7 @@ func (o *ChangeAgentOKBody) contextValidateExternalExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -1578,6 +1605,7 @@ func (o *ChangeAgentOKBody) contextValidateMongodbExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -1598,6 +1626,7 @@ func (o *ChangeAgentOKBody) contextValidateMysqldExporter(ctx context.Context, f } func (o *ChangeAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -1618,6 +1647,7 @@ func (o *ChangeAgentOKBody) contextValidateNodeExporter(ctx context.Context, for } func (o *ChangeAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -1638,6 +1668,7 @@ func (o *ChangeAgentOKBody) contextValidatePostgresExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -1658,6 +1689,7 @@ func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1678,6 +1710,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1698,6 +1731,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1718,6 +1752,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Cont } func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1738,6 +1773,7 @@ func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx co } func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1758,6 +1794,7 @@ func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx c } func (o *ChangeAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1800,6 +1837,7 @@ ChangeAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or swagger:model ChangeAgentOKBodyAzureDatabaseExporter */ type ChangeAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2022,6 +2060,7 @@ func (o *ChangeAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Con } func (o *ChangeAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2064,6 +2103,7 @@ ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions repr swagger:model ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2107,6 +2147,7 @@ ChangeAgentOKBodyExternalExporter ExternalExporter runs on any Node type, includ swagger:model ChangeAgentOKBodyExternalExporter */ type ChangeAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2192,6 +2233,7 @@ func (o *ChangeAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2234,6 +2276,7 @@ ChangeAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyExternalExporterMetricsResolutions */ type ChangeAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2277,6 +2320,7 @@ ChangeAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container No swagger:model ChangeAgentOKBodyMongodbExporter */ type ChangeAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2518,6 +2562,7 @@ func (o *ChangeAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2560,6 +2605,7 @@ ChangeAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyMongodbExporterMetricsResolutions */ type ChangeAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2603,6 +2649,7 @@ ChangeAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node swagger:model ChangeAgentOKBodyMysqldExporter */ type ChangeAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2854,6 +2901,7 @@ func (o *ChangeAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, f } func (o *ChangeAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2896,6 +2944,7 @@ ChangeAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyMysqldExporterMetricsResolutions */ type ChangeAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2939,6 +2988,7 @@ ChangeAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and swagger:model ChangeAgentOKBodyNodeExporter */ type ChangeAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3158,6 +3208,7 @@ func (o *ChangeAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, for } func (o *ChangeAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3200,6 +3251,7 @@ ChangeAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Pr swagger:model ChangeAgentOKBodyNodeExporterMetricsResolutions */ type ChangeAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3243,6 +3295,7 @@ ChangeAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container swagger:model ChangeAgentOKBodyPostgresExporter */ type ChangeAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3480,6 +3533,7 @@ func (o *ChangeAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3522,6 +3576,7 @@ ChangeAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyPostgresExporterMetricsResolutions */ type ChangeAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3565,6 +3620,7 @@ ChangeAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container swagger:model ChangeAgentOKBodyProxysqlExporter */ type ChangeAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3796,6 +3852,7 @@ func (o *ChangeAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3838,6 +3895,7 @@ ChangeAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyProxysqlExporterMetricsResolutions */ type ChangeAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3881,6 +3939,7 @@ ChangeAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm swagger:model ChangeAgentOKBodyQANMongodbProfilerAgent */ type ChangeAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4090,6 +4149,7 @@ ChangeAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm swagger:model ChangeAgentOKBodyQANMysqlPerfschemaAgent */ type ChangeAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4314,6 +4374,7 @@ ChangeAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent swagger:model ChangeAgentOKBodyQANMysqlSlowlogAgent */ type ChangeAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4541,6 +4602,7 @@ ChangeAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent r swagger:model ChangeAgentOKBodyQANPostgresqlPgstatementsAgent */ type ChangeAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4753,6 +4815,7 @@ ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent swagger:model ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4968,6 +5031,7 @@ ChangeAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and e swagger:model ChangeAgentOKBodyRDSExporter */ type ChangeAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5196,6 +5260,7 @@ func (o *ChangeAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, form } func (o *ChangeAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5238,6 +5303,7 @@ ChangeAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeAgentOKBodyRDSExporterMetricsResolutions */ type ChangeAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5281,6 +5347,7 @@ ChangeAgentParamsBodyAzureDatabaseExporter change agent params body azure databa swagger:model ChangeAgentParamsBodyAzureDatabaseExporter */ type ChangeAgentParamsBodyAzureDatabaseExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -5369,6 +5436,7 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) ContextValidate(ctx context } func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -5389,6 +5457,7 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels } func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5431,6 +5500,7 @@ ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels A wrapper for map[string] swagger:model ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels */ type ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -5468,6 +5538,7 @@ ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions swagger:model ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions */ type ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5511,6 +5582,7 @@ ChangeAgentParamsBodyExternalExporter change agent params body external exporter swagger:model ChangeAgentParamsBodyExternalExporter */ type ChangeAgentParamsBodyExternalExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -5599,6 +5671,7 @@ func (o *ChangeAgentParamsBodyExternalExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -5619,6 +5692,7 @@ func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5661,6 +5735,7 @@ ChangeAgentParamsBodyExternalExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyExternalExporterCustomLabels */ type ChangeAgentParamsBodyExternalExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -5698,6 +5773,7 @@ ChangeAgentParamsBodyExternalExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyExternalExporterMetricsResolutions */ type ChangeAgentParamsBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5741,6 +5817,7 @@ ChangeAgentParamsBodyMongodbExporter change agent params body mongodb exporter swagger:model ChangeAgentParamsBodyMongodbExporter */ type ChangeAgentParamsBodyMongodbExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -5829,6 +5906,7 @@ func (o *ChangeAgentParamsBodyMongodbExporter) ContextValidate(ctx context.Conte } func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -5849,6 +5927,7 @@ func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx c } func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5891,6 +5970,7 @@ ChangeAgentParamsBodyMongodbExporterCustomLabels A wrapper for map[string]string swagger:model ChangeAgentParamsBodyMongodbExporterCustomLabels */ type ChangeAgentParamsBodyMongodbExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -5928,6 +6008,7 @@ ChangeAgentParamsBodyMongodbExporterMetricsResolutions MetricsResolutions repres swagger:model ChangeAgentParamsBodyMongodbExporterMetricsResolutions */ type ChangeAgentParamsBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5971,6 +6052,7 @@ ChangeAgentParamsBodyMysqldExporter change agent params body mysqld exporter swagger:model ChangeAgentParamsBodyMysqldExporter */ type ChangeAgentParamsBodyMysqldExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6059,6 +6141,7 @@ func (o *ChangeAgentParamsBodyMysqldExporter) ContextValidate(ctx context.Contex } func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6079,6 +6162,7 @@ func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx co } func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6121,6 +6205,7 @@ ChangeAgentParamsBodyMysqldExporterCustomLabels A wrapper for map[string]string. swagger:model ChangeAgentParamsBodyMysqldExporterCustomLabels */ type ChangeAgentParamsBodyMysqldExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -6158,6 +6243,7 @@ ChangeAgentParamsBodyMysqldExporterMetricsResolutions MetricsResolutions represe swagger:model ChangeAgentParamsBodyMysqldExporterMetricsResolutions */ type ChangeAgentParamsBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6201,6 +6287,7 @@ ChangeAgentParamsBodyNodeExporter change agent params body node exporter swagger:model ChangeAgentParamsBodyNodeExporter */ type ChangeAgentParamsBodyNodeExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6289,6 +6376,7 @@ func (o *ChangeAgentParamsBodyNodeExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6309,6 +6397,7 @@ func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx cont } func (o *ChangeAgentParamsBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6351,6 +6440,7 @@ ChangeAgentParamsBodyNodeExporterCustomLabels A wrapper for map[string]string. T swagger:model ChangeAgentParamsBodyNodeExporterCustomLabels */ type ChangeAgentParamsBodyNodeExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -6388,6 +6478,7 @@ ChangeAgentParamsBodyNodeExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentParamsBodyNodeExporterMetricsResolutions */ type ChangeAgentParamsBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6431,6 +6522,7 @@ ChangeAgentParamsBodyPostgresExporter change agent params body postgres exporter swagger:model ChangeAgentParamsBodyPostgresExporter */ type ChangeAgentParamsBodyPostgresExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6519,6 +6611,7 @@ func (o *ChangeAgentParamsBodyPostgresExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6539,6 +6632,7 @@ func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6581,6 +6675,7 @@ ChangeAgentParamsBodyPostgresExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyPostgresExporterCustomLabels */ type ChangeAgentParamsBodyPostgresExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -6618,6 +6713,7 @@ ChangeAgentParamsBodyPostgresExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyPostgresExporterMetricsResolutions */ type ChangeAgentParamsBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6661,6 +6757,7 @@ ChangeAgentParamsBodyProxysqlExporter change agent params body proxysql exporter swagger:model ChangeAgentParamsBodyProxysqlExporter */ type ChangeAgentParamsBodyProxysqlExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6749,6 +6846,7 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6769,6 +6867,7 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6811,6 +6910,7 @@ ChangeAgentParamsBodyProxysqlExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyProxysqlExporterCustomLabels */ type ChangeAgentParamsBodyProxysqlExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -6848,6 +6948,7 @@ ChangeAgentParamsBodyProxysqlExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyProxysqlExporterMetricsResolutions */ type ChangeAgentParamsBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6891,6 +6992,7 @@ ChangeAgentParamsBodyQANMongodbProfilerAgent change agent params body QAN mongod swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgent */ type ChangeAgentParamsBodyQANMongodbProfilerAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6979,6 +7081,7 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) ContextValidate(ctx conte } func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6999,6 +7102,7 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabe } func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7041,6 +7145,7 @@ ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels A wrapper for map[strin swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels */ type ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -7078,6 +7183,7 @@ ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions MetricsResolution swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7121,6 +7227,7 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgent change agent params body QAN mysql swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgent */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7209,6 +7316,7 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) ContextValidate(ctx conte } func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7229,6 +7337,7 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabe } func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7271,6 +7380,7 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels A wrapper for map[strin swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -7308,6 +7418,7 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions MetricsResolution swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7351,6 +7462,7 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgent change agent params body QAN mysql slo swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgent */ type ChangeAgentParamsBodyQANMysqlSlowlogAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7439,6 +7551,7 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) ContextValidate(ctx context. } func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7459,6 +7572,7 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels( } func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7501,6 +7615,7 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels A wrapper for map[string]s swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels */ type ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -7538,6 +7653,7 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions MetricsResolutions r swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7581,6 +7697,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent change agent params body QAN swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7669,6 +7786,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) ContextValidate(ct } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7689,6 +7807,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCus } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7731,6 +7850,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels A wrapper for ma swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -7768,6 +7888,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions MetricsRes swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7811,6 +7932,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent change agent params body QA swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7899,6 +8021,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) ContextValidate(c } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7919,6 +8042,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCu } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7961,6 +8085,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels A wrapper for m swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -7998,6 +8123,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions MetricsRe swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -8041,6 +8167,7 @@ ChangeAgentParamsBodyRDSExporter change agent params body RDS exporter swagger:model ChangeAgentParamsBodyRDSExporter */ type ChangeAgentParamsBodyRDSExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -8129,6 +8256,7 @@ func (o *ChangeAgentParamsBodyRDSExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8149,6 +8277,7 @@ func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx conte } func (o *ChangeAgentParamsBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8191,6 +8320,7 @@ ChangeAgentParamsBodyRDSExporterCustomLabels A wrapper for map[string]string. Th swagger:model ChangeAgentParamsBodyRDSExporterCustomLabels */ type ChangeAgentParamsBodyRDSExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -8228,6 +8358,7 @@ ChangeAgentParamsBodyRDSExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentParamsBodyRDSExporterMetricsResolutions */ type ChangeAgentParamsBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go b/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go index 97651a5eab..f62c8c3401 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go @@ -61,6 +61,7 @@ GetAgentLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentLogsParams struct { + /* AgentID. Unique randomly generated instance identifier. @@ -152,6 +153,7 @@ func (o *GetAgentLogsParams) SetLimit(limit *int64) { // WriteToRequest writes these params to a swagger request func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -172,6 +174,7 @@ func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go b/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go index 3a2fd7aeed..3094d3ea5a 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go @@ -103,6 +103,7 @@ func (o *GetAgentLogsOK) GetPayload() *GetAgentLogsOKBody { } func (o *GetAgentLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentLogsOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetAgentLogsDefault) GetPayload() *GetAgentLogsDefaultBody { } func (o *GetAgentLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentLogsDefaultBody) // response payload @@ -191,6 +193,7 @@ GetAgentLogsDefaultBody get agent logs default body swagger:model GetAgentLogsDefaultBody */ type GetAgentLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetAgentLogsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -300,6 +306,7 @@ GetAgentLogsDefaultBodyDetailsItems0 get agent logs default body details items0 swagger:model GetAgentLogsDefaultBodyDetailsItems0 */ type GetAgentLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetAgentLogsDefaultBodyDetailsItems0 struct { func (o *GetAgentLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetAgentLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetAgentLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetAgentLogsOKBody get agent logs OK body swagger:model GetAgentLogsOKBody */ type GetAgentLogsOKBody struct { + // logs Logs []string `json:"logs"` diff --git a/api/inventory/v1/json/client/agents_service/get_agent_parameters.go b/api/inventory/v1/json/client/agents_service/get_agent_parameters.go index 05cb31a609..8242239f60 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_parameters.go @@ -60,6 +60,7 @@ GetAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentParams struct { + /* AgentID. Unique randomly generated instance identifier. @@ -132,6 +133,7 @@ func (o *GetAgentParams) SetAgentID(agentID string) { // WriteToRequest writes these params to a swagger request func (o *GetAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/get_agent_responses.go b/api/inventory/v1/json/client/agents_service/get_agent_responses.go index 0dd59aaadb..4a771a8b04 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_responses.go @@ -104,6 +104,7 @@ func (o *GetAgentOK) GetPayload() *GetAgentOKBody { } func (o *GetAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetAgentDefault) GetPayload() *GetAgentDefaultBody { } func (o *GetAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentDefaultBody) // response payload @@ -192,6 +194,7 @@ GetAgentDefaultBody get agent default body swagger:model GetAgentDefaultBody */ type GetAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *GetAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } + } return nil @@ -301,6 +307,7 @@ GetAgentDefaultBodyDetailsItems0 get agent default body details items0 swagger:model GetAgentDefaultBodyDetailsItems0 */ type GetAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type GetAgentDefaultBodyDetailsItems0 struct { func (o *GetAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *GetAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ GetAgentOKBody get agent OK body swagger:model GetAgentOKBody */ type GetAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *GetAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -884,6 +894,7 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -904,6 +915,7 @@ func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -924,6 +936,7 @@ func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -944,6 +957,7 @@ func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -964,6 +978,7 @@ func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -984,6 +999,7 @@ func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -1004,6 +1020,7 @@ func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -1024,6 +1041,7 @@ func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -1044,6 +1062,7 @@ func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1064,6 +1083,7 @@ func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1084,6 +1104,7 @@ func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1104,6 +1125,7 @@ func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1124,6 +1146,7 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1144,6 +1167,7 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1164,6 +1188,7 @@ func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats } func (o *GetAgentOKBody) contextValidateVmagent(ctx context.Context, formats strfmt.Registry) error { + if o.Vmagent != nil { if swag.IsZero(o.Vmagent) { // not required @@ -1206,6 +1231,7 @@ GetAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model GetAgentOKBodyAzureDatabaseExporter */ type GetAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1428,6 +1454,7 @@ func (o *GetAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Contex } func (o *GetAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1470,6 +1497,7 @@ GetAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represe swagger:model GetAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type GetAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1513,6 +1541,7 @@ GetAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model GetAgentOKBodyExternalExporter */ type GetAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1598,6 +1627,7 @@ func (o *GetAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1640,6 +1670,7 @@ GetAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyExternalExporterMetricsResolutions */ type GetAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1683,6 +1714,7 @@ GetAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model GetAgentOKBodyMongodbExporter */ type GetAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1924,6 +1956,7 @@ func (o *GetAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, for } func (o *GetAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1966,6 +1999,7 @@ GetAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents Pr swagger:model GetAgentOKBodyMongodbExporterMetricsResolutions */ type GetAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2009,6 +2043,7 @@ GetAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model GetAgentOKBodyMysqldExporter */ type GetAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2260,6 +2295,7 @@ func (o *GetAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, form } func (o *GetAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2302,6 +2338,7 @@ GetAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents Pro swagger:model GetAgentOKBodyMysqldExporterMetricsResolutions */ type GetAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2345,6 +2382,7 @@ GetAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model GetAgentOKBodyNodeExporter */ type GetAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2564,6 +2602,7 @@ func (o *GetAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, format } func (o *GetAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2606,6 +2645,7 @@ GetAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Prome swagger:model GetAgentOKBodyNodeExporterMetricsResolutions */ type GetAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2649,6 +2689,7 @@ GetAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model GetAgentOKBodyPMMAgent */ type GetAgentOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2698,6 +2739,7 @@ GetAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyPostgresExporter */ type GetAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2935,6 +2977,7 @@ func (o *GetAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2977,6 +3020,7 @@ GetAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyPostgresExporterMetricsResolutions */ type GetAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3020,6 +3064,7 @@ GetAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyProxysqlExporter */ type GetAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3251,6 +3296,7 @@ func (o *GetAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3293,6 +3339,7 @@ GetAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyProxysqlExporterMetricsResolutions */ type GetAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3336,6 +3383,7 @@ GetAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMongodbProfilerAgent */ type GetAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3545,6 +3593,7 @@ GetAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMysqlPerfschemaAgent */ type GetAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3769,6 +3818,7 @@ GetAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model GetAgentOKBodyQANMysqlSlowlogAgent */ type GetAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3996,6 +4046,7 @@ GetAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model GetAgentOKBodyQANPostgresqlPgstatementsAgent */ type GetAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4208,6 +4259,7 @@ GetAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model GetAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type GetAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4423,6 +4475,7 @@ GetAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model GetAgentOKBodyRDSExporter */ type GetAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4651,6 +4704,7 @@ func (o *GetAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, formats } func (o *GetAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4693,6 +4747,7 @@ GetAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Promet swagger:model GetAgentOKBodyRDSExporterMetricsResolutions */ type GetAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4738,6 +4793,7 @@ GetAgentOKBodyVmagent VMAgent runs on Generic or Container Node alongside pmm-ag swagger:model GetAgentOKBodyVmagent */ type GetAgentOKBodyVmagent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/list_agents_parameters.go b/api/inventory/v1/json/client/agents_service/list_agents_parameters.go index 371c8f77c3..1836e25a8c 100644 --- a/api/inventory/v1/json/client/agents_service/list_agents_parameters.go +++ b/api/inventory/v1/json/client/agents_service/list_agents_parameters.go @@ -60,6 +60,7 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { + /* AgentType. Return only agents of a particular type. @@ -106,7 +107,9 @@ func (o *ListAgentsParams) WithDefaults() *ListAgentsParams { // // All values with no default are reset to their zero value. func (o *ListAgentsParams) SetDefaults() { - agentTypeDefault := string("AGENT_TYPE_UNSPECIFIED") + var ( + agentTypeDefault = string("AGENT_TYPE_UNSPECIFIED") + ) val := ListAgentsParams{ AgentType: &agentTypeDefault, @@ -197,6 +200,7 @@ func (o *ListAgentsParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -212,6 +216,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qAgentType := qrAgentType if qAgentType != "" { + if err := r.SetQueryParam("agent_type", qAgentType); err != nil { return err } @@ -228,6 +233,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qNodeID := qrNodeID if qNodeID != "" { + if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -244,6 +250,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qPMMAgentID := qrPMMAgentID if qPMMAgentID != "" { + if err := r.SetQueryParam("pmm_agent_id", qPMMAgentID); err != nil { return err } @@ -260,6 +267,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qServiceID := qrServiceID if qServiceID != "" { + if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/list_agents_responses.go b/api/inventory/v1/json/client/agents_service/list_agents_responses.go index 99d43b0071..d6f5b2aa2f 100644 --- a/api/inventory/v1/json/client/agents_service/list_agents_responses.go +++ b/api/inventory/v1/json/client/agents_service/list_agents_responses.go @@ -104,6 +104,7 @@ func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -301,6 +307,7 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListAgentsDefaultBodyDetailsItems0 struct { func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { + // pmm agent PMMAgent []*ListAgentsOKBodyPMMAgentItems0 `json:"pmm_agent"` @@ -989,7 +999,9 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.PMMAgent); i++ { + if o.PMMAgent[i] != nil { if swag.IsZero(o.PMMAgent[i]) { // not required @@ -1005,13 +1017,16 @@ func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.VMAgent); i++ { + if o.VMAgent[i] != nil { if swag.IsZero(o.VMAgent[i]) { // not required @@ -1027,13 +1042,16 @@ func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats s return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.NodeExporter); i++ { + if o.NodeExporter[i] != nil { if swag.IsZero(o.NodeExporter[i]) { // not required @@ -1049,13 +1067,16 @@ func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, form return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MysqldExporter); i++ { + if o.MysqldExporter[i] != nil { if swag.IsZero(o.MysqldExporter[i]) { // not required @@ -1071,13 +1092,16 @@ func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, fo return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MongodbExporter); i++ { + if o.MongodbExporter[i] != nil { if swag.IsZero(o.MongodbExporter[i]) { // not required @@ -1093,13 +1117,16 @@ func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, f return err } } + } return nil } func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.PostgresExporter); i++ { + if o.PostgresExporter[i] != nil { if swag.IsZero(o.PostgresExporter[i]) { // not required @@ -1115,13 +1142,16 @@ func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ProxysqlExporter); i++ { + if o.ProxysqlExporter[i] != nil { if swag.IsZero(o.ProxysqlExporter[i]) { // not required @@ -1137,13 +1167,16 @@ func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMysqlPerfschemaAgent); i++ { + if o.QANMysqlPerfschemaAgent[i] != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent[i]) { // not required @@ -1159,13 +1192,16 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMysqlSlowlogAgent); i++ { + if o.QANMysqlSlowlogAgent[i] != nil { if swag.IsZero(o.QANMysqlSlowlogAgent[i]) { // not required @@ -1181,13 +1217,16 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Conte return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMongodbProfilerAgent); i++ { + if o.QANMongodbProfilerAgent[i] != nil { if swag.IsZero(o.QANMongodbProfilerAgent[i]) { // not required @@ -1203,13 +1242,16 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANPostgresqlPgstatementsAgent); i++ { + if o.QANPostgresqlPgstatementsAgent[i] != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent[i]) { // not required @@ -1225,13 +1267,16 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx con return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANPostgresqlPgstatmonitorAgent); i++ { + if o.QANPostgresqlPgstatmonitorAgent[i] != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent[i]) { // not required @@ -1247,13 +1292,16 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ExternalExporter); i++ { + if o.ExternalExporter[i] != nil { if swag.IsZero(o.ExternalExporter[i]) { // not required @@ -1269,13 +1317,16 @@ func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RDSExporter); i++ { + if o.RDSExporter[i] != nil { if swag.IsZero(o.RDSExporter[i]) { // not required @@ -1291,13 +1342,16 @@ func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, forma return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AzureDatabaseExporter); i++ { + if o.AzureDatabaseExporter[i] != nil { if swag.IsZero(o.AzureDatabaseExporter[i]) { // not required @@ -1313,6 +1367,7 @@ func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Cont return err } } + } return nil @@ -1341,6 +1396,7 @@ ListAgentsOKBodyAzureDatabaseExporterItems0 AzureDatabaseExporter runs on Generi swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0 */ type ListAgentsOKBodyAzureDatabaseExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1563,6 +1619,7 @@ func (o *ListAgentsOKBodyAzureDatabaseExporterItems0) ContextValidate(ctx contex } func (o *ListAgentsOKBodyAzureDatabaseExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1605,6 +1662,7 @@ ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions MetricsResolutions swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions */ type ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1648,6 +1706,7 @@ ListAgentsOKBodyExternalExporterItems0 ExternalExporter runs on any Node type, i swagger:model ListAgentsOKBodyExternalExporterItems0 */ type ListAgentsOKBodyExternalExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1733,6 +1792,7 @@ func (o *ListAgentsOKBodyExternalExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyExternalExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1775,6 +1835,7 @@ ListAgentsOKBodyExternalExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyExternalExporterItems0MetricsResolutions */ type ListAgentsOKBodyExternalExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1818,6 +1879,7 @@ ListAgentsOKBodyMongodbExporterItems0 MongoDBExporter runs on Generic or Contain swagger:model ListAgentsOKBodyMongodbExporterItems0 */ type ListAgentsOKBodyMongodbExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2059,6 +2121,7 @@ func (o *ListAgentsOKBodyMongodbExporterItems0) ContextValidate(ctx context.Cont } func (o *ListAgentsOKBodyMongodbExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2101,6 +2164,7 @@ ListAgentsOKBodyMongodbExporterItems0MetricsResolutions MetricsResolutions repre swagger:model ListAgentsOKBodyMongodbExporterItems0MetricsResolutions */ type ListAgentsOKBodyMongodbExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2144,6 +2208,7 @@ ListAgentsOKBodyMysqldExporterItems0 MySQLdExporter runs on Generic or Container swagger:model ListAgentsOKBodyMysqldExporterItems0 */ type ListAgentsOKBodyMysqldExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2395,6 +2460,7 @@ func (o *ListAgentsOKBodyMysqldExporterItems0) ContextValidate(ctx context.Conte } func (o *ListAgentsOKBodyMysqldExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2437,6 +2503,7 @@ ListAgentsOKBodyMysqldExporterItems0MetricsResolutions MetricsResolutions repres swagger:model ListAgentsOKBodyMysqldExporterItems0MetricsResolutions */ type ListAgentsOKBodyMysqldExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2480,6 +2547,7 @@ ListAgentsOKBodyNodeExporterItems0 NodeExporter runs on Generic or Container Nod swagger:model ListAgentsOKBodyNodeExporterItems0 */ type ListAgentsOKBodyNodeExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2699,6 +2767,7 @@ func (o *ListAgentsOKBodyNodeExporterItems0) ContextValidate(ctx context.Context } func (o *ListAgentsOKBodyNodeExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2741,6 +2810,7 @@ ListAgentsOKBodyNodeExporterItems0MetricsResolutions MetricsResolutions represen swagger:model ListAgentsOKBodyNodeExporterItems0MetricsResolutions */ type ListAgentsOKBodyNodeExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2784,6 +2854,7 @@ ListAgentsOKBodyPMMAgentItems0 PMMAgent runs on Generic or Container Node. swagger:model ListAgentsOKBodyPMMAgentItems0 */ type ListAgentsOKBodyPMMAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2833,6 +2904,7 @@ ListAgentsOKBodyPostgresExporterItems0 PostgresExporter runs on Generic or Conta swagger:model ListAgentsOKBodyPostgresExporterItems0 */ type ListAgentsOKBodyPostgresExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3070,6 +3142,7 @@ func (o *ListAgentsOKBodyPostgresExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyPostgresExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3112,6 +3185,7 @@ ListAgentsOKBodyPostgresExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyPostgresExporterItems0MetricsResolutions */ type ListAgentsOKBodyPostgresExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3155,6 +3229,7 @@ ListAgentsOKBodyProxysqlExporterItems0 ProxySQLExporter runs on Generic or Conta swagger:model ListAgentsOKBodyProxysqlExporterItems0 */ type ListAgentsOKBodyProxysqlExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3386,6 +3461,7 @@ func (o *ListAgentsOKBodyProxysqlExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyProxysqlExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3428,6 +3504,7 @@ ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions */ type ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3471,6 +3548,7 @@ ListAgentsOKBodyQANMongodbProfilerAgentItems0 QANMongoDBProfilerAgent runs withi swagger:model ListAgentsOKBodyQANMongodbProfilerAgentItems0 */ type ListAgentsOKBodyQANMongodbProfilerAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3680,6 +3758,7 @@ ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 QANMySQLPerfSchemaAgent runs withi swagger:model ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 */ type ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3904,6 +3983,7 @@ ListAgentsOKBodyQANMysqlSlowlogAgentItems0 QANMySQLSlowlogAgent runs within pmm- swagger:model ListAgentsOKBodyQANMysqlSlowlogAgentItems0 */ type ListAgentsOKBodyQANMysqlSlowlogAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4131,6 +4211,7 @@ ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 QANPostgreSQLPgStatementsAg swagger:model ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4343,6 +4424,7 @@ ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 QANPostgreSQLPgStatMonitor swagger:model ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4558,6 +4640,7 @@ ListAgentsOKBodyRDSExporterItems0 RDSExporter runs on Generic or Container Node swagger:model ListAgentsOKBodyRDSExporterItems0 */ type ListAgentsOKBodyRDSExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4786,6 +4869,7 @@ func (o *ListAgentsOKBodyRDSExporterItems0) ContextValidate(ctx context.Context, } func (o *ListAgentsOKBodyRDSExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4828,6 +4912,7 @@ ListAgentsOKBodyRDSExporterItems0MetricsResolutions MetricsResolutions represent swagger:model ListAgentsOKBodyRDSExporterItems0MetricsResolutions */ type ListAgentsOKBodyRDSExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4873,6 +4958,7 @@ ListAgentsOKBodyVMAgentItems0 VMAgent runs on Generic or Container Node alongsid swagger:model ListAgentsOKBodyVMAgentItems0 */ type ListAgentsOKBodyVMAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go b/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go index fd762f2972..946dbbe4ca 100644 --- a/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go @@ -61,6 +61,7 @@ RemoveAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveAgentParams struct { + // AgentID. AgentID string @@ -147,6 +148,7 @@ func (o *RemoveAgentParams) SetForce(force *bool) { // WriteToRequest writes these params to a swagger request func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -167,6 +169,7 @@ func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/remove_agent_responses.go b/api/inventory/v1/json/client/agents_service/remove_agent_responses.go index 6861c9c705..60f7d9ef01 100644 --- a/api/inventory/v1/json/client/agents_service/remove_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/remove_agent_responses.go @@ -103,6 +103,7 @@ func (o *RemoveAgentOK) GetPayload() interface{} { } func (o *RemoveAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *RemoveAgentDefault) GetPayload() *RemoveAgentDefaultBody { } func (o *RemoveAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveAgentDefaultBody) // response payload @@ -189,6 +191,7 @@ RemoveAgentDefaultBody remove agent default body swagger:model RemoveAgentDefaultBody */ type RemoveAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *RemoveAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -298,6 +304,7 @@ RemoveAgentDefaultBodyDetailsItems0 remove agent default body details items0 swagger:model RemoveAgentDefaultBodyDetailsItems0 */ type RemoveAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type RemoveAgentDefaultBodyDetailsItems0 struct { func (o *RemoveAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *RemoveAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/client/nodes_service/add_node_parameters.go b/api/inventory/v1/json/client/nodes_service/add_node_parameters.go index 67702dfa37..a1f49d176f 100644 --- a/api/inventory/v1/json/client/nodes_service/add_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/add_node_parameters.go @@ -60,6 +60,7 @@ AddNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddNodeParams struct { + // Body. Body AddNodeBody @@ -129,6 +130,7 @@ func (o *AddNodeParams) SetBody(body AddNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/add_node_responses.go b/api/inventory/v1/json/client/nodes_service/add_node_responses.go index 1170cb0781..01506e5b60 100644 --- a/api/inventory/v1/json/client/nodes_service/add_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/add_node_responses.go @@ -103,6 +103,7 @@ func (o *AddNodeOK) GetPayload() *AddNodeOKBody { } func (o *AddNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddNodeOKBody) // response payload @@ -176,6 +177,7 @@ func (o *AddNodeDefault) GetPayload() *AddNodeDefaultBody { } func (o *AddNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddNodeDefaultBody) // response payload @@ -191,6 +193,7 @@ AddNodeBody add node body swagger:model AddNodeBody */ type AddNodeBody struct { + // container Container *AddNodeParamsBodyContainer `json:"container,omitempty"` @@ -363,6 +366,7 @@ func (o *AddNodeBody) ContextValidate(ctx context.Context, formats strfmt.Regist } func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -383,6 +387,7 @@ func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strf } func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -403,6 +408,7 @@ func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt } func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -423,6 +429,7 @@ func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt. } func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzure != nil { if swag.IsZero(o.RemoteAzure) { // not required @@ -443,6 +450,7 @@ func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats st } func (o *AddNodeBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -485,6 +493,7 @@ AddNodeDefaultBody add node default body swagger:model AddNodeDefaultBody */ type AddNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -550,7 +559,9 @@ func (o *AddNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -566,6 +577,7 @@ func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -594,6 +606,7 @@ AddNodeDefaultBodyDetailsItems0 add node default body details items0 swagger:model AddNodeDefaultBodyDetailsItems0 */ type AddNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -605,6 +618,7 @@ type AddNodeDefaultBodyDetailsItems0 struct { func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -642,6 +656,7 @@ func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -705,6 +720,7 @@ AddNodeOKBody add node OK body swagger:model AddNodeOKBody */ type AddNodeOKBody struct { + // container Container *AddNodeOKBodyContainer `json:"container,omitempty"` @@ -877,6 +893,7 @@ func (o *AddNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -897,6 +914,7 @@ func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -917,6 +935,7 @@ func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -937,6 +956,7 @@ func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzureDatabase != nil { if swag.IsZero(o.RemoteAzureDatabase) { // not required @@ -957,6 +977,7 @@ func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *AddNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -999,6 +1020,7 @@ AddNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model AddNodeOKBodyContainer */ type AddNodeOKBodyContainer struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1063,6 +1085,7 @@ AddNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model AddNodeOKBodyGeneric */ type AddNodeOKBodyGeneric struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1124,6 +1147,7 @@ AddNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model AddNodeOKBodyRemote */ type AddNodeOKBodyRemote struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1179,6 +1203,7 @@ AddNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model AddNodeOKBodyRemoteAzureDatabase */ type AddNodeOKBodyRemoteAzureDatabase struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1234,6 +1259,7 @@ AddNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model AddNodeOKBodyRemoteRDS */ type AddNodeOKBodyRemoteRDS struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1289,6 +1315,7 @@ AddNodeParamsBodyContainer add node params body container swagger:model AddNodeParamsBodyContainer */ type AddNodeParamsBodyContainer struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1350,6 +1377,7 @@ AddNodeParamsBodyGeneric add node params body generic swagger:model AddNodeParamsBodyGeneric */ type AddNodeParamsBodyGeneric struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1408,6 +1436,7 @@ AddNodeParamsBodyRemote add node params body remote swagger:model AddNodeParamsBodyRemote */ type AddNodeParamsBodyRemote struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1460,6 +1489,7 @@ AddNodeParamsBodyRemoteAzure add node params body remote azure swagger:model AddNodeParamsBodyRemoteAzure */ type AddNodeParamsBodyRemoteAzure struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1512,6 +1542,7 @@ AddNodeParamsBodyRemoteRDS add node params body remote RDS swagger:model AddNodeParamsBodyRemoteRDS */ type AddNodeParamsBodyRemoteRDS struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/get_node_parameters.go b/api/inventory/v1/json/client/nodes_service/get_node_parameters.go index 3498346e1f..25b4a671bc 100644 --- a/api/inventory/v1/json/client/nodes_service/get_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/get_node_parameters.go @@ -60,6 +60,7 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { + /* NodeID. Unique randomly generated instance identifier. @@ -132,6 +133,7 @@ func (o *GetNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/get_node_responses.go b/api/inventory/v1/json/client/nodes_service/get_node_responses.go index cae578625e..b1fb5b2fee 100644 --- a/api/inventory/v1/json/client/nodes_service/get_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/get_node_responses.go @@ -103,6 +103,7 @@ func (o *GetNodeOK) GetPayload() *GetNodeOKBody { } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeDefaultBody) // response payload @@ -191,6 +193,7 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -300,6 +306,7 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetNodeDefaultBodyDetailsItems0 struct { func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { + // container Container *GetNodeOKBodyContainer `json:"container,omitempty"` @@ -583,6 +593,7 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -603,6 +614,7 @@ func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -623,6 +635,7 @@ func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -643,6 +656,7 @@ func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzureDatabase != nil { if swag.IsZero(o.RemoteAzureDatabase) { // not required @@ -663,6 +677,7 @@ func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *GetNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -705,6 +720,7 @@ GetNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model GetNodeOKBodyContainer */ type GetNodeOKBodyContainer struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -769,6 +785,7 @@ GetNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model GetNodeOKBodyGeneric */ type GetNodeOKBodyGeneric struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -830,6 +847,7 @@ GetNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model GetNodeOKBodyRemote */ type GetNodeOKBodyRemote struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -885,6 +903,7 @@ GetNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model GetNodeOKBodyRemoteAzureDatabase */ type GetNodeOKBodyRemoteAzureDatabase struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -940,6 +959,7 @@ GetNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model GetNodeOKBodyRemoteRDS */ type GetNodeOKBodyRemoteRDS struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go b/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go index 63128821ce..828de4c8f1 100644 --- a/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go @@ -60,6 +60,7 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { + /* NodeType. Return only Nodes with matching Node type. @@ -85,7 +86,9 @@ func (o *ListNodesParams) WithDefaults() *ListNodesParams { // // All values with no default are reset to their zero value. func (o *ListNodesParams) SetDefaults() { - nodeTypeDefault := string("NODE_TYPE_UNSPECIFIED") + var ( + nodeTypeDefault = string("NODE_TYPE_UNSPECIFIED") + ) val := ListNodesParams{ NodeType: &nodeTypeDefault, @@ -143,6 +146,7 @@ func (o *ListNodesParams) SetNodeType(nodeType *string) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -158,6 +162,7 @@ func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } qNodeType := qrNodeType if qNodeType != "" { + if err := r.SetQueryParam("node_type", qNodeType); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go b/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go index 7182f2aca7..75adb97452 100644 --- a/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go +++ b/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go @@ -103,6 +103,7 @@ func (o *ListNodesOK) GetPayload() *ListNodesOKBody { } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesDefaultBody) // response payload @@ -191,6 +193,7 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -300,6 +306,7 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type ListNodesDefaultBodyDetailsItems0 struct { func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListNodesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { + // generic Generic []*ListNodesOKBodyGenericItems0 `json:"generic"` @@ -618,7 +628,9 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Generic); i++ { + if o.Generic[i] != nil { if swag.IsZero(o.Generic[i]) { // not required @@ -634,13 +646,16 @@ func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats st return err } } + } return nil } func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Container); i++ { + if o.Container[i] != nil { if swag.IsZero(o.Container[i]) { // not required @@ -656,13 +671,16 @@ func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Remote); i++ { + if o.Remote[i] != nil { if swag.IsZero(o.Remote[i]) { // not required @@ -678,13 +696,16 @@ func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats str return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RemoteRDS); i++ { + if o.RemoteRDS[i] != nil { if swag.IsZero(o.RemoteRDS[i]) { // not required @@ -700,13 +721,16 @@ func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RemoteAzureDatabase); i++ { + if o.RemoteAzureDatabase[i] != nil { if swag.IsZero(o.RemoteAzureDatabase[i]) { // not required @@ -722,6 +746,7 @@ func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context return err } } + } return nil @@ -750,6 +775,7 @@ ListNodesOKBodyContainerItems0 ContainerNode represents a Docker container. swagger:model ListNodesOKBodyContainerItems0 */ type ListNodesOKBodyContainerItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -814,6 +840,7 @@ ListNodesOKBodyGenericItems0 GenericNode represents a bare metal server or virtu swagger:model ListNodesOKBodyGenericItems0 */ type ListNodesOKBodyGenericItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -875,6 +902,7 @@ ListNodesOKBodyRemoteAzureDatabaseItems0 RemoteAzureDatabaseNode represents remo swagger:model ListNodesOKBodyRemoteAzureDatabaseItems0 */ type ListNodesOKBodyRemoteAzureDatabaseItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -930,6 +958,7 @@ ListNodesOKBodyRemoteItems0 RemoteNode represents generic remote Node. It's a no swagger:model ListNodesOKBodyRemoteItems0 */ type ListNodesOKBodyRemoteItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -985,6 +1014,7 @@ ListNodesOKBodyRemoteRDSItems0 RemoteRDSNode represents remote RDS Node. Agents swagger:model ListNodesOKBodyRemoteRDSItems0 */ type ListNodesOKBodyRemoteRDSItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go b/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go index 62194bd1a8..c2bfa764da 100644 --- a/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go @@ -61,6 +61,7 @@ RemoveNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveNodeParams struct { + /* Force. Remove node with all dependencies. @@ -150,6 +151,7 @@ func (o *RemoveNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/remove_node_responses.go b/api/inventory/v1/json/client/nodes_service/remove_node_responses.go index 80f2e26ef2..eeaddaac03 100644 --- a/api/inventory/v1/json/client/nodes_service/remove_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/remove_node_responses.go @@ -103,6 +103,7 @@ func (o *RemoveNodeOK) GetPayload() interface{} { } func (o *RemoveNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *RemoveNodeDefault) GetPayload() *RemoveNodeDefaultBody { } func (o *RemoveNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveNodeDefaultBody) // response payload @@ -189,6 +191,7 @@ RemoveNodeDefaultBody remove node default body swagger:model RemoveNodeDefaultBody */ type RemoveNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *RemoveNodeDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -298,6 +304,7 @@ RemoveNodeDefaultBodyDetailsItems0 remove node default body details items0 swagger:model RemoveNodeDefaultBodyDetailsItems0 */ type RemoveNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type RemoveNodeDefaultBodyDetailsItems0 struct { func (o *RemoveNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *RemoveNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/client/services_service/add_service_parameters.go b/api/inventory/v1/json/client/services_service/add_service_parameters.go index ed2a7830ee..db289d481c 100644 --- a/api/inventory/v1/json/client/services_service/add_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/add_service_parameters.go @@ -60,6 +60,7 @@ AddServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddServiceParams struct { + // Body. Body AddServiceBody @@ -129,6 +130,7 @@ func (o *AddServiceParams) SetBody(body AddServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/add_service_responses.go b/api/inventory/v1/json/client/services_service/add_service_responses.go index 87767c8a51..bb65cd9dfa 100644 --- a/api/inventory/v1/json/client/services_service/add_service_responses.go +++ b/api/inventory/v1/json/client/services_service/add_service_responses.go @@ -103,6 +103,7 @@ func (o *AddServiceOK) GetPayload() *AddServiceOKBody { } func (o *AddServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceOKBody) // response payload @@ -176,6 +177,7 @@ func (o *AddServiceDefault) GetPayload() *AddServiceDefaultBody { } func (o *AddServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceDefaultBody) // response payload @@ -191,6 +193,7 @@ AddServiceBody add service body swagger:model AddServiceBody */ type AddServiceBody struct { + // external External *AddServiceParamsBodyExternal `json:"external,omitempty"` @@ -393,6 +396,7 @@ func (o *AddServiceBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -413,6 +417,7 @@ func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -433,6 +438,7 @@ func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -453,6 +459,7 @@ func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -473,6 +480,7 @@ func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfm } func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -493,6 +501,7 @@ func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats } func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -535,6 +544,7 @@ AddServiceDefaultBody add service default body swagger:model AddServiceDefaultBody */ type AddServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -600,7 +610,9 @@ func (o *AddServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -616,6 +628,7 @@ func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -644,6 +657,7 @@ AddServiceDefaultBodyDetailsItems0 add service default body details items0 swagger:model AddServiceDefaultBodyDetailsItems0 */ type AddServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -655,6 +669,7 @@ type AddServiceDefaultBodyDetailsItems0 struct { func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -692,6 +707,7 @@ func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -755,6 +771,7 @@ AddServiceOKBody add service OK body swagger:model AddServiceOKBody */ type AddServiceOKBody struct { + // external External *AddServiceOKBodyExternal `json:"external,omitempty"` @@ -957,6 +974,7 @@ func (o *AddServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -977,6 +995,7 @@ func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -997,6 +1016,7 @@ func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -1017,6 +1037,7 @@ func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -1037,6 +1058,7 @@ func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -1057,6 +1079,7 @@ func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -1099,6 +1122,7 @@ AddServiceOKBodyExternal ExternalService represents a generic External service i swagger:model AddServiceOKBodyExternal */ type AddServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1157,6 +1181,7 @@ AddServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model AddServiceOKBodyHaproxy */ type AddServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1212,6 +1237,7 @@ AddServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model AddServiceOKBodyMongodb */ type AddServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1282,6 +1308,7 @@ AddServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyMysql */ type AddServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1352,6 +1379,7 @@ AddServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model AddServiceOKBodyPostgresql */ type AddServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1428,6 +1456,7 @@ AddServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model AddServiceOKBodyProxysql */ type AddServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1498,6 +1527,7 @@ AddServiceParamsBodyExternal add service params body external swagger:model AddServiceParamsBodyExternal */ type AddServiceParamsBodyExternal struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1553,6 +1583,7 @@ AddServiceParamsBodyHaproxy add service params body haproxy swagger:model AddServiceParamsBodyHaproxy */ type AddServiceParamsBodyHaproxy struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1605,6 +1636,7 @@ AddServiceParamsBodyMongodb add service params body mongodb swagger:model AddServiceParamsBodyMongodb */ type AddServiceParamsBodyMongodb struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1669,6 +1701,7 @@ AddServiceParamsBodyMysql add service params body mysql swagger:model AddServiceParamsBodyMysql */ type AddServiceParamsBodyMysql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1733,6 +1766,7 @@ AddServiceParamsBodyPostgresql add service params body postgresql swagger:model AddServiceParamsBodyPostgresql */ type AddServiceParamsBodyPostgresql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1800,6 +1834,7 @@ AddServiceParamsBodyProxysql add service params body proxysql swagger:model AddServiceParamsBodyProxysql */ type AddServiceParamsBodyProxysql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/change_service_parameters.go b/api/inventory/v1/json/client/services_service/change_service_parameters.go index d718cb7f5b..d2ffc87b96 100644 --- a/api/inventory/v1/json/client/services_service/change_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/change_service_parameters.go @@ -60,6 +60,7 @@ ChangeServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeServiceParams struct { + // Body. Body ChangeServiceBody @@ -143,6 +144,7 @@ func (o *ChangeServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *ChangeServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/change_service_responses.go b/api/inventory/v1/json/client/services_service/change_service_responses.go index c6f61609b7..a2be387f9f 100644 --- a/api/inventory/v1/json/client/services_service/change_service_responses.go +++ b/api/inventory/v1/json/client/services_service/change_service_responses.go @@ -103,6 +103,7 @@ func (o *ChangeServiceOK) GetPayload() *ChangeServiceOKBody { } func (o *ChangeServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeServiceOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ChangeServiceDefault) GetPayload() *ChangeServiceDefaultBody { } func (o *ChangeServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeServiceDefaultBody) // response payload @@ -191,6 +193,7 @@ ChangeServiceBody change service body swagger:model ChangeServiceBody */ type ChangeServiceBody struct { + // environment Environment *string `json:"environment,omitempty"` @@ -255,6 +258,7 @@ func (o *ChangeServiceBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeServiceBody) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -297,6 +301,7 @@ ChangeServiceDefaultBody change service default body swagger:model ChangeServiceDefaultBody */ type ChangeServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -362,7 +367,9 @@ func (o *ChangeServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -378,6 +385,7 @@ func (o *ChangeServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -406,6 +414,7 @@ ChangeServiceDefaultBodyDetailsItems0 change service default body details items0 swagger:model ChangeServiceDefaultBodyDetailsItems0 */ type ChangeServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -417,6 +426,7 @@ type ChangeServiceDefaultBodyDetailsItems0 struct { func (o *ChangeServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -454,6 +464,7 @@ func (o *ChangeServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -517,6 +528,7 @@ ChangeServiceOKBody change service OK body swagger:model ChangeServiceOKBody */ type ChangeServiceOKBody struct { + // external External *ChangeServiceOKBodyExternal `json:"external,omitempty"` @@ -719,6 +731,7 @@ func (o *ChangeServiceOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ChangeServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -739,6 +752,7 @@ func (o *ChangeServiceOKBody) contextValidateExternal(ctx context.Context, forma } func (o *ChangeServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -759,6 +773,7 @@ func (o *ChangeServiceOKBody) contextValidateHaproxy(ctx context.Context, format } func (o *ChangeServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -779,6 +794,7 @@ func (o *ChangeServiceOKBody) contextValidateMongodb(ctx context.Context, format } func (o *ChangeServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -799,6 +815,7 @@ func (o *ChangeServiceOKBody) contextValidateMysql(ctx context.Context, formats } func (o *ChangeServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -819,6 +836,7 @@ func (o *ChangeServiceOKBody) contextValidatePostgresql(ctx context.Context, for } func (o *ChangeServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -861,6 +879,7 @@ ChangeServiceOKBodyExternal ExternalService represents a generic External servic swagger:model ChangeServiceOKBodyExternal */ type ChangeServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -919,6 +938,7 @@ ChangeServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service i swagger:model ChangeServiceOKBodyHaproxy */ type ChangeServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -974,6 +994,7 @@ ChangeServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model ChangeServiceOKBodyMongodb */ type ChangeServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1044,6 +1065,7 @@ ChangeServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model ChangeServiceOKBodyMysql */ type ChangeServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1114,6 +1136,7 @@ ChangeServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL swagger:model ChangeServiceOKBodyPostgresql */ type ChangeServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1190,6 +1213,7 @@ ChangeServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instan swagger:model ChangeServiceOKBodyProxysql */ type ChangeServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1260,6 +1284,7 @@ ChangeServiceParamsBodyCustomLabels A wrapper for map[string]string. This type a swagger:model ChangeServiceParamsBodyCustomLabels */ type ChangeServiceParamsBodyCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } diff --git a/api/inventory/v1/json/client/services_service/get_service_parameters.go b/api/inventory/v1/json/client/services_service/get_service_parameters.go index 8569bce763..12989ecf6a 100644 --- a/api/inventory/v1/json/client/services_service/get_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/get_service_parameters.go @@ -60,6 +60,7 @@ GetServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetServiceParams struct { + /* ServiceID. Unique randomly generated instance identifier. @@ -132,6 +133,7 @@ func (o *GetServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/get_service_responses.go b/api/inventory/v1/json/client/services_service/get_service_responses.go index ac73582902..f0c595afd2 100644 --- a/api/inventory/v1/json/client/services_service/get_service_responses.go +++ b/api/inventory/v1/json/client/services_service/get_service_responses.go @@ -103,6 +103,7 @@ func (o *GetServiceOK) GetPayload() *GetServiceOKBody { } func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetServiceOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetServiceDefault) GetPayload() *GetServiceDefaultBody { } func (o *GetServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetServiceDefaultBody) // response payload @@ -191,6 +193,7 @@ GetServiceDefaultBody get service default body swagger:model GetServiceDefaultBody */ type GetServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -300,6 +306,7 @@ GetServiceDefaultBodyDetailsItems0 get service default body details items0 swagger:model GetServiceDefaultBodyDetailsItems0 */ type GetServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetServiceDefaultBodyDetailsItems0 struct { func (o *GetServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetServiceOKBody get service OK body swagger:model GetServiceOKBody */ type GetServiceOKBody struct { + // external External *GetServiceOKBodyExternal `json:"external,omitempty"` @@ -613,6 +623,7 @@ func (o *GetServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -633,6 +644,7 @@ func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -653,6 +665,7 @@ func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -673,6 +686,7 @@ func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -693,6 +707,7 @@ func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -713,6 +728,7 @@ func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *GetServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -755,6 +771,7 @@ GetServiceOKBodyExternal ExternalService represents a generic External service i swagger:model GetServiceOKBodyExternal */ type GetServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -813,6 +830,7 @@ GetServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model GetServiceOKBodyHaproxy */ type GetServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -868,6 +886,7 @@ GetServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model GetServiceOKBodyMongodb */ type GetServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -938,6 +957,7 @@ GetServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model GetServiceOKBodyMysql */ type GetServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1008,6 +1028,7 @@ GetServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model GetServiceOKBodyPostgresql */ type GetServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1084,6 +1105,7 @@ GetServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model GetServiceOKBodyProxysql */ type GetServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go b/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go index 87429c6341..b5ff5f3d62 100644 --- a/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go +++ b/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go @@ -60,6 +60,7 @@ ListActiveServiceTypesParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ListActiveServiceTypesParams struct { + // Body. Body interface{} @@ -129,6 +130,7 @@ func (o *ListActiveServiceTypesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListActiveServiceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go b/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go index 992e691c94..fbf62aa31f 100644 --- a/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go +++ b/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go @@ -104,6 +104,7 @@ func (o *ListActiveServiceTypesOK) GetPayload() *ListActiveServiceTypesOKBody { } func (o *ListActiveServiceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListActiveServiceTypesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListActiveServiceTypesDefault) GetPayload() *ListActiveServiceTypesDefa } func (o *ListActiveServiceTypesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListActiveServiceTypesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListActiveServiceTypesDefaultBody list active service types default body swagger:model ListActiveServiceTypesDefaultBody */ type ListActiveServiceTypesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListActiveServiceTypesDefaultBody) ContextValidate(ctx context.Context, } func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.C return err } } + } return nil @@ -301,6 +307,7 @@ ListActiveServiceTypesDefaultBodyDetailsItems0 list active service types default swagger:model ListActiveServiceTypesDefaultBodyDetailsItems0 */ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { func (o *ListActiveServiceTypesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListActiveServiceTypesDefaultBodyDetailsItems0) UnmarshalJSON(data []by // MarshalJSON marshals this object with additional properties into a JSON object func (o ListActiveServiceTypesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListActiveServiceTypesOKBody list active service types OK body swagger:model ListActiveServiceTypesOKBody */ type ListActiveServiceTypesOKBody struct { + // service types ServiceTypes []*string `json:"service_types"` } diff --git a/api/inventory/v1/json/client/services_service/list_services_parameters.go b/api/inventory/v1/json/client/services_service/list_services_parameters.go index 2173e7e182..9c03818782 100644 --- a/api/inventory/v1/json/client/services_service/list_services_parameters.go +++ b/api/inventory/v1/json/client/services_service/list_services_parameters.go @@ -60,6 +60,7 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { + /* ExternalGroup. Return only services in this external group. @@ -97,7 +98,9 @@ func (o *ListServicesParams) WithDefaults() *ListServicesParams { // // All values with no default are reset to their zero value. func (o *ListServicesParams) SetDefaults() { - serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + var ( + serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") + ) val := ListServicesParams{ ServiceType: &serviceTypeDefault, @@ -177,6 +180,7 @@ func (o *ListServicesParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -192,6 +196,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qExternalGroup := qrExternalGroup if qExternalGroup != "" { + if err := r.SetQueryParam("external_group", qExternalGroup); err != nil { return err } @@ -208,6 +213,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qNodeID := qrNodeID if qNodeID != "" { + if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -224,6 +230,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qServiceType := qrServiceType if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/list_services_responses.go b/api/inventory/v1/json/client/services_service/list_services_responses.go index ceffebc60e..7305d17d01 100644 --- a/api/inventory/v1/json/client/services_service/list_services_responses.go +++ b/api/inventory/v1/json/client/services_service/list_services_responses.go @@ -103,6 +103,7 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -191,6 +193,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -300,6 +306,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // mysql Mysql []*ListServicesOKBodyMysqlItems0 `json:"mysql"` @@ -655,7 +665,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mysql); i++ { + if o.Mysql[i] != nil { if swag.IsZero(o.Mysql[i]) { // not required @@ -671,13 +683,16 @@ func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats s return err } } + } return nil } func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -693,13 +708,16 @@ func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats return err } } + } return nil } func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Postgresql); i++ { + if o.Postgresql[i] != nil { if swag.IsZero(o.Postgresql[i]) { // not required @@ -715,13 +733,16 @@ func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, form return err } } + } return nil } func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Proxysql); i++ { + if o.Proxysql[i] != nil { if swag.IsZero(o.Proxysql[i]) { // not required @@ -737,13 +758,16 @@ func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, format return err } } + } return nil } func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Haproxy); i++ { + if o.Haproxy[i] != nil { if swag.IsZero(o.Haproxy[i]) { // not required @@ -759,13 +783,16 @@ func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats return err } } + } return nil } func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.External); i++ { + if o.External[i] != nil { if swag.IsZero(o.External[i]) { // not required @@ -781,6 +808,7 @@ func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, format return err } } + } return nil @@ -809,6 +837,7 @@ ListServicesOKBodyExternalItems0 ExternalService represents a generic External s swagger:model ListServicesOKBodyExternalItems0 */ type ListServicesOKBodyExternalItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -867,6 +896,7 @@ ListServicesOKBodyHaproxyItems0 HAProxyService represents a generic HAProxy serv swagger:model ListServicesOKBodyHaproxyItems0 */ type ListServicesOKBodyHaproxyItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -922,6 +952,7 @@ ListServicesOKBodyMongodbItems0 MongoDBService represents a generic MongoDB inst swagger:model ListServicesOKBodyMongodbItems0 */ type ListServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -992,6 +1023,7 @@ ListServicesOKBodyMysqlItems0 MySQLService represents a generic MySQL instance. swagger:model ListServicesOKBodyMysqlItems0 */ type ListServicesOKBodyMysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1062,6 +1094,7 @@ ListServicesOKBodyPostgresqlItems0 PostgreSQLService represents a generic Postgr swagger:model ListServicesOKBodyPostgresqlItems0 */ type ListServicesOKBodyPostgresqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1138,6 +1171,7 @@ ListServicesOKBodyProxysqlItems0 ProxySQLService represents a generic ProxySQL i swagger:model ListServicesOKBodyProxysqlItems0 */ type ListServicesOKBodyProxysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/remove_service_parameters.go b/api/inventory/v1/json/client/services_service/remove_service_parameters.go index 876f2945e9..09c33e6bcd 100644 --- a/api/inventory/v1/json/client/services_service/remove_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/remove_service_parameters.go @@ -61,6 +61,7 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { + /* Force. Remove service with all dependencies. @@ -150,6 +151,7 @@ func (o *RemoveServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/remove_service_responses.go b/api/inventory/v1/json/client/services_service/remove_service_responses.go index 554e2978f7..0abc326f41 100644 --- a/api/inventory/v1/json/client/services_service/remove_service_responses.go +++ b/api/inventory/v1/json/client/services_service/remove_service_responses.go @@ -103,6 +103,7 @@ func (o *RemoveServiceOK) GetPayload() interface{} { } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -189,6 +191,7 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -298,6 +304,7 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type RemoveServiceDefaultBodyDetailsItems0 struct { func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/log_level.pb.go b/api/inventory/v1/log_level.pb.go index addb457bf8..a81214b6d9 100644 --- a/api/inventory/v1/log_level.pb.go +++ b/api/inventory/v1/log_level.pb.go @@ -7,11 +7,10 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -121,13 +120,10 @@ func file_inventory_v1_log_level_proto_rawDescGZIP() []byte { return file_inventory_v1_log_level_proto_rawDescData } -var ( - file_inventory_v1_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_log_level_proto_goTypes = []any{ - (LogLevel)(0), // 0: inventory.v1.LogLevel - } -) - +var file_inventory_v1_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_log_level_proto_goTypes = []any{ + (LogLevel)(0), // 0: inventory.v1.LogLevel +} var file_inventory_v1_log_level_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventory/v1/nodes.pb.go b/api/inventory/v1/nodes.pb.go index a2ffc9e83d..fe0f2df44e 100644 --- a/api/inventory/v1/nodes.pb.go +++ b/api/inventory/v1/nodes.pb.go @@ -7,14 +7,13 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -2170,42 +2169,39 @@ func file_inventory_v1_nodes_proto_rawDescGZIP() []byte { return file_inventory_v1_nodes_proto_rawDescData } -var ( - file_inventory_v1_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 28) - file_inventory_v1_nodes_proto_goTypes = []any{ - (NodeType)(0), // 0: inventory.v1.NodeType - (*GenericNode)(nil), // 1: inventory.v1.GenericNode - (*ContainerNode)(nil), // 2: inventory.v1.ContainerNode - (*RemoteNode)(nil), // 3: inventory.v1.RemoteNode - (*RemoteRDSNode)(nil), // 4: inventory.v1.RemoteRDSNode - (*RemoteAzureDatabaseNode)(nil), // 5: inventory.v1.RemoteAzureDatabaseNode - (*ListNodesRequest)(nil), // 6: inventory.v1.ListNodesRequest - (*ListNodesResponse)(nil), // 7: inventory.v1.ListNodesResponse - (*GetNodeRequest)(nil), // 8: inventory.v1.GetNodeRequest - (*GetNodeResponse)(nil), // 9: inventory.v1.GetNodeResponse - (*AddNodeRequest)(nil), // 10: inventory.v1.AddNodeRequest - (*AddNodeResponse)(nil), // 11: inventory.v1.AddNodeResponse - (*AddGenericNodeParams)(nil), // 12: inventory.v1.AddGenericNodeParams - (*AddContainerNodeParams)(nil), // 13: inventory.v1.AddContainerNodeParams - (*AddRemoteNodeParams)(nil), // 14: inventory.v1.AddRemoteNodeParams - (*AddRemoteRDSNodeParams)(nil), // 15: inventory.v1.AddRemoteRDSNodeParams - (*AddRemoteAzureNodeParams)(nil), // 16: inventory.v1.AddRemoteAzureNodeParams - (*RemoveNodeRequest)(nil), // 17: inventory.v1.RemoveNodeRequest - (*RemoveNodeResponse)(nil), // 18: inventory.v1.RemoveNodeResponse - nil, // 19: inventory.v1.GenericNode.CustomLabelsEntry - nil, // 20: inventory.v1.ContainerNode.CustomLabelsEntry - nil, // 21: inventory.v1.RemoteNode.CustomLabelsEntry - nil, // 22: inventory.v1.RemoteRDSNode.CustomLabelsEntry - nil, // 23: inventory.v1.RemoteAzureDatabaseNode.CustomLabelsEntry - nil, // 24: inventory.v1.AddGenericNodeParams.CustomLabelsEntry - nil, // 25: inventory.v1.AddContainerNodeParams.CustomLabelsEntry - nil, // 26: inventory.v1.AddRemoteNodeParams.CustomLabelsEntry - nil, // 27: inventory.v1.AddRemoteRDSNodeParams.CustomLabelsEntry - nil, // 28: inventory.v1.AddRemoteAzureNodeParams.CustomLabelsEntry - } -) - +var file_inventory_v1_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_inventory_v1_nodes_proto_goTypes = []any{ + (NodeType)(0), // 0: inventory.v1.NodeType + (*GenericNode)(nil), // 1: inventory.v1.GenericNode + (*ContainerNode)(nil), // 2: inventory.v1.ContainerNode + (*RemoteNode)(nil), // 3: inventory.v1.RemoteNode + (*RemoteRDSNode)(nil), // 4: inventory.v1.RemoteRDSNode + (*RemoteAzureDatabaseNode)(nil), // 5: inventory.v1.RemoteAzureDatabaseNode + (*ListNodesRequest)(nil), // 6: inventory.v1.ListNodesRequest + (*ListNodesResponse)(nil), // 7: inventory.v1.ListNodesResponse + (*GetNodeRequest)(nil), // 8: inventory.v1.GetNodeRequest + (*GetNodeResponse)(nil), // 9: inventory.v1.GetNodeResponse + (*AddNodeRequest)(nil), // 10: inventory.v1.AddNodeRequest + (*AddNodeResponse)(nil), // 11: inventory.v1.AddNodeResponse + (*AddGenericNodeParams)(nil), // 12: inventory.v1.AddGenericNodeParams + (*AddContainerNodeParams)(nil), // 13: inventory.v1.AddContainerNodeParams + (*AddRemoteNodeParams)(nil), // 14: inventory.v1.AddRemoteNodeParams + (*AddRemoteRDSNodeParams)(nil), // 15: inventory.v1.AddRemoteRDSNodeParams + (*AddRemoteAzureNodeParams)(nil), // 16: inventory.v1.AddRemoteAzureNodeParams + (*RemoveNodeRequest)(nil), // 17: inventory.v1.RemoveNodeRequest + (*RemoveNodeResponse)(nil), // 18: inventory.v1.RemoveNodeResponse + nil, // 19: inventory.v1.GenericNode.CustomLabelsEntry + nil, // 20: inventory.v1.ContainerNode.CustomLabelsEntry + nil, // 21: inventory.v1.RemoteNode.CustomLabelsEntry + nil, // 22: inventory.v1.RemoteRDSNode.CustomLabelsEntry + nil, // 23: inventory.v1.RemoteAzureDatabaseNode.CustomLabelsEntry + nil, // 24: inventory.v1.AddGenericNodeParams.CustomLabelsEntry + nil, // 25: inventory.v1.AddContainerNodeParams.CustomLabelsEntry + nil, // 26: inventory.v1.AddRemoteNodeParams.CustomLabelsEntry + nil, // 27: inventory.v1.AddRemoteRDSNodeParams.CustomLabelsEntry + nil, // 28: inventory.v1.AddRemoteAzureNodeParams.CustomLabelsEntry +} var file_inventory_v1_nodes_proto_depIdxs = []int32{ 19, // 0: inventory.v1.GenericNode.custom_labels:type_name -> inventory.v1.GenericNode.CustomLabelsEntry 20, // 1: inventory.v1.ContainerNode.custom_labels:type_name -> inventory.v1.ContainerNode.CustomLabelsEntry diff --git a/api/inventory/v1/nodes.pb.gw.go b/api/inventory/v1/nodes.pb.gw.go index b6ee5b6c38..d11d2d230b 100644 --- a/api/inventory/v1/nodes.pb.gw.go +++ b/api/inventory/v1/nodes.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join + filter_NodesService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -var filter_NodesService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - func request_NodesService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodesRequest var metadata runtime.ServerMetadata @@ -48,6 +48,7 @@ func request_NodesService_ListNodes_0(ctx context.Context, marshaler runtime.Mar msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_NodesService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +64,7 @@ func local_request_NodesService_ListNodes_0(ctx context.Context, marshaler runti msg, err := server.ListNodes(ctx, &protoReq) return msg, metadata, err + } func request_NodesService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -88,6 +90,7 @@ func request_NodesService_GetNode_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_NodesService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -113,6 +116,7 @@ func local_request_NodesService_GetNode_0(ctx context.Context, marshaler runtime msg, err := server.GetNode(ctx, &protoReq) return msg, metadata, err + } func request_NodesService_AddNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -125,6 +129,7 @@ func request_NodesService_AddNode_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.AddNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_NodesService_AddNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -137,9 +142,12 @@ func local_request_NodesService_AddNode_0(ctx context.Context, marshaler runtime msg, err := server.AddNode(ctx, &protoReq) return msg, metadata, err + } -var filter_NodesService_RemoveNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_NodesService_RemoveNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_NodesService_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveNodeRequest @@ -171,6 +179,7 @@ func request_NodesService_RemoveNode_0(ctx context.Context, marshaler runtime.Ma msg, err := client.RemoveNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -203,6 +212,7 @@ func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runt msg, err := server.RemoveNode(ctx, &protoReq) return msg, metadata, err + } // RegisterNodesServiceHandlerServer registers the http handlers for service NodesService to "mux". @@ -211,6 +221,7 @@ func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runt // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNodesServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodesServiceServer) error { + mux.Handle("GET", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -233,6 +244,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_NodesService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -257,6 +269,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_NodesService_AddNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -281,6 +294,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_AddNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_NodesService_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -305,6 +319,7 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_RemoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -347,6 +362,7 @@ func RegisterNodesServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NodesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodesServiceClient) error { + mux.Handle("GET", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -366,6 +382,7 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_NodesService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -387,6 +404,7 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_NodesService_AddNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -408,6 +426,7 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_AddNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_NodesService_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -429,6 +448,7 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_RemoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/inventory/v1/nodes_grpc.pb.go b/api/inventory/v1/nodes_grpc.pb.go index 86f5ff2104..0b7e0e5ec0 100644 --- a/api/inventory/v1/nodes_grpc.pb.go +++ b/api/inventory/v1/nodes_grpc.pb.go @@ -8,7 +8,6 @@ package inventoryv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -117,15 +116,12 @@ type UnimplementedNodesServiceServer struct{} func (UnimplementedNodesServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } - func (UnimplementedNodesServiceServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") } - func (UnimplementedNodesServiceServer) AddNode(context.Context, *AddNodeRequest) (*AddNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddNode not implemented") } - func (UnimplementedNodesServiceServer) RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveNode not implemented") } diff --git a/api/inventory/v1/services.pb.go b/api/inventory/v1/services.pb.go index ee6842b032..2811591c72 100644 --- a/api/inventory/v1/services.pb.go +++ b/api/inventory/v1/services.pb.go @@ -7,16 +7,14 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - common "github.com/percona/pmm/api/common" + reflect "reflect" + sync "sync" ) const ( @@ -3192,51 +3190,48 @@ func file_inventory_v1_services_proto_rawDescGZIP() []byte { return file_inventory_v1_services_proto_rawDescData } -var ( - file_inventory_v1_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_services_proto_msgTypes = make([]protoimpl.MessageInfo, 36) - file_inventory_v1_services_proto_goTypes = []any{ - (ServiceType)(0), // 0: inventory.v1.ServiceType - (*MySQLService)(nil), // 1: inventory.v1.MySQLService - (*MongoDBService)(nil), // 2: inventory.v1.MongoDBService - (*PostgreSQLService)(nil), // 3: inventory.v1.PostgreSQLService - (*ProxySQLService)(nil), // 4: inventory.v1.ProxySQLService - (*HAProxyService)(nil), // 5: inventory.v1.HAProxyService - (*ExternalService)(nil), // 6: inventory.v1.ExternalService - (*ListServicesRequest)(nil), // 7: inventory.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 8: inventory.v1.ListServicesResponse - (*ListActiveServiceTypesRequest)(nil), // 9: inventory.v1.ListActiveServiceTypesRequest - (*ListActiveServiceTypesResponse)(nil), // 10: inventory.v1.ListActiveServiceTypesResponse - (*GetServiceRequest)(nil), // 11: inventory.v1.GetServiceRequest - (*GetServiceResponse)(nil), // 12: inventory.v1.GetServiceResponse - (*AddServiceRequest)(nil), // 13: inventory.v1.AddServiceRequest - (*AddServiceResponse)(nil), // 14: inventory.v1.AddServiceResponse - (*AddMySQLServiceParams)(nil), // 15: inventory.v1.AddMySQLServiceParams - (*AddMongoDBServiceParams)(nil), // 16: inventory.v1.AddMongoDBServiceParams - (*AddPostgreSQLServiceParams)(nil), // 17: inventory.v1.AddPostgreSQLServiceParams - (*AddProxySQLServiceParams)(nil), // 18: inventory.v1.AddProxySQLServiceParams - (*AddHAProxyServiceParams)(nil), // 19: inventory.v1.AddHAProxyServiceParams - (*AddExternalServiceParams)(nil), // 20: inventory.v1.AddExternalServiceParams - (*RemoveServiceRequest)(nil), // 21: inventory.v1.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 22: inventory.v1.RemoveServiceResponse - (*ChangeServiceRequest)(nil), // 23: inventory.v1.ChangeServiceRequest - (*ChangeServiceResponse)(nil), // 24: inventory.v1.ChangeServiceResponse - nil, // 25: inventory.v1.MySQLService.CustomLabelsEntry - nil, // 26: inventory.v1.MongoDBService.CustomLabelsEntry - nil, // 27: inventory.v1.PostgreSQLService.CustomLabelsEntry - nil, // 28: inventory.v1.ProxySQLService.CustomLabelsEntry - nil, // 29: inventory.v1.HAProxyService.CustomLabelsEntry - nil, // 30: inventory.v1.ExternalService.CustomLabelsEntry - nil, // 31: inventory.v1.AddMySQLServiceParams.CustomLabelsEntry - nil, // 32: inventory.v1.AddMongoDBServiceParams.CustomLabelsEntry - nil, // 33: inventory.v1.AddPostgreSQLServiceParams.CustomLabelsEntry - nil, // 34: inventory.v1.AddProxySQLServiceParams.CustomLabelsEntry - nil, // 35: inventory.v1.AddHAProxyServiceParams.CustomLabelsEntry - nil, // 36: inventory.v1.AddExternalServiceParams.CustomLabelsEntry - (*common.StringMap)(nil), // 37: common.StringMap - } -) - +var file_inventory_v1_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_services_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_inventory_v1_services_proto_goTypes = []any{ + (ServiceType)(0), // 0: inventory.v1.ServiceType + (*MySQLService)(nil), // 1: inventory.v1.MySQLService + (*MongoDBService)(nil), // 2: inventory.v1.MongoDBService + (*PostgreSQLService)(nil), // 3: inventory.v1.PostgreSQLService + (*ProxySQLService)(nil), // 4: inventory.v1.ProxySQLService + (*HAProxyService)(nil), // 5: inventory.v1.HAProxyService + (*ExternalService)(nil), // 6: inventory.v1.ExternalService + (*ListServicesRequest)(nil), // 7: inventory.v1.ListServicesRequest + (*ListServicesResponse)(nil), // 8: inventory.v1.ListServicesResponse + (*ListActiveServiceTypesRequest)(nil), // 9: inventory.v1.ListActiveServiceTypesRequest + (*ListActiveServiceTypesResponse)(nil), // 10: inventory.v1.ListActiveServiceTypesResponse + (*GetServiceRequest)(nil), // 11: inventory.v1.GetServiceRequest + (*GetServiceResponse)(nil), // 12: inventory.v1.GetServiceResponse + (*AddServiceRequest)(nil), // 13: inventory.v1.AddServiceRequest + (*AddServiceResponse)(nil), // 14: inventory.v1.AddServiceResponse + (*AddMySQLServiceParams)(nil), // 15: inventory.v1.AddMySQLServiceParams + (*AddMongoDBServiceParams)(nil), // 16: inventory.v1.AddMongoDBServiceParams + (*AddPostgreSQLServiceParams)(nil), // 17: inventory.v1.AddPostgreSQLServiceParams + (*AddProxySQLServiceParams)(nil), // 18: inventory.v1.AddProxySQLServiceParams + (*AddHAProxyServiceParams)(nil), // 19: inventory.v1.AddHAProxyServiceParams + (*AddExternalServiceParams)(nil), // 20: inventory.v1.AddExternalServiceParams + (*RemoveServiceRequest)(nil), // 21: inventory.v1.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 22: inventory.v1.RemoveServiceResponse + (*ChangeServiceRequest)(nil), // 23: inventory.v1.ChangeServiceRequest + (*ChangeServiceResponse)(nil), // 24: inventory.v1.ChangeServiceResponse + nil, // 25: inventory.v1.MySQLService.CustomLabelsEntry + nil, // 26: inventory.v1.MongoDBService.CustomLabelsEntry + nil, // 27: inventory.v1.PostgreSQLService.CustomLabelsEntry + nil, // 28: inventory.v1.ProxySQLService.CustomLabelsEntry + nil, // 29: inventory.v1.HAProxyService.CustomLabelsEntry + nil, // 30: inventory.v1.ExternalService.CustomLabelsEntry + nil, // 31: inventory.v1.AddMySQLServiceParams.CustomLabelsEntry + nil, // 32: inventory.v1.AddMongoDBServiceParams.CustomLabelsEntry + nil, // 33: inventory.v1.AddPostgreSQLServiceParams.CustomLabelsEntry + nil, // 34: inventory.v1.AddProxySQLServiceParams.CustomLabelsEntry + nil, // 35: inventory.v1.AddHAProxyServiceParams.CustomLabelsEntry + nil, // 36: inventory.v1.AddExternalServiceParams.CustomLabelsEntry + (*common.StringMap)(nil), // 37: common.StringMap +} var file_inventory_v1_services_proto_depIdxs = []int32{ 25, // 0: inventory.v1.MySQLService.custom_labels:type_name -> inventory.v1.MySQLService.CustomLabelsEntry 26, // 1: inventory.v1.MongoDBService.custom_labels:type_name -> inventory.v1.MongoDBService.CustomLabelsEntry diff --git a/api/inventory/v1/services.pb.gw.go b/api/inventory/v1/services.pb.gw.go index 77a826da39..631bf391fe 100644 --- a/api/inventory/v1/services.pb.gw.go +++ b/api/inventory/v1/services.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join + filter_ServicesService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -var filter_ServicesService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - func request_ServicesService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListServicesRequest var metadata runtime.ServerMetadata @@ -48,6 +48,7 @@ func request_ServicesService_ListServices_0(ctx context.Context, marshaler runti msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServicesService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +64,7 @@ func local_request_ServicesService_ListServices_0(ctx context.Context, marshaler msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err + } func request_ServicesService_ListActiveServiceTypes_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -75,6 +77,7 @@ func request_ServicesService_ListActiveServiceTypes_0(ctx context.Context, marsh msg, err := client.ListActiveServiceTypes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServicesService_ListActiveServiceTypes_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -87,6 +90,7 @@ func local_request_ServicesService_ListActiveServiceTypes_0(ctx context.Context, msg, err := server.ListActiveServiceTypes(ctx, &protoReq) return msg, metadata, err + } func request_ServicesService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -112,6 +116,7 @@ func request_ServicesService_GetService_0(ctx context.Context, marshaler runtime msg, err := client.GetService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServicesService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -137,6 +142,7 @@ func local_request_ServicesService_GetService_0(ctx context.Context, marshaler r msg, err := server.GetService(ctx, &protoReq) return msg, metadata, err + } func request_ServicesService_AddService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -149,6 +155,7 @@ func request_ServicesService_AddService_0(ctx context.Context, marshaler runtime msg, err := client.AddService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServicesService_AddService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -161,9 +168,12 @@ func local_request_ServicesService_AddService_0(ctx context.Context, marshaler r msg, err := server.AddService(ctx, &protoReq) return msg, metadata, err + } -var filter_ServicesService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_ServicesService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_ServicesService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveServiceRequest @@ -195,6 +205,7 @@ func request_ServicesService_RemoveService_0(ctx context.Context, marshaler runt msg, err := client.RemoveService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServicesService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -227,6 +238,7 @@ func local_request_ServicesService_RemoveService_0(ctx context.Context, marshale msg, err := server.RemoveService(ctx, &protoReq) return msg, metadata, err + } func request_ServicesService_ChangeService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -256,6 +268,7 @@ func request_ServicesService_ChangeService_0(ctx context.Context, marshaler runt msg, err := client.ChangeService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServicesService_ChangeService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -285,6 +298,7 @@ func local_request_ServicesService_ChangeService_0(ctx context.Context, marshale msg, err := server.ChangeService(ctx, &protoReq) return msg, metadata, err + } // RegisterServicesServiceHandlerServer registers the http handlers for service ServicesService to "mux". @@ -293,6 +307,7 @@ func local_request_ServicesService_ChangeService_0(ctx context.Context, marshale // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServicesServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServicesServiceServer) error { + mux.Handle("GET", pattern_ServicesService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -315,6 +330,7 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ServicesService_ListActiveServiceTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -339,6 +355,7 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ListActiveServiceTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServicesService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -363,6 +380,7 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_GetService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ServicesService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -387,6 +405,7 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_ServicesService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -411,6 +430,7 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_ServicesService_ChangeService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -435,6 +455,7 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ChangeService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -477,6 +498,7 @@ func RegisterServicesServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServicesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServicesServiceClient) error { + mux.Handle("GET", pattern_ServicesService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -496,6 +518,7 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ServicesService_ListActiveServiceTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -517,6 +540,7 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ListActiveServiceTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServicesService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -538,6 +562,7 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_GetService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ServicesService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -559,6 +584,7 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_ServicesService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -580,6 +606,7 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_ServicesService_ChangeService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -601,6 +628,7 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ChangeService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/inventory/v1/services.pb.validate.go b/api/inventory/v1/services.pb.validate.go index 1bca110f71..9765f78898 100644 --- a/api/inventory/v1/services.pb.validate.go +++ b/api/inventory/v1/services.pb.validate.go @@ -3637,6 +3637,7 @@ func (m *ChangeServiceRequest) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -3665,6 +3666,7 @@ func (m *ChangeServiceRequest) validate(all bool) error { } } } + } if len(errors) > 0 { diff --git a/api/inventory/v1/services_grpc.pb.go b/api/inventory/v1/services_grpc.pb.go index 55a382a871..bc541c2fc2 100644 --- a/api/inventory/v1/services_grpc.pb.go +++ b/api/inventory/v1/services_grpc.pb.go @@ -8,7 +8,6 @@ package inventoryv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -147,23 +146,18 @@ type UnimplementedServicesServiceServer struct{} func (UnimplementedServicesServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") } - func (UnimplementedServicesServiceServer) ListActiveServiceTypes(context.Context, *ListActiveServiceTypesRequest) (*ListActiveServiceTypesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListActiveServiceTypes not implemented") } - func (UnimplementedServicesServiceServer) GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") } - func (UnimplementedServicesServiceServer) AddService(context.Context, *AddServiceRequest) (*AddServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented") } - func (UnimplementedServicesServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") } - func (UnimplementedServicesServiceServer) ChangeService(context.Context, *ChangeServiceRequest) (*ChangeServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeService not implemented") } diff --git a/api/management/v1/agent.pb.go b/api/management/v1/agent.pb.go index 97850fb8d0..37244a34de 100644 --- a/api/management/v1/agent.pb.go +++ b/api/management/v1/agent.pb.go @@ -7,14 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -1280,27 +1278,24 @@ func file_management_v1_agent_proto_rawDescGZIP() []byte { return file_management_v1_agent_proto_rawDescData } -var ( - file_management_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 11) - file_management_v1_agent_proto_goTypes = []any{ - (UpdateSeverity)(0), // 0: management.v1.UpdateSeverity - (*UniversalAgent)(nil), // 1: management.v1.UniversalAgent - (*ListAgentsRequest)(nil), // 2: management.v1.ListAgentsRequest - (*ListAgentsResponse)(nil), // 3: management.v1.ListAgentsResponse - (*AgentVersions)(nil), // 4: management.v1.AgentVersions - (*ListAgentVersionsRequest)(nil), // 5: management.v1.ListAgentVersionsRequest - (*ListAgentVersionsResponse)(nil), // 6: management.v1.ListAgentVersionsResponse - (*UniversalAgent_MySQLOptions)(nil), // 7: management.v1.UniversalAgent.MySQLOptions - (*UniversalAgent_AzureOptions)(nil), // 8: management.v1.UniversalAgent.AzureOptions - (*UniversalAgent_MongoDBOptions)(nil), // 9: management.v1.UniversalAgent.MongoDBOptions - (*UniversalAgent_PostgreSQLOptions)(nil), // 10: management.v1.UniversalAgent.PostgreSQLOptions - nil, // 11: management.v1.UniversalAgent.CustomLabelsEntry - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp - (v1.LogLevel)(0), // 13: inventory.v1.LogLevel - } -) - +var file_management_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_management_v1_agent_proto_goTypes = []any{ + (UpdateSeverity)(0), // 0: management.v1.UpdateSeverity + (*UniversalAgent)(nil), // 1: management.v1.UniversalAgent + (*ListAgentsRequest)(nil), // 2: management.v1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 3: management.v1.ListAgentsResponse + (*AgentVersions)(nil), // 4: management.v1.AgentVersions + (*ListAgentVersionsRequest)(nil), // 5: management.v1.ListAgentVersionsRequest + (*ListAgentVersionsResponse)(nil), // 6: management.v1.ListAgentVersionsResponse + (*UniversalAgent_MySQLOptions)(nil), // 7: management.v1.UniversalAgent.MySQLOptions + (*UniversalAgent_AzureOptions)(nil), // 8: management.v1.UniversalAgent.AzureOptions + (*UniversalAgent_MongoDBOptions)(nil), // 9: management.v1.UniversalAgent.MongoDBOptions + (*UniversalAgent_PostgreSQLOptions)(nil), // 10: management.v1.UniversalAgent.PostgreSQLOptions + nil, // 11: management.v1.UniversalAgent.CustomLabelsEntry + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp + (v1.LogLevel)(0), // 13: inventory.v1.LogLevel +} var file_management_v1_agent_proto_depIdxs = []int32{ 8, // 0: management.v1.UniversalAgent.azure_options:type_name -> management.v1.UniversalAgent.AzureOptions 12, // 1: management.v1.UniversalAgent.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/management/v1/annotation.pb.go b/api/management/v1/annotation.pb.go index 2eecdfbebc..5a7e06ba13 100644 --- a/api/management/v1/annotation.pb.go +++ b/api/management/v1/annotation.pb.go @@ -7,12 +7,11 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -176,14 +175,11 @@ func file_management_v1_annotation_proto_rawDescGZIP() []byte { return file_management_v1_annotation_proto_rawDescData } -var ( - file_management_v1_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_management_v1_annotation_proto_goTypes = []any{ - (*AddAnnotationRequest)(nil), // 0: management.v1.AddAnnotationRequest - (*AddAnnotationResponse)(nil), // 1: management.v1.AddAnnotationResponse - } -) - +var file_management_v1_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_management_v1_annotation_proto_goTypes = []any{ + (*AddAnnotationRequest)(nil), // 0: management.v1.AddAnnotationRequest + (*AddAnnotationResponse)(nil), // 1: management.v1.AddAnnotationResponse +} var file_management_v1_annotation_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/management/v1/azure.pb.go b/api/management/v1/azure.pb.go index 5df29f0eed..cab7587d3a 100644 --- a/api/management/v1/azure.pb.go +++ b/api/management/v1/azure.pb.go @@ -7,12 +7,11 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -790,20 +789,17 @@ func file_management_v1_azure_proto_rawDescGZIP() []byte { return file_management_v1_azure_proto_rawDescData } -var ( - file_management_v1_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_management_v1_azure_proto_goTypes = []any{ - (DiscoverAzureDatabaseType)(0), // 0: management.v1.DiscoverAzureDatabaseType - (*DiscoverAzureDatabaseRequest)(nil), // 1: management.v1.DiscoverAzureDatabaseRequest - (*DiscoverAzureDatabaseInstance)(nil), // 2: management.v1.DiscoverAzureDatabaseInstance - (*DiscoverAzureDatabaseResponse)(nil), // 3: management.v1.DiscoverAzureDatabaseResponse - (*AddAzureDatabaseRequest)(nil), // 4: management.v1.AddAzureDatabaseRequest - (*AddAzureDatabaseResponse)(nil), // 5: management.v1.AddAzureDatabaseResponse - nil, // 6: management.v1.AddAzureDatabaseRequest.CustomLabelsEntry - } -) - +var file_management_v1_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_management_v1_azure_proto_goTypes = []any{ + (DiscoverAzureDatabaseType)(0), // 0: management.v1.DiscoverAzureDatabaseType + (*DiscoverAzureDatabaseRequest)(nil), // 1: management.v1.DiscoverAzureDatabaseRequest + (*DiscoverAzureDatabaseInstance)(nil), // 2: management.v1.DiscoverAzureDatabaseInstance + (*DiscoverAzureDatabaseResponse)(nil), // 3: management.v1.DiscoverAzureDatabaseResponse + (*AddAzureDatabaseRequest)(nil), // 4: management.v1.AddAzureDatabaseRequest + (*AddAzureDatabaseResponse)(nil), // 5: management.v1.AddAzureDatabaseResponse + nil, // 6: management.v1.AddAzureDatabaseRequest.CustomLabelsEntry +} var file_management_v1_azure_proto_depIdxs = []int32{ 0, // 0: management.v1.DiscoverAzureDatabaseInstance.type:type_name -> management.v1.DiscoverAzureDatabaseType 2, // 1: management.v1.DiscoverAzureDatabaseResponse.azure_database_instance:type_name -> management.v1.DiscoverAzureDatabaseInstance diff --git a/api/management/v1/external.pb.go b/api/management/v1/external.pb.go index 21bf55c8ac..8de3a47d42 100644 --- a/api/management/v1/external.pb.go +++ b/api/management/v1/external.pb.go @@ -7,14 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -388,19 +386,16 @@ func file_management_v1_external_proto_rawDescGZIP() []byte { return file_management_v1_external_proto_rawDescData } -var ( - file_management_v1_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_external_proto_goTypes = []any{ - (*AddExternalServiceParams)(nil), // 0: management.v1.AddExternalServiceParams - (*ExternalServiceResult)(nil), // 1: management.v1.ExternalServiceResult - nil, // 2: management.v1.AddExternalServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (*v1.ExternalService)(nil), // 5: inventory.v1.ExternalService - (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter - } -) - +var file_management_v1_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_external_proto_goTypes = []any{ + (*AddExternalServiceParams)(nil), // 0: management.v1.AddExternalServiceParams + (*ExternalServiceResult)(nil), // 1: management.v1.ExternalServiceResult + nil, // 2: management.v1.AddExternalServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (*v1.ExternalService)(nil), // 5: inventory.v1.ExternalService + (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter +} var file_management_v1_external_proto_depIdxs = []int32{ 3, // 0: management.v1.AddExternalServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddExternalServiceParams.custom_labels:type_name -> management.v1.AddExternalServiceParams.CustomLabelsEntry diff --git a/api/management/v1/haproxy.pb.go b/api/management/v1/haproxy.pb.go index e271046bc7..057a76eb94 100644 --- a/api/management/v1/haproxy.pb.go +++ b/api/management/v1/haproxy.pb.go @@ -7,14 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -364,19 +362,16 @@ func file_management_v1_haproxy_proto_rawDescGZIP() []byte { return file_management_v1_haproxy_proto_rawDescData } -var ( - file_management_v1_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_haproxy_proto_goTypes = []any{ - (*AddHAProxyServiceParams)(nil), // 0: management.v1.AddHAProxyServiceParams - (*HAProxyServiceResult)(nil), // 1: management.v1.HAProxyServiceResult - nil, // 2: management.v1.AddHAProxyServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (*v1.HAProxyService)(nil), // 5: inventory.v1.HAProxyService - (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter - } -) - +var file_management_v1_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_haproxy_proto_goTypes = []any{ + (*AddHAProxyServiceParams)(nil), // 0: management.v1.AddHAProxyServiceParams + (*HAProxyServiceResult)(nil), // 1: management.v1.HAProxyServiceResult + nil, // 2: management.v1.AddHAProxyServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (*v1.HAProxyService)(nil), // 5: inventory.v1.HAProxyService + (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter +} var file_management_v1_haproxy_proto_depIdxs = []int32{ 3, // 0: management.v1.AddHAProxyServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddHAProxyServiceParams.custom_labels:type_name -> management.v1.AddHAProxyServiceParams.CustomLabelsEntry diff --git a/api/management/v1/json/client/management_service/add_annotation_parameters.go b/api/management/v1/json/client/management_service/add_annotation_parameters.go index 0a6148e59a..68d4bd7653 100644 --- a/api/management/v1/json/client/management_service/add_annotation_parameters.go +++ b/api/management/v1/json/client/management_service/add_annotation_parameters.go @@ -60,6 +60,7 @@ AddAnnotationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAnnotationParams struct { + /* Body. AddAnnotationRequest is a params to add new annotation. @@ -132,6 +133,7 @@ func (o *AddAnnotationParams) SetBody(body AddAnnotationBody) { // WriteToRequest writes these params to a swagger request func (o *AddAnnotationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_annotation_responses.go b/api/management/v1/json/client/management_service/add_annotation_responses.go index 87ec308d78..ad0abf531d 100644 --- a/api/management/v1/json/client/management_service/add_annotation_responses.go +++ b/api/management/v1/json/client/management_service/add_annotation_responses.go @@ -103,6 +103,7 @@ func (o *AddAnnotationOK) GetPayload() interface{} { } func (o *AddAnnotationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *AddAnnotationDefault) GetPayload() *AddAnnotationDefaultBody { } func (o *AddAnnotationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAnnotationDefaultBody) // response payload @@ -189,6 +191,7 @@ AddAnnotationBody AddAnnotationRequest is a params to add new annotation. swagger:model AddAnnotationBody */ type AddAnnotationBody struct { + // An annotation description. Required. Text string `json:"text,omitempty"` @@ -235,6 +238,7 @@ AddAnnotationDefaultBody add annotation default body swagger:model AddAnnotationDefaultBody */ type AddAnnotationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -300,7 +304,9 @@ func (o *AddAnnotationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,6 +322,7 @@ func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -344,6 +351,7 @@ AddAnnotationDefaultBodyDetailsItems0 add annotation default body details items0 swagger:model AddAnnotationDefaultBodyDetailsItems0 */ type AddAnnotationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -355,6 +363,7 @@ type AddAnnotationDefaultBodyDetailsItems0 struct { func (o *AddAnnotationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -392,6 +401,7 @@ func (o *AddAnnotationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAnnotationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/add_azure_database_parameters.go b/api/management/v1/json/client/management_service/add_azure_database_parameters.go index b9e1d96ff0..1fd8c87b5d 100644 --- a/api/management/v1/json/client/management_service/add_azure_database_parameters.go +++ b/api/management/v1/json/client/management_service/add_azure_database_parameters.go @@ -60,6 +60,7 @@ AddAzureDatabaseParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAzureDatabaseParams struct { + // Body. Body AddAzureDatabaseBody @@ -129,6 +130,7 @@ func (o *AddAzureDatabaseParams) SetBody(body AddAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *AddAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_azure_database_responses.go b/api/management/v1/json/client/management_service/add_azure_database_responses.go index 4d69fe8ff4..4f84669743 100644 --- a/api/management/v1/json/client/management_service/add_azure_database_responses.go +++ b/api/management/v1/json/client/management_service/add_azure_database_responses.go @@ -104,6 +104,7 @@ func (o *AddAzureDatabaseOK) GetPayload() interface{} { } func (o *AddAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,6 +176,7 @@ func (o *AddAzureDatabaseDefault) GetPayload() *AddAzureDatabaseDefaultBody { } func (o *AddAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAzureDatabaseDefaultBody) // response payload @@ -190,6 +192,7 @@ AddAzureDatabaseBody add azure database body swagger:model AddAzureDatabaseBody */ type AddAzureDatabaseBody struct { + // Azure database location. Region string `json:"region,omitempty"` @@ -360,6 +363,7 @@ AddAzureDatabaseDefaultBody add azure database default body swagger:model AddAzureDatabaseDefaultBody */ type AddAzureDatabaseDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -425,7 +429,9 @@ func (o *AddAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -441,6 +447,7 @@ func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context return err } } + } return nil @@ -469,6 +476,7 @@ AddAzureDatabaseDefaultBodyDetailsItems0 add azure database default body details swagger:model AddAzureDatabaseDefaultBodyDetailsItems0 */ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -480,6 +488,7 @@ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { func (o *AddAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -517,6 +526,7 @@ func (o *AddAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) er // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAzureDatabaseDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/add_service_parameters.go b/api/management/v1/json/client/management_service/add_service_parameters.go index 64e2dd78b6..8e80c2a608 100644 --- a/api/management/v1/json/client/management_service/add_service_parameters.go +++ b/api/management/v1/json/client/management_service/add_service_parameters.go @@ -60,6 +60,7 @@ AddServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddServiceParams struct { + // Body. Body AddServiceBody @@ -129,6 +130,7 @@ func (o *AddServiceParams) SetBody(body AddServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_service_responses.go b/api/management/v1/json/client/management_service/add_service_responses.go index b616578be9..437b9f2f32 100644 --- a/api/management/v1/json/client/management_service/add_service_responses.go +++ b/api/management/v1/json/client/management_service/add_service_responses.go @@ -104,6 +104,7 @@ func (o *AddServiceOK) GetPayload() *AddServiceOKBody { } func (o *AddServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceOKBody) // response payload @@ -177,6 +178,7 @@ func (o *AddServiceDefault) GetPayload() *AddServiceDefaultBody { } func (o *AddServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceDefaultBody) // response payload @@ -192,6 +194,7 @@ AddServiceBody add service body swagger:model AddServiceBody */ type AddServiceBody struct { + // external External *AddServiceParamsBodyExternal `json:"external,omitempty"` @@ -424,6 +427,7 @@ func (o *AddServiceBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -444,6 +448,7 @@ func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -464,6 +469,7 @@ func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -484,6 +490,7 @@ func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -504,6 +511,7 @@ func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfm } func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -524,6 +532,7 @@ func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats } func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -544,6 +553,7 @@ func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RDS != nil { if swag.IsZero(o.RDS) { // not required @@ -586,6 +596,7 @@ AddServiceDefaultBody add service default body swagger:model AddServiceDefaultBody */ type AddServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -651,7 +662,9 @@ func (o *AddServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -667,6 +680,7 @@ func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -695,6 +709,7 @@ AddServiceDefaultBodyDetailsItems0 add service default body details items0 swagger:model AddServiceDefaultBodyDetailsItems0 */ type AddServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -706,6 +721,7 @@ type AddServiceDefaultBodyDetailsItems0 struct { func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -743,6 +759,7 @@ func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -806,6 +823,7 @@ AddServiceOKBody add service OK body swagger:model AddServiceOKBody */ type AddServiceOKBody struct { + // external External *AddServiceOKBodyExternal `json:"external,omitempty"` @@ -1038,6 +1056,7 @@ func (o *AddServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -1058,6 +1077,7 @@ func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -1078,6 +1098,7 @@ func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -1098,6 +1119,7 @@ func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -1118,6 +1140,7 @@ func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -1138,6 +1161,7 @@ func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -1158,6 +1182,7 @@ func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RDS != nil { if swag.IsZero(o.RDS) { // not required @@ -1200,6 +1225,7 @@ AddServiceOKBodyExternal add service OK body external swagger:model AddServiceOKBodyExternal */ type AddServiceOKBodyExternal struct { + // external exporter ExternalExporter *AddServiceOKBodyExternalExternalExporter `json:"external_exporter,omitempty"` @@ -1282,6 +1308,7 @@ func (o *AddServiceOKBodyExternal) ContextValidate(ctx context.Context, formats } func (o *AddServiceOKBodyExternal) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1302,6 +1329,7 @@ func (o *AddServiceOKBodyExternal) contextValidateExternalExporter(ctx context.C } func (o *AddServiceOKBodyExternal) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -1344,6 +1372,7 @@ AddServiceOKBodyExternalExternalExporter ExternalExporter runs on any Node type, swagger:model AddServiceOKBodyExternalExternalExporter */ type AddServiceOKBodyExternalExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1429,6 +1458,7 @@ func (o *AddServiceOKBodyExternalExternalExporter) ContextValidate(ctx context.C } func (o *AddServiceOKBodyExternalExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1471,6 +1501,7 @@ AddServiceOKBodyExternalExternalExporterMetricsResolutions MetricsResolutions re swagger:model AddServiceOKBodyExternalExternalExporterMetricsResolutions */ type AddServiceOKBodyExternalExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1514,6 +1545,7 @@ AddServiceOKBodyExternalService ExternalService represents a generic External se swagger:model AddServiceOKBodyExternalService */ type AddServiceOKBodyExternalService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1572,6 +1604,7 @@ AddServiceOKBodyHaproxy add service OK body haproxy swagger:model AddServiceOKBodyHaproxy */ type AddServiceOKBodyHaproxy struct { + // external exporter ExternalExporter *AddServiceOKBodyHaproxyExternalExporter `json:"external_exporter,omitempty"` @@ -1654,6 +1687,7 @@ func (o *AddServiceOKBodyHaproxy) ContextValidate(ctx context.Context, formats s } func (o *AddServiceOKBodyHaproxy) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1674,6 +1708,7 @@ func (o *AddServiceOKBodyHaproxy) contextValidateExternalExporter(ctx context.Co } func (o *AddServiceOKBodyHaproxy) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -1716,6 +1751,7 @@ AddServiceOKBodyHaproxyExternalExporter ExternalExporter runs on any Node type, swagger:model AddServiceOKBodyHaproxyExternalExporter */ type AddServiceOKBodyHaproxyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1801,6 +1837,7 @@ func (o *AddServiceOKBodyHaproxyExternalExporter) ContextValidate(ctx context.Co } func (o *AddServiceOKBodyHaproxyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1843,6 +1880,7 @@ AddServiceOKBodyHaproxyExternalExporterMetricsResolutions MetricsResolutions rep swagger:model AddServiceOKBodyHaproxyExternalExporterMetricsResolutions */ type AddServiceOKBodyHaproxyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1886,6 +1924,7 @@ AddServiceOKBodyHaproxyService HAProxyService represents a generic HAProxy servi swagger:model AddServiceOKBodyHaproxyService */ type AddServiceOKBodyHaproxyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1941,6 +1980,7 @@ AddServiceOKBodyMongodb add service OK body mongodb swagger:model AddServiceOKBodyMongodb */ type AddServiceOKBodyMongodb struct { + // mongodb exporter MongodbExporter *AddServiceOKBodyMongodbMongodbExporter `json:"mongodb_exporter,omitempty"` @@ -2053,6 +2093,7 @@ func (o *AddServiceOKBodyMongodb) ContextValidate(ctx context.Context, formats s } func (o *AddServiceOKBodyMongodb) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -2073,6 +2114,7 @@ func (o *AddServiceOKBodyMongodb) contextValidateMongodbExporter(ctx context.Con } func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbProfiler(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfiler != nil { if swag.IsZero(o.QANMongodbProfiler) { // not required @@ -2093,6 +2135,7 @@ func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbProfiler(ctx context. } func (o *AddServiceOKBodyMongodb) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -2135,6 +2178,7 @@ AddServiceOKBodyMongodbMongodbExporter MongoDBExporter runs on Generic or Contai swagger:model AddServiceOKBodyMongodbMongodbExporter */ type AddServiceOKBodyMongodbMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2376,6 +2420,7 @@ func (o *AddServiceOKBodyMongodbMongodbExporter) ContextValidate(ctx context.Con } func (o *AddServiceOKBodyMongodbMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2418,6 +2463,7 @@ AddServiceOKBodyMongodbMongodbExporterMetricsResolutions MetricsResolutions repr swagger:model AddServiceOKBodyMongodbMongodbExporterMetricsResolutions */ type AddServiceOKBodyMongodbMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2461,6 +2507,7 @@ AddServiceOKBodyMongodbQANMongodbProfiler QANMongoDBProfilerAgent runs within pm swagger:model AddServiceOKBodyMongodbQANMongodbProfiler */ type AddServiceOKBodyMongodbQANMongodbProfiler struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2670,6 +2717,7 @@ AddServiceOKBodyMongodbService MongoDBService represents a generic MongoDB insta swagger:model AddServiceOKBodyMongodbService */ type AddServiceOKBodyMongodbService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -2740,6 +2788,7 @@ AddServiceOKBodyMysql add service OK body mysql swagger:model AddServiceOKBodyMysql */ type AddServiceOKBodyMysql struct { + // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -2885,6 +2934,7 @@ func (o *AddServiceOKBodyMysql) ContextValidate(ctx context.Context, formats str } func (o *AddServiceOKBodyMysql) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -2905,6 +2955,7 @@ func (o *AddServiceOKBodyMysql) contextValidateMysqldExporter(ctx context.Contex } func (o *AddServiceOKBodyMysql) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschema != nil { if swag.IsZero(o.QANMysqlPerfschema) { // not required @@ -2925,6 +2976,7 @@ func (o *AddServiceOKBodyMysql) contextValidateQANMysqlPerfschema(ctx context.Co } func (o *AddServiceOKBodyMysql) contextValidateQANMysqlSlowlog(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlog != nil { if swag.IsZero(o.QANMysqlSlowlog) { // not required @@ -2945,6 +2997,7 @@ func (o *AddServiceOKBodyMysql) contextValidateQANMysqlSlowlog(ctx context.Conte } func (o *AddServiceOKBodyMysql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -2987,6 +3040,7 @@ AddServiceOKBodyMysqlMysqldExporter MySQLdExporter runs on Generic or Container swagger:model AddServiceOKBodyMysqlMysqldExporter */ type AddServiceOKBodyMysqlMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3238,6 +3292,7 @@ func (o *AddServiceOKBodyMysqlMysqldExporter) ContextValidate(ctx context.Contex } func (o *AddServiceOKBodyMysqlMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3280,6 +3335,7 @@ AddServiceOKBodyMysqlMysqldExporterMetricsResolutions MetricsResolutions represe swagger:model AddServiceOKBodyMysqlMysqldExporterMetricsResolutions */ type AddServiceOKBodyMysqlMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3323,6 +3379,7 @@ AddServiceOKBodyMysqlQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm- swagger:model AddServiceOKBodyMysqlQANMysqlPerfschema */ type AddServiceOKBodyMysqlQANMysqlPerfschema struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3547,6 +3604,7 @@ AddServiceOKBodyMysqlQANMysqlSlowlog QANMySQLSlowlogAgent runs within pmm-agent swagger:model AddServiceOKBodyMysqlQANMysqlSlowlog */ type AddServiceOKBodyMysqlQANMysqlSlowlog struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3774,6 +3832,7 @@ AddServiceOKBodyMysqlService MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyMysqlService */ type AddServiceOKBodyMysqlService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -3844,6 +3903,7 @@ AddServiceOKBodyPostgresql add service OK body postgresql swagger:model AddServiceOKBodyPostgresql */ type AddServiceOKBodyPostgresql struct { + // Warning message. Warning string `json:"warning,omitempty"` @@ -3989,6 +4049,7 @@ func (o *AddServiceOKBodyPostgresql) ContextValidate(ctx context.Context, format } func (o *AddServiceOKBodyPostgresql) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -4009,6 +4070,7 @@ func (o *AddServiceOKBodyPostgresql) contextValidatePostgresExporter(ctx context } func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -4029,6 +4091,7 @@ func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatementsAge } func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -4049,6 +4112,7 @@ func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatmonitorAg } func (o *AddServiceOKBodyPostgresql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -4091,6 +4155,7 @@ AddServiceOKBodyPostgresqlPostgresExporter PostgresExporter runs on Generic or C swagger:model AddServiceOKBodyPostgresqlPostgresExporter */ type AddServiceOKBodyPostgresqlPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4328,6 +4393,7 @@ func (o *AddServiceOKBodyPostgresqlPostgresExporter) ContextValidate(ctx context } func (o *AddServiceOKBodyPostgresqlPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4370,6 +4436,7 @@ AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions MetricsResolutions swagger:model AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions */ type AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4413,6 +4480,7 @@ AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatemen swagger:model AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent */ type AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4625,6 +4693,7 @@ AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMon swagger:model AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent */ type AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4840,6 +4909,7 @@ AddServiceOKBodyPostgresqlService PostgreSQLService represents a generic Postgre swagger:model AddServiceOKBodyPostgresqlService */ type AddServiceOKBodyPostgresqlService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -4916,6 +4986,7 @@ AddServiceOKBodyProxysql add service OK body proxysql swagger:model AddServiceOKBodyProxysql */ type AddServiceOKBodyProxysql struct { + // proxysql exporter ProxysqlExporter *AddServiceOKBodyProxysqlProxysqlExporter `json:"proxysql_exporter,omitempty"` @@ -4998,6 +5069,7 @@ func (o *AddServiceOKBodyProxysql) ContextValidate(ctx context.Context, formats } func (o *AddServiceOKBodyProxysql) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -5018,6 +5090,7 @@ func (o *AddServiceOKBodyProxysql) contextValidateProxysqlExporter(ctx context.C } func (o *AddServiceOKBodyProxysql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -5060,6 +5133,7 @@ AddServiceOKBodyProxysqlProxysqlExporter ProxySQLExporter runs on Generic or Con swagger:model AddServiceOKBodyProxysqlProxysqlExporter */ type AddServiceOKBodyProxysqlProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5291,6 +5365,7 @@ func (o *AddServiceOKBodyProxysqlProxysqlExporter) ContextValidate(ctx context.C } func (o *AddServiceOKBodyProxysqlProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5333,6 +5408,7 @@ AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions MetricsResolutions re swagger:model AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions */ type AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5376,6 +5452,7 @@ AddServiceOKBodyProxysqlService ProxySQLService represents a generic ProxySQL in swagger:model AddServiceOKBodyProxysqlService */ type AddServiceOKBodyProxysqlService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -5446,6 +5523,7 @@ AddServiceOKBodyRDS add service OK body RDS swagger:model AddServiceOKBodyRDS */ type AddServiceOKBodyRDS struct { + // mysql Mysql *AddServiceOKBodyRDSMysql `json:"mysql,omitempty"` @@ -5708,6 +5786,7 @@ func (o *AddServiceOKBodyRDS) ContextValidate(ctx context.Context, formats strfm } func (o *AddServiceOKBodyRDS) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -5728,6 +5807,7 @@ func (o *AddServiceOKBodyRDS) contextValidateMysql(ctx context.Context, formats } func (o *AddServiceOKBodyRDS) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -5748,6 +5828,7 @@ func (o *AddServiceOKBodyRDS) contextValidateMysqldExporter(ctx context.Context, } func (o *AddServiceOKBodyRDS) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { + if o.Node != nil { if swag.IsZero(o.Node) { // not required @@ -5768,6 +5849,7 @@ func (o *AddServiceOKBodyRDS) contextValidateNode(ctx context.Context, formats s } func (o *AddServiceOKBodyRDS) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -5788,6 +5870,7 @@ func (o *AddServiceOKBodyRDS) contextValidatePostgresql(ctx context.Context, for } func (o *AddServiceOKBodyRDS) contextValidatePostgresqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlExporter != nil { if swag.IsZero(o.PostgresqlExporter) { // not required @@ -5808,6 +5891,7 @@ func (o *AddServiceOKBodyRDS) contextValidatePostgresqlExporter(ctx context.Cont } func (o *AddServiceOKBodyRDS) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschema != nil { if swag.IsZero(o.QANMysqlPerfschema) { // not required @@ -5828,6 +5912,7 @@ func (o *AddServiceOKBodyRDS) contextValidateQANMysqlPerfschema(ctx context.Cont } func (o *AddServiceOKBodyRDS) contextValidateQANPostgresqlPgstatements(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatements != nil { if swag.IsZero(o.QANPostgresqlPgstatements) { // not required @@ -5848,6 +5933,7 @@ func (o *AddServiceOKBodyRDS) contextValidateQANPostgresqlPgstatements(ctx conte } func (o *AddServiceOKBodyRDS) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -5890,6 +5976,7 @@ AddServiceOKBodyRDSMysql MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyRDSMysql */ type AddServiceOKBodyRDSMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -5960,6 +6047,7 @@ AddServiceOKBodyRDSMysqldExporter MySQLdExporter runs on Generic or Container No swagger:model AddServiceOKBodyRDSMysqldExporter */ type AddServiceOKBodyRDSMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6211,6 +6299,7 @@ func (o *AddServiceOKBodyRDSMysqldExporter) ContextValidate(ctx context.Context, } func (o *AddServiceOKBodyRDSMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6253,6 +6342,7 @@ AddServiceOKBodyRDSMysqldExporterMetricsResolutions MetricsResolutions represent swagger:model AddServiceOKBodyRDSMysqldExporterMetricsResolutions */ type AddServiceOKBodyRDSMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6296,6 +6386,7 @@ AddServiceOKBodyRDSNode RemoteRDSNode represents remote RDS Node. Agents can't r swagger:model AddServiceOKBodyRDSNode */ type AddServiceOKBodyRDSNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -6351,6 +6442,7 @@ AddServiceOKBodyRDSPostgresql PostgreSQLService represents a generic PostgreSQL swagger:model AddServiceOKBodyRDSPostgresql */ type AddServiceOKBodyRDSPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -6427,6 +6519,7 @@ AddServiceOKBodyRDSPostgresqlExporter PostgresExporter runs on Generic or Contai swagger:model AddServiceOKBodyRDSPostgresqlExporter */ type AddServiceOKBodyRDSPostgresqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6664,6 +6757,7 @@ func (o *AddServiceOKBodyRDSPostgresqlExporter) ContextValidate(ctx context.Cont } func (o *AddServiceOKBodyRDSPostgresqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6706,6 +6800,7 @@ AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions MetricsResolutions repre swagger:model AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions */ type AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6749,6 +6844,7 @@ AddServiceOKBodyRDSQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model AddServiceOKBodyRDSQANMysqlPerfschema */ type AddServiceOKBodyRDSQANMysqlPerfschema struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6973,6 +7069,7 @@ AddServiceOKBodyRDSQANPostgresqlPgstatements QANPostgreSQLPgStatementsAgent runs swagger:model AddServiceOKBodyRDSQANPostgresqlPgstatements */ type AddServiceOKBodyRDSQANPostgresqlPgstatements struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -7185,6 +7282,7 @@ AddServiceOKBodyRDSRDSExporter RDSExporter runs on Generic or Container Node and swagger:model AddServiceOKBodyRDSRDSExporter */ type AddServiceOKBodyRDSRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -7413,6 +7511,7 @@ func (o *AddServiceOKBodyRDSRDSExporter) ContextValidate(ctx context.Context, fo } func (o *AddServiceOKBodyRDSRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7455,6 +7554,7 @@ AddServiceOKBodyRDSRDSExporterMetricsResolutions MetricsResolutions represents P swagger:model AddServiceOKBodyRDSRDSExporterMetricsResolutions */ type AddServiceOKBodyRDSRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7498,6 +7598,7 @@ AddServiceParamsBodyExternal add service params body external swagger:model AddServiceParamsBodyExternal */ type AddServiceParamsBodyExternal struct { + // Node identifier on which an external exporter is been running. // runs_on_node_id should always be passed with node_id. // Exactly one of these parameters should be present: node_id, node_name, add_node. @@ -7659,6 +7760,7 @@ func (o *AddServiceParamsBodyExternal) ContextValidate(ctx context.Context, form } func (o *AddServiceParamsBodyExternal) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -7701,6 +7803,7 @@ AddServiceParamsBodyExternalAddNode AddNodeParams holds node params and is used swagger:model AddServiceParamsBodyExternalAddNode */ type AddServiceParamsBodyExternalAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -7829,6 +7932,7 @@ AddServiceParamsBodyHaproxy add service params body haproxy swagger:model AddServiceParamsBodyHaproxy */ type AddServiceParamsBodyHaproxy struct { + // Node identifier on which an external exporter is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -7982,6 +8086,7 @@ func (o *AddServiceParamsBodyHaproxy) ContextValidate(ctx context.Context, forma } func (o *AddServiceParamsBodyHaproxy) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -8024,6 +8129,7 @@ AddServiceParamsBodyHaproxyAddNode AddNodeParams holds node params and is used t swagger:model AddServiceParamsBodyHaproxyAddNode */ type AddServiceParamsBodyHaproxyAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -8152,6 +8258,7 @@ AddServiceParamsBodyMongodb add service params body mongodb swagger:model AddServiceParamsBodyMongodb */ type AddServiceParamsBodyMongodb struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -8419,6 +8526,7 @@ func (o *AddServiceParamsBodyMongodb) ContextValidate(ctx context.Context, forma } func (o *AddServiceParamsBodyMongodb) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -8461,6 +8569,7 @@ AddServiceParamsBodyMongodbAddNode AddNodeParams holds node params and is used t swagger:model AddServiceParamsBodyMongodbAddNode */ type AddServiceParamsBodyMongodbAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -8589,6 +8698,7 @@ AddServiceParamsBodyMysql add service params body mysql swagger:model AddServiceParamsBodyMysql */ type AddServiceParamsBodyMysql struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -8857,6 +8967,7 @@ func (o *AddServiceParamsBodyMysql) ContextValidate(ctx context.Context, formats } func (o *AddServiceParamsBodyMysql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -8899,6 +9010,7 @@ AddServiceParamsBodyMysqlAddNode AddNodeParams holds node params and is used to swagger:model AddServiceParamsBodyMysqlAddNode */ type AddServiceParamsBodyMysqlAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -9027,6 +9139,7 @@ AddServiceParamsBodyPostgresql add service params body postgresql swagger:model AddServiceParamsBodyPostgresql */ type AddServiceParamsBodyPostgresql struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -9294,6 +9407,7 @@ func (o *AddServiceParamsBodyPostgresql) ContextValidate(ctx context.Context, fo } func (o *AddServiceParamsBodyPostgresql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -9336,6 +9450,7 @@ AddServiceParamsBodyPostgresqlAddNode AddNodeParams holds node params and is use swagger:model AddServiceParamsBodyPostgresqlAddNode */ type AddServiceParamsBodyPostgresqlAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -9464,6 +9579,7 @@ AddServiceParamsBodyProxysql add service params body proxysql swagger:model AddServiceParamsBodyProxysql */ type AddServiceParamsBodyProxysql struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -9698,6 +9814,7 @@ func (o *AddServiceParamsBodyProxysql) ContextValidate(ctx context.Context, form } func (o *AddServiceParamsBodyProxysql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -9740,6 +9857,7 @@ AddServiceParamsBodyProxysqlAddNode AddNodeParams holds node params and is used swagger:model AddServiceParamsBodyProxysqlAddNode */ type AddServiceParamsBodyProxysqlAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -9868,6 +9986,7 @@ AddServiceParamsBodyRDS add service params body RDS swagger:model AddServiceParamsBodyRDS */ type AddServiceParamsBodyRDS struct { + // AWS region. Region string `json:"region,omitempty"` diff --git a/api/management/v1/json/client/management_service/discover_azure_database_parameters.go b/api/management/v1/json/client/management_service/discover_azure_database_parameters.go index f5f9f75a92..75b1e24acb 100644 --- a/api/management/v1/json/client/management_service/discover_azure_database_parameters.go +++ b/api/management/v1/json/client/management_service/discover_azure_database_parameters.go @@ -60,6 +60,7 @@ DiscoverAzureDatabaseParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type DiscoverAzureDatabaseParams struct { + /* Body. DiscoverAzureDatabaseRequest discover azure databases request. @@ -132,6 +133,7 @@ func (o *DiscoverAzureDatabaseParams) SetBody(body DiscoverAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/discover_azure_database_responses.go b/api/management/v1/json/client/management_service/discover_azure_database_responses.go index d407a5acea..7fed7bd497 100644 --- a/api/management/v1/json/client/management_service/discover_azure_database_responses.go +++ b/api/management/v1/json/client/management_service/discover_azure_database_responses.go @@ -104,6 +104,7 @@ func (o *DiscoverAzureDatabaseOK) GetPayload() *DiscoverAzureDatabaseOKBody { } func (o *DiscoverAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverAzureDatabaseOKBody) // response payload @@ -177,6 +178,7 @@ func (o *DiscoverAzureDatabaseDefault) GetPayload() *DiscoverAzureDatabaseDefaul } func (o *DiscoverAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverAzureDatabaseDefaultBody) // response payload @@ -192,6 +194,7 @@ DiscoverAzureDatabaseBody DiscoverAzureDatabaseRequest discover azure databases swagger:model DiscoverAzureDatabaseBody */ type DiscoverAzureDatabaseBody struct { + // Azure client ID. AzureClientID string `json:"azure_client_id,omitempty"` @@ -238,6 +241,7 @@ DiscoverAzureDatabaseDefaultBody discover azure database default body swagger:model DiscoverAzureDatabaseDefaultBody */ type DiscoverAzureDatabaseDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -303,7 +307,9 @@ func (o *DiscoverAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, } func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -319,6 +325,7 @@ func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -347,6 +354,7 @@ DiscoverAzureDatabaseDefaultBodyDetailsItems0 discover azure database default bo swagger:model DiscoverAzureDatabaseDefaultBodyDetailsItems0 */ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -358,6 +366,7 @@ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { func (o *DiscoverAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -395,6 +404,7 @@ func (o *DiscoverAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o DiscoverAzureDatabaseDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -458,6 +468,7 @@ DiscoverAzureDatabaseOKBody DiscoverAzureDatabaseResponse discover azure databas swagger:model DiscoverAzureDatabaseOKBody */ type DiscoverAzureDatabaseOKBody struct { + // azure database instance AzureDatabaseInstance []*DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 `json:"azure_database_instance"` } @@ -517,7 +528,9 @@ func (o *DiscoverAzureDatabaseOKBody) ContextValidate(ctx context.Context, forma } func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AzureDatabaseInstance); i++ { + if o.AzureDatabaseInstance[i] != nil { if swag.IsZero(o.AzureDatabaseInstance[i]) { // not required @@ -533,6 +546,7 @@ func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx c return err } } + } return nil @@ -561,6 +575,7 @@ DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 DiscoverAzureDatabaseInst swagger:model DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 */ type DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 struct { + // Azure database instance ID. InstanceID string `json:"instance_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/discover_rds_parameters.go b/api/management/v1/json/client/management_service/discover_rds_parameters.go index ef5c0058c5..93e9487d96 100644 --- a/api/management/v1/json/client/management_service/discover_rds_parameters.go +++ b/api/management/v1/json/client/management_service/discover_rds_parameters.go @@ -60,6 +60,7 @@ DiscoverRDSParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DiscoverRDSParams struct { + // Body. Body DiscoverRDSBody @@ -129,6 +130,7 @@ func (o *DiscoverRDSParams) SetBody(body DiscoverRDSBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverRDSParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/discover_rds_responses.go b/api/management/v1/json/client/management_service/discover_rds_responses.go index bf43f10f8b..b0fe32a0f0 100644 --- a/api/management/v1/json/client/management_service/discover_rds_responses.go +++ b/api/management/v1/json/client/management_service/discover_rds_responses.go @@ -104,6 +104,7 @@ func (o *DiscoverRDSOK) GetPayload() *DiscoverRDSOKBody { } func (o *DiscoverRDSOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverRDSOKBody) // response payload @@ -177,6 +178,7 @@ func (o *DiscoverRDSDefault) GetPayload() *DiscoverRDSDefaultBody { } func (o *DiscoverRDSDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverRDSDefaultBody) // response payload @@ -192,6 +194,7 @@ DiscoverRDSBody discover RDS body swagger:model DiscoverRDSBody */ type DiscoverRDSBody struct { + // AWS Access key. Optional. AWSAccessKey string `json:"aws_access_key,omitempty"` @@ -232,6 +235,7 @@ DiscoverRDSDefaultBody discover RDS default body swagger:model DiscoverRDSDefaultBody */ type DiscoverRDSDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -297,7 +301,9 @@ func (o *DiscoverRDSDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,6 +319,7 @@ func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -341,6 +348,7 @@ DiscoverRDSDefaultBodyDetailsItems0 discover RDS default body details items0 swagger:model DiscoverRDSDefaultBodyDetailsItems0 */ type DiscoverRDSDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -352,6 +360,7 @@ type DiscoverRDSDefaultBodyDetailsItems0 struct { func (o *DiscoverRDSDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -389,6 +398,7 @@ func (o *DiscoverRDSDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DiscoverRDSDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -452,6 +462,7 @@ DiscoverRDSOKBody discover RDS OK body swagger:model DiscoverRDSOKBody */ type DiscoverRDSOKBody struct { + // rds instances RDSInstances []*DiscoverRDSOKBodyRDSInstancesItems0 `json:"rds_instances"` } @@ -511,7 +522,9 @@ func (o *DiscoverRDSOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RDSInstances); i++ { + if o.RDSInstances[i] != nil { if swag.IsZero(o.RDSInstances[i]) { // not required @@ -527,6 +540,7 @@ func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, for return err } } + } return nil @@ -555,6 +569,7 @@ DiscoverRDSOKBodyRDSInstancesItems0 DiscoverRDSInstance models an unique RDS ins swagger:model DiscoverRDSOKBodyRDSInstancesItems0 */ type DiscoverRDSOKBodyRDSInstancesItems0 struct { + // AWS region. Region string `json:"region,omitempty"` diff --git a/api/management/v1/json/client/management_service/get_node_parameters.go b/api/management/v1/json/client/management_service/get_node_parameters.go index 63aa4bdf7c..73629cc22d 100644 --- a/api/management/v1/json/client/management_service/get_node_parameters.go +++ b/api/management/v1/json/client/management_service/get_node_parameters.go @@ -60,6 +60,7 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { + /* NodeID. Unique Node identifier. @@ -132,6 +133,7 @@ func (o *GetNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/get_node_responses.go b/api/management/v1/json/client/management_service/get_node_responses.go index 052114c3ad..6824619ea1 100644 --- a/api/management/v1/json/client/management_service/get_node_responses.go +++ b/api/management/v1/json/client/management_service/get_node_responses.go @@ -104,6 +104,7 @@ func (o *GetNodeOK) GetPayload() *GetNodeOKBody { } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeDefaultBody) // response payload @@ -192,6 +194,7 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -301,6 +307,7 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type GetNodeDefaultBodyDetailsItems0 struct { func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { + // node Node *GetNodeOKBodyNode `json:"node,omitempty"` } @@ -464,6 +474,7 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { + if o.Node != nil { if swag.IsZero(o.Node) { // not required @@ -506,6 +517,7 @@ GetNodeOKBodyNode get node OK body node swagger:model GetNodeOKBodyNode */ type GetNodeOKBodyNode struct { + // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -739,7 +751,9 @@ func (o *GetNodeOKBodyNode) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -755,13 +769,16 @@ func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats s return err } } + } return nil } func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -777,6 +794,7 @@ func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats return err } } + } return nil @@ -805,6 +823,7 @@ GetNodeOKBodyNodeAgentsItems0 get node OK body node agents items0 swagger:model GetNodeOKBodyNodeAgentsItems0 */ type GetNodeOKBodyNodeAgentsItems0 struct { + // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -851,6 +870,7 @@ GetNodeOKBodyNodeServicesItems0 Service represents a service running on a node. swagger:model GetNodeOKBodyNodeServicesItems0 */ type GetNodeOKBodyNodeServicesItems0 struct { + // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_agent_versions_parameters.go b/api/management/v1/json/client/management_service/list_agent_versions_parameters.go index d7f16fa9b2..97d2ce24b7 100644 --- a/api/management/v1/json/client/management_service/list_agent_versions_parameters.go +++ b/api/management/v1/json/client/management_service/list_agent_versions_parameters.go @@ -115,6 +115,7 @@ func (o *ListAgentVersionsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAgentVersionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_agent_versions_responses.go b/api/management/v1/json/client/management_service/list_agent_versions_responses.go index c8e2470228..af03219404 100644 --- a/api/management/v1/json/client/management_service/list_agent_versions_responses.go +++ b/api/management/v1/json/client/management_service/list_agent_versions_responses.go @@ -104,6 +104,7 @@ func (o *ListAgentVersionsOK) GetPayload() *ListAgentVersionsOKBody { } func (o *ListAgentVersionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentVersionsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListAgentVersionsDefault) GetPayload() *ListAgentVersionsDefaultBody { } func (o *ListAgentVersionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentVersionsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListAgentVersionsDefaultBody list agent versions default body swagger:model ListAgentVersionsDefaultBody */ type ListAgentVersionsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListAgentVersionsDefaultBody) ContextValidate(ctx context.Context, form } func (o *ListAgentVersionsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListAgentVersionsDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -301,6 +307,7 @@ ListAgentVersionsDefaultBodyDetailsItems0 list agent versions default body detai swagger:model ListAgentVersionsDefaultBodyDetailsItems0 */ type ListAgentVersionsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListAgentVersionsDefaultBodyDetailsItems0 struct { func (o *ListAgentVersionsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListAgentVersionsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentVersionsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListAgentVersionsOKBody list agent versions OK body swagger:model ListAgentVersionsOKBody */ type ListAgentVersionsOKBody struct { + // List of Agent versions. AgentVersions []*ListAgentVersionsOKBodyAgentVersionsItems0 `json:"agent_versions"` } @@ -471,7 +481,9 @@ func (o *ListAgentVersionsOKBody) ContextValidate(ctx context.Context, formats s } func (o *ListAgentVersionsOKBody) contextValidateAgentVersions(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AgentVersions); i++ { + if o.AgentVersions[i] != nil { if swag.IsZero(o.AgentVersions[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListAgentVersionsOKBody) contextValidateAgentVersions(ctx context.Conte return err } } + } return nil @@ -515,6 +528,7 @@ ListAgentVersionsOKBodyAgentVersionsItems0 list agent versions OK body agent ver swagger:model ListAgentVersionsOKBodyAgentVersionsItems0 */ type ListAgentVersionsOKBodyAgentVersionsItems0 struct { + // Agent ID. AgentID string `json:"agent_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_agents_parameters.go b/api/management/v1/json/client/management_service/list_agents_parameters.go index 5dd7b7b6a4..7c16816c10 100644 --- a/api/management/v1/json/client/management_service/list_agents_parameters.go +++ b/api/management/v1/json/client/management_service/list_agents_parameters.go @@ -60,6 +60,7 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { + /* NodeID. Return only Agents that relate to a specific NodeID. @@ -149,6 +150,7 @@ func (o *ListAgentsParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -164,6 +166,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qNodeID := qrNodeID if qNodeID != "" { + if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -180,6 +183,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qServiceID := qrServiceID if qServiceID != "" { + if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_agents_responses.go b/api/management/v1/json/client/management_service/list_agents_responses.go index 57d0a04d55..2c501bf8ba 100644 --- a/api/management/v1/json/client/management_service/list_agents_responses.go +++ b/api/management/v1/json/client/management_service/list_agents_responses.go @@ -104,6 +104,7 @@ func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -301,6 +307,7 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListAgentsDefaultBodyDetailsItems0 struct { func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { + // List of Agents. Agents []*ListAgentsOKBodyAgentsItems0 `json:"agents"` } @@ -471,7 +481,9 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats st return err } } + } return nil @@ -515,6 +528,7 @@ ListAgentsOKBodyAgentsItems0 list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0 */ type ListAgentsOKBodyAgentsItems0 struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -862,6 +876,7 @@ func (o *ListAgentsOKBodyAgentsItems0) ContextValidate(ctx context.Context, form } func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { + if o.AzureOptions != nil { if swag.IsZero(o.AzureOptions) { // not required @@ -882,6 +897,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MongoDBOptions != nil { if swag.IsZero(o.MongoDBOptions) { // not required @@ -902,6 +918,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlOptions != nil { if swag.IsZero(o.MysqlOptions) { // not required @@ -922,6 +939,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlOptions != nil { if swag.IsZero(o.PostgresqlOptions) { // not required @@ -964,6 +982,7 @@ ListAgentsOKBodyAgentsItems0AzureOptions list agents OK body agents items0 azure swagger:model ListAgentsOKBodyAgentsItems0AzureOptions */ type ListAgentsOKBodyAgentsItems0AzureOptions struct { + // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -1013,6 +1032,7 @@ ListAgentsOKBodyAgentsItems0MongoDBOptions list agents OK body agents items0 mon swagger:model ListAgentsOKBodyAgentsItems0MongoDBOptions */ type ListAgentsOKBodyAgentsItems0MongoDBOptions struct { + // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -1068,6 +1088,7 @@ ListAgentsOKBodyAgentsItems0MysqlOptions list agents OK body agents items0 mysql swagger:model ListAgentsOKBodyAgentsItems0MysqlOptions */ type ListAgentsOKBodyAgentsItems0MysqlOptions struct { + // True if TLS key is set. IsTLSKeySet bool `json:"is_tls_key_set,omitempty"` } @@ -1105,6 +1126,7 @@ ListAgentsOKBodyAgentsItems0PostgresqlOptions list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0PostgresqlOptions */ type ListAgentsOKBodyAgentsItems0PostgresqlOptions struct { + // True if TLS key is set. IsSslKeySet bool `json:"is_ssl_key_set,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_nodes_parameters.go b/api/management/v1/json/client/management_service/list_nodes_parameters.go index 441e42660e..eeca2a1f5f 100644 --- a/api/management/v1/json/client/management_service/list_nodes_parameters.go +++ b/api/management/v1/json/client/management_service/list_nodes_parameters.go @@ -60,6 +60,7 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { + /* NodeType. Node type to be filtered out. @@ -85,7 +86,9 @@ func (o *ListNodesParams) WithDefaults() *ListNodesParams { // // All values with no default are reset to their zero value. func (o *ListNodesParams) SetDefaults() { - nodeTypeDefault := string("NODE_TYPE_UNSPECIFIED") + var ( + nodeTypeDefault = string("NODE_TYPE_UNSPECIFIED") + ) val := ListNodesParams{ NodeType: &nodeTypeDefault, @@ -143,6 +146,7 @@ func (o *ListNodesParams) SetNodeType(nodeType *string) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -158,6 +162,7 @@ func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } qNodeType := qrNodeType if qNodeType != "" { + if err := r.SetQueryParam("node_type", qNodeType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_nodes_responses.go b/api/management/v1/json/client/management_service/list_nodes_responses.go index a9ca575d18..4b821c8d8f 100644 --- a/api/management/v1/json/client/management_service/list_nodes_responses.go +++ b/api/management/v1/json/client/management_service/list_nodes_responses.go @@ -104,6 +104,7 @@ func (o *ListNodesOK) GetPayload() *ListNodesOKBody { } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -301,6 +307,7 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListNodesDefaultBodyDetailsItems0 struct { func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListNodesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { + // nodes Nodes []*ListNodesOKBodyNodesItems0 `json:"nodes"` } @@ -471,7 +481,9 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Nodes); i++ { + if o.Nodes[i] != nil { if swag.IsZero(o.Nodes[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strf return err } } + } return nil @@ -515,6 +528,7 @@ ListNodesOKBodyNodesItems0 list nodes OK body nodes items0 swagger:model ListNodesOKBodyNodesItems0 */ type ListNodesOKBodyNodesItems0 struct { + // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -748,7 +762,9 @@ func (o *ListNodesOKBodyNodesItems0) ContextValidate(ctx context.Context, format } func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -764,13 +780,16 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, return err } } + } return nil } func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -786,6 +805,7 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context return err } } + } return nil @@ -814,6 +834,7 @@ ListNodesOKBodyNodesItems0AgentsItems0 list nodes OK body nodes items0 agents it swagger:model ListNodesOKBodyNodesItems0AgentsItems0 */ type ListNodesOKBodyNodesItems0AgentsItems0 struct { + // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -860,6 +881,7 @@ ListNodesOKBodyNodesItems0ServicesItems0 Service represents a service running on swagger:model ListNodesOKBodyNodesItems0ServicesItems0 */ type ListNodesOKBodyNodesItems0ServicesItems0 struct { + // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_services_parameters.go b/api/management/v1/json/client/management_service/list_services_parameters.go index 80363638ef..d9a1cba103 100644 --- a/api/management/v1/json/client/management_service/list_services_parameters.go +++ b/api/management/v1/json/client/management_service/list_services_parameters.go @@ -60,6 +60,7 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { + /* ExternalGroup. Return only services in this external group. @@ -97,7 +98,9 @@ func (o *ListServicesParams) WithDefaults() *ListServicesParams { // // All values with no default are reset to their zero value. func (o *ListServicesParams) SetDefaults() { - serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + var ( + serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") + ) val := ListServicesParams{ ServiceType: &serviceTypeDefault, @@ -177,6 +180,7 @@ func (o *ListServicesParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -192,6 +196,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qExternalGroup := qrExternalGroup if qExternalGroup != "" { + if err := r.SetQueryParam("external_group", qExternalGroup); err != nil { return err } @@ -208,6 +213,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qNodeID := qrNodeID if qNodeID != "" { + if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -224,6 +230,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qServiceType := qrServiceType if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_services_responses.go b/api/management/v1/json/client/management_service/list_services_responses.go index 47af72c35e..919a053f91 100644 --- a/api/management/v1/json/client/management_service/list_services_responses.go +++ b/api/management/v1/json/client/management_service/list_services_responses.go @@ -104,6 +104,7 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -301,6 +307,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // List of Services. Services []*ListServicesOKBodyServicesItems0 `json:"services"` } @@ -471,7 +481,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -487,6 +499,7 @@ func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, format return err } } + } return nil @@ -515,6 +528,7 @@ ListServicesOKBodyServicesItems0 list services OK body services items0 swagger:model ListServicesOKBodyServicesItems0 */ type ListServicesOKBodyServicesItems0 struct { + // Unique service identifier. ServiceID string `json:"service_id,omitempty"` @@ -723,7 +737,9 @@ func (o *ListServicesOKBodyServicesItems0) ContextValidate(ctx context.Context, } func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -739,6 +755,7 @@ func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Con return err } } + } return nil @@ -767,6 +784,7 @@ ListServicesOKBodyServicesItems0AgentsItems0 list services OK body services item swagger:model ListServicesOKBodyServicesItems0AgentsItems0 */ type ListServicesOKBodyServicesItems0AgentsItems0 struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -1114,6 +1132,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) ContextValidate(ctx conte } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { + if o.AzureOptions != nil { if swag.IsZero(o.AzureOptions) { // not required @@ -1134,6 +1153,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MongoDBOptions != nil { if swag.IsZero(o.MongoDBOptions) { // not required @@ -1154,6 +1174,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOpt } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlOptions != nil { if swag.IsZero(o.MysqlOptions) { // not required @@ -1174,6 +1195,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlOptions != nil { if swag.IsZero(o.PostgresqlOptions) { // not required @@ -1216,6 +1238,7 @@ ListServicesOKBodyServicesItems0AgentsItems0AzureOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0AzureOptions */ type ListServicesOKBodyServicesItems0AgentsItems0AzureOptions struct { + // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -1265,6 +1288,7 @@ ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions list services OK body swagger:model ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions struct { + // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -1320,6 +1344,7 @@ ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions struct { + // True if TLS key is set. IsTLSKeySet bool `json:"is_tls_key_set,omitempty"` } @@ -1357,6 +1382,7 @@ ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions list services OK b swagger:model ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions struct { + // True if TLS key is set. IsSslKeySet bool `json:"is_ssl_key_set,omitempty"` diff --git a/api/management/v1/json/client/management_service/register_node_parameters.go b/api/management/v1/json/client/management_service/register_node_parameters.go index a614118a70..5de06b5b32 100644 --- a/api/management/v1/json/client/management_service/register_node_parameters.go +++ b/api/management/v1/json/client/management_service/register_node_parameters.go @@ -60,6 +60,7 @@ RegisterNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RegisterNodeParams struct { + // Body. Body RegisterNodeBody @@ -129,6 +130,7 @@ func (o *RegisterNodeParams) SetBody(body RegisterNodeBody) { // WriteToRequest writes these params to a swagger request func (o *RegisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/register_node_responses.go b/api/management/v1/json/client/management_service/register_node_responses.go index 290a1e219e..576ddb268b 100644 --- a/api/management/v1/json/client/management_service/register_node_responses.go +++ b/api/management/v1/json/client/management_service/register_node_responses.go @@ -104,6 +104,7 @@ func (o *RegisterNodeOK) GetPayload() *RegisterNodeOKBody { } func (o *RegisterNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RegisterNodeOKBody) // response payload @@ -177,6 +178,7 @@ func (o *RegisterNodeDefault) GetPayload() *RegisterNodeDefaultBody { } func (o *RegisterNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RegisterNodeDefaultBody) // response payload @@ -192,6 +194,7 @@ RegisterNodeBody register node body swagger:model RegisterNodeBody */ type RegisterNodeBody struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -391,6 +394,7 @@ RegisterNodeDefaultBody register node default body swagger:model RegisterNodeDefaultBody */ type RegisterNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -456,7 +460,9 @@ func (o *RegisterNodeDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -472,6 +478,7 @@ func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -500,6 +507,7 @@ RegisterNodeDefaultBodyDetailsItems0 register node default body details items0 swagger:model RegisterNodeDefaultBodyDetailsItems0 */ type RegisterNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -511,6 +519,7 @@ type RegisterNodeDefaultBodyDetailsItems0 struct { func (o *RegisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -548,6 +557,7 @@ func (o *RegisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RegisterNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -611,6 +621,7 @@ RegisterNodeOKBody register node OK body swagger:model RegisterNodeOKBody */ type RegisterNodeOKBody struct { + // Token represents token for vmagent auth config. Token string `json:"token,omitempty"` @@ -729,6 +740,7 @@ func (o *RegisterNodeOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, formats strfmt.Registry) error { + if o.ContainerNode != nil { if swag.IsZero(o.ContainerNode) { // not required @@ -749,6 +761,7 @@ func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, f } func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, formats strfmt.Registry) error { + if o.GenericNode != nil { if swag.IsZero(o.GenericNode) { // not required @@ -769,6 +782,7 @@ func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, for } func (o *RegisterNodeOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -811,6 +825,7 @@ RegisterNodeOKBodyContainerNode ContainerNode represents a Docker container. swagger:model RegisterNodeOKBodyContainerNode */ type RegisterNodeOKBodyContainerNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -875,6 +890,7 @@ RegisterNodeOKBodyGenericNode GenericNode represents a bare metal server or virt swagger:model RegisterNodeOKBodyGenericNode */ type RegisterNodeOKBodyGenericNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -936,6 +952,7 @@ RegisterNodeOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model RegisterNodeOKBodyPMMAgent */ type RegisterNodeOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/remove_service_parameters.go b/api/management/v1/json/client/management_service/remove_service_parameters.go index 16511c1b2e..7700f22424 100644 --- a/api/management/v1/json/client/management_service/remove_service_parameters.go +++ b/api/management/v1/json/client/management_service/remove_service_parameters.go @@ -60,6 +60,7 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { + /* ServiceID. Either a Service ID or a Service Name. @@ -91,7 +92,9 @@ func (o *RemoveServiceParams) WithDefaults() *RemoveServiceParams { // // All values with no default are reset to their zero value. func (o *RemoveServiceParams) SetDefaults() { - serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + var ( + serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") + ) val := RemoveServiceParams{ ServiceType: &serviceTypeDefault, @@ -160,6 +163,7 @@ func (o *RemoveServiceParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -180,6 +184,7 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qServiceType := qrServiceType if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/remove_service_responses.go b/api/management/v1/json/client/management_service/remove_service_responses.go index 39934d4575..d413afd47f 100644 --- a/api/management/v1/json/client/management_service/remove_service_responses.go +++ b/api/management/v1/json/client/management_service/remove_service_responses.go @@ -103,6 +103,7 @@ func (o *RemoveServiceOK) GetPayload() interface{} { } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -189,6 +191,7 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -298,6 +304,7 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -309,6 +316,7 @@ type RemoveServiceDefaultBodyDetailsItems0 struct { func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -346,6 +354,7 @@ func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/unregister_node_parameters.go b/api/management/v1/json/client/management_service/unregister_node_parameters.go index 069530e44b..21d279574a 100644 --- a/api/management/v1/json/client/management_service/unregister_node_parameters.go +++ b/api/management/v1/json/client/management_service/unregister_node_parameters.go @@ -61,6 +61,7 @@ UnregisterNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UnregisterNodeParams struct { + /* Force. Force delete node, related service account, even if it has more service tokens attached. @@ -150,6 +151,7 @@ func (o *UnregisterNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *UnregisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *UnregisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/unregister_node_responses.go b/api/management/v1/json/client/management_service/unregister_node_responses.go index 4b94542ee5..8204d24e15 100644 --- a/api/management/v1/json/client/management_service/unregister_node_responses.go +++ b/api/management/v1/json/client/management_service/unregister_node_responses.go @@ -103,6 +103,7 @@ func (o *UnregisterNodeOK) GetPayload() *UnregisterNodeOKBody { } func (o *UnregisterNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UnregisterNodeOKBody) // response payload @@ -176,6 +177,7 @@ func (o *UnregisterNodeDefault) GetPayload() *UnregisterNodeDefaultBody { } func (o *UnregisterNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UnregisterNodeDefaultBody) // response payload @@ -191,6 +193,7 @@ UnregisterNodeDefaultBody unregister node default body swagger:model UnregisterNodeDefaultBody */ type UnregisterNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *UnregisterNodeDefaultBody) ContextValidate(ctx context.Context, formats } func (o *UnregisterNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *UnregisterNodeDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -300,6 +306,7 @@ UnregisterNodeDefaultBodyDetailsItems0 unregister node default body details item swagger:model UnregisterNodeDefaultBodyDetailsItems0 */ type UnregisterNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type UnregisterNodeDefaultBodyDetailsItems0 struct { func (o *UnregisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *UnregisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o UnregisterNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ UnregisterNodeOKBody unregister node OK body swagger:model UnregisterNodeOKBody */ type UnregisterNodeOKBody struct { + // Warning message if there are more service tokens attached to service account. Warning string `json:"warning,omitempty"` } diff --git a/api/management/v1/metrics.pb.go b/api/management/v1/metrics.pb.go index 27faa2b842..db10b6ec8f 100644 --- a/api/management/v1/metrics.pb.go +++ b/api/management/v1/metrics.pb.go @@ -7,11 +7,10 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -110,13 +109,10 @@ func file_management_v1_metrics_proto_rawDescGZIP() []byte { return file_management_v1_metrics_proto_rawDescData } -var ( - file_management_v1_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_metrics_proto_goTypes = []any{ - (MetricsMode)(0), // 0: management.v1.MetricsMode - } -) - +var file_management_v1_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_metrics_proto_goTypes = []any{ + (MetricsMode)(0), // 0: management.v1.MetricsMode +} var file_management_v1_metrics_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/management/v1/mongodb.pb.go b/api/management/v1/mongodb.pb.go index 48ebbb5909..ff0d61345b 100644 --- a/api/management/v1/mongodb.pb.go +++ b/api/management/v1/mongodb.pb.go @@ -7,14 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -572,21 +570,18 @@ func file_management_v1_mongodb_proto_rawDescGZIP() []byte { return file_management_v1_mongodb_proto_rawDescData } -var ( - file_management_v1_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_mongodb_proto_goTypes = []any{ - (*AddMongoDBServiceParams)(nil), // 0: management.v1.AddMongoDBServiceParams - (*MongoDBServiceResult)(nil), // 1: management.v1.MongoDBServiceResult - nil, // 2: management.v1.AddMongoDBServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.MongoDBService)(nil), // 6: inventory.v1.MongoDBService - (*v1.MongoDBExporter)(nil), // 7: inventory.v1.MongoDBExporter - (*v1.QANMongoDBProfilerAgent)(nil), // 8: inventory.v1.QANMongoDBProfilerAgent - } -) - +var file_management_v1_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_mongodb_proto_goTypes = []any{ + (*AddMongoDBServiceParams)(nil), // 0: management.v1.AddMongoDBServiceParams + (*MongoDBServiceResult)(nil), // 1: management.v1.MongoDBServiceResult + nil, // 2: management.v1.AddMongoDBServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.MongoDBService)(nil), // 6: inventory.v1.MongoDBService + (*v1.MongoDBExporter)(nil), // 7: inventory.v1.MongoDBExporter + (*v1.QANMongoDBProfilerAgent)(nil), // 8: inventory.v1.QANMongoDBProfilerAgent +} var file_management_v1_mongodb_proto_depIdxs = []int32{ 3, // 0: management.v1.AddMongoDBServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddMongoDBServiceParams.custom_labels:type_name -> management.v1.AddMongoDBServiceParams.CustomLabelsEntry diff --git a/api/management/v1/mysql.pb.go b/api/management/v1/mysql.pb.go index 28b64588a0..8471abb10e 100644 --- a/api/management/v1/mysql.pb.go +++ b/api/management/v1/mysql.pb.go @@ -7,14 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -591,22 +589,19 @@ func file_management_v1_mysql_proto_rawDescGZIP() []byte { return file_management_v1_mysql_proto_rawDescData } -var ( - file_management_v1_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_mysql_proto_goTypes = []any{ - (*AddMySQLServiceParams)(nil), // 0: management.v1.AddMySQLServiceParams - (*MySQLServiceResult)(nil), // 1: management.v1.MySQLServiceResult - nil, // 2: management.v1.AddMySQLServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.MySQLService)(nil), // 6: inventory.v1.MySQLService - (*v1.MySQLdExporter)(nil), // 7: inventory.v1.MySQLdExporter - (*v1.QANMySQLPerfSchemaAgent)(nil), // 8: inventory.v1.QANMySQLPerfSchemaAgent - (*v1.QANMySQLSlowlogAgent)(nil), // 9: inventory.v1.QANMySQLSlowlogAgent - } -) - +var file_management_v1_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_mysql_proto_goTypes = []any{ + (*AddMySQLServiceParams)(nil), // 0: management.v1.AddMySQLServiceParams + (*MySQLServiceResult)(nil), // 1: management.v1.MySQLServiceResult + nil, // 2: management.v1.AddMySQLServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.MySQLService)(nil), // 6: inventory.v1.MySQLService + (*v1.MySQLdExporter)(nil), // 7: inventory.v1.MySQLdExporter + (*v1.QANMySQLPerfSchemaAgent)(nil), // 8: inventory.v1.QANMySQLPerfSchemaAgent + (*v1.QANMySQLSlowlogAgent)(nil), // 9: inventory.v1.QANMySQLSlowlogAgent +} var file_management_v1_mysql_proto_depIdxs = []int32{ 3, // 0: management.v1.AddMySQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddMySQLServiceParams.custom_labels:type_name -> management.v1.AddMySQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/node.pb.go b/api/management/v1/node.pb.go index 6a5622ded1..f6d26d11b4 100644 --- a/api/management/v1/node.pb.go +++ b/api/management/v1/node.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -1307,35 +1305,32 @@ func file_management_v1_node_proto_rawDescGZIP() []byte { return file_management_v1_node_proto_rawDescData } -var ( - file_management_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 15) - file_management_v1_node_proto_goTypes = []any{ - (UniversalNode_Status)(0), // 0: management.v1.UniversalNode.Status - (*AddNodeParams)(nil), // 1: management.v1.AddNodeParams - (*RegisterNodeRequest)(nil), // 2: management.v1.RegisterNodeRequest - (*RegisterNodeResponse)(nil), // 3: management.v1.RegisterNodeResponse - (*UnregisterNodeRequest)(nil), // 4: management.v1.UnregisterNodeRequest - (*UnregisterNodeResponse)(nil), // 5: management.v1.UnregisterNodeResponse - (*UniversalNode)(nil), // 6: management.v1.UniversalNode - (*ListNodesRequest)(nil), // 7: management.v1.ListNodesRequest - (*ListNodesResponse)(nil), // 8: management.v1.ListNodesResponse - (*GetNodeRequest)(nil), // 9: management.v1.GetNodeRequest - (*GetNodeResponse)(nil), // 10: management.v1.GetNodeResponse - nil, // 11: management.v1.AddNodeParams.CustomLabelsEntry - nil, // 12: management.v1.RegisterNodeRequest.CustomLabelsEntry - (*UniversalNode_Service)(nil), // 13: management.v1.UniversalNode.Service - (*UniversalNode_Agent)(nil), // 14: management.v1.UniversalNode.Agent - nil, // 15: management.v1.UniversalNode.CustomLabelsEntry - (v1.NodeType)(0), // 16: inventory.v1.NodeType - (MetricsMode)(0), // 17: management.v1.MetricsMode - (*v1.GenericNode)(nil), // 18: inventory.v1.GenericNode - (*v1.ContainerNode)(nil), // 19: inventory.v1.ContainerNode - (*v1.PMMAgent)(nil), // 20: inventory.v1.PMMAgent - (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp - } -) - +var file_management_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_management_v1_node_proto_goTypes = []any{ + (UniversalNode_Status)(0), // 0: management.v1.UniversalNode.Status + (*AddNodeParams)(nil), // 1: management.v1.AddNodeParams + (*RegisterNodeRequest)(nil), // 2: management.v1.RegisterNodeRequest + (*RegisterNodeResponse)(nil), // 3: management.v1.RegisterNodeResponse + (*UnregisterNodeRequest)(nil), // 4: management.v1.UnregisterNodeRequest + (*UnregisterNodeResponse)(nil), // 5: management.v1.UnregisterNodeResponse + (*UniversalNode)(nil), // 6: management.v1.UniversalNode + (*ListNodesRequest)(nil), // 7: management.v1.ListNodesRequest + (*ListNodesResponse)(nil), // 8: management.v1.ListNodesResponse + (*GetNodeRequest)(nil), // 9: management.v1.GetNodeRequest + (*GetNodeResponse)(nil), // 10: management.v1.GetNodeResponse + nil, // 11: management.v1.AddNodeParams.CustomLabelsEntry + nil, // 12: management.v1.RegisterNodeRequest.CustomLabelsEntry + (*UniversalNode_Service)(nil), // 13: management.v1.UniversalNode.Service + (*UniversalNode_Agent)(nil), // 14: management.v1.UniversalNode.Agent + nil, // 15: management.v1.UniversalNode.CustomLabelsEntry + (v1.NodeType)(0), // 16: inventory.v1.NodeType + (MetricsMode)(0), // 17: management.v1.MetricsMode + (*v1.GenericNode)(nil), // 18: inventory.v1.GenericNode + (*v1.ContainerNode)(nil), // 19: inventory.v1.ContainerNode + (*v1.PMMAgent)(nil), // 20: inventory.v1.PMMAgent + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp +} var file_management_v1_node_proto_depIdxs = []int32{ 16, // 0: management.v1.AddNodeParams.node_type:type_name -> inventory.v1.NodeType 11, // 1: management.v1.AddNodeParams.custom_labels:type_name -> management.v1.AddNodeParams.CustomLabelsEntry diff --git a/api/management/v1/postgresql.pb.go b/api/management/v1/postgresql.pb.go index 08c3bee477..dec50c8201 100644 --- a/api/management/v1/postgresql.pb.go +++ b/api/management/v1/postgresql.pb.go @@ -7,14 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -607,22 +605,19 @@ func file_management_v1_postgresql_proto_rawDescGZIP() []byte { return file_management_v1_postgresql_proto_rawDescData } -var ( - file_management_v1_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_postgresql_proto_goTypes = []any{ - (*AddPostgreSQLServiceParams)(nil), // 0: management.v1.AddPostgreSQLServiceParams - (*PostgreSQLServiceResult)(nil), // 1: management.v1.PostgreSQLServiceResult - nil, // 2: management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.PostgreSQLService)(nil), // 6: inventory.v1.PostgreSQLService - (*v1.PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter - (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.v1.QANPostgreSQLPgStatementsAgent - (*v1.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.v1.QANPostgreSQLPgStatMonitorAgent - } -) - +var file_management_v1_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_postgresql_proto_goTypes = []any{ + (*AddPostgreSQLServiceParams)(nil), // 0: management.v1.AddPostgreSQLServiceParams + (*PostgreSQLServiceResult)(nil), // 1: management.v1.PostgreSQLServiceResult + nil, // 2: management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.PostgreSQLService)(nil), // 6: inventory.v1.PostgreSQLService + (*v1.PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter + (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.v1.QANPostgreSQLPgStatementsAgent + (*v1.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.v1.QANPostgreSQLPgStatMonitorAgent +} var file_management_v1_postgresql_proto_depIdxs = []int32{ 3, // 0: management.v1.AddPostgreSQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddPostgreSQLServiceParams.custom_labels:type_name -> management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/proxysql.pb.go b/api/management/v1/proxysql.pb.go index 0360313e81..2f654a181b 100644 --- a/api/management/v1/proxysql.pb.go +++ b/api/management/v1/proxysql.pb.go @@ -7,14 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -433,20 +431,17 @@ func file_management_v1_proxysql_proto_rawDescGZIP() []byte { return file_management_v1_proxysql_proto_rawDescData } -var ( - file_management_v1_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_proxysql_proto_goTypes = []any{ - (*AddProxySQLServiceParams)(nil), // 0: management.v1.AddProxySQLServiceParams - (*ProxySQLServiceResult)(nil), // 1: management.v1.ProxySQLServiceResult - nil, // 2: management.v1.AddProxySQLServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.ProxySQLService)(nil), // 6: inventory.v1.ProxySQLService - (*v1.ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter - } -) - +var file_management_v1_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_proxysql_proto_goTypes = []any{ + (*AddProxySQLServiceParams)(nil), // 0: management.v1.AddProxySQLServiceParams + (*ProxySQLServiceResult)(nil), // 1: management.v1.ProxySQLServiceResult + nil, // 2: management.v1.AddProxySQLServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.ProxySQLService)(nil), // 6: inventory.v1.ProxySQLService + (*v1.ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter +} var file_management_v1_proxysql_proto_depIdxs = []int32{ 3, // 0: management.v1.AddProxySQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddProxySQLServiceParams.custom_labels:type_name -> management.v1.AddProxySQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/rds.pb.go b/api/management/v1/rds.pb.go index d493683cda..093f671af3 100644 --- a/api/management/v1/rds.pb.go +++ b/api/management/v1/rds.pb.go @@ -7,14 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -943,29 +941,26 @@ func file_management_v1_rds_proto_rawDescGZIP() []byte { return file_management_v1_rds_proto_rawDescData } -var ( - file_management_v1_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_management_v1_rds_proto_goTypes = []any{ - (DiscoverRDSEngine)(0), // 0: management.v1.DiscoverRDSEngine - (*DiscoverRDSInstance)(nil), // 1: management.v1.DiscoverRDSInstance - (*DiscoverRDSRequest)(nil), // 2: management.v1.DiscoverRDSRequest - (*DiscoverRDSResponse)(nil), // 3: management.v1.DiscoverRDSResponse - (*AddRDSServiceParams)(nil), // 4: management.v1.AddRDSServiceParams - (*RDSServiceResult)(nil), // 5: management.v1.RDSServiceResult - nil, // 6: management.v1.AddRDSServiceParams.CustomLabelsEntry - (MetricsMode)(0), // 7: management.v1.MetricsMode - (*v1.RemoteRDSNode)(nil), // 8: inventory.v1.RemoteRDSNode - (*v1.RDSExporter)(nil), // 9: inventory.v1.RDSExporter - (*v1.MySQLService)(nil), // 10: inventory.v1.MySQLService - (*v1.MySQLdExporter)(nil), // 11: inventory.v1.MySQLdExporter - (*v1.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.v1.QANMySQLPerfSchemaAgent - (*v1.PostgreSQLService)(nil), // 13: inventory.v1.PostgreSQLService - (*v1.PostgresExporter)(nil), // 14: inventory.v1.PostgresExporter - (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.v1.QANPostgreSQLPgStatementsAgent - } -) - +var file_management_v1_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_management_v1_rds_proto_goTypes = []any{ + (DiscoverRDSEngine)(0), // 0: management.v1.DiscoverRDSEngine + (*DiscoverRDSInstance)(nil), // 1: management.v1.DiscoverRDSInstance + (*DiscoverRDSRequest)(nil), // 2: management.v1.DiscoverRDSRequest + (*DiscoverRDSResponse)(nil), // 3: management.v1.DiscoverRDSResponse + (*AddRDSServiceParams)(nil), // 4: management.v1.AddRDSServiceParams + (*RDSServiceResult)(nil), // 5: management.v1.RDSServiceResult + nil, // 6: management.v1.AddRDSServiceParams.CustomLabelsEntry + (MetricsMode)(0), // 7: management.v1.MetricsMode + (*v1.RemoteRDSNode)(nil), // 8: inventory.v1.RemoteRDSNode + (*v1.RDSExporter)(nil), // 9: inventory.v1.RDSExporter + (*v1.MySQLService)(nil), // 10: inventory.v1.MySQLService + (*v1.MySQLdExporter)(nil), // 11: inventory.v1.MySQLdExporter + (*v1.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.v1.QANMySQLPerfSchemaAgent + (*v1.PostgreSQLService)(nil), // 13: inventory.v1.PostgreSQLService + (*v1.PostgresExporter)(nil), // 14: inventory.v1.PostgresExporter + (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.v1.QANPostgreSQLPgStatementsAgent +} var file_management_v1_rds_proto_depIdxs = []int32{ 0, // 0: management.v1.DiscoverRDSInstance.engine:type_name -> management.v1.DiscoverRDSEngine 1, // 1: management.v1.DiscoverRDSResponse.rds_instances:type_name -> management.v1.DiscoverRDSInstance diff --git a/api/management/v1/service.pb.go b/api/management/v1/service.pb.go index d3b46ad63b..90623dc839 100644 --- a/api/management/v1/service.pb.go +++ b/api/management/v1/service.pb.go @@ -7,16 +7,14 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -1151,59 +1149,56 @@ func file_management_v1_service_proto_rawDescGZIP() []byte { return file_management_v1_service_proto_rawDescData } -var ( - file_management_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_management_v1_service_proto_goTypes = []any{ - (UniversalService_Status)(0), // 0: management.v1.UniversalService.Status - (*AddServiceRequest)(nil), // 1: management.v1.AddServiceRequest - (*AddServiceResponse)(nil), // 2: management.v1.AddServiceResponse - (*RemoveServiceRequest)(nil), // 3: management.v1.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 4: management.v1.RemoveServiceResponse - (*UniversalService)(nil), // 5: management.v1.UniversalService - (*ListServicesRequest)(nil), // 6: management.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 7: management.v1.ListServicesResponse - nil, // 8: management.v1.UniversalService.CustomLabelsEntry - (*AddMySQLServiceParams)(nil), // 9: management.v1.AddMySQLServiceParams - (*AddMongoDBServiceParams)(nil), // 10: management.v1.AddMongoDBServiceParams - (*AddPostgreSQLServiceParams)(nil), // 11: management.v1.AddPostgreSQLServiceParams - (*AddProxySQLServiceParams)(nil), // 12: management.v1.AddProxySQLServiceParams - (*AddHAProxyServiceParams)(nil), // 13: management.v1.AddHAProxyServiceParams - (*AddExternalServiceParams)(nil), // 14: management.v1.AddExternalServiceParams - (*AddRDSServiceParams)(nil), // 15: management.v1.AddRDSServiceParams - (*MySQLServiceResult)(nil), // 16: management.v1.MySQLServiceResult - (*MongoDBServiceResult)(nil), // 17: management.v1.MongoDBServiceResult - (*PostgreSQLServiceResult)(nil), // 18: management.v1.PostgreSQLServiceResult - (*ProxySQLServiceResult)(nil), // 19: management.v1.ProxySQLServiceResult - (*HAProxyServiceResult)(nil), // 20: management.v1.HAProxyServiceResult - (*ExternalServiceResult)(nil), // 21: management.v1.ExternalServiceResult - (*RDSServiceResult)(nil), // 22: management.v1.RDSServiceResult - (v1.ServiceType)(0), // 23: inventory.v1.ServiceType - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*UniversalAgent)(nil), // 25: management.v1.UniversalAgent - (*AddAnnotationRequest)(nil), // 26: management.v1.AddAnnotationRequest - (*ListAgentsRequest)(nil), // 27: management.v1.ListAgentsRequest - (*ListAgentVersionsRequest)(nil), // 28: management.v1.ListAgentVersionsRequest - (*RegisterNodeRequest)(nil), // 29: management.v1.RegisterNodeRequest - (*UnregisterNodeRequest)(nil), // 30: management.v1.UnregisterNodeRequest - (*ListNodesRequest)(nil), // 31: management.v1.ListNodesRequest - (*GetNodeRequest)(nil), // 32: management.v1.GetNodeRequest - (*DiscoverRDSRequest)(nil), // 33: management.v1.DiscoverRDSRequest - (*DiscoverAzureDatabaseRequest)(nil), // 34: management.v1.DiscoverAzureDatabaseRequest - (*AddAzureDatabaseRequest)(nil), // 35: management.v1.AddAzureDatabaseRequest - (*AddAnnotationResponse)(nil), // 36: management.v1.AddAnnotationResponse - (*ListAgentsResponse)(nil), // 37: management.v1.ListAgentsResponse - (*ListAgentVersionsResponse)(nil), // 38: management.v1.ListAgentVersionsResponse - (*RegisterNodeResponse)(nil), // 39: management.v1.RegisterNodeResponse - (*UnregisterNodeResponse)(nil), // 40: management.v1.UnregisterNodeResponse - (*ListNodesResponse)(nil), // 41: management.v1.ListNodesResponse - (*GetNodeResponse)(nil), // 42: management.v1.GetNodeResponse - (*DiscoverRDSResponse)(nil), // 43: management.v1.DiscoverRDSResponse - (*DiscoverAzureDatabaseResponse)(nil), // 44: management.v1.DiscoverAzureDatabaseResponse - (*AddAzureDatabaseResponse)(nil), // 45: management.v1.AddAzureDatabaseResponse - } -) - +var file_management_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_management_v1_service_proto_goTypes = []any{ + (UniversalService_Status)(0), // 0: management.v1.UniversalService.Status + (*AddServiceRequest)(nil), // 1: management.v1.AddServiceRequest + (*AddServiceResponse)(nil), // 2: management.v1.AddServiceResponse + (*RemoveServiceRequest)(nil), // 3: management.v1.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 4: management.v1.RemoveServiceResponse + (*UniversalService)(nil), // 5: management.v1.UniversalService + (*ListServicesRequest)(nil), // 6: management.v1.ListServicesRequest + (*ListServicesResponse)(nil), // 7: management.v1.ListServicesResponse + nil, // 8: management.v1.UniversalService.CustomLabelsEntry + (*AddMySQLServiceParams)(nil), // 9: management.v1.AddMySQLServiceParams + (*AddMongoDBServiceParams)(nil), // 10: management.v1.AddMongoDBServiceParams + (*AddPostgreSQLServiceParams)(nil), // 11: management.v1.AddPostgreSQLServiceParams + (*AddProxySQLServiceParams)(nil), // 12: management.v1.AddProxySQLServiceParams + (*AddHAProxyServiceParams)(nil), // 13: management.v1.AddHAProxyServiceParams + (*AddExternalServiceParams)(nil), // 14: management.v1.AddExternalServiceParams + (*AddRDSServiceParams)(nil), // 15: management.v1.AddRDSServiceParams + (*MySQLServiceResult)(nil), // 16: management.v1.MySQLServiceResult + (*MongoDBServiceResult)(nil), // 17: management.v1.MongoDBServiceResult + (*PostgreSQLServiceResult)(nil), // 18: management.v1.PostgreSQLServiceResult + (*ProxySQLServiceResult)(nil), // 19: management.v1.ProxySQLServiceResult + (*HAProxyServiceResult)(nil), // 20: management.v1.HAProxyServiceResult + (*ExternalServiceResult)(nil), // 21: management.v1.ExternalServiceResult + (*RDSServiceResult)(nil), // 22: management.v1.RDSServiceResult + (v1.ServiceType)(0), // 23: inventory.v1.ServiceType + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*UniversalAgent)(nil), // 25: management.v1.UniversalAgent + (*AddAnnotationRequest)(nil), // 26: management.v1.AddAnnotationRequest + (*ListAgentsRequest)(nil), // 27: management.v1.ListAgentsRequest + (*ListAgentVersionsRequest)(nil), // 28: management.v1.ListAgentVersionsRequest + (*RegisterNodeRequest)(nil), // 29: management.v1.RegisterNodeRequest + (*UnregisterNodeRequest)(nil), // 30: management.v1.UnregisterNodeRequest + (*ListNodesRequest)(nil), // 31: management.v1.ListNodesRequest + (*GetNodeRequest)(nil), // 32: management.v1.GetNodeRequest + (*DiscoverRDSRequest)(nil), // 33: management.v1.DiscoverRDSRequest + (*DiscoverAzureDatabaseRequest)(nil), // 34: management.v1.DiscoverAzureDatabaseRequest + (*AddAzureDatabaseRequest)(nil), // 35: management.v1.AddAzureDatabaseRequest + (*AddAnnotationResponse)(nil), // 36: management.v1.AddAnnotationResponse + (*ListAgentsResponse)(nil), // 37: management.v1.ListAgentsResponse + (*ListAgentVersionsResponse)(nil), // 38: management.v1.ListAgentVersionsResponse + (*RegisterNodeResponse)(nil), // 39: management.v1.RegisterNodeResponse + (*UnregisterNodeResponse)(nil), // 40: management.v1.UnregisterNodeResponse + (*ListNodesResponse)(nil), // 41: management.v1.ListNodesResponse + (*GetNodeResponse)(nil), // 42: management.v1.GetNodeResponse + (*DiscoverRDSResponse)(nil), // 43: management.v1.DiscoverRDSResponse + (*DiscoverAzureDatabaseResponse)(nil), // 44: management.v1.DiscoverAzureDatabaseResponse + (*AddAzureDatabaseResponse)(nil), // 45: management.v1.AddAzureDatabaseResponse +} var file_management_v1_service_proto_depIdxs = []int32{ 9, // 0: management.v1.AddServiceRequest.mysql:type_name -> management.v1.AddMySQLServiceParams 10, // 1: management.v1.AddServiceRequest.mongodb:type_name -> management.v1.AddMongoDBServiceParams diff --git a/api/management/v1/service.pb.gw.go b/api/management/v1/service.pb.gw.go index b71f27c3f6..1c029ecf7f 100644 --- a/api/management/v1/service.pb.gw.go +++ b/api/management/v1/service.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_ManagementService_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddAnnotationRequest @@ -43,6 +41,7 @@ func request_ManagementService_AddAnnotation_0(ctx context.Context, marshaler ru msg, err := client.AddAnnotation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -55,9 +54,12 @@ func local_request_ManagementService_AddAnnotation_0(ctx context.Context, marsha msg, err := server.AddAnnotation(ctx, &protoReq) return msg, metadata, err + } -var filter_ManagementService_ListAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_ManagementService_ListAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_ManagementService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAgentsRequest @@ -72,6 +74,7 @@ func request_ManagementService_ListAgents_0(ctx context.Context, marshaler runti msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -87,6 +90,7 @@ func local_request_ManagementService_ListAgents_0(ctx context.Context, marshaler msg, err := server.ListAgents(ctx, &protoReq) return msg, metadata, err + } func request_ManagementService_ListAgentVersions_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +99,7 @@ func request_ManagementService_ListAgentVersions_0(ctx context.Context, marshale msg, err := client.ListAgentVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_ListAgentVersions_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -103,6 +108,7 @@ func local_request_ManagementService_ListAgentVersions_0(ctx context.Context, ma msg, err := server.ListAgentVersions(ctx, &protoReq) return msg, metadata, err + } func request_ManagementService_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -115,6 +121,7 @@ func request_ManagementService_RegisterNode_0(ctx context.Context, marshaler run msg, err := client.RegisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,9 +134,12 @@ func local_request_ManagementService_RegisterNode_0(ctx context.Context, marshal msg, err := server.RegisterNode(ctx, &protoReq) return msg, metadata, err + } -var filter_ManagementService_UnregisterNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_ManagementService_UnregisterNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_ManagementService_UnregisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnregisterNodeRequest @@ -161,6 +171,7 @@ func request_ManagementService_UnregisterNode_0(ctx context.Context, marshaler r msg, err := client.UnregisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_UnregisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -193,9 +204,12 @@ func local_request_ManagementService_UnregisterNode_0(ctx context.Context, marsh msg, err := server.UnregisterNode(ctx, &protoReq) return msg, metadata, err + } -var filter_ManagementService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_ManagementService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_ManagementService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodesRequest @@ -210,6 +224,7 @@ func request_ManagementService_ListNodes_0(ctx context.Context, marshaler runtim msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -225,6 +240,7 @@ func local_request_ManagementService_ListNodes_0(ctx context.Context, marshaler msg, err := server.ListNodes(ctx, &protoReq) return msg, metadata, err + } func request_ManagementService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -250,6 +266,7 @@ func request_ManagementService_GetNode_0(ctx context.Context, marshaler runtime. msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -275,6 +292,7 @@ func local_request_ManagementService_GetNode_0(ctx context.Context, marshaler ru msg, err := server.GetNode(ctx, &protoReq) return msg, metadata, err + } func request_ManagementService_AddService_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -287,6 +305,7 @@ func request_ManagementService_AddService_0(ctx context.Context, marshaler runti msg, err := client.AddService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_AddService_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -299,9 +318,12 @@ func local_request_ManagementService_AddService_0(ctx context.Context, marshaler msg, err := server.AddService(ctx, &protoReq) return msg, metadata, err + } -var filter_ManagementService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_ManagementService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_ManagementService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListServicesRequest @@ -316,6 +338,7 @@ func request_ManagementService_ListServices_0(ctx context.Context, marshaler run msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -331,6 +354,7 @@ func local_request_ManagementService_ListServices_0(ctx context.Context, marshal msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err + } func request_ManagementService_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -343,6 +367,7 @@ func request_ManagementService_DiscoverRDS_0(ctx context.Context, marshaler runt msg, err := client.DiscoverRDS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -355,6 +380,7 @@ func local_request_ManagementService_DiscoverRDS_0(ctx context.Context, marshale msg, err := server.DiscoverRDS(ctx, &protoReq) return msg, metadata, err + } func request_ManagementService_DiscoverAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -367,6 +393,7 @@ func request_ManagementService_DiscoverAzureDatabase_0(ctx context.Context, mars msg, err := client.DiscoverAzureDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_DiscoverAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -379,6 +406,7 @@ func local_request_ManagementService_DiscoverAzureDatabase_0(ctx context.Context msg, err := server.DiscoverAzureDatabase(ctx, &protoReq) return msg, metadata, err + } func request_ManagementService_AddAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -391,6 +419,7 @@ func request_ManagementService_AddAzureDatabase_0(ctx context.Context, marshaler msg, err := client.AddAzureDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_AddAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -403,9 +432,12 @@ func local_request_ManagementService_AddAzureDatabase_0(ctx context.Context, mar msg, err := server.AddAzureDatabase(ctx, &protoReq) return msg, metadata, err + } -var filter_ManagementService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_ManagementService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_ManagementService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveServiceRequest @@ -437,6 +469,7 @@ func request_ManagementService_RemoveService_0(ctx context.Context, marshaler ru msg, err := client.RemoveService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ManagementService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -469,6 +502,7 @@ func local_request_ManagementService_RemoveService_0(ctx context.Context, marsha msg, err := server.RemoveService(ctx, &protoReq) return msg, metadata, err + } // RegisterManagementServiceHandlerServer registers the http handlers for service ManagementService to "mux". @@ -477,6 +511,7 @@ func local_request_ManagementService_RemoveService_0(ctx context.Context, marsha // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterManagementServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ManagementServiceServer) error { + mux.Handle("POST", pattern_ManagementService_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -499,6 +534,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -523,6 +559,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_ListAgentVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -547,6 +584,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListAgentVersions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -571,6 +609,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_ManagementService_UnregisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -595,6 +634,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_UnregisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -619,6 +659,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -643,6 +684,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -667,6 +709,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -691,6 +734,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_DiscoverRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -715,6 +759,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_DiscoverRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_DiscoverAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -739,6 +784,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_DiscoverAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_AddAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -763,6 +809,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -787,6 +834,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -829,6 +877,7 @@ func RegisterManagementServiceHandler(ctx context.Context, mux *runtime.ServeMux // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ManagementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ManagementServiceClient) error { + mux.Handle("POST", pattern_ManagementService_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -848,6 +897,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -869,6 +919,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_ListAgentVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -890,6 +941,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListAgentVersions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -911,6 +963,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_ManagementService_UnregisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -932,6 +985,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_UnregisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -953,6 +1007,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -974,6 +1029,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -995,6 +1051,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ManagementService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1016,6 +1073,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_DiscoverRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1037,6 +1095,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_DiscoverRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_DiscoverAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1058,6 +1117,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_DiscoverAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ManagementService_AddAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1079,6 +1139,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("DELETE", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1100,6 +1161,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/management/v1/service_grpc.pb.go b/api/management/v1/service_grpc.pb.go index 476fd197e4..1d2237fe83 100644 --- a/api/management/v1/service_grpc.pb.go +++ b/api/management/v1/service_grpc.pb.go @@ -8,7 +8,6 @@ package managementv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -252,51 +251,39 @@ type UnimplementedManagementServiceServer struct{} func (UnimplementedManagementServiceServer) AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAnnotation not implemented") } - func (UnimplementedManagementServiceServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") } - func (UnimplementedManagementServiceServer) ListAgentVersions(context.Context, *ListAgentVersionsRequest) (*ListAgentVersionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgentVersions not implemented") } - func (UnimplementedManagementServiceServer) RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented") } - func (UnimplementedManagementServiceServer) UnregisterNode(context.Context, *UnregisterNodeRequest) (*UnregisterNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnregisterNode not implemented") } - func (UnimplementedManagementServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } - func (UnimplementedManagementServiceServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") } - func (UnimplementedManagementServiceServer) AddService(context.Context, *AddServiceRequest) (*AddServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented") } - func (UnimplementedManagementServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") } - func (UnimplementedManagementServiceServer) DiscoverRDS(context.Context, *DiscoverRDSRequest) (*DiscoverRDSResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DiscoverRDS not implemented") } - func (UnimplementedManagementServiceServer) DiscoverAzureDatabase(context.Context, *DiscoverAzureDatabaseRequest) (*DiscoverAzureDatabaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DiscoverAzureDatabase not implemented") } - func (UnimplementedManagementServiceServer) AddAzureDatabase(context.Context, *AddAzureDatabaseRequest) (*AddAzureDatabaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAzureDatabase not implemented") } - func (UnimplementedManagementServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") } diff --git a/api/management/v1/severity.pb.go b/api/management/v1/severity.pb.go index 5701f74476..e98b2bce61 100644 --- a/api/management/v1/severity.pb.go +++ b/api/management/v1/severity.pb.go @@ -7,11 +7,10 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -134,13 +133,10 @@ func file_management_v1_severity_proto_rawDescGZIP() []byte { return file_management_v1_severity_proto_rawDescData } -var ( - file_management_v1_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_severity_proto_goTypes = []any{ - (Severity)(0), // 0: management.v1.Severity - } -) - +var file_management_v1_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_severity_proto_goTypes = []any{ + (Severity)(0), // 0: management.v1.Severity +} var file_management_v1_severity_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/platform/v1/json/client/platform_service/connect_parameters.go b/api/platform/v1/json/client/platform_service/connect_parameters.go index 9c19eb64d1..22fbf3bda7 100644 --- a/api/platform/v1/json/client/platform_service/connect_parameters.go +++ b/api/platform/v1/json/client/platform_service/connect_parameters.go @@ -60,6 +60,7 @@ ConnectParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ConnectParams struct { + // Body. Body ConnectBody @@ -129,6 +130,7 @@ func (o *ConnectParams) SetBody(body ConnectBody) { // WriteToRequest writes these params to a swagger request func (o *ConnectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/connect_responses.go b/api/platform/v1/json/client/platform_service/connect_responses.go index 078c378f0e..dc9fb1bba9 100644 --- a/api/platform/v1/json/client/platform_service/connect_responses.go +++ b/api/platform/v1/json/client/platform_service/connect_responses.go @@ -103,6 +103,7 @@ func (o *ConnectOK) GetPayload() interface{} { } func (o *ConnectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *ConnectDefault) GetPayload() *ConnectDefaultBody { } func (o *ConnectDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ConnectDefaultBody) // response payload @@ -189,6 +191,7 @@ ConnectBody connect body swagger:model ConnectBody */ type ConnectBody struct { + // User defined human readable PMM Server Name. ServerName string `json:"server_name,omitempty"` @@ -229,6 +232,7 @@ ConnectDefaultBody connect default body swagger:model ConnectDefaultBody */ type ConnectDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -294,7 +298,9 @@ func (o *ConnectDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ConnectDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -310,6 +316,7 @@ func (o *ConnectDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -338,6 +345,7 @@ ConnectDefaultBodyDetailsItems0 connect default body details items0 swagger:model ConnectDefaultBodyDetailsItems0 */ type ConnectDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -349,6 +357,7 @@ type ConnectDefaultBodyDetailsItems0 struct { func (o *ConnectDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -386,6 +395,7 @@ func (o *ConnectDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ConnectDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/platform/v1/json/client/platform_service/disconnect_parameters.go b/api/platform/v1/json/client/platform_service/disconnect_parameters.go index b8a19f5972..58be82dbfd 100644 --- a/api/platform/v1/json/client/platform_service/disconnect_parameters.go +++ b/api/platform/v1/json/client/platform_service/disconnect_parameters.go @@ -60,6 +60,7 @@ DisconnectParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DisconnectParams struct { + // Body. Body DisconnectBody @@ -129,6 +130,7 @@ func (o *DisconnectParams) SetBody(body DisconnectBody) { // WriteToRequest writes these params to a swagger request func (o *DisconnectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/disconnect_responses.go b/api/platform/v1/json/client/platform_service/disconnect_responses.go index 210eafa639..7e2c2b93cc 100644 --- a/api/platform/v1/json/client/platform_service/disconnect_responses.go +++ b/api/platform/v1/json/client/platform_service/disconnect_responses.go @@ -103,6 +103,7 @@ func (o *DisconnectOK) GetPayload() interface{} { } func (o *DisconnectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *DisconnectDefault) GetPayload() *DisconnectDefaultBody { } func (o *DisconnectDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DisconnectDefaultBody) // response payload @@ -189,6 +191,7 @@ DisconnectBody disconnect body swagger:model DisconnectBody */ type DisconnectBody struct { + // Forces the cleanup process for connected PMM instances regardless of the Portal API response Force bool `json:"force,omitempty"` } @@ -226,6 +229,7 @@ DisconnectDefaultBody disconnect default body swagger:model DisconnectDefaultBody */ type DisconnectDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -291,7 +295,9 @@ func (o *DisconnectDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DisconnectDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -307,6 +313,7 @@ func (o *DisconnectDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -335,6 +342,7 @@ DisconnectDefaultBodyDetailsItems0 disconnect default body details items0 swagger:model DisconnectDefaultBodyDetailsItems0 */ type DisconnectDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -346,6 +354,7 @@ type DisconnectDefaultBodyDetailsItems0 struct { func (o *DisconnectDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -383,6 +392,7 @@ func (o *DisconnectDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DisconnectDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go b/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go index 5f1da0f329..8c907dc1d9 100644 --- a/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go +++ b/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go @@ -115,6 +115,7 @@ func (o *GetContactInformationParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetContactInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/get_contact_information_responses.go b/api/platform/v1/json/client/platform_service/get_contact_information_responses.go index 048cac1845..5840df9484 100644 --- a/api/platform/v1/json/client/platform_service/get_contact_information_responses.go +++ b/api/platform/v1/json/client/platform_service/get_contact_information_responses.go @@ -103,6 +103,7 @@ func (o *GetContactInformationOK) GetPayload() *GetContactInformationOKBody { } func (o *GetContactInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetContactInformationOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetContactInformationDefault) GetPayload() *GetContactInformationDefaul } func (o *GetContactInformationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetContactInformationDefaultBody) // response payload @@ -191,6 +193,7 @@ GetContactInformationDefaultBody get contact information default body swagger:model GetContactInformationDefaultBody */ type GetContactInformationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetContactInformationDefaultBody) ContextValidate(ctx context.Context, } func (o *GetContactInformationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetContactInformationDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -300,6 +306,7 @@ GetContactInformationDefaultBodyDetailsItems0 get contact information default bo swagger:model GetContactInformationDefaultBodyDetailsItems0 */ type GetContactInformationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetContactInformationDefaultBodyDetailsItems0 struct { func (o *GetContactInformationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetContactInformationDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o GetContactInformationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetContactInformationOKBody get contact information OK body swagger:model GetContactInformationOKBody */ type GetContactInformationOKBody struct { + // URL to open a new support ticket. NewTicketURL string `json:"new_ticket_url,omitempty"` @@ -466,6 +476,7 @@ func (o *GetContactInformationOKBody) ContextValidate(ctx context.Context, forma } func (o *GetContactInformationOKBody) contextValidateCustomerSuccess(ctx context.Context, formats strfmt.Registry) error { + if o.CustomerSuccess != nil { if swag.IsZero(o.CustomerSuccess) { // not required @@ -508,6 +519,7 @@ GetContactInformationOKBodyCustomerSuccess CustomerSuccess contains the contanct swagger:model GetContactInformationOKBodyCustomerSuccess */ type GetContactInformationOKBodyCustomerSuccess struct { + // name Name string `json:"name,omitempty"` diff --git a/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go b/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go index a63841d674..6590caf39d 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go +++ b/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go @@ -115,6 +115,7 @@ func (o *SearchOrganizationEntitlementsParams) SetHTTPClient(client *http.Client // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationEntitlementsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go b/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go index eabef9309b..6e18d49e0e 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go +++ b/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go @@ -104,6 +104,7 @@ func (o *SearchOrganizationEntitlementsOK) GetPayload() *SearchOrganizationEntit } func (o *SearchOrganizationEntitlementsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchOrganizationEntitlementsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *SearchOrganizationEntitlementsDefault) GetPayload() *SearchOrganization } func (o *SearchOrganizationEntitlementsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchOrganizationEntitlementsDefaultBody) // response payload @@ -192,6 +194,7 @@ SearchOrganizationEntitlementsDefaultBody search organization entitlements defau swagger:model SearchOrganizationEntitlementsDefaultBody */ type SearchOrganizationEntitlementsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *SearchOrganizationEntitlementsDefaultBody) ContextValidate(ctx context. } func (o *SearchOrganizationEntitlementsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *SearchOrganizationEntitlementsDefaultBody) contextValidateDetails(ctx c return err } } + } return nil @@ -301,6 +307,7 @@ SearchOrganizationEntitlementsDefaultBodyDetailsItems0 search organization entit swagger:model SearchOrganizationEntitlementsDefaultBodyDetailsItems0 */ type SearchOrganizationEntitlementsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type SearchOrganizationEntitlementsDefaultBodyDetailsItems0 struct { func (o *SearchOrganizationEntitlementsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *SearchOrganizationEntitlementsDefaultBodyDetailsItems0) UnmarshalJSON(d // MarshalJSON marshals this object with additional properties into a JSON object func (o SearchOrganizationEntitlementsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ SearchOrganizationEntitlementsOKBody search organization entitlements OK body swagger:model SearchOrganizationEntitlementsOKBody */ type SearchOrganizationEntitlementsOKBody struct { + // entitlements Entitlements []*SearchOrganizationEntitlementsOKBodyEntitlementsItems0 `json:"entitlements"` } @@ -471,7 +481,9 @@ func (o *SearchOrganizationEntitlementsOKBody) ContextValidate(ctx context.Conte } func (o *SearchOrganizationEntitlementsOKBody) contextValidateEntitlements(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Entitlements); i++ { + if o.Entitlements[i] != nil { if swag.IsZero(o.Entitlements[i]) { // not required @@ -487,6 +499,7 @@ func (o *SearchOrganizationEntitlementsOKBody) contextValidateEntitlements(ctx c return err } } + } return nil @@ -515,6 +528,7 @@ SearchOrganizationEntitlementsOKBodyEntitlementsItems0 OrganizationEntitlement c swagger:model SearchOrganizationEntitlementsOKBodyEntitlementsItems0 */ type SearchOrganizationEntitlementsOKBodyEntitlementsItems0 struct { + // Entitlement number. Number string `json:"number,omitempty"` @@ -633,6 +647,7 @@ func (o *SearchOrganizationEntitlementsOKBodyEntitlementsItems0) ContextValidate } func (o *SearchOrganizationEntitlementsOKBodyEntitlementsItems0) contextValidatePlatform(ctx context.Context, formats strfmt.Registry) error { + if o.Platform != nil { if swag.IsZero(o.Platform) { // not required @@ -675,6 +690,7 @@ SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform Platform indicate swagger:model SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform */ type SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform struct { + // Flag indicates that security advisors are covered by this entitlement. SecurityAdvisor *string `json:"security_advisor,omitempty"` diff --git a/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go b/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go index b86868b75f..901e457f2a 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go +++ b/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go @@ -115,6 +115,7 @@ func (o *SearchOrganizationTicketsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationTicketsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go b/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go index dc9d57f422..06cf0bb794 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go +++ b/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go @@ -104,6 +104,7 @@ func (o *SearchOrganizationTicketsOK) GetPayload() *SearchOrganizationTicketsOKB } func (o *SearchOrganizationTicketsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchOrganizationTicketsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *SearchOrganizationTicketsDefault) GetPayload() *SearchOrganizationTicke } func (o *SearchOrganizationTicketsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchOrganizationTicketsDefaultBody) // response payload @@ -192,6 +194,7 @@ SearchOrganizationTicketsDefaultBody search organization tickets default body swagger:model SearchOrganizationTicketsDefaultBody */ type SearchOrganizationTicketsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *SearchOrganizationTicketsDefaultBody) ContextValidate(ctx context.Conte } func (o *SearchOrganizationTicketsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *SearchOrganizationTicketsDefaultBody) contextValidateDetails(ctx contex return err } } + } return nil @@ -301,6 +307,7 @@ SearchOrganizationTicketsDefaultBodyDetailsItems0 search organization tickets de swagger:model SearchOrganizationTicketsDefaultBodyDetailsItems0 */ type SearchOrganizationTicketsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -312,6 +319,7 @@ type SearchOrganizationTicketsDefaultBodyDetailsItems0 struct { func (o *SearchOrganizationTicketsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -349,6 +357,7 @@ func (o *SearchOrganizationTicketsDefaultBodyDetailsItems0) UnmarshalJSON(data [ // MarshalJSON marshals this object with additional properties into a JSON object func (o SearchOrganizationTicketsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -412,6 +421,7 @@ SearchOrganizationTicketsOKBody search organization tickets OK body swagger:model SearchOrganizationTicketsOKBody */ type SearchOrganizationTicketsOKBody struct { + // Support tickets belonging to the Percona Portal Organization. Tickets []*SearchOrganizationTicketsOKBodyTicketsItems0 `json:"tickets"` } @@ -471,7 +481,9 @@ func (o *SearchOrganizationTicketsOKBody) ContextValidate(ctx context.Context, f } func (o *SearchOrganizationTicketsOKBody) contextValidateTickets(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Tickets); i++ { + if o.Tickets[i] != nil { if swag.IsZero(o.Tickets[i]) { // not required @@ -487,6 +499,7 @@ func (o *SearchOrganizationTicketsOKBody) contextValidateTickets(ctx context.Con return err } } + } return nil @@ -515,6 +528,7 @@ SearchOrganizationTicketsOKBodyTicketsItems0 OrganizationTicket contains informa swagger:model SearchOrganizationTicketsOKBodyTicketsItems0 */ type SearchOrganizationTicketsOKBodyTicketsItems0 struct { + // Ticket number. Number string `json:"number,omitempty"` diff --git a/api/platform/v1/json/client/platform_service/server_info_parameters.go b/api/platform/v1/json/client/platform_service/server_info_parameters.go index 3dbeb11371..5dac32f83d 100644 --- a/api/platform/v1/json/client/platform_service/server_info_parameters.go +++ b/api/platform/v1/json/client/platform_service/server_info_parameters.go @@ -115,6 +115,7 @@ func (o *ServerInfoParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ServerInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/server_info_responses.go b/api/platform/v1/json/client/platform_service/server_info_responses.go index 10d6d12ff4..9cc51b5d42 100644 --- a/api/platform/v1/json/client/platform_service/server_info_responses.go +++ b/api/platform/v1/json/client/platform_service/server_info_responses.go @@ -103,6 +103,7 @@ func (o *ServerInfoOK) GetPayload() *ServerInfoOKBody { } func (o *ServerInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ServerInfoOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ServerInfoDefault) GetPayload() *ServerInfoDefaultBody { } func (o *ServerInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ServerInfoDefaultBody) // response payload @@ -191,6 +193,7 @@ ServerInfoDefaultBody server info default body swagger:model ServerInfoDefaultBody */ type ServerInfoDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *ServerInfoDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ServerInfoDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *ServerInfoDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -300,6 +306,7 @@ ServerInfoDefaultBodyDetailsItems0 server info default body details items0 swagger:model ServerInfoDefaultBodyDetailsItems0 */ type ServerInfoDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type ServerInfoDefaultBodyDetailsItems0 struct { func (o *ServerInfoDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *ServerInfoDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ServerInfoDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ ServerInfoOKBody server info OK body swagger:model ServerInfoOKBody */ type ServerInfoOKBody struct { + // pmm server name PMMServerName string `json:"pmm_server_name,omitempty"` diff --git a/api/platform/v1/json/client/platform_service/user_status_parameters.go b/api/platform/v1/json/client/platform_service/user_status_parameters.go index ea2a62482d..0a00f1925b 100644 --- a/api/platform/v1/json/client/platform_service/user_status_parameters.go +++ b/api/platform/v1/json/client/platform_service/user_status_parameters.go @@ -115,6 +115,7 @@ func (o *UserStatusParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *UserStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/user_status_responses.go b/api/platform/v1/json/client/platform_service/user_status_responses.go index 1cfe76a4d0..95117fb73a 100644 --- a/api/platform/v1/json/client/platform_service/user_status_responses.go +++ b/api/platform/v1/json/client/platform_service/user_status_responses.go @@ -103,6 +103,7 @@ func (o *UserStatusOK) GetPayload() *UserStatusOKBody { } func (o *UserStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UserStatusOKBody) // response payload @@ -176,6 +177,7 @@ func (o *UserStatusDefault) GetPayload() *UserStatusDefaultBody { } func (o *UserStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UserStatusDefaultBody) // response payload @@ -191,6 +193,7 @@ UserStatusDefaultBody user status default body swagger:model UserStatusDefaultBody */ type UserStatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *UserStatusDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UserStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *UserStatusDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -300,6 +306,7 @@ UserStatusDefaultBodyDetailsItems0 user status default body details items0 swagger:model UserStatusDefaultBodyDetailsItems0 */ type UserStatusDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type UserStatusDefaultBodyDetailsItems0 struct { func (o *UserStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *UserStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UserStatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ UserStatusOKBody user status OK body swagger:model UserStatusOKBody */ type UserStatusOKBody struct { + // is platform user IsPlatformUser bool `json:"is_platform_user,omitempty"` } diff --git a/api/platform/v1/platform.pb.go b/api/platform/v1/platform.pb.go index c62f94c581..cdcd2e86ba 100644 --- a/api/platform/v1/platform.pb.go +++ b/api/platform/v1/platform.pb.go @@ -7,15 +7,14 @@ package platformv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -1285,31 +1284,28 @@ func file_platform_v1_platform_proto_rawDescGZIP() []byte { return file_platform_v1_platform_proto_rawDescData } -var ( - file_platform_v1_platform_proto_msgTypes = make([]protoimpl.MessageInfo, 18) - file_platform_v1_platform_proto_goTypes = []any{ - (*ConnectRequest)(nil), // 0: platform.v1.ConnectRequest - (*ConnectResponse)(nil), // 1: platform.v1.ConnectResponse - (*DisconnectRequest)(nil), // 2: platform.v1.DisconnectRequest - (*DisconnectResponse)(nil), // 3: platform.v1.DisconnectResponse - (*SearchOrganizationTicketsRequest)(nil), // 4: platform.v1.SearchOrganizationTicketsRequest - (*SearchOrganizationTicketsResponse)(nil), // 5: platform.v1.SearchOrganizationTicketsResponse - (*OrganizationTicket)(nil), // 6: platform.v1.OrganizationTicket - (*SearchOrganizationEntitlementsRequest)(nil), // 7: platform.v1.SearchOrganizationEntitlementsRequest - (*SearchOrganizationEntitlementsResponse)(nil), // 8: platform.v1.SearchOrganizationEntitlementsResponse - (*OrganizationEntitlement)(nil), // 9: platform.v1.OrganizationEntitlement - (*GetContactInformationRequest)(nil), // 10: platform.v1.GetContactInformationRequest - (*GetContactInformationResponse)(nil), // 11: platform.v1.GetContactInformationResponse - (*ServerInfoRequest)(nil), // 12: platform.v1.ServerInfoRequest - (*ServerInfoResponse)(nil), // 13: platform.v1.ServerInfoResponse - (*UserStatusRequest)(nil), // 14: platform.v1.UserStatusRequest - (*UserStatusResponse)(nil), // 15: platform.v1.UserStatusResponse - (*OrganizationEntitlement_Platform)(nil), // 16: platform.v1.OrganizationEntitlement.Platform - (*GetContactInformationResponse_CustomerSuccess)(nil), // 17: platform.v1.GetContactInformationResponse.CustomerSuccess - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp - } -) - +var file_platform_v1_platform_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_platform_v1_platform_proto_goTypes = []any{ + (*ConnectRequest)(nil), // 0: platform.v1.ConnectRequest + (*ConnectResponse)(nil), // 1: platform.v1.ConnectResponse + (*DisconnectRequest)(nil), // 2: platform.v1.DisconnectRequest + (*DisconnectResponse)(nil), // 3: platform.v1.DisconnectResponse + (*SearchOrganizationTicketsRequest)(nil), // 4: platform.v1.SearchOrganizationTicketsRequest + (*SearchOrganizationTicketsResponse)(nil), // 5: platform.v1.SearchOrganizationTicketsResponse + (*OrganizationTicket)(nil), // 6: platform.v1.OrganizationTicket + (*SearchOrganizationEntitlementsRequest)(nil), // 7: platform.v1.SearchOrganizationEntitlementsRequest + (*SearchOrganizationEntitlementsResponse)(nil), // 8: platform.v1.SearchOrganizationEntitlementsResponse + (*OrganizationEntitlement)(nil), // 9: platform.v1.OrganizationEntitlement + (*GetContactInformationRequest)(nil), // 10: platform.v1.GetContactInformationRequest + (*GetContactInformationResponse)(nil), // 11: platform.v1.GetContactInformationResponse + (*ServerInfoRequest)(nil), // 12: platform.v1.ServerInfoRequest + (*ServerInfoResponse)(nil), // 13: platform.v1.ServerInfoResponse + (*UserStatusRequest)(nil), // 14: platform.v1.UserStatusRequest + (*UserStatusResponse)(nil), // 15: platform.v1.UserStatusResponse + (*OrganizationEntitlement_Platform)(nil), // 16: platform.v1.OrganizationEntitlement.Platform + (*GetContactInformationResponse_CustomerSuccess)(nil), // 17: platform.v1.GetContactInformationResponse.CustomerSuccess + (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp +} var file_platform_v1_platform_proto_depIdxs = []int32{ 6, // 0: platform.v1.SearchOrganizationTicketsResponse.tickets:type_name -> platform.v1.OrganizationTicket 18, // 1: platform.v1.OrganizationTicket.create_time:type_name -> google.protobuf.Timestamp diff --git a/api/platform/v1/platform.pb.gw.go b/api/platform/v1/platform.pb.gw.go index 06cfee4c9e..a528eddb52 100644 --- a/api/platform/v1/platform.pb.gw.go +++ b/api/platform/v1/platform.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_PlatformService_Connect_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ConnectRequest @@ -43,6 +41,7 @@ func request_PlatformService_Connect_0(ctx context.Context, marshaler runtime.Ma msg, err := client.Connect(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_PlatformService_Connect_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -55,6 +54,7 @@ func local_request_PlatformService_Connect_0(ctx context.Context, marshaler runt msg, err := server.Connect(ctx, &protoReq) return msg, metadata, err + } func request_PlatformService_Disconnect_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -67,6 +67,7 @@ func request_PlatformService_Disconnect_0(ctx context.Context, marshaler runtime msg, err := client.Disconnect(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_PlatformService_Disconnect_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +80,7 @@ func local_request_PlatformService_Disconnect_0(ctx context.Context, marshaler r msg, err := server.Disconnect(ctx, &protoReq) return msg, metadata, err + } func request_PlatformService_SearchOrganizationTickets_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -87,6 +89,7 @@ func request_PlatformService_SearchOrganizationTickets_0(ctx context.Context, ma msg, err := client.SearchOrganizationTickets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_PlatformService_SearchOrganizationTickets_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,6 +98,7 @@ func local_request_PlatformService_SearchOrganizationTickets_0(ctx context.Conte msg, err := server.SearchOrganizationTickets(ctx, &protoReq) return msg, metadata, err + } func request_PlatformService_SearchOrganizationEntitlements_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -103,6 +107,7 @@ func request_PlatformService_SearchOrganizationEntitlements_0(ctx context.Contex msg, err := client.SearchOrganizationEntitlements(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_PlatformService_SearchOrganizationEntitlements_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -111,6 +116,7 @@ func local_request_PlatformService_SearchOrganizationEntitlements_0(ctx context. msg, err := server.SearchOrganizationEntitlements(ctx, &protoReq) return msg, metadata, err + } func request_PlatformService_GetContactInformation_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -119,6 +125,7 @@ func request_PlatformService_GetContactInformation_0(ctx context.Context, marsha msg, err := client.GetContactInformation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_PlatformService_GetContactInformation_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +134,7 @@ func local_request_PlatformService_GetContactInformation_0(ctx context.Context, msg, err := server.GetContactInformation(ctx, &protoReq) return msg, metadata, err + } func request_PlatformService_ServerInfo_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -135,6 +143,7 @@ func request_PlatformService_ServerInfo_0(ctx context.Context, marshaler runtime msg, err := client.ServerInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_PlatformService_ServerInfo_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +152,7 @@ func local_request_PlatformService_ServerInfo_0(ctx context.Context, marshaler r msg, err := server.ServerInfo(ctx, &protoReq) return msg, metadata, err + } func request_PlatformService_UserStatus_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -151,6 +161,7 @@ func request_PlatformService_UserStatus_0(ctx context.Context, marshaler runtime msg, err := client.UserStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_PlatformService_UserStatus_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -159,6 +170,7 @@ func local_request_PlatformService_UserStatus_0(ctx context.Context, marshaler r msg, err := server.UserStatus(ctx, &protoReq) return msg, metadata, err + } // RegisterPlatformServiceHandlerServer registers the http handlers for service PlatformService to "mux". @@ -167,6 +179,7 @@ func local_request_PlatformService_UserStatus_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPlatformServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PlatformServiceServer) error { + mux.Handle("POST", pattern_PlatformService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -189,6 +202,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_PlatformService_Disconnect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -213,6 +227,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -237,6 +252,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -261,6 +277,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -285,6 +302,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -309,6 +327,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -333,6 +352,7 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_UserStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -375,6 +395,7 @@ func RegisterPlatformServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "PlatformServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PlatformServiceClient) error { + mux.Handle("POST", pattern_PlatformService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -394,6 +415,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_PlatformService_Disconnect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -415,6 +437,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -436,6 +459,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -457,6 +481,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -478,6 +503,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -499,6 +525,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_PlatformService_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -520,6 +547,7 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_UserStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/platform/v1/platform_grpc.pb.go b/api/platform/v1/platform_grpc.pb.go index 42cadaab2d..23bfcdbd5b 100644 --- a/api/platform/v1/platform_grpc.pb.go +++ b/api/platform/v1/platform_grpc.pb.go @@ -8,7 +8,6 @@ package platformv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -162,27 +161,21 @@ type UnimplementedPlatformServiceServer struct{} func (UnimplementedPlatformServiceServer) Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Connect not implemented") } - func (UnimplementedPlatformServiceServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Disconnect not implemented") } - func (UnimplementedPlatformServiceServer) SearchOrganizationTickets(context.Context, *SearchOrganizationTicketsRequest) (*SearchOrganizationTicketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizationTickets not implemented") } - func (UnimplementedPlatformServiceServer) SearchOrganizationEntitlements(context.Context, *SearchOrganizationEntitlementsRequest) (*SearchOrganizationEntitlementsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizationEntitlements not implemented") } - func (UnimplementedPlatformServiceServer) GetContactInformation(context.Context, *GetContactInformationRequest) (*GetContactInformationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetContactInformation not implemented") } - func (UnimplementedPlatformServiceServer) ServerInfo(context.Context, *ServerInfoRequest) (*ServerInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ServerInfo not implemented") } - func (UnimplementedPlatformServiceServer) UserStatus(context.Context, *UserStatusRequest) (*UserStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserStatus not implemented") } diff --git a/api/qan/v1/collector.pb.go b/api/qan/v1/collector.pb.go index 2a2a08ad52..13f3ebd295 100644 --- a/api/qan/v1/collector.pb.go +++ b/api/qan/v1/collector.pb.go @@ -7,14 +7,12 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" ) const ( @@ -2789,20 +2787,17 @@ func file_qan_v1_collector_proto_rawDescGZIP() []byte { return file_qan_v1_collector_proto_rawDescData } -var ( - file_qan_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_qan_v1_collector_proto_goTypes = []any{ - (*CollectRequest)(nil), // 0: qan.v1.CollectRequest - (*MetricsBucket)(nil), // 1: qan.v1.MetricsBucket - (*CollectResponse)(nil), // 2: qan.v1.CollectResponse - nil, // 3: qan.v1.MetricsBucket.LabelsEntry - nil, // 4: qan.v1.MetricsBucket.WarningsEntry - nil, // 5: qan.v1.MetricsBucket.ErrorsEntry - (v1.AgentType)(0), // 6: inventory.v1.AgentType - (ExampleType)(0), // 7: qan.v1.ExampleType - } -) - +var file_qan_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_qan_v1_collector_proto_goTypes = []any{ + (*CollectRequest)(nil), // 0: qan.v1.CollectRequest + (*MetricsBucket)(nil), // 1: qan.v1.MetricsBucket + (*CollectResponse)(nil), // 2: qan.v1.CollectResponse + nil, // 3: qan.v1.MetricsBucket.LabelsEntry + nil, // 4: qan.v1.MetricsBucket.WarningsEntry + nil, // 5: qan.v1.MetricsBucket.ErrorsEntry + (v1.AgentType)(0), // 6: inventory.v1.AgentType + (ExampleType)(0), // 7: qan.v1.ExampleType +} var file_qan_v1_collector_proto_depIdxs = []int32{ 1, // 0: qan.v1.CollectRequest.metrics_bucket:type_name -> qan.v1.MetricsBucket 6, // 1: qan.v1.MetricsBucket.agent_type:type_name -> inventory.v1.AgentType diff --git a/api/qan/v1/collector_grpc.pb.go b/api/qan/v1/collector_grpc.pb.go index 27f7ffbcdd..7434c418cc 100644 --- a/api/qan/v1/collector_grpc.pb.go +++ b/api/qan/v1/collector_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/qan/v1/filters.pb.go b/api/qan/v1/filters.pb.go index 8449e2d557..43e18a957f 100644 --- a/api/qan/v1/filters.pb.go +++ b/api/qan/v1/filters.pb.go @@ -7,12 +7,11 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -317,19 +316,16 @@ func file_qan_v1_filters_proto_rawDescGZIP() []byte { return file_qan_v1_filters_proto_rawDescData } -var ( - file_qan_v1_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) - file_qan_v1_filters_proto_goTypes = []any{ - (*GetFilteredMetricsNamesRequest)(nil), // 0: qan.v1.GetFilteredMetricsNamesRequest - (*GetFilteredMetricsNamesResponse)(nil), // 1: qan.v1.GetFilteredMetricsNamesResponse - (*ListLabels)(nil), // 2: qan.v1.ListLabels - (*Values)(nil), // 3: qan.v1.Values - nil, // 4: qan.v1.GetFilteredMetricsNamesResponse.LabelsEntry - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 6: qan.v1.MapFieldEntry - } -) - +var file_qan_v1_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_qan_v1_filters_proto_goTypes = []any{ + (*GetFilteredMetricsNamesRequest)(nil), // 0: qan.v1.GetFilteredMetricsNamesRequest + (*GetFilteredMetricsNamesResponse)(nil), // 1: qan.v1.GetFilteredMetricsNamesResponse + (*ListLabels)(nil), // 2: qan.v1.ListLabels + (*Values)(nil), // 3: qan.v1.Values + nil, // 4: qan.v1.GetFilteredMetricsNamesResponse.LabelsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 6: qan.v1.MapFieldEntry +} var file_qan_v1_filters_proto_depIdxs = []int32{ 5, // 0: qan.v1.GetFilteredMetricsNamesRequest.period_start_from:type_name -> google.protobuf.Timestamp 5, // 1: qan.v1.GetFilteredMetricsNamesRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go index 5b2c7bf438..0b477d3a71 100644 --- a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go +++ b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go @@ -60,6 +60,7 @@ ExplainFingerprintByQueryIDParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ExplainFingerprintByQueryIDParams struct { + /* Body. ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID. @@ -132,6 +133,7 @@ func (o *ExplainFingerprintByQueryIDParams) SetBody(body ExplainFingerprintByQue // WriteToRequest writes these params to a swagger request func (o *ExplainFingerprintByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go index 49d669294f..671866854f 100644 --- a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go +++ b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go @@ -103,6 +103,7 @@ func (o *ExplainFingerprintByQueryIDOK) GetPayload() *ExplainFingerprintByQueryI } func (o *ExplainFingerprintByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ExplainFingerprintByQueryIDOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ExplainFingerprintByQueryIDDefault) GetPayload() *ExplainFingerprintByQ } func (o *ExplainFingerprintByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ExplainFingerprintByQueryIDDefaultBody) // response payload @@ -191,6 +193,7 @@ ExplainFingerprintByQueryIDBody ExplainFingerprintByQueryIDRequest get explain f swagger:model ExplainFingerprintByQueryIDBody */ type ExplainFingerprintByQueryIDBody struct { + // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -231,6 +234,7 @@ ExplainFingerprintByQueryIDDefaultBody explain fingerprint by query ID default b swagger:model ExplainFingerprintByQueryIDDefaultBody */ type ExplainFingerprintByQueryIDDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) ContextValidate(ctx context.Con } func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -312,6 +318,7 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx cont return err } } + } return nil @@ -340,6 +347,7 @@ ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 explain fingerprint by query swagger:model ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 */ type ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -351,6 +359,7 @@ type ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 struct { func (o *ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -388,6 +397,7 @@ func (o *ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data // MarshalJSON marshals this object with additional properties into a JSON object func (o ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -451,6 +461,7 @@ ExplainFingerprintByQueryIDOKBody ExplainFingerprintByQueryIDResponse is explain swagger:model ExplainFingerprintByQueryIDOKBody */ type ExplainFingerprintByQueryIDOKBody struct { + // explain fingerprint ExplainFingerprint string `json:"explain_fingerprint,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go index 7b377ad61a..14be6f6c2d 100644 --- a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go @@ -60,6 +60,7 @@ GetFilteredMetricsNamesParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type GetFilteredMetricsNamesParams struct { + /* Body. GetFilteredMetricsNamesRequest contains period for which we need filters. @@ -132,6 +133,7 @@ func (o *GetFilteredMetricsNamesParams) SetBody(body GetFilteredMetricsNamesBody // WriteToRequest writes these params to a swagger request func (o *GetFilteredMetricsNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go index 2fa39a5790..ecd318b778 100644 --- a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go +++ b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go @@ -104,6 +104,7 @@ func (o *GetFilteredMetricsNamesOK) GetPayload() *GetFilteredMetricsNamesOKBody } func (o *GetFilteredMetricsNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFilteredMetricsNamesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetFilteredMetricsNamesDefault) GetPayload() *GetFilteredMetricsNamesDe } func (o *GetFilteredMetricsNamesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFilteredMetricsNamesDefaultBody) // response payload @@ -192,6 +194,7 @@ GetFilteredMetricsNamesBody GetFilteredMetricsNamesRequest contains period for w swagger:model GetFilteredMetricsNamesBody */ type GetFilteredMetricsNamesBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -294,7 +297,9 @@ func (o *GetFilteredMetricsNamesBody) ContextValidate(ctx context.Context, forma } func (o *GetFilteredMetricsNamesBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -310,6 +315,7 @@ func (o *GetFilteredMetricsNamesBody) contextValidateLabels(ctx context.Context, return err } } + } return nil @@ -338,6 +344,7 @@ GetFilteredMetricsNamesDefaultBody get filtered metrics names default body swagger:model GetFilteredMetricsNamesDefaultBody */ type GetFilteredMetricsNamesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -403,7 +410,9 @@ func (o *GetFilteredMetricsNamesDefaultBody) ContextValidate(ctx context.Context } func (o *GetFilteredMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -419,6 +428,7 @@ func (o *GetFilteredMetricsNamesDefaultBody) contextValidateDetails(ctx context. return err } } + } return nil @@ -447,6 +457,7 @@ GetFilteredMetricsNamesDefaultBodyDetailsItems0 get filtered metrics names defau swagger:model GetFilteredMetricsNamesDefaultBodyDetailsItems0 */ type GetFilteredMetricsNamesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -458,6 +469,7 @@ type GetFilteredMetricsNamesDefaultBodyDetailsItems0 struct { func (o *GetFilteredMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -495,6 +507,7 @@ func (o *GetFilteredMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []b // MarshalJSON marshals this object with additional properties into a JSON object func (o GetFilteredMetricsNamesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -559,6 +572,7 @@ GetFilteredMetricsNamesOKBody GetFilteredMetricsNamesResponse is map of labels f swagger:model GetFilteredMetricsNamesOKBody */ type GetFilteredMetricsNamesOKBody struct { + // labels Labels map[string]GetFilteredMetricsNamesOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -618,12 +632,15 @@ func (o *GetFilteredMetricsNamesOKBody) ContextValidate(ctx context.Context, for } func (o *GetFilteredMetricsNamesOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Labels { + if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil @@ -652,6 +669,7 @@ GetFilteredMetricsNamesOKBodyLabelsAnon ListLabels is list of label's values: du swagger:model GetFilteredMetricsNamesOKBodyLabelsAnon */ type GetFilteredMetricsNamesOKBodyLabelsAnon struct { + // name Name []*GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 `json:"name"` } @@ -711,7 +729,9 @@ func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) ContextValidate(ctx context.Co } func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) contextValidateName(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Name); i++ { + if o.Name[i] != nil { if swag.IsZero(o.Name[i]) { // not required @@ -727,6 +747,7 @@ func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) contextValidateName(ctx contex return err } } + } return nil @@ -755,6 +776,7 @@ GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 Values is label values and mai swagger:model GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 */ type GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 struct { + // value Value string `json:"value,omitempty"` @@ -798,6 +820,7 @@ GetFilteredMetricsNamesParamsBodyLabelsItems0 MapFieldEntry allows to pass label swagger:model GetFilteredMetricsNamesParamsBodyLabelsItems0 */ type GetFilteredMetricsNamesParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_histogram_parameters.go b/api/qan/v1/json/client/qan_service/get_histogram_parameters.go index 273d1c7ba3..a86298f991 100644 --- a/api/qan/v1/json/client/qan_service/get_histogram_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_histogram_parameters.go @@ -60,6 +60,7 @@ GetHistogramParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetHistogramParams struct { + /* Body. GetHistogramRequest defines filtering by time range, labels and queryid. @@ -132,6 +133,7 @@ func (o *GetHistogramParams) SetBody(body GetHistogramBody) { // WriteToRequest writes these params to a swagger request func (o *GetHistogramParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_histogram_responses.go b/api/qan/v1/json/client/qan_service/get_histogram_responses.go index a100823cb5..6d8dd5c127 100644 --- a/api/qan/v1/json/client/qan_service/get_histogram_responses.go +++ b/api/qan/v1/json/client/qan_service/get_histogram_responses.go @@ -104,6 +104,7 @@ func (o *GetHistogramOK) GetPayload() *GetHistogramOKBody { } func (o *GetHistogramOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetHistogramOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetHistogramDefault) GetPayload() *GetHistogramDefaultBody { } func (o *GetHistogramDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetHistogramDefaultBody) // response payload @@ -192,6 +194,7 @@ GetHistogramBody GetHistogramRequest defines filtering by time range, labels and swagger:model GetHistogramBody */ type GetHistogramBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -294,7 +297,9 @@ func (o *GetHistogramBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -310,6 +315,7 @@ func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats st return err } } + } return nil @@ -338,6 +344,7 @@ GetHistogramDefaultBody get histogram default body swagger:model GetHistogramDefaultBody */ type GetHistogramDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -403,7 +410,9 @@ func (o *GetHistogramDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -419,6 +428,7 @@ func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -447,6 +457,7 @@ GetHistogramDefaultBodyDetailsItems0 get histogram default body details items0 swagger:model GetHistogramDefaultBodyDetailsItems0 */ type GetHistogramDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -458,6 +469,7 @@ type GetHistogramDefaultBodyDetailsItems0 struct { func (o *GetHistogramDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -495,6 +507,7 @@ func (o *GetHistogramDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetHistogramDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -558,6 +571,7 @@ GetHistogramOKBody GetHistogramResponse is histogram items as a list. swagger:model GetHistogramOKBody */ type GetHistogramOKBody struct { + // histogram items HistogramItems []*GetHistogramOKBodyHistogramItemsItems0 `json:"histogram_items"` } @@ -617,7 +631,9 @@ func (o *GetHistogramOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.HistogramItems); i++ { + if o.HistogramItems[i] != nil { if swag.IsZero(o.HistogramItems[i]) { // not required @@ -633,6 +649,7 @@ func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, return err } } + } return nil @@ -661,6 +678,7 @@ GetHistogramOKBodyHistogramItemsItems0 HistogramItem represents one item in hist swagger:model GetHistogramOKBodyHistogramItemsItems0 */ type GetHistogramOKBodyHistogramItemsItems0 struct { + // range Range string `json:"range,omitempty"` @@ -701,6 +719,7 @@ GetHistogramParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimension swagger:model GetHistogramParamsBodyLabelsItems0 */ type GetHistogramParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_labels_parameters.go b/api/qan/v1/json/client/qan_service/get_labels_parameters.go index ebf388c128..946aabc1dc 100644 --- a/api/qan/v1/json/client/qan_service/get_labels_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_labels_parameters.go @@ -60,6 +60,7 @@ GetLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLabelsParams struct { + /* Body. GetLabelsRequest defines filtering of object detail's labels for specific value of @@ -133,6 +134,7 @@ func (o *GetLabelsParams) SetBody(body GetLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *GetLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_labels_responses.go b/api/qan/v1/json/client/qan_service/get_labels_responses.go index a1690be466..5775729a1d 100644 --- a/api/qan/v1/json/client/qan_service/get_labels_responses.go +++ b/api/qan/v1/json/client/qan_service/get_labels_responses.go @@ -104,6 +104,7 @@ func (o *GetLabelsOK) GetPayload() *GetLabelsOKBody { } func (o *GetLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLabelsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetLabelsDefault) GetPayload() *GetLabelsDefaultBody { } func (o *GetLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLabelsDefaultBody) // response payload @@ -193,6 +195,7 @@ GetLabelsBody GetLabelsRequest defines filtering of object detail's labels for s swagger:model GetLabelsBody */ type GetLabelsBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -278,6 +281,7 @@ GetLabelsDefaultBody get labels default body swagger:model GetLabelsDefaultBody */ type GetLabelsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -343,7 +347,9 @@ func (o *GetLabelsDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -359,6 +365,7 @@ func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -387,6 +394,7 @@ GetLabelsDefaultBodyDetailsItems0 get labels default body details items0 swagger:model GetLabelsDefaultBodyDetailsItems0 */ type GetLabelsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -398,6 +406,7 @@ type GetLabelsDefaultBodyDetailsItems0 struct { func (o *GetLabelsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -435,6 +444,7 @@ func (o *GetLabelsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLabelsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -498,6 +508,7 @@ GetLabelsOKBody GetLabelsResponse is a map of labels names as keys and labels va swagger:model GetLabelsOKBody */ type GetLabelsOKBody struct { + // labels Labels map[string]GetLabelsOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -557,12 +568,15 @@ func (o *GetLabelsOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetLabelsOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Labels { + if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil @@ -591,6 +605,7 @@ GetLabelsOKBodyLabelsAnon ListLabelValues is list of label's values. swagger:model GetLabelsOKBodyLabelsAnon */ type GetLabelsOKBodyLabelsAnon struct { + // values Values []string `json:"values"` } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go b/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go index ef138a2556..30ebadcf3a 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go @@ -60,6 +60,7 @@ GetMetricsNamesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsNamesParams struct { + /* Body. MetricsNamesRequest is empty. @@ -132,6 +133,7 @@ func (o *GetMetricsNamesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go b/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go index 89bc0b01e7..f7ff85b571 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go @@ -103,6 +103,7 @@ func (o *GetMetricsNamesOK) GetPayload() *GetMetricsNamesOKBody { } func (o *GetMetricsNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsNamesOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetMetricsNamesDefault) GetPayload() *GetMetricsNamesDefaultBody { } func (o *GetMetricsNamesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsNamesDefaultBody) // response payload @@ -191,6 +193,7 @@ GetMetricsNamesDefaultBody get metrics names default body swagger:model GetMetricsNamesDefaultBody */ type GetMetricsNamesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetMetricsNamesDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -300,6 +306,7 @@ GetMetricsNamesDefaultBodyDetailsItems0 get metrics names default body details i swagger:model GetMetricsNamesDefaultBodyDetailsItems0 */ type GetMetricsNamesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetMetricsNamesDefaultBodyDetailsItems0 struct { func (o *GetMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetMetricsNamesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -413,6 +422,7 @@ GetMetricsNamesOKBody MetricsNamesReply is map of stored metrics: swagger:model GetMetricsNamesOKBody */ type GetMetricsNamesOKBody struct { + // data Data map[string]string `json:"data,omitempty"` } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_parameters.go b/api/qan/v1/json/client/qan_service/get_metrics_parameters.go index 65e95eae00..6653906634 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_parameters.go @@ -60,6 +60,7 @@ GetMetricsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsParams struct { + /* Body. GetMetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972. @@ -132,6 +133,7 @@ func (o *GetMetricsParams) SetBody(body GetMetricsBody) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_responses.go b/api/qan/v1/json/client/qan_service/get_metrics_responses.go index 3ab221f11d..43a1c4c77f 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_responses.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_responses.go @@ -104,6 +104,7 @@ func (o *GetMetricsOK) GetPayload() *GetMetricsOKBody { } func (o *GetMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetMetricsDefault) GetPayload() *GetMetricsDefaultBody { } func (o *GetMetricsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsDefaultBody) // response payload @@ -192,6 +194,7 @@ GetMetricsBody GetMetricsRequest defines filtering of metrics for specific value swagger:model GetMetricsBody */ type GetMetricsBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -303,7 +306,9 @@ func (o *GetMetricsBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -319,6 +324,7 @@ func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strf return err } } + } return nil @@ -347,6 +353,7 @@ GetMetricsDefaultBody get metrics default body swagger:model GetMetricsDefaultBody */ type GetMetricsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -412,7 +419,9 @@ func (o *GetMetricsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -428,6 +437,7 @@ func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -456,6 +466,7 @@ GetMetricsDefaultBodyDetailsItems0 get metrics default body details items0 swagger:model GetMetricsDefaultBodyDetailsItems0 */ type GetMetricsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -467,6 +478,7 @@ type GetMetricsDefaultBodyDetailsItems0 struct { func (o *GetMetricsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -504,6 +516,7 @@ func (o *GetMetricsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetMetricsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -567,6 +580,7 @@ GetMetricsOKBody GetMetricsResponse defines metrics for specific value of dimens swagger:model GetMetricsOKBody */ type GetMetricsOKBody struct { + // metrics Metrics map[string]GetMetricsOKBodyMetricsAnon `json:"metrics,omitempty"` @@ -736,19 +750,24 @@ func (o *GetMetricsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetMetricsOKBody) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Metrics { + if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Sparkline); i++ { + if o.Sparkline[i] != nil { if swag.IsZero(o.Sparkline[i]) { // not required @@ -764,24 +783,29 @@ func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Totals { + if val, ok := o.Totals[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + if o.Metadata != nil { if swag.IsZero(o.Metadata) { // not required @@ -824,6 +848,7 @@ GetMetricsOKBodyMetadata GetSlecetedQueryMetadataResponse consists selected quer swagger:model GetMetricsOKBodyMetadata */ type GetMetricsOKBodyMetadata struct { + // service name ServiceName string `json:"service_name,omitempty"` @@ -894,6 +919,7 @@ GetMetricsOKBodyMetricsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyMetricsAnon */ type GetMetricsOKBodyMetricsAnon struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -953,6 +979,7 @@ GetMetricsOKBodySparklineItems0 Point contains values that represents abscissa ( swagger:model GetMetricsOKBodySparklineItems0 */ type GetMetricsOKBodySparklineItems0 struct { + // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1185,6 +1212,7 @@ GetMetricsOKBodyTotalsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyTotalsAnon */ type GetMetricsOKBodyTotalsAnon struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -1243,6 +1271,7 @@ GetMetricsParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimensions swagger:model GetMetricsParamsBodyLabelsItems0 */ type GetMetricsParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_query_example_parameters.go b/api/qan/v1/json/client/qan_service/get_query_example_parameters.go index 7757bae1c9..2d400fd9bb 100644 --- a/api/qan/v1/json/client/qan_service/get_query_example_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_query_example_parameters.go @@ -60,6 +60,7 @@ GetQueryExampleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryExampleParams struct { + /* Body. GetQueryExampleRequest defines filtering of query examples for specific value of @@ -133,6 +134,7 @@ func (o *GetQueryExampleParams) SetBody(body GetQueryExampleBody) { // WriteToRequest writes these params to a swagger request func (o *GetQueryExampleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_query_example_responses.go b/api/qan/v1/json/client/qan_service/get_query_example_responses.go index 7dc92e072f..1c005ca846 100644 --- a/api/qan/v1/json/client/qan_service/get_query_example_responses.go +++ b/api/qan/v1/json/client/qan_service/get_query_example_responses.go @@ -104,6 +104,7 @@ func (o *GetQueryExampleOK) GetPayload() *GetQueryExampleOKBody { } func (o *GetQueryExampleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryExampleOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetQueryExampleDefault) GetPayload() *GetQueryExampleDefaultBody { } func (o *GetQueryExampleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryExampleDefaultBody) // response payload @@ -193,6 +195,7 @@ GetQueryExampleBody GetQueryExampleRequest defines filtering of query examples f swagger:model GetQueryExampleBody */ type GetQueryExampleBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -301,7 +304,9 @@ func (o *GetQueryExampleBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -317,6 +322,7 @@ func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats return err } } + } return nil @@ -345,6 +351,7 @@ GetQueryExampleDefaultBody get query example default body swagger:model GetQueryExampleDefaultBody */ type GetQueryExampleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -410,7 +417,9 @@ func (o *GetQueryExampleDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -426,6 +435,7 @@ func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -454,6 +464,7 @@ GetQueryExampleDefaultBodyDetailsItems0 get query example default body details i swagger:model GetQueryExampleDefaultBodyDetailsItems0 */ type GetQueryExampleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -465,6 +476,7 @@ type GetQueryExampleDefaultBodyDetailsItems0 struct { func (o *GetQueryExampleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -502,6 +514,7 @@ func (o *GetQueryExampleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetQueryExampleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -565,6 +578,7 @@ GetQueryExampleOKBody GetQueryExampleResponse list of query examples. swagger:model GetQueryExampleOKBody */ type GetQueryExampleOKBody struct { + // query examples QueryExamples []*GetQueryExampleOKBodyQueryExamplesItems0 `json:"query_examples"` } @@ -624,7 +638,9 @@ func (o *GetQueryExampleOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QueryExamples); i++ { + if o.QueryExamples[i] != nil { if swag.IsZero(o.QueryExamples[i]) { // not required @@ -640,6 +656,7 @@ func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context return err } } + } return nil @@ -668,6 +685,7 @@ GetQueryExampleOKBodyQueryExamplesItems0 QueryExample shows query examples and t swagger:model GetQueryExampleOKBodyQueryExamplesItems0 */ type GetQueryExampleOKBodyQueryExamplesItems0 struct { + // example Example string `json:"example,omitempty"` @@ -796,6 +814,7 @@ GetQueryExampleParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimens swagger:model GetQueryExampleParamsBodyLabelsItems0 */ type GetQueryExampleParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go b/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go index 3d94992021..367e78a912 100644 --- a/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go @@ -60,6 +60,7 @@ GetQueryPlanParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryPlanParams struct { + // Queryid. Queryid string @@ -129,6 +130,7 @@ func (o *GetQueryPlanParams) SetQueryid(queryid string) { // WriteToRequest writes these params to a swagger request func (o *GetQueryPlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_query_plan_responses.go b/api/qan/v1/json/client/qan_service/get_query_plan_responses.go index 9bb8f78603..888d4d3083 100644 --- a/api/qan/v1/json/client/qan_service/get_query_plan_responses.go +++ b/api/qan/v1/json/client/qan_service/get_query_plan_responses.go @@ -103,6 +103,7 @@ func (o *GetQueryPlanOK) GetPayload() *GetQueryPlanOKBody { } func (o *GetQueryPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryPlanOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetQueryPlanDefault) GetPayload() *GetQueryPlanDefaultBody { } func (o *GetQueryPlanDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryPlanDefaultBody) // response payload @@ -191,6 +193,7 @@ GetQueryPlanDefaultBody get query plan default body swagger:model GetQueryPlanDefaultBody */ type GetQueryPlanDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetQueryPlanDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -300,6 +306,7 @@ GetQueryPlanDefaultBodyDetailsItems0 get query plan default body details items0 swagger:model GetQueryPlanDefaultBodyDetailsItems0 */ type GetQueryPlanDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetQueryPlanDefaultBodyDetailsItems0 struct { func (o *GetQueryPlanDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetQueryPlanDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetQueryPlanDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetQueryPlanOKBody GetQueryPlanResponse contains planid and query_plan. swagger:model GetQueryPlanOKBody */ type GetQueryPlanOKBody struct { + // planid Planid string `json:"planid,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_report_parameters.go b/api/qan/v1/json/client/qan_service/get_report_parameters.go index 41494719a4..69d495bc6b 100644 --- a/api/qan/v1/json/client/qan_service/get_report_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_report_parameters.go @@ -60,6 +60,7 @@ GetReportParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetReportParams struct { + /* Body. ReportRequest defines filtering of metrics report for db server or other dimentions. @@ -132,6 +133,7 @@ func (o *GetReportParams) SetBody(body GetReportBody) { // WriteToRequest writes these params to a swagger request func (o *GetReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_report_responses.go b/api/qan/v1/json/client/qan_service/get_report_responses.go index 19383e587b..bc186cb448 100644 --- a/api/qan/v1/json/client/qan_service/get_report_responses.go +++ b/api/qan/v1/json/client/qan_service/get_report_responses.go @@ -104,6 +104,7 @@ func (o *GetReportOK) GetPayload() *GetReportOKBody { } func (o *GetReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetReportOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetReportDefault) GetPayload() *GetReportDefaultBody { } func (o *GetReportDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetReportDefaultBody) // response payload @@ -192,6 +194,7 @@ GetReportBody ReportRequest defines filtering of metrics report for db server or swagger:model GetReportBody */ type GetReportBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -312,7 +315,9 @@ func (o *GetReportBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -328,6 +333,7 @@ func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfm return err } } + } return nil @@ -356,6 +362,7 @@ GetReportDefaultBody get report default body swagger:model GetReportDefaultBody */ type GetReportDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -421,7 +428,9 @@ func (o *GetReportDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -437,6 +446,7 @@ func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -465,6 +475,7 @@ GetReportDefaultBodyDetailsItems0 get report default body details items0 swagger:model GetReportDefaultBodyDetailsItems0 */ type GetReportDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -476,6 +487,7 @@ type GetReportDefaultBodyDetailsItems0 struct { func (o *GetReportDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -513,6 +525,7 @@ func (o *GetReportDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetReportDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -576,6 +589,7 @@ GetReportOKBody ReportReply is list of reports per quieryids, hosts etc. swagger:model GetReportOKBody */ type GetReportOKBody struct { + // total rows TotalRows int64 `json:"total_rows,omitempty"` @@ -644,7 +658,9 @@ func (o *GetReportOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Rows); i++ { + if o.Rows[i] != nil { if swag.IsZero(o.Rows[i]) { // not required @@ -660,6 +676,7 @@ func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfm return err } } + } return nil @@ -688,6 +705,7 @@ GetReportOKBodyRowsItems0 Row define metrics for selected dimention. swagger:model GetReportOKBodyRowsItems0 */ type GetReportOKBodyRowsItems0 struct { + // rank Rank int64 `json:"rank,omitempty"` @@ -805,19 +823,24 @@ func (o *GetReportOKBodyRowsItems0) ContextValidate(ctx context.Context, formats } func (o *GetReportOKBodyRowsItems0) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Metrics { + if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Sparkline); i++ { + if o.Sparkline[i] != nil { if swag.IsZero(o.Sparkline[i]) { // not required @@ -833,6 +856,7 @@ func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context return err } } + } return nil @@ -861,6 +885,7 @@ GetReportOKBodyRowsItems0MetricsAnon Metric cell. swagger:model GetReportOKBodyRowsItems0MetricsAnon */ type GetReportOKBodyRowsItems0MetricsAnon struct { + // stats Stats *GetReportOKBodyRowsItems0MetricsAnonStats `json:"stats,omitempty"` } @@ -913,6 +938,7 @@ func (o *GetReportOKBodyRowsItems0MetricsAnon) ContextValidate(ctx context.Conte } func (o *GetReportOKBodyRowsItems0MetricsAnon) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { + if o.Stats != nil { if swag.IsZero(o.Stats) { // not required @@ -955,6 +981,7 @@ GetReportOKBodyRowsItems0MetricsAnonStats Stat is statistics of specific metric. swagger:model GetReportOKBodyRowsItems0MetricsAnonStats */ type GetReportOKBodyRowsItems0MetricsAnonStats struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -1014,6 +1041,7 @@ GetReportOKBodyRowsItems0SparklineItems0 Point contains values that represents a swagger:model GetReportOKBodyRowsItems0SparklineItems0 */ type GetReportOKBodyRowsItems0SparklineItems0 struct { + // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1246,6 +1274,7 @@ GetReportParamsBodyLabelsItems0 ReportMapFieldEntry allows to pass labels/diment swagger:model GetReportParamsBodyLabelsItems0 */ type GetReportParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/query_exists_parameters.go b/api/qan/v1/json/client/qan_service/query_exists_parameters.go index 7650af6a9d..21422ff17c 100644 --- a/api/qan/v1/json/client/qan_service/query_exists_parameters.go +++ b/api/qan/v1/json/client/qan_service/query_exists_parameters.go @@ -60,6 +60,7 @@ QueryExistsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type QueryExistsParams struct { + /* Body. QueryExistsRequest check if provided query exists or not. @@ -132,6 +133,7 @@ func (o *QueryExistsParams) SetBody(body QueryExistsBody) { // WriteToRequest writes these params to a swagger request func (o *QueryExistsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/query_exists_responses.go b/api/qan/v1/json/client/qan_service/query_exists_responses.go index e21f8d4b2f..db702bf180 100644 --- a/api/qan/v1/json/client/qan_service/query_exists_responses.go +++ b/api/qan/v1/json/client/qan_service/query_exists_responses.go @@ -103,6 +103,7 @@ func (o *QueryExistsOK) GetPayload() *QueryExistsOKBody { } func (o *QueryExistsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(QueryExistsOKBody) // response payload @@ -176,6 +177,7 @@ func (o *QueryExistsDefault) GetPayload() *QueryExistsDefaultBody { } func (o *QueryExistsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(QueryExistsDefaultBody) // response payload @@ -191,6 +193,7 @@ QueryExistsBody QueryExistsRequest check if provided query exists or not. swagger:model QueryExistsBody */ type QueryExistsBody struct { + // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -231,6 +234,7 @@ QueryExistsDefaultBody query exists default body swagger:model QueryExistsDefaultBody */ type QueryExistsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *QueryExistsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -312,6 +318,7 @@ func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -340,6 +347,7 @@ QueryExistsDefaultBodyDetailsItems0 query exists default body details items0 swagger:model QueryExistsDefaultBodyDetailsItems0 */ type QueryExistsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -351,6 +359,7 @@ type QueryExistsDefaultBodyDetailsItems0 struct { func (o *QueryExistsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -388,6 +397,7 @@ func (o *QueryExistsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o QueryExistsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -451,6 +461,7 @@ QueryExistsOKBody QueryExistsResponse returns true if query exists. swagger:model QueryExistsOKBody */ type QueryExistsOKBody struct { + // exists Exists bool `json:"exists,omitempty"` } diff --git a/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go b/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go index f0be4d869c..45d51b4b64 100644 --- a/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go +++ b/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go @@ -60,6 +60,7 @@ SchemaByQueryIDParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SchemaByQueryIDParams struct { + /* Body. SchemaByQueryIDRequest returns schema for given query ID and service ID. @@ -132,6 +133,7 @@ func (o *SchemaByQueryIDParams) SetBody(body SchemaByQueryIDBody) { // WriteToRequest writes these params to a swagger request func (o *SchemaByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go b/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go index 7856e075e9..a95d70829f 100644 --- a/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go +++ b/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go @@ -103,6 +103,7 @@ func (o *SchemaByQueryIDOK) GetPayload() *SchemaByQueryIDOKBody { } func (o *SchemaByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SchemaByQueryIDOKBody) // response payload @@ -176,6 +177,7 @@ func (o *SchemaByQueryIDDefault) GetPayload() *SchemaByQueryIDDefaultBody { } func (o *SchemaByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SchemaByQueryIDDefaultBody) // response payload @@ -191,6 +193,7 @@ SchemaByQueryIDBody SchemaByQueryIDRequest returns schema for given query ID and swagger:model SchemaByQueryIDBody */ type SchemaByQueryIDBody struct { + // service id ServiceID string `json:"service_id,omitempty"` @@ -231,6 +234,7 @@ SchemaByQueryIDDefaultBody schema by query ID default body swagger:model SchemaByQueryIDDefaultBody */ type SchemaByQueryIDDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *SchemaByQueryIDDefaultBody) ContextValidate(ctx context.Context, format } func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -312,6 +318,7 @@ func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -340,6 +347,7 @@ SchemaByQueryIDDefaultBodyDetailsItems0 schema by query ID default body details swagger:model SchemaByQueryIDDefaultBodyDetailsItems0 */ type SchemaByQueryIDDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -351,6 +359,7 @@ type SchemaByQueryIDDefaultBodyDetailsItems0 struct { func (o *SchemaByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -388,6 +397,7 @@ func (o *SchemaByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o SchemaByQueryIDDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -451,6 +461,7 @@ SchemaByQueryIDOKBody SchemaByQueryIDResponse is schema for given query ID and s swagger:model SchemaByQueryIDOKBody */ type SchemaByQueryIDOKBody struct { + // schema Schema string `json:"schema,omitempty"` } diff --git a/api/qan/v1/object_details.pb.go b/api/qan/v1/object_details.pb.go index af39a8e43a..2c60c1a3a4 100644 --- a/api/qan/v1/object_details.pb.go +++ b/api/qan/v1/object_details.pb.go @@ -7,12 +7,11 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -1760,42 +1759,39 @@ func file_qan_v1_object_details_proto_rawDescGZIP() []byte { return file_qan_v1_object_details_proto_rawDescData } -var ( - file_qan_v1_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 26) - file_qan_v1_object_details_proto_goTypes = []any{ - (*GetMetricsRequest)(nil), // 0: qan.v1.GetMetricsRequest - (*GetMetricsResponse)(nil), // 1: qan.v1.GetMetricsResponse - (*MetricValues)(nil), // 2: qan.v1.MetricValues - (*Labels)(nil), // 3: qan.v1.Labels - (*GetQueryExampleRequest)(nil), // 4: qan.v1.GetQueryExampleRequest - (*GetQueryExampleResponse)(nil), // 5: qan.v1.GetQueryExampleResponse - (*QueryExample)(nil), // 6: qan.v1.QueryExample - (*GetLabelsRequest)(nil), // 7: qan.v1.GetLabelsRequest - (*GetLabelsResponse)(nil), // 8: qan.v1.GetLabelsResponse - (*ListLabelValues)(nil), // 9: qan.v1.ListLabelValues - (*GetQueryPlanRequest)(nil), // 10: qan.v1.GetQueryPlanRequest - (*GetQueryPlanResponse)(nil), // 11: qan.v1.GetQueryPlanResponse - (*GetHistogramRequest)(nil), // 12: qan.v1.GetHistogramRequest - (*GetHistogramResponse)(nil), // 13: qan.v1.GetHistogramResponse - (*HistogramItem)(nil), // 14: qan.v1.HistogramItem - (*QueryExistsRequest)(nil), // 15: qan.v1.QueryExistsRequest - (*QueryExistsResponse)(nil), // 16: qan.v1.QueryExistsResponse - (*SchemaByQueryIDRequest)(nil), // 17: qan.v1.SchemaByQueryIDRequest - (*SchemaByQueryIDResponse)(nil), // 18: qan.v1.SchemaByQueryIDResponse - (*ExplainFingerprintByQueryIDRequest)(nil), // 19: qan.v1.ExplainFingerprintByQueryIDRequest - (*ExplainFingerprintByQueryIDResponse)(nil), // 20: qan.v1.ExplainFingerprintByQueryIDResponse - (*GetSelectedQueryMetadataResponse)(nil), // 21: qan.v1.GetSelectedQueryMetadataResponse - nil, // 22: qan.v1.GetMetricsResponse.MetricsEntry - nil, // 23: qan.v1.GetMetricsResponse.TextMetricsEntry - nil, // 24: qan.v1.GetMetricsResponse.TotalsEntry - nil, // 25: qan.v1.GetLabelsResponse.LabelsEntry - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 27: qan.v1.MapFieldEntry - (*Point)(nil), // 28: qan.v1.Point - (ExampleType)(0), // 29: qan.v1.ExampleType - } -) - +var file_qan_v1_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_qan_v1_object_details_proto_goTypes = []any{ + (*GetMetricsRequest)(nil), // 0: qan.v1.GetMetricsRequest + (*GetMetricsResponse)(nil), // 1: qan.v1.GetMetricsResponse + (*MetricValues)(nil), // 2: qan.v1.MetricValues + (*Labels)(nil), // 3: qan.v1.Labels + (*GetQueryExampleRequest)(nil), // 4: qan.v1.GetQueryExampleRequest + (*GetQueryExampleResponse)(nil), // 5: qan.v1.GetQueryExampleResponse + (*QueryExample)(nil), // 6: qan.v1.QueryExample + (*GetLabelsRequest)(nil), // 7: qan.v1.GetLabelsRequest + (*GetLabelsResponse)(nil), // 8: qan.v1.GetLabelsResponse + (*ListLabelValues)(nil), // 9: qan.v1.ListLabelValues + (*GetQueryPlanRequest)(nil), // 10: qan.v1.GetQueryPlanRequest + (*GetQueryPlanResponse)(nil), // 11: qan.v1.GetQueryPlanResponse + (*GetHistogramRequest)(nil), // 12: qan.v1.GetHistogramRequest + (*GetHistogramResponse)(nil), // 13: qan.v1.GetHistogramResponse + (*HistogramItem)(nil), // 14: qan.v1.HistogramItem + (*QueryExistsRequest)(nil), // 15: qan.v1.QueryExistsRequest + (*QueryExistsResponse)(nil), // 16: qan.v1.QueryExistsResponse + (*SchemaByQueryIDRequest)(nil), // 17: qan.v1.SchemaByQueryIDRequest + (*SchemaByQueryIDResponse)(nil), // 18: qan.v1.SchemaByQueryIDResponse + (*ExplainFingerprintByQueryIDRequest)(nil), // 19: qan.v1.ExplainFingerprintByQueryIDRequest + (*ExplainFingerprintByQueryIDResponse)(nil), // 20: qan.v1.ExplainFingerprintByQueryIDResponse + (*GetSelectedQueryMetadataResponse)(nil), // 21: qan.v1.GetSelectedQueryMetadataResponse + nil, // 22: qan.v1.GetMetricsResponse.MetricsEntry + nil, // 23: qan.v1.GetMetricsResponse.TextMetricsEntry + nil, // 24: qan.v1.GetMetricsResponse.TotalsEntry + nil, // 25: qan.v1.GetLabelsResponse.LabelsEntry + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 27: qan.v1.MapFieldEntry + (*Point)(nil), // 28: qan.v1.Point + (ExampleType)(0), // 29: qan.v1.ExampleType +} var file_qan_v1_object_details_proto_depIdxs = []int32{ 26, // 0: qan.v1.GetMetricsRequest.period_start_from:type_name -> google.protobuf.Timestamp 26, // 1: qan.v1.GetMetricsRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/profile.pb.go b/api/qan/v1/profile.pb.go index 49c017d4a7..903e217600 100644 --- a/api/qan/v1/profile.pb.go +++ b/api/qan/v1/profile.pb.go @@ -7,12 +7,11 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) const ( @@ -626,21 +625,18 @@ func file_qan_v1_profile_proto_rawDescGZIP() []byte { return file_qan_v1_profile_proto_rawDescData } -var ( - file_qan_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_qan_v1_profile_proto_goTypes = []any{ - (*GetReportRequest)(nil), // 0: qan.v1.GetReportRequest - (*ReportMapFieldEntry)(nil), // 1: qan.v1.ReportMapFieldEntry - (*GetReportResponse)(nil), // 2: qan.v1.GetReportResponse - (*Row)(nil), // 3: qan.v1.Row - (*Metric)(nil), // 4: qan.v1.Metric - (*Stat)(nil), // 5: qan.v1.Stat - nil, // 6: qan.v1.Row.MetricsEntry - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*Point)(nil), // 8: qan.v1.Point - } -) - +var file_qan_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_qan_v1_profile_proto_goTypes = []any{ + (*GetReportRequest)(nil), // 0: qan.v1.GetReportRequest + (*ReportMapFieldEntry)(nil), // 1: qan.v1.ReportMapFieldEntry + (*GetReportResponse)(nil), // 2: qan.v1.GetReportResponse + (*Row)(nil), // 3: qan.v1.Row + (*Metric)(nil), // 4: qan.v1.Metric + (*Stat)(nil), // 5: qan.v1.Stat + nil, // 6: qan.v1.Row.MetricsEntry + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*Point)(nil), // 8: qan.v1.Point +} var file_qan_v1_profile_proto_depIdxs = []int32{ 7, // 0: qan.v1.GetReportRequest.period_start_from:type_name -> google.protobuf.Timestamp 7, // 1: qan.v1.GetReportRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/qan.pb.go b/api/qan/v1/qan.pb.go index 49eb549dbc..8b995a5c6d 100644 --- a/api/qan/v1/qan.pb.go +++ b/api/qan/v1/qan.pb.go @@ -7,11 +7,10 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -1051,16 +1050,13 @@ func file_qan_v1_qan_proto_rawDescGZIP() []byte { return file_qan_v1_qan_proto_rawDescData } -var ( - file_qan_v1_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_qan_v1_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_qan_v1_qan_proto_goTypes = []any{ - (ExampleType)(0), // 0: qan.v1.ExampleType - (*Point)(nil), // 1: qan.v1.Point - (*MapFieldEntry)(nil), // 2: qan.v1.MapFieldEntry - } -) - +var file_qan_v1_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_qan_v1_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_qan_v1_qan_proto_goTypes = []any{ + (ExampleType)(0), // 0: qan.v1.ExampleType + (*Point)(nil), // 1: qan.v1.Point + (*MapFieldEntry)(nil), // 2: qan.v1.MapFieldEntry +} var file_qan_v1_qan_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/qan/v1/service.pb.go b/api/qan/v1/service.pb.go index 5787f81592..2e63e0b028 100644 --- a/api/qan/v1/service.pb.go +++ b/api/qan/v1/service.pb.go @@ -7,13 +7,12 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -285,35 +284,32 @@ func file_qan_v1_service_proto_rawDescGZIP() []byte { return file_qan_v1_service_proto_rawDescData } -var ( - file_qan_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_qan_v1_service_proto_goTypes = []any{ - (*GetMetricsNamesRequest)(nil), // 0: qan.v1.GetMetricsNamesRequest - (*GetMetricsNamesResponse)(nil), // 1: qan.v1.GetMetricsNamesResponse - nil, // 2: qan.v1.GetMetricsNamesResponse.DataEntry - (*GetReportRequest)(nil), // 3: qan.v1.GetReportRequest - (*GetFilteredMetricsNamesRequest)(nil), // 4: qan.v1.GetFilteredMetricsNamesRequest - (*GetMetricsRequest)(nil), // 5: qan.v1.GetMetricsRequest - (*GetLabelsRequest)(nil), // 6: qan.v1.GetLabelsRequest - (*GetHistogramRequest)(nil), // 7: qan.v1.GetHistogramRequest - (*ExplainFingerprintByQueryIDRequest)(nil), // 8: qan.v1.ExplainFingerprintByQueryIDRequest - (*GetQueryPlanRequest)(nil), // 9: qan.v1.GetQueryPlanRequest - (*QueryExistsRequest)(nil), // 10: qan.v1.QueryExistsRequest - (*SchemaByQueryIDRequest)(nil), // 11: qan.v1.SchemaByQueryIDRequest - (*GetQueryExampleRequest)(nil), // 12: qan.v1.GetQueryExampleRequest - (*GetReportResponse)(nil), // 13: qan.v1.GetReportResponse - (*GetFilteredMetricsNamesResponse)(nil), // 14: qan.v1.GetFilteredMetricsNamesResponse - (*GetMetricsResponse)(nil), // 15: qan.v1.GetMetricsResponse - (*GetLabelsResponse)(nil), // 16: qan.v1.GetLabelsResponse - (*GetHistogramResponse)(nil), // 17: qan.v1.GetHistogramResponse - (*ExplainFingerprintByQueryIDResponse)(nil), // 18: qan.v1.ExplainFingerprintByQueryIDResponse - (*GetQueryPlanResponse)(nil), // 19: qan.v1.GetQueryPlanResponse - (*QueryExistsResponse)(nil), // 20: qan.v1.QueryExistsResponse - (*SchemaByQueryIDResponse)(nil), // 21: qan.v1.SchemaByQueryIDResponse - (*GetQueryExampleResponse)(nil), // 22: qan.v1.GetQueryExampleResponse - } -) - +var file_qan_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_qan_v1_service_proto_goTypes = []any{ + (*GetMetricsNamesRequest)(nil), // 0: qan.v1.GetMetricsNamesRequest + (*GetMetricsNamesResponse)(nil), // 1: qan.v1.GetMetricsNamesResponse + nil, // 2: qan.v1.GetMetricsNamesResponse.DataEntry + (*GetReportRequest)(nil), // 3: qan.v1.GetReportRequest + (*GetFilteredMetricsNamesRequest)(nil), // 4: qan.v1.GetFilteredMetricsNamesRequest + (*GetMetricsRequest)(nil), // 5: qan.v1.GetMetricsRequest + (*GetLabelsRequest)(nil), // 6: qan.v1.GetLabelsRequest + (*GetHistogramRequest)(nil), // 7: qan.v1.GetHistogramRequest + (*ExplainFingerprintByQueryIDRequest)(nil), // 8: qan.v1.ExplainFingerprintByQueryIDRequest + (*GetQueryPlanRequest)(nil), // 9: qan.v1.GetQueryPlanRequest + (*QueryExistsRequest)(nil), // 10: qan.v1.QueryExistsRequest + (*SchemaByQueryIDRequest)(nil), // 11: qan.v1.SchemaByQueryIDRequest + (*GetQueryExampleRequest)(nil), // 12: qan.v1.GetQueryExampleRequest + (*GetReportResponse)(nil), // 13: qan.v1.GetReportResponse + (*GetFilteredMetricsNamesResponse)(nil), // 14: qan.v1.GetFilteredMetricsNamesResponse + (*GetMetricsResponse)(nil), // 15: qan.v1.GetMetricsResponse + (*GetLabelsResponse)(nil), // 16: qan.v1.GetLabelsResponse + (*GetHistogramResponse)(nil), // 17: qan.v1.GetHistogramResponse + (*ExplainFingerprintByQueryIDResponse)(nil), // 18: qan.v1.ExplainFingerprintByQueryIDResponse + (*GetQueryPlanResponse)(nil), // 19: qan.v1.GetQueryPlanResponse + (*QueryExistsResponse)(nil), // 20: qan.v1.QueryExistsResponse + (*SchemaByQueryIDResponse)(nil), // 21: qan.v1.SchemaByQueryIDResponse + (*GetQueryExampleResponse)(nil), // 22: qan.v1.GetQueryExampleResponse +} var file_qan_v1_service_proto_depIdxs = []int32{ 2, // 0: qan.v1.GetMetricsNamesResponse.data:type_name -> qan.v1.GetMetricsNamesResponse.DataEntry 3, // 1: qan.v1.QANService.GetReport:input_type -> qan.v1.GetReportRequest diff --git a/api/qan/v1/service.pb.gw.go b/api/qan/v1/service.pb.gw.go index 7046112486..79903d4f40 100644 --- a/api/qan/v1/service.pb.gw.go +++ b/api/qan/v1/service.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_QANService_GetReport_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetReportRequest @@ -43,6 +41,7 @@ func request_QANService_GetReport_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.GetReport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_GetReport_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -55,6 +54,7 @@ func local_request_QANService_GetReport_0(ctx context.Context, marshaler runtime msg, err := server.GetReport(ctx, &protoReq) return msg, metadata, err + } func request_QANService_GetFilteredMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -67,6 +67,7 @@ func request_QANService_GetFilteredMetricsNames_0(ctx context.Context, marshaler msg, err := client.GetFilteredMetricsNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_GetFilteredMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +80,7 @@ func local_request_QANService_GetFilteredMetricsNames_0(ctx context.Context, mar msg, err := server.GetFilteredMetricsNames(ctx, &protoReq) return msg, metadata, err + } func request_QANService_GetMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -91,6 +93,7 @@ func request_QANService_GetMetricsNames_0(ctx context.Context, marshaler runtime msg, err := client.GetMetricsNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_GetMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -103,6 +106,7 @@ func local_request_QANService_GetMetricsNames_0(ctx context.Context, marshaler r msg, err := server.GetMetricsNames(ctx, &protoReq) return msg, metadata, err + } func request_QANService_GetMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -115,6 +119,7 @@ func request_QANService_GetMetrics_0(ctx context.Context, marshaler runtime.Mars msg, err := client.GetMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_GetMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +132,7 @@ func local_request_QANService_GetMetrics_0(ctx context.Context, marshaler runtim msg, err := server.GetMetrics(ctx, &protoReq) return msg, metadata, err + } func request_QANService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -139,6 +145,7 @@ func request_QANService_GetLabels_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.GetLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -151,6 +158,7 @@ func local_request_QANService_GetLabels_0(ctx context.Context, marshaler runtime msg, err := server.GetLabels(ctx, &protoReq) return msg, metadata, err + } func request_QANService_GetHistogram_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -163,6 +171,7 @@ func request_QANService_GetHistogram_0(ctx context.Context, marshaler runtime.Ma msg, err := client.GetHistogram(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_GetHistogram_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -175,6 +184,7 @@ func local_request_QANService_GetHistogram_0(ctx context.Context, marshaler runt msg, err := server.GetHistogram(ctx, &protoReq) return msg, metadata, err + } func request_QANService_ExplainFingerprintByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -187,6 +197,7 @@ func request_QANService_ExplainFingerprintByQueryID_0(ctx context.Context, marsh msg, err := client.ExplainFingerprintByQueryID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_ExplainFingerprintByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -199,6 +210,7 @@ func local_request_QANService_ExplainFingerprintByQueryID_0(ctx context.Context, msg, err := server.ExplainFingerprintByQueryID(ctx, &protoReq) return msg, metadata, err + } func request_QANService_GetQueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -224,6 +236,7 @@ func request_QANService_GetQueryPlan_0(ctx context.Context, marshaler runtime.Ma msg, err := client.GetQueryPlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_GetQueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -249,6 +262,7 @@ func local_request_QANService_GetQueryPlan_0(ctx context.Context, marshaler runt msg, err := server.GetQueryPlan(ctx, &protoReq) return msg, metadata, err + } func request_QANService_QueryExists_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -261,6 +275,7 @@ func request_QANService_QueryExists_0(ctx context.Context, marshaler runtime.Mar msg, err := client.QueryExists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_QueryExists_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -273,6 +288,7 @@ func local_request_QANService_QueryExists_0(ctx context.Context, marshaler runti msg, err := server.QueryExists(ctx, &protoReq) return msg, metadata, err + } func request_QANService_SchemaByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -285,6 +301,7 @@ func request_QANService_SchemaByQueryID_0(ctx context.Context, marshaler runtime msg, err := client.SchemaByQueryID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_SchemaByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -297,6 +314,7 @@ func local_request_QANService_SchemaByQueryID_0(ctx context.Context, marshaler r msg, err := server.SchemaByQueryID(ctx, &protoReq) return msg, metadata, err + } func request_QANService_GetQueryExample_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -309,6 +327,7 @@ func request_QANService_GetQueryExample_0(ctx context.Context, marshaler runtime msg, err := client.GetQueryExample(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_QANService_GetQueryExample_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -321,6 +340,7 @@ func local_request_QANService_GetQueryExample_0(ctx context.Context, marshaler r msg, err := server.GetQueryExample(ctx, &protoReq) return msg, metadata, err + } // RegisterQANServiceHandlerServer registers the http handlers for service QANService to "mux". @@ -329,6 +349,7 @@ func local_request_QANService_GetQueryExample_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQANServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QANServiceServer) error { + mux.Handle("POST", pattern_QANService_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -351,6 +372,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetReport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetFilteredMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -375,6 +397,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetFilteredMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -399,6 +422,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -423,6 +447,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -447,6 +472,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetHistogram_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -471,6 +497,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetHistogram_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_ExplainFingerprintByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -495,6 +522,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_ExplainFingerprintByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_QANService_GetQueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -519,6 +547,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetQueryPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_QueryExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -543,6 +572,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_QueryExists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_SchemaByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -567,6 +597,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_SchemaByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetQueryExample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -591,6 +622,7 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetQueryExample_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -633,6 +665,7 @@ func RegisterQANServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "QANServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QANServiceClient) error { + mux.Handle("POST", pattern_QANService_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -652,6 +685,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetReport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetFilteredMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -673,6 +707,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetFilteredMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -694,6 +729,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -715,6 +751,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -736,6 +773,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetHistogram_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -757,6 +795,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetHistogram_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_ExplainFingerprintByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -778,6 +817,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_ExplainFingerprintByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_QANService_GetQueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -799,6 +839,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetQueryPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_QueryExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -820,6 +861,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_QueryExists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_SchemaByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -841,6 +883,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_SchemaByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_QANService_GetQueryExample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -862,6 +905,7 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetQueryExample_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/qan/v1/service_grpc.pb.go b/api/qan/v1/service_grpc.pb.go index 75fc7b8118..acef2a20cf 100644 --- a/api/qan/v1/service_grpc.pb.go +++ b/api/qan/v1/service_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -222,43 +221,33 @@ type UnimplementedQANServiceServer struct{} func (UnimplementedQANServiceServer) GetReport(context.Context, *GetReportRequest) (*GetReportResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetReport not implemented") } - func (UnimplementedQANServiceServer) GetFilteredMetricsNames(context.Context, *GetFilteredMetricsNamesRequest) (*GetFilteredMetricsNamesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFilteredMetricsNames not implemented") } - func (UnimplementedQANServiceServer) GetMetricsNames(context.Context, *GetMetricsNamesRequest) (*GetMetricsNamesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetricsNames not implemented") } - func (UnimplementedQANServiceServer) GetMetrics(context.Context, *GetMetricsRequest) (*GetMetricsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") } - func (UnimplementedQANServiceServer) GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented") } - func (UnimplementedQANServiceServer) GetHistogram(context.Context, *GetHistogramRequest) (*GetHistogramResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetHistogram not implemented") } - func (UnimplementedQANServiceServer) ExplainFingerprintByQueryID(context.Context, *ExplainFingerprintByQueryIDRequest) (*ExplainFingerprintByQueryIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExplainFingerprintByQueryID not implemented") } - func (UnimplementedQANServiceServer) GetQueryPlan(context.Context, *GetQueryPlanRequest) (*GetQueryPlanResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQueryPlan not implemented") } - func (UnimplementedQANServiceServer) QueryExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryExists not implemented") } - func (UnimplementedQANServiceServer) SchemaByQueryID(context.Context, *SchemaByQueryIDRequest) (*SchemaByQueryIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SchemaByQueryID not implemented") } - func (UnimplementedQANServiceServer) GetQueryExample(context.Context, *GetQueryExampleRequest) (*GetQueryExampleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQueryExample not implemented") } diff --git a/api/server/v1/httperror.pb.go b/api/server/v1/httperror.pb.go index 15550a0c7f..7033239ec8 100644 --- a/api/server/v1/httperror.pb.go +++ b/api/server/v1/httperror.pb.go @@ -7,12 +7,11 @@ package serverv1 import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" ) const ( @@ -134,14 +133,11 @@ func file_server_v1_httperror_proto_rawDescGZIP() []byte { return file_server_v1_httperror_proto_rawDescData } -var ( - file_server_v1_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) - file_server_v1_httperror_proto_goTypes = []any{ - (*HttpError)(nil), // 0: server.v1.HttpError - (*anypb.Any)(nil), // 1: google.protobuf.Any - } -) - +var file_server_v1_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_server_v1_httperror_proto_goTypes = []any{ + (*HttpError)(nil), // 0: server.v1.HttpError + (*anypb.Any)(nil), // 1: google.protobuf.Any +} var file_server_v1_httperror_proto_depIdxs = []int32{ 1, // 0: server.v1.HttpError.details:type_name -> google.protobuf.Any 1, // [1:1] is the sub-list for method output_type diff --git a/api/server/v1/json/client/server_service/change_settings_parameters.go b/api/server/v1/json/client/server_service/change_settings_parameters.go index 12afd77da3..8fd09d8309 100644 --- a/api/server/v1/json/client/server_service/change_settings_parameters.go +++ b/api/server/v1/json/client/server_service/change_settings_parameters.go @@ -60,6 +60,7 @@ ChangeSettingsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeSettingsParams struct { + // Body. Body ChangeSettingsBody @@ -129,6 +130,7 @@ func (o *ChangeSettingsParams) SetBody(body ChangeSettingsBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/change_settings_responses.go b/api/server/v1/json/client/server_service/change_settings_responses.go index e8dbdc0e8d..6014f3bc4b 100644 --- a/api/server/v1/json/client/server_service/change_settings_responses.go +++ b/api/server/v1/json/client/server_service/change_settings_responses.go @@ -103,6 +103,7 @@ func (o *ChangeSettingsOK) GetPayload() *ChangeSettingsOKBody { } func (o *ChangeSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeSettingsOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ChangeSettingsDefault) GetPayload() *ChangeSettingsDefaultBody { } func (o *ChangeSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeSettingsDefaultBody) // response payload @@ -191,6 +193,7 @@ ChangeSettingsBody change settings body swagger:model ChangeSettingsBody */ type ChangeSettingsBody struct { + // enable updates EnableUpdates *bool `json:"enable_updates,omitempty"` @@ -333,6 +336,7 @@ func (o *ChangeSettingsBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeSettingsBody) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -353,6 +357,7 @@ func (o *ChangeSettingsBody) contextValidateAdvisorRunIntervals(ctx context.Cont } func (o *ChangeSettingsBody) contextValidateAWSPartitions(ctx context.Context, formats strfmt.Registry) error { + if o.AWSPartitions != nil { if swag.IsZero(o.AWSPartitions) { // not required @@ -373,6 +378,7 @@ func (o *ChangeSettingsBody) contextValidateAWSPartitions(ctx context.Context, f } func (o *ChangeSettingsBody) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -415,6 +421,7 @@ ChangeSettingsDefaultBody change settings default body swagger:model ChangeSettingsDefaultBody */ type ChangeSettingsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -480,7 +487,9 @@ func (o *ChangeSettingsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -496,6 +505,7 @@ func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -608,6 +618,7 @@ ChangeSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized pr swagger:model ChangeSettingsDefaultBodyDetailsItems0 */ type ChangeSettingsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -646,6 +657,7 @@ type ChangeSettingsDefaultBodyDetailsItems0 struct { func (o *ChangeSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -710,6 +722,7 @@ func (o *ChangeSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeSettingsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -800,6 +813,7 @@ ChangeSettingsOKBody change settings OK body swagger:model ChangeSettingsOKBody */ type ChangeSettingsOKBody struct { + // settings Settings *ChangeSettingsOKBodySettings `json:"settings,omitempty"` } @@ -852,6 +866,7 @@ func (o *ChangeSettingsOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ChangeSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { + if o.Settings != nil { if swag.IsZero(o.Settings) { // not required @@ -894,6 +909,7 @@ ChangeSettingsOKBodySettings Settings represents PMM Server settings. swagger:model ChangeSettingsOKBodySettings */ type ChangeSettingsOKBodySettings struct { + // True if updates are enabled. UpdatesEnabled bool `json:"updates_enabled,omitempty"` @@ -1021,6 +1037,7 @@ func (o *ChangeSettingsOKBodySettings) ContextValidate(ctx context.Context, form } func (o *ChangeSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -1041,6 +1058,7 @@ func (o *ChangeSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx co } func (o *ChangeSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1083,6 +1101,7 @@ ChangeSettingsOKBodySettingsAdvisorRunIntervals AdvisorRunIntervals represents i swagger:model ChangeSettingsOKBodySettingsAdvisorRunIntervals */ type ChangeSettingsOKBodySettingsAdvisorRunIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -1126,6 +1145,7 @@ ChangeSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeSettingsOKBodySettingsMetricsResolutions */ type ChangeSettingsOKBodySettingsMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -1169,6 +1189,7 @@ ChangeSettingsParamsBodyAWSPartitions A wrapper for a string array. This type al swagger:model ChangeSettingsParamsBodyAWSPartitions */ type ChangeSettingsParamsBodyAWSPartitions struct { + // values Values []string `json:"values"` } @@ -1206,6 +1227,7 @@ ChangeSettingsParamsBodyAdvisorRunIntervals AdvisorRunIntervals represents inter swagger:model ChangeSettingsParamsBodyAdvisorRunIntervals */ type ChangeSettingsParamsBodyAdvisorRunIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -1249,6 +1271,7 @@ ChangeSettingsParamsBodyMetricsResolutions MetricsResolutions represents Prometh swagger:model ChangeSettingsParamsBodyMetricsResolutions */ type ChangeSettingsParamsBodyMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` diff --git a/api/server/v1/json/client/server_service/check_updates_parameters.go b/api/server/v1/json/client/server_service/check_updates_parameters.go index 9bf5b1322d..601149cc3e 100644 --- a/api/server/v1/json/client/server_service/check_updates_parameters.go +++ b/api/server/v1/json/client/server_service/check_updates_parameters.go @@ -61,6 +61,7 @@ CheckUpdatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CheckUpdatesParams struct { + /* Force. If false, cached information may be returned. @@ -150,6 +151,7 @@ func (o *CheckUpdatesParams) SetOnlyInstalledVersion(onlyInstalledVersion *bool) // WriteToRequest writes these params to a swagger request func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } @@ -181,6 +184,7 @@ func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qOnlyInstalledVersion := swag.FormatBool(qrOnlyInstalledVersion) if qOnlyInstalledVersion != "" { + if err := r.SetQueryParam("only_installed_version", qOnlyInstalledVersion); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/check_updates_responses.go b/api/server/v1/json/client/server_service/check_updates_responses.go index 093065dd97..cc429561ac 100644 --- a/api/server/v1/json/client/server_service/check_updates_responses.go +++ b/api/server/v1/json/client/server_service/check_updates_responses.go @@ -104,6 +104,7 @@ func (o *CheckUpdatesOK) GetPayload() *CheckUpdatesOKBody { } func (o *CheckUpdatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CheckUpdatesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *CheckUpdatesDefault) GetPayload() *CheckUpdatesDefaultBody { } func (o *CheckUpdatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CheckUpdatesDefaultBody) // response payload @@ -192,6 +194,7 @@ CheckUpdatesDefaultBody check updates default body swagger:model CheckUpdatesDefaultBody */ type CheckUpdatesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *CheckUpdatesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -385,6 +391,7 @@ CheckUpdatesDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model CheckUpdatesDefaultBodyDetailsItems0 */ type CheckUpdatesDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -423,6 +430,7 @@ type CheckUpdatesDefaultBodyDetailsItems0 struct { func (o *CheckUpdatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -487,6 +495,7 @@ func (o *CheckUpdatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o CheckUpdatesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -577,6 +586,7 @@ CheckUpdatesOKBody check updates OK body swagger:model CheckUpdatesOKBody */ type CheckUpdatesOKBody struct { + // True if there is a PMM Server update available. UpdateAvailable bool `json:"update_available,omitempty"` @@ -685,6 +695,7 @@ func (o *CheckUpdatesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, formats strfmt.Registry) error { + if o.Installed != nil { if swag.IsZero(o.Installed) { // not required @@ -705,6 +716,7 @@ func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, forma } func (o *CheckUpdatesOKBody) contextValidateLatest(ctx context.Context, formats strfmt.Registry) error { + if o.Latest != nil { if swag.IsZero(o.Latest) { // not required @@ -747,6 +759,7 @@ CheckUpdatesOKBodyInstalled VersionInfo describes component version, or PMM Serv swagger:model CheckUpdatesOKBodyInstalled */ type CheckUpdatesOKBodyInstalled struct { + // User-visible version. Version string `json:"version,omitempty"` @@ -812,6 +825,7 @@ CheckUpdatesOKBodyLatest check updates OK body latest swagger:model CheckUpdatesOKBodyLatest */ type CheckUpdatesOKBodyLatest struct { + // PMM Version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/json/client/server_service/get_settings_parameters.go b/api/server/v1/json/client/server_service/get_settings_parameters.go index a25fa8d3b2..f41cc41534 100644 --- a/api/server/v1/json/client/server_service/get_settings_parameters.go +++ b/api/server/v1/json/client/server_service/get_settings_parameters.go @@ -115,6 +115,7 @@ func (o *GetSettingsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/get_settings_responses.go b/api/server/v1/json/client/server_service/get_settings_responses.go index 5431615125..de95c91cb3 100644 --- a/api/server/v1/json/client/server_service/get_settings_responses.go +++ b/api/server/v1/json/client/server_service/get_settings_responses.go @@ -103,6 +103,7 @@ func (o *GetSettingsOK) GetPayload() *GetSettingsOKBody { } func (o *GetSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetSettingsOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetSettingsDefault) GetPayload() *GetSettingsDefaultBody { } func (o *GetSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetSettingsDefaultBody) // response payload @@ -191,6 +193,7 @@ GetSettingsDefaultBody get settings default body swagger:model GetSettingsDefaultBody */ type GetSettingsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetSettingsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -384,6 +390,7 @@ GetSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model GetSettingsDefaultBodyDetailsItems0 */ type GetSettingsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -422,6 +429,7 @@ type GetSettingsDefaultBodyDetailsItems0 struct { func (o *GetSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -486,6 +494,7 @@ func (o *GetSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetSettingsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -576,6 +585,7 @@ GetSettingsOKBody get settings OK body swagger:model GetSettingsOKBody */ type GetSettingsOKBody struct { + // settings Settings *GetSettingsOKBodySettings `json:"settings,omitempty"` } @@ -628,6 +638,7 @@ func (o *GetSettingsOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { + if o.Settings != nil { if swag.IsZero(o.Settings) { // not required @@ -670,6 +681,7 @@ GetSettingsOKBodySettings Settings represents PMM Server settings. swagger:model GetSettingsOKBodySettings */ type GetSettingsOKBodySettings struct { + // True if updates are enabled. UpdatesEnabled bool `json:"updates_enabled,omitempty"` @@ -797,6 +809,7 @@ func (o *GetSettingsOKBodySettings) ContextValidate(ctx context.Context, formats } func (o *GetSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -817,6 +830,7 @@ func (o *GetSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx conte } func (o *GetSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -859,6 +873,7 @@ GetSettingsOKBodySettingsAdvisorRunIntervals AdvisorRunIntervals represents inte swagger:model GetSettingsOKBodySettingsAdvisorRunIntervals */ type GetSettingsOKBodySettingsAdvisorRunIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -902,6 +917,7 @@ GetSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Promet swagger:model GetSettingsOKBodySettingsMetricsResolutions */ type GetSettingsOKBodySettingsMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` diff --git a/api/server/v1/json/client/server_service/leader_health_check_parameters.go b/api/server/v1/json/client/server_service/leader_health_check_parameters.go index 86cdd9c398..4cb5355dc7 100644 --- a/api/server/v1/json/client/server_service/leader_health_check_parameters.go +++ b/api/server/v1/json/client/server_service/leader_health_check_parameters.go @@ -115,6 +115,7 @@ func (o *LeaderHealthCheckParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *LeaderHealthCheckParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/leader_health_check_responses.go b/api/server/v1/json/client/server_service/leader_health_check_responses.go index b1deec1fbd..4ba7a4a496 100644 --- a/api/server/v1/json/client/server_service/leader_health_check_responses.go +++ b/api/server/v1/json/client/server_service/leader_health_check_responses.go @@ -103,6 +103,7 @@ func (o *LeaderHealthCheckOK) GetPayload() interface{} { } func (o *LeaderHealthCheckOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *LeaderHealthCheckDefault) GetPayload() *LeaderHealthCheckDefaultBody { } func (o *LeaderHealthCheckDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(LeaderHealthCheckDefaultBody) // response payload @@ -189,6 +191,7 @@ LeaderHealthCheckDefaultBody leader health check default body swagger:model LeaderHealthCheckDefaultBody */ type LeaderHealthCheckDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *LeaderHealthCheckDefaultBody) ContextValidate(ctx context.Context, form } func (o *LeaderHealthCheckDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *LeaderHealthCheckDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -382,6 +388,7 @@ LeaderHealthCheckDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized swagger:model LeaderHealthCheckDefaultBodyDetailsItems0 */ type LeaderHealthCheckDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -420,6 +427,7 @@ type LeaderHealthCheckDefaultBodyDetailsItems0 struct { func (o *LeaderHealthCheckDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -484,6 +492,7 @@ func (o *LeaderHealthCheckDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o LeaderHealthCheckDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/server/v1/json/client/server_service/list_change_logs_parameters.go b/api/server/v1/json/client/server_service/list_change_logs_parameters.go index 4160eaf6fa..b801f277d1 100644 --- a/api/server/v1/json/client/server_service/list_change_logs_parameters.go +++ b/api/server/v1/json/client/server_service/list_change_logs_parameters.go @@ -115,6 +115,7 @@ func (o *ListChangeLogsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListChangeLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/list_change_logs_responses.go b/api/server/v1/json/client/server_service/list_change_logs_responses.go index 8abd8afe26..384991c84e 100644 --- a/api/server/v1/json/client/server_service/list_change_logs_responses.go +++ b/api/server/v1/json/client/server_service/list_change_logs_responses.go @@ -104,6 +104,7 @@ func (o *ListChangeLogsOK) GetPayload() *ListChangeLogsOKBody { } func (o *ListChangeLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListChangeLogsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListChangeLogsDefault) GetPayload() *ListChangeLogsDefaultBody { } func (o *ListChangeLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListChangeLogsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListChangeLogsDefaultBody list change logs default body swagger:model ListChangeLogsDefaultBody */ type ListChangeLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *ListChangeLogsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListChangeLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *ListChangeLogsDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -385,6 +391,7 @@ ListChangeLogsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized pr swagger:model ListChangeLogsDefaultBodyDetailsItems0 */ type ListChangeLogsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -423,6 +430,7 @@ type ListChangeLogsDefaultBodyDetailsItems0 struct { func (o *ListChangeLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -487,6 +495,7 @@ func (o *ListChangeLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ListChangeLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -577,6 +586,7 @@ ListChangeLogsOKBody list change logs OK body swagger:model ListChangeLogsOKBody */ type ListChangeLogsOKBody struct { + // List of available updates. Updates []*ListChangeLogsOKBodyUpdatesItems0 `json:"updates"` @@ -656,7 +666,9 @@ func (o *ListChangeLogsOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ListChangeLogsOKBody) contextValidateUpdates(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Updates); i++ { + if o.Updates[i] != nil { if swag.IsZero(o.Updates[i]) { // not required @@ -672,6 +684,7 @@ func (o *ListChangeLogsOKBody) contextValidateUpdates(ctx context.Context, forma return err } } + } return nil @@ -700,6 +713,7 @@ ListChangeLogsOKBodyUpdatesItems0 list change logs OK body updates items0 swagger:model ListChangeLogsOKBodyUpdatesItems0 */ type ListChangeLogsOKBodyUpdatesItems0 struct { + // PMM Version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/json/client/server_service/logs_parameters.go b/api/server/v1/json/client/server_service/logs_parameters.go index eac190ca90..31b876d12f 100644 --- a/api/server/v1/json/client/server_service/logs_parameters.go +++ b/api/server/v1/json/client/server_service/logs_parameters.go @@ -61,6 +61,7 @@ LogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type LogsParams struct { + /* Pprof. Include performance profiling data, @@ -133,6 +134,7 @@ func (o *LogsParams) SetPprof(pprof *bool) { // WriteToRequest writes these params to a swagger request func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -148,6 +150,7 @@ func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry } qPprof := swag.FormatBool(qrPprof) if qPprof != "" { + if err := r.SetQueryParam("pprof", qPprof); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/logs_responses.go b/api/server/v1/json/client/server_service/logs_responses.go index 51d28dc669..e7b5e1a6b7 100644 --- a/api/server/v1/json/client/server_service/logs_responses.go +++ b/api/server/v1/json/client/server_service/logs_responses.go @@ -46,6 +46,7 @@ func (o *LogsReader) ReadResponse(response runtime.ClientResponse, consumer runt // NewLogsOK creates a LogsOK with default headers values func NewLogsOK(writer io.Writer) *LogsOK { return &LogsOK{ + Payload: writer, } } @@ -102,6 +103,7 @@ func (o *LogsOK) GetPayload() io.Writer { } func (o *LogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err @@ -173,6 +175,7 @@ func (o *LogsDefault) GetPayload() *LogsDefaultBody { } func (o *LogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(LogsDefaultBody) // response payload @@ -188,6 +191,7 @@ LogsDefaultBody ErrorResponse is a message returned on HTTP error. swagger:model LogsDefaultBody */ type LogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` diff --git a/api/server/v1/json/client/server_service/readiness_parameters.go b/api/server/v1/json/client/server_service/readiness_parameters.go index 88fbc32380..ed27b25482 100644 --- a/api/server/v1/json/client/server_service/readiness_parameters.go +++ b/api/server/v1/json/client/server_service/readiness_parameters.go @@ -115,6 +115,7 @@ func (o *ReadinessParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ReadinessParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/readiness_responses.go b/api/server/v1/json/client/server_service/readiness_responses.go index eb6439b803..ac87e89462 100644 --- a/api/server/v1/json/client/server_service/readiness_responses.go +++ b/api/server/v1/json/client/server_service/readiness_responses.go @@ -103,6 +103,7 @@ func (o *ReadinessOK) GetPayload() interface{} { } func (o *ReadinessOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -174,6 +175,7 @@ func (o *ReadinessDefault) GetPayload() *ReadinessDefaultBody { } func (o *ReadinessDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ReadinessDefaultBody) // response payload @@ -189,6 +191,7 @@ ReadinessDefaultBody readiness default body swagger:model ReadinessDefaultBody */ type ReadinessDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -254,7 +257,9 @@ func (o *ReadinessDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -270,6 +275,7 @@ func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -382,6 +388,7 @@ ReadinessDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protoco swagger:model ReadinessDefaultBodyDetailsItems0 */ type ReadinessDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -420,6 +427,7 @@ type ReadinessDefaultBodyDetailsItems0 struct { func (o *ReadinessDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -484,6 +492,7 @@ func (o *ReadinessDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ReadinessDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/server/v1/json/client/server_service/start_update_parameters.go b/api/server/v1/json/client/server_service/start_update_parameters.go index 82bb6c7915..9ee4645d34 100644 --- a/api/server/v1/json/client/server_service/start_update_parameters.go +++ b/api/server/v1/json/client/server_service/start_update_parameters.go @@ -60,6 +60,7 @@ StartUpdateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartUpdateParams struct { + // Body. Body StartUpdateBody @@ -129,6 +130,7 @@ func (o *StartUpdateParams) SetBody(body StartUpdateBody) { // WriteToRequest writes these params to a swagger request func (o *StartUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/start_update_responses.go b/api/server/v1/json/client/server_service/start_update_responses.go index e84a835d03..058a9b72b5 100644 --- a/api/server/v1/json/client/server_service/start_update_responses.go +++ b/api/server/v1/json/client/server_service/start_update_responses.go @@ -103,6 +103,7 @@ func (o *StartUpdateOK) GetPayload() *StartUpdateOKBody { } func (o *StartUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartUpdateOKBody) // response payload @@ -176,6 +177,7 @@ func (o *StartUpdateDefault) GetPayload() *StartUpdateDefaultBody { } func (o *StartUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartUpdateDefaultBody) // response payload @@ -191,6 +193,7 @@ StartUpdateBody start update body swagger:model StartUpdateBody */ type StartUpdateBody struct { + // new image NewImage string `json:"new_image,omitempty"` } @@ -228,6 +231,7 @@ StartUpdateDefaultBody start update default body swagger:model StartUpdateDefaultBody */ type StartUpdateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -293,7 +297,9 @@ func (o *StartUpdateDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -309,6 +315,7 @@ func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -421,6 +428,7 @@ StartUpdateDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model StartUpdateDefaultBodyDetailsItems0 */ type StartUpdateDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -459,6 +467,7 @@ type StartUpdateDefaultBodyDetailsItems0 struct { func (o *StartUpdateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -523,6 +532,7 @@ func (o *StartUpdateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartUpdateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -613,6 +623,7 @@ StartUpdateOKBody start update OK body swagger:model StartUpdateOKBody */ type StartUpdateOKBody struct { + // Authentication token for getting update statuses. AuthToken string `json:"auth_token,omitempty"` diff --git a/api/server/v1/json/client/server_service/update_status_parameters.go b/api/server/v1/json/client/server_service/update_status_parameters.go index c9ad778284..fe3f759e40 100644 --- a/api/server/v1/json/client/server_service/update_status_parameters.go +++ b/api/server/v1/json/client/server_service/update_status_parameters.go @@ -60,6 +60,7 @@ UpdateStatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateStatusParams struct { + // Body. Body UpdateStatusBody @@ -129,6 +130,7 @@ func (o *UpdateStatusParams) SetBody(body UpdateStatusBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/update_status_responses.go b/api/server/v1/json/client/server_service/update_status_responses.go index b09accb8ca..1b6b7fe741 100644 --- a/api/server/v1/json/client/server_service/update_status_responses.go +++ b/api/server/v1/json/client/server_service/update_status_responses.go @@ -103,6 +103,7 @@ func (o *UpdateStatusOK) GetPayload() *UpdateStatusOKBody { } func (o *UpdateStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateStatusOKBody) // response payload @@ -176,6 +177,7 @@ func (o *UpdateStatusDefault) GetPayload() *UpdateStatusDefaultBody { } func (o *UpdateStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateStatusDefaultBody) // response payload @@ -191,6 +193,7 @@ UpdateStatusBody update status body swagger:model UpdateStatusBody */ type UpdateStatusBody struct { + // Authentication token. AuthToken string `json:"auth_token,omitempty"` @@ -231,6 +234,7 @@ UpdateStatusDefaultBody update status default body swagger:model UpdateStatusDefaultBody */ type UpdateStatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *UpdateStatusDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -312,6 +318,7 @@ func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -424,6 +431,7 @@ UpdateStatusDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model UpdateStatusDefaultBodyDetailsItems0 */ type UpdateStatusDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -462,6 +470,7 @@ type UpdateStatusDefaultBodyDetailsItems0 struct { func (o *UpdateStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -526,6 +535,7 @@ func (o *UpdateStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateStatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -616,6 +626,7 @@ UpdateStatusOKBody update status OK body swagger:model UpdateStatusOKBody */ type UpdateStatusOKBody struct { + // Progress log lines. LogLines []string `json:"log_lines"` diff --git a/api/server/v1/json/client/server_service/version_parameters.go b/api/server/v1/json/client/server_service/version_parameters.go index 89ff607417..3712817fa8 100644 --- a/api/server/v1/json/client/server_service/version_parameters.go +++ b/api/server/v1/json/client/server_service/version_parameters.go @@ -60,6 +60,7 @@ VersionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type VersionParams struct { + /* Dummy. Dummy parameter for internal testing. Do not use. @@ -132,6 +133,7 @@ func (o *VersionParams) SetDummy(dummy *string) { // WriteToRequest writes these params to a swagger request func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -147,6 +149,7 @@ func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qDummy := qrDummy if qDummy != "" { + if err := r.SetQueryParam("dummy", qDummy); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/version_responses.go b/api/server/v1/json/client/server_service/version_responses.go index 4cf40e1d0c..aeff9e043c 100644 --- a/api/server/v1/json/client/server_service/version_responses.go +++ b/api/server/v1/json/client/server_service/version_responses.go @@ -104,6 +104,7 @@ func (o *VersionOK) GetPayload() *VersionOKBody { } func (o *VersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(VersionOKBody) // response payload @@ -177,6 +178,7 @@ func (o *VersionDefault) GetPayload() *VersionDefaultBody { } func (o *VersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(VersionDefaultBody) // response payload @@ -192,6 +194,7 @@ VersionDefaultBody version default body swagger:model VersionDefaultBody */ type VersionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -257,7 +260,9 @@ func (o *VersionDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -273,6 +278,7 @@ func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -385,6 +391,7 @@ VersionDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol swagger:model VersionDefaultBodyDetailsItems0 */ type VersionDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -423,6 +430,7 @@ type VersionDefaultBodyDetailsItems0 struct { func (o *VersionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -487,6 +495,7 @@ func (o *VersionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o VersionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -577,6 +586,7 @@ VersionOKBody version OK body swagger:model VersionOKBody */ type VersionOKBody struct { + // PMM Server version. Version string `json:"version,omitempty"` @@ -724,6 +734,7 @@ func (o *VersionOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strfmt.Registry) error { + if o.Managed != nil { if swag.IsZero(o.Managed) { // not required @@ -744,6 +755,7 @@ func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strf } func (o *VersionOKBody) contextValidateServer(ctx context.Context, formats strfmt.Registry) error { + if o.Server != nil { if swag.IsZero(o.Server) { // not required @@ -786,6 +798,7 @@ VersionOKBodyManaged VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyManaged */ type VersionOKBodyManaged struct { + // User-visible version. Version string `json:"version,omitempty"` @@ -851,6 +864,7 @@ VersionOKBodyServer VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyServer */ type VersionOKBodyServer struct { + // User-visible version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/server.pb.go b/api/server/v1/server.pb.go index 5afb755095..68ebfac20c 100644 --- a/api/server/v1/server.pb.go +++ b/api/server/v1/server.pb.go @@ -7,17 +7,15 @@ package serverv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - common "github.com/percona/pmm/api/common" + reflect "reflect" + sync "sync" ) const ( @@ -1948,40 +1946,37 @@ func file_server_v1_server_proto_rawDescGZIP() []byte { return file_server_v1_server_proto_rawDescData } -var ( - file_server_v1_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_server_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 23) - file_server_v1_server_proto_goTypes = []any{ - (DistributionMethod)(0), // 0: server.v1.DistributionMethod - (*VersionInfo)(nil), // 1: server.v1.VersionInfo - (*VersionRequest)(nil), // 2: server.v1.VersionRequest - (*VersionResponse)(nil), // 3: server.v1.VersionResponse - (*ReadinessRequest)(nil), // 4: server.v1.ReadinessRequest - (*ReadinessResponse)(nil), // 5: server.v1.ReadinessResponse - (*LeaderHealthCheckRequest)(nil), // 6: server.v1.LeaderHealthCheckRequest - (*LeaderHealthCheckResponse)(nil), // 7: server.v1.LeaderHealthCheckResponse - (*CheckUpdatesRequest)(nil), // 8: server.v1.CheckUpdatesRequest - (*DockerVersionInfo)(nil), // 9: server.v1.DockerVersionInfo - (*CheckUpdatesResponse)(nil), // 10: server.v1.CheckUpdatesResponse - (*ListChangeLogsRequest)(nil), // 11: server.v1.ListChangeLogsRequest - (*ListChangeLogsResponse)(nil), // 12: server.v1.ListChangeLogsResponse - (*StartUpdateRequest)(nil), // 13: server.v1.StartUpdateRequest - (*StartUpdateResponse)(nil), // 14: server.v1.StartUpdateResponse - (*UpdateStatusRequest)(nil), // 15: server.v1.UpdateStatusRequest - (*UpdateStatusResponse)(nil), // 16: server.v1.UpdateStatusResponse - (*MetricsResolutions)(nil), // 17: server.v1.MetricsResolutions - (*AdvisorRunIntervals)(nil), // 18: server.v1.AdvisorRunIntervals - (*Settings)(nil), // 19: server.v1.Settings - (*GetSettingsRequest)(nil), // 20: server.v1.GetSettingsRequest - (*GetSettingsResponse)(nil), // 21: server.v1.GetSettingsResponse - (*ChangeSettingsRequest)(nil), // 22: server.v1.ChangeSettingsRequest - (*ChangeSettingsResponse)(nil), // 23: server.v1.ChangeSettingsResponse - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 25: google.protobuf.Duration - (*common.StringArray)(nil), // 26: common.StringArray - } -) - +var file_server_v1_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_server_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_server_v1_server_proto_goTypes = []any{ + (DistributionMethod)(0), // 0: server.v1.DistributionMethod + (*VersionInfo)(nil), // 1: server.v1.VersionInfo + (*VersionRequest)(nil), // 2: server.v1.VersionRequest + (*VersionResponse)(nil), // 3: server.v1.VersionResponse + (*ReadinessRequest)(nil), // 4: server.v1.ReadinessRequest + (*ReadinessResponse)(nil), // 5: server.v1.ReadinessResponse + (*LeaderHealthCheckRequest)(nil), // 6: server.v1.LeaderHealthCheckRequest + (*LeaderHealthCheckResponse)(nil), // 7: server.v1.LeaderHealthCheckResponse + (*CheckUpdatesRequest)(nil), // 8: server.v1.CheckUpdatesRequest + (*DockerVersionInfo)(nil), // 9: server.v1.DockerVersionInfo + (*CheckUpdatesResponse)(nil), // 10: server.v1.CheckUpdatesResponse + (*ListChangeLogsRequest)(nil), // 11: server.v1.ListChangeLogsRequest + (*ListChangeLogsResponse)(nil), // 12: server.v1.ListChangeLogsResponse + (*StartUpdateRequest)(nil), // 13: server.v1.StartUpdateRequest + (*StartUpdateResponse)(nil), // 14: server.v1.StartUpdateResponse + (*UpdateStatusRequest)(nil), // 15: server.v1.UpdateStatusRequest + (*UpdateStatusResponse)(nil), // 16: server.v1.UpdateStatusResponse + (*MetricsResolutions)(nil), // 17: server.v1.MetricsResolutions + (*AdvisorRunIntervals)(nil), // 18: server.v1.AdvisorRunIntervals + (*Settings)(nil), // 19: server.v1.Settings + (*GetSettingsRequest)(nil), // 20: server.v1.GetSettingsRequest + (*GetSettingsResponse)(nil), // 21: server.v1.GetSettingsResponse + (*ChangeSettingsRequest)(nil), // 22: server.v1.ChangeSettingsRequest + (*ChangeSettingsResponse)(nil), // 23: server.v1.ChangeSettingsResponse + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 25: google.protobuf.Duration + (*common.StringArray)(nil), // 26: common.StringArray +} var file_server_v1_server_proto_depIdxs = []int32{ 24, // 0: server.v1.VersionInfo.timestamp:type_name -> google.protobuf.Timestamp 1, // 1: server.v1.VersionResponse.server:type_name -> server.v1.VersionInfo diff --git a/api/server/v1/server.pb.gw.go b/api/server/v1/server.pb.gw.go index 26253aedbb..a9cb941776 100644 --- a/api/server/v1/server.pb.gw.go +++ b/api/server/v1/server.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join + filter_ServerService_Version_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -var filter_ServerService_Version_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - func request_ServerService_Version_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq VersionRequest var metadata runtime.ServerMetadata @@ -48,6 +48,7 @@ func request_ServerService_Version_0(ctx context.Context, marshaler runtime.Mars msg, err := client.Version(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_Version_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,6 +64,7 @@ func local_request_ServerService_Version_0(ctx context.Context, marshaler runtim msg, err := server.Version(ctx, &protoReq) return msg, metadata, err + } func request_ServerService_Readiness_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -71,6 +73,7 @@ func request_ServerService_Readiness_0(ctx context.Context, marshaler runtime.Ma msg, err := client.Readiness(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_Readiness_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +82,7 @@ func local_request_ServerService_Readiness_0(ctx context.Context, marshaler runt msg, err := server.Readiness(ctx, &protoReq) return msg, metadata, err + } func request_ServerService_LeaderHealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -87,6 +91,7 @@ func request_ServerService_LeaderHealthCheck_0(ctx context.Context, marshaler ru msg, err := client.LeaderHealthCheck(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_LeaderHealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,9 +100,12 @@ func local_request_ServerService_LeaderHealthCheck_0(ctx context.Context, marsha msg, err := server.LeaderHealthCheck(ctx, &protoReq) return msg, metadata, err + } -var filter_ServerService_CheckUpdates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_ServerService_CheckUpdates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_ServerService_CheckUpdates_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CheckUpdatesRequest @@ -112,6 +120,7 @@ func request_ServerService_CheckUpdates_0(ctx context.Context, marshaler runtime msg, err := client.CheckUpdates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_CheckUpdates_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -127,6 +136,7 @@ func local_request_ServerService_CheckUpdates_0(ctx context.Context, marshaler r msg, err := server.CheckUpdates(ctx, &protoReq) return msg, metadata, err + } func request_ServerService_ListChangeLogs_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -135,6 +145,7 @@ func request_ServerService_ListChangeLogs_0(ctx context.Context, marshaler runti msg, err := client.ListChangeLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_ListChangeLogs_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,6 +154,7 @@ func local_request_ServerService_ListChangeLogs_0(ctx context.Context, marshaler msg, err := server.ListChangeLogs(ctx, &protoReq) return msg, metadata, err + } func request_ServerService_StartUpdate_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -155,6 +167,7 @@ func request_ServerService_StartUpdate_0(ctx context.Context, marshaler runtime. msg, err := client.StartUpdate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_StartUpdate_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -167,6 +180,7 @@ func local_request_ServerService_StartUpdate_0(ctx context.Context, marshaler ru msg, err := server.StartUpdate(ctx, &protoReq) return msg, metadata, err + } func request_ServerService_UpdateStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -179,6 +193,7 @@ func request_ServerService_UpdateStatus_0(ctx context.Context, marshaler runtime msg, err := client.UpdateStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_UpdateStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -191,6 +206,7 @@ func local_request_ServerService_UpdateStatus_0(ctx context.Context, marshaler r msg, err := server.UpdateStatus(ctx, &protoReq) return msg, metadata, err + } func request_ServerService_GetSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -199,6 +215,7 @@ func request_ServerService_GetSettings_0(ctx context.Context, marshaler runtime. msg, err := client.GetSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_GetSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -207,6 +224,7 @@ func local_request_ServerService_GetSettings_0(ctx context.Context, marshaler ru msg, err := server.GetSettings(ctx, &protoReq) return msg, metadata, err + } func request_ServerService_ChangeSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -219,6 +237,7 @@ func request_ServerService_ChangeSettings_0(ctx context.Context, marshaler runti msg, err := client.ChangeSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_ServerService_ChangeSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -231,6 +250,7 @@ func local_request_ServerService_ChangeSettings_0(ctx context.Context, marshaler msg, err := server.ChangeSettings(ctx, &protoReq) return msg, metadata, err + } // RegisterServerServiceHandlerServer registers the http handlers for service ServerService to "mux". @@ -239,6 +259,7 @@ func local_request_ServerService_ChangeSettings_0(ctx context.Context, marshaler // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServerServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServerServiceServer) error { + mux.Handle("GET", pattern_ServerService_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -261,6 +282,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_Readiness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -285,6 +307,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_Readiness_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_LeaderHealthCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -309,6 +332,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_LeaderHealthCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_CheckUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -333,6 +357,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_CheckUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_ListChangeLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -357,6 +382,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ListChangeLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ServerService_StartUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -381,6 +407,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_StartUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ServerService_UpdateStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -405,6 +432,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_UpdateStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_GetSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -429,6 +457,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_GetSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_ServerService_ChangeSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -453,6 +482,7 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -495,6 +525,7 @@ func RegisterServerServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServerServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerServiceClient) error { + mux.Handle("GET", pattern_ServerService_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -514,6 +545,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_Readiness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -535,6 +567,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_Readiness_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_LeaderHealthCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -556,6 +589,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_LeaderHealthCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_CheckUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -577,6 +611,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_CheckUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_ListChangeLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -598,6 +633,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ListChangeLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ServerService_StartUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -619,6 +655,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_StartUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("POST", pattern_ServerService_UpdateStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -640,6 +677,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_UpdateStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_ServerService_GetSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -661,6 +699,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_GetSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_ServerService_ChangeSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -682,6 +721,7 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/server/v1/server.pb.validate.go b/api/server/v1/server.pb.validate.go index 48dad7e546..b14ed39f7f 100644 --- a/api/server/v1/server.pb.validate.go +++ b/api/server/v1/server.pb.validate.go @@ -2907,6 +2907,7 @@ func (m *ChangeSettingsRequest) validate(all bool) error { } if m.AwsPartitions != nil { + if all { switch v := interface{}(m.GetAwsPartitions()).(type) { case interface{ ValidateAll() error }: @@ -2935,6 +2936,7 @@ func (m *ChangeSettingsRequest) validate(all bool) error { } } } + } if m.EnableAdvisor != nil { diff --git a/api/server/v1/server_grpc.pb.go b/api/server/v1/server_grpc.pb.go index 1e91e3cc14..17cf2c8ee6 100644 --- a/api/server/v1/server_grpc.pb.go +++ b/api/server/v1/server_grpc.pb.go @@ -8,7 +8,6 @@ package serverv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -194,35 +193,27 @@ type UnimplementedServerServiceServer struct{} func (UnimplementedServerServiceServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") } - func (UnimplementedServerServiceServer) Readiness(context.Context, *ReadinessRequest) (*ReadinessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Readiness not implemented") } - func (UnimplementedServerServiceServer) LeaderHealthCheck(context.Context, *LeaderHealthCheckRequest) (*LeaderHealthCheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LeaderHealthCheck not implemented") } - func (UnimplementedServerServiceServer) CheckUpdates(context.Context, *CheckUpdatesRequest) (*CheckUpdatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckUpdates not implemented") } - func (UnimplementedServerServiceServer) ListChangeLogs(context.Context, *ListChangeLogsRequest) (*ListChangeLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListChangeLogs not implemented") } - func (UnimplementedServerServiceServer) StartUpdate(context.Context, *StartUpdateRequest) (*StartUpdateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartUpdate not implemented") } - func (UnimplementedServerServiceServer) UpdateStatus(context.Context, *UpdateStatusRequest) (*UpdateStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStatus not implemented") } - func (UnimplementedServerServiceServer) GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") } - func (UnimplementedServerServiceServer) ChangeSettings(context.Context, *ChangeSettingsRequest) (*ChangeSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeSettings not implemented") } diff --git a/api/uievents/v1/server.pb.go b/api/uievents/v1/server.pb.go index 22a36775af..aef7f50cb2 100644 --- a/api/uievents/v1/server.pb.go +++ b/api/uievents/v1/server.pb.go @@ -7,13 +7,12 @@ package uieventsv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -529,19 +528,16 @@ func file_uievents_v1_server_proto_rawDescGZIP() []byte { return file_uievents_v1_server_proto_rawDescData } -var ( - file_uievents_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_uievents_v1_server_proto_goTypes = []any{ - (*NotificationEvent)(nil), // 0: uievents.v1.NotificationEvent - (*FetchingEvent)(nil), // 1: uievents.v1.FetchingEvent - (*DashboardUsageEvent)(nil), // 2: uievents.v1.DashboardUsageEvent - (*UserFlowEvent)(nil), // 3: uievents.v1.UserFlowEvent - (*StoreRequest)(nil), // 4: uievents.v1.StoreRequest - (*StoreResponse)(nil), // 5: uievents.v1.StoreResponse - nil, // 6: uievents.v1.UserFlowEvent.ParamsEntry - } -) - +var file_uievents_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_uievents_v1_server_proto_goTypes = []any{ + (*NotificationEvent)(nil), // 0: uievents.v1.NotificationEvent + (*FetchingEvent)(nil), // 1: uievents.v1.FetchingEvent + (*DashboardUsageEvent)(nil), // 2: uievents.v1.DashboardUsageEvent + (*UserFlowEvent)(nil), // 3: uievents.v1.UserFlowEvent + (*StoreRequest)(nil), // 4: uievents.v1.StoreRequest + (*StoreResponse)(nil), // 5: uievents.v1.StoreResponse + nil, // 6: uievents.v1.UserFlowEvent.ParamsEntry +} var file_uievents_v1_server_proto_depIdxs = []int32{ 6, // 0: uievents.v1.UserFlowEvent.params:type_name -> uievents.v1.UserFlowEvent.ParamsEntry 0, // 1: uievents.v1.StoreRequest.notifications:type_name -> uievents.v1.NotificationEvent diff --git a/api/uievents/v1/server.pb.gw.go b/api/uievents/v1/server.pb.gw.go index 784ea0403f..c42a546251 100644 --- a/api/uievents/v1/server.pb.gw.go +++ b/api/uievents/v1/server.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_UIEventsService_Store_0(ctx context.Context, marshaler runtime.Marshaler, client UIEventsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StoreRequest @@ -43,6 +41,7 @@ func request_UIEventsService_Store_0(ctx context.Context, marshaler runtime.Mars msg, err := client.Store(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_UIEventsService_Store_0(ctx context.Context, marshaler runtime.Marshaler, server UIEventsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -55,6 +54,7 @@ func local_request_UIEventsService_Store_0(ctx context.Context, marshaler runtim msg, err := server.Store(ctx, &protoReq) return msg, metadata, err + } // RegisterUIEventsServiceHandlerServer registers the http handlers for service UIEventsService to "mux". @@ -63,6 +63,7 @@ func local_request_UIEventsService_Store_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUIEventsServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterUIEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UIEventsServiceServer) error { + mux.Handle("POST", pattern_UIEventsService_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -85,6 +86,7 @@ func RegisterUIEventsServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_UIEventsService_Store_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -127,6 +129,7 @@ func RegisterUIEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UIEventsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterUIEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UIEventsServiceClient) error { + mux.Handle("POST", pattern_UIEventsService_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -146,11 +149,16 @@ func RegisterUIEventsServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_UIEventsService_Store_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } -var pattern_UIEventsService_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) +var ( + pattern_UIEventsService_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) +) -var forward_UIEventsService_Store_0 = runtime.ForwardResponseMessage +var ( + forward_UIEventsService_Store_0 = runtime.ForwardResponseMessage +) diff --git a/api/uievents/v1/server_grpc.pb.go b/api/uievents/v1/server_grpc.pb.go index b763803e1f..b392738521 100644 --- a/api/uievents/v1/server_grpc.pb.go +++ b/api/uievents/v1/server_grpc.pb.go @@ -8,7 +8,6 @@ package uieventsv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/user/v1/json/client/user_service/get_user_parameters.go b/api/user/v1/json/client/user_service/get_user_parameters.go index 9d7ebe5ff7..8bf63bd7f8 100644 --- a/api/user/v1/json/client/user_service/get_user_parameters.go +++ b/api/user/v1/json/client/user_service/get_user_parameters.go @@ -115,6 +115,7 @@ func (o *GetUserParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/get_user_responses.go b/api/user/v1/json/client/user_service/get_user_responses.go index e9ef71e832..5fd99d2fc3 100644 --- a/api/user/v1/json/client/user_service/get_user_responses.go +++ b/api/user/v1/json/client/user_service/get_user_responses.go @@ -103,6 +103,7 @@ func (o *GetUserOK) GetPayload() *GetUserOKBody { } func (o *GetUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetUserOKBody) // response payload @@ -176,6 +177,7 @@ func (o *GetUserDefault) GetPayload() *GetUserDefaultBody { } func (o *GetUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetUserDefaultBody) // response payload @@ -191,6 +193,7 @@ GetUserDefaultBody get user default body swagger:model GetUserDefaultBody */ type GetUserDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *GetUserDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -300,6 +306,7 @@ GetUserDefaultBodyDetailsItems0 get user default body details items0 swagger:model GetUserDefaultBodyDetailsItems0 */ type GetUserDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type GetUserDefaultBodyDetailsItems0 struct { func (o *GetUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *GetUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetUserDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ GetUserOKBody get user OK body swagger:model GetUserOKBody */ type GetUserOKBody struct { + // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/json/client/user_service/list_users_parameters.go b/api/user/v1/json/client/user_service/list_users_parameters.go index 1d3c35510b..d5b20ea07c 100644 --- a/api/user/v1/json/client/user_service/list_users_parameters.go +++ b/api/user/v1/json/client/user_service/list_users_parameters.go @@ -115,6 +115,7 @@ func (o *ListUsersParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/list_users_responses.go b/api/user/v1/json/client/user_service/list_users_responses.go index 2c5cfcf892..01ece2d1c9 100644 --- a/api/user/v1/json/client/user_service/list_users_responses.go +++ b/api/user/v1/json/client/user_service/list_users_responses.go @@ -103,6 +103,7 @@ func (o *ListUsersOK) GetPayload() *ListUsersOKBody { } func (o *ListUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListUsersOKBody) // response payload @@ -176,6 +177,7 @@ func (o *ListUsersDefault) GetPayload() *ListUsersDefaultBody { } func (o *ListUsersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListUsersDefaultBody) // response payload @@ -191,6 +193,7 @@ ListUsersDefaultBody list users default body swagger:model ListUsersDefaultBody */ type ListUsersDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -256,7 +259,9 @@ func (o *ListUsersDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -272,6 +277,7 @@ func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -300,6 +306,7 @@ ListUsersDefaultBodyDetailsItems0 list users default body details items0 swagger:model ListUsersDefaultBodyDetailsItems0 */ type ListUsersDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -311,6 +318,7 @@ type ListUsersDefaultBodyDetailsItems0 struct { func (o *ListUsersDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -348,6 +356,7 @@ func (o *ListUsersDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListUsersDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -411,6 +420,7 @@ ListUsersOKBody list users OK body swagger:model ListUsersOKBody */ type ListUsersOKBody struct { + // users Users []*ListUsersOKBodyUsersItems0 `json:"users"` } @@ -470,7 +480,9 @@ func (o *ListUsersOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Users); i++ { + if o.Users[i] != nil { if swag.IsZero(o.Users[i]) { // not required @@ -486,6 +498,7 @@ func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strf return err } } + } return nil @@ -514,6 +527,7 @@ ListUsersOKBodyUsersItems0 list users OK body users items0 swagger:model ListUsersOKBodyUsersItems0 */ type ListUsersOKBodyUsersItems0 struct { + // user id UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/json/client/user_service/update_user_parameters.go b/api/user/v1/json/client/user_service/update_user_parameters.go index c1e0a19fa5..d98c9c45bb 100644 --- a/api/user/v1/json/client/user_service/update_user_parameters.go +++ b/api/user/v1/json/client/user_service/update_user_parameters.go @@ -60,6 +60,7 @@ UpdateUserParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateUserParams struct { + // Body. Body UpdateUserBody @@ -129,6 +130,7 @@ func (o *UpdateUserParams) SetBody(body UpdateUserBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/update_user_responses.go b/api/user/v1/json/client/user_service/update_user_responses.go index 93a7ec4357..f3ddbaa09d 100644 --- a/api/user/v1/json/client/user_service/update_user_responses.go +++ b/api/user/v1/json/client/user_service/update_user_responses.go @@ -103,6 +103,7 @@ func (o *UpdateUserOK) GetPayload() *UpdateUserOKBody { } func (o *UpdateUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateUserOKBody) // response payload @@ -176,6 +177,7 @@ func (o *UpdateUserDefault) GetPayload() *UpdateUserDefaultBody { } func (o *UpdateUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateUserDefaultBody) // response payload @@ -191,6 +193,7 @@ UpdateUserBody update user body swagger:model UpdateUserBody */ type UpdateUserBody struct { + // Product Tour ProductTourCompleted *bool `json:"product_tour_completed,omitempty"` @@ -234,6 +237,7 @@ UpdateUserDefaultBody update user default body swagger:model UpdateUserDefaultBody */ type UpdateUserDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -299,7 +303,9 @@ func (o *UpdateUserDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -315,6 +321,7 @@ func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -343,6 +350,7 @@ UpdateUserDefaultBodyDetailsItems0 update user default body details items0 swagger:model UpdateUserDefaultBodyDetailsItems0 */ type UpdateUserDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -354,6 +362,7 @@ type UpdateUserDefaultBodyDetailsItems0 struct { func (o *UpdateUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -391,6 +400,7 @@ func (o *UpdateUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateUserDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -454,6 +464,7 @@ UpdateUserOKBody update user OK body swagger:model UpdateUserOKBody */ type UpdateUserOKBody struct { + // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/user.pb.go b/api/user/v1/user.pb.go index 703d234e8b..159b850422 100644 --- a/api/user/v1/user.pb.go +++ b/api/user/v1/user.pb.go @@ -7,13 +7,12 @@ package userv1 import ( - reflect "reflect" - sync "sync" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( @@ -522,19 +521,16 @@ func file_user_v1_user_proto_rawDescGZIP() []byte { return file_user_v1_user_proto_rawDescData } -var ( - file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_user_v1_user_proto_goTypes = []any{ - (*GetUserRequest)(nil), // 0: user.v1.GetUserRequest - (*GetUserResponse)(nil), // 1: user.v1.GetUserResponse - (*UpdateUserRequest)(nil), // 2: user.v1.UpdateUserRequest - (*UpdateUserResponse)(nil), // 3: user.v1.UpdateUserResponse - (*ListUsersRequest)(nil), // 4: user.v1.ListUsersRequest - (*ListUsersResponse)(nil), // 5: user.v1.ListUsersResponse - (*ListUsersResponse_UserDetail)(nil), // 6: user.v1.ListUsersResponse.UserDetail - } -) - +var file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_user_v1_user_proto_goTypes = []any{ + (*GetUserRequest)(nil), // 0: user.v1.GetUserRequest + (*GetUserResponse)(nil), // 1: user.v1.GetUserResponse + (*UpdateUserRequest)(nil), // 2: user.v1.UpdateUserRequest + (*UpdateUserResponse)(nil), // 3: user.v1.UpdateUserResponse + (*ListUsersRequest)(nil), // 4: user.v1.ListUsersRequest + (*ListUsersResponse)(nil), // 5: user.v1.ListUsersResponse + (*ListUsersResponse_UserDetail)(nil), // 6: user.v1.ListUsersResponse.UserDetail +} var file_user_v1_user_proto_depIdxs = []int32{ 6, // 0: user.v1.ListUsersResponse.users:type_name -> user.v1.ListUsersResponse.UserDetail 0, // 1: user.v1.UserService.GetUser:input_type -> user.v1.GetUserRequest diff --git a/api/user/v1/user.pb.gw.go b/api/user/v1/user.pb.gw.go index 890714f191..0f372e1c20 100644 --- a/api/user/v1/user.pb.gw.go +++ b/api/user/v1/user.pb.gw.go @@ -24,14 +24,12 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetUserRequest @@ -39,6 +37,7 @@ func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -47,6 +46,7 @@ func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime. msg, err := server.GetUser(ctx, &protoReq) return msg, metadata, err + } func request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -59,6 +59,7 @@ func request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Mar msg, err := client.UpdateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -71,6 +72,7 @@ func local_request_UserService_UpdateUser_0(ctx context.Context, marshaler runti msg, err := server.UpdateUser(ctx, &protoReq) return msg, metadata, err + } func request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -79,6 +81,7 @@ func request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -87,6 +90,7 @@ func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtim msg, err := server.ListUsers(ctx, &protoReq) return msg, metadata, err + } // RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". @@ -95,6 +99,7 @@ func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error { + mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -117,6 +122,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -141,6 +147,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_UserService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -165,6 +172,7 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_UserService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -207,6 +215,7 @@ func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error { + mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -226,6 +235,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("PUT", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -247,6 +257,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_UserService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -268,6 +279,7 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_UserService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/api/user/v1/user_grpc.pb.go b/api/user/v1/user_grpc.pb.go index 2a74efe6ff..307067de16 100644 --- a/api/user/v1/user_grpc.pb.go +++ b/api/user/v1/user_grpc.pb.go @@ -8,7 +8,6 @@ package userv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -96,11 +95,9 @@ type UnimplementedUserServiceServer struct{} func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } - func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") } - func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") } diff --git a/get-pmm.sh b/get-pmm.sh index 1b498de6e9..2fd68c2b72 100755 --- a/get-pmm.sh +++ b/get-pmm.sh @@ -346,7 +346,7 @@ start_pmm() { # get container tag from inspect old_version=$(run_docker "inspect --format='{{.Config.Image}}' $container_name | cut -d':' -f2") # if tag starts with 2.x, we need to migrate data - if [[ "$old_version" == 2.* ]]; then + if [[ "$old_version" == "2" || "$old_version" == 2.* || "$old_version" == "dev-latest" ]]; then migrate_pmm_data fi run_docker "rename $container_name $pmm_archive\n" diff --git a/managed/models/agent_helpers.go b/managed/models/agent_helpers.go index f588fd4f17..76d64b020c 100644 --- a/managed/models/agent_helpers.go +++ b/managed/models/agent_helpers.go @@ -44,15 +44,12 @@ type MySQLOptionsParams interface { } // MySQLOptionsFromRequest creates MySQLOptions object from request. -func MySQLOptionsFromRequest(params MySQLOptionsParams) *MySQLOptions { - if params.GetTlsCa() != "" || params.GetTlsCert() != "" || params.GetTlsKey() != "" { - return &MySQLOptions{ - TLSCa: params.GetTlsCa(), - TLSCert: params.GetTlsCert(), - TLSKey: params.GetTlsKey(), - } +func MySQLOptionsFromRequest(params MySQLOptionsParams) MySQLOptions { + return MySQLOptions{ + TLSCa: params.GetTlsCa(), + TLSCert: params.GetTlsCert(), + TLSKey: params.GetTlsKey(), } - return &MySQLOptions{} } // PostgreSQLOptionsParams contains methods to create PostgreSQLOptions object. @@ -69,13 +66,11 @@ type PostgreSQLExtendedOptionsParams interface { } // PostgreSQLOptionsFromRequest creates PostgreSQLOptions object from request. -func PostgreSQLOptionsFromRequest(params PostgreSQLOptionsParams) *PostgreSQLOptions { - res := &PostgreSQLOptions{} - if params.GetTlsCa() != "" || params.GetTlsCert() != "" || params.GetTlsKey() != "" { - res.SSLCa = params.GetTlsCa() - res.SSLCert = params.GetTlsCert() - res.SSLKey = params.GetTlsKey() - } +func PostgreSQLOptionsFromRequest(params PostgreSQLOptionsParams) PostgreSQLOptions { + res := PostgreSQLOptions{} + res.SSLCa = params.GetTlsCa() + res.SSLCert = params.GetTlsCert() + res.SSLKey = params.GetTlsKey() // PostgreSQL exporter has these parameters but they are not needed for QAN agent. if extendedOptions, ok := params.(PostgreSQLExtendedOptionsParams); ok && extendedOptions != nil { @@ -103,20 +98,15 @@ type MongoDBExtendedOptionsParams interface { } // MongoDBOptionsFromRequest creates MongoDBOptionsParams object from request. -func MongoDBOptionsFromRequest(params MongoDBOptionsParams) *MongoDBOptions { - mdbOptions := &MongoDBOptions{} +func MongoDBOptionsFromRequest(params MongoDBOptionsParams) MongoDBOptions { + mdbOptions := MongoDBOptions{} - if params.GetTlsCertificateKey() != "" || params.GetTlsCertificateKeyFilePassword() != "" || params.GetTlsCa() != "" { - mdbOptions = &MongoDBOptions{} - mdbOptions.TLSCertificateKey = params.GetTlsCertificateKey() - mdbOptions.TLSCertificateKeyFilePassword = params.GetTlsCertificateKeyFilePassword() - mdbOptions.TLSCa = params.GetTlsCa() - } + mdbOptions.TLSCertificateKey = params.GetTlsCertificateKey() + mdbOptions.TLSCertificateKeyFilePassword = params.GetTlsCertificateKeyFilePassword() + mdbOptions.TLSCa = params.GetTlsCa() - if params.GetAuthenticationMechanism() != "" || params.GetAuthenticationDatabase() != "" { - mdbOptions.AuthenticationMechanism = params.GetAuthenticationMechanism() - mdbOptions.AuthenticationDatabase = params.GetAuthenticationDatabase() - } + mdbOptions.AuthenticationMechanism = params.GetAuthenticationMechanism() + mdbOptions.AuthenticationDatabase = params.GetAuthenticationDatabase() // MongoDB exporter has these parameters but they are not needed for QAN agent. if extendedOptions, ok := params.(MongoDBExtendedOptionsParams); ok { @@ -140,10 +130,10 @@ type AzureOptionsParams interface { } // AzureOptionsFromRequest creates AzureOptions object from request. -func AzureOptionsFromRequest(params AzureOptionsParams) *AzureOptions { +func AzureOptionsFromRequest(params AzureOptionsParams) AzureOptions { if params.GetAzureSubscriptionId() != "" || params.GetAzureClientId() != "" || params.GetAzureClientSecret() != "" || params.GetAzureTenantId() != "" || params.GetAzureResourceGroup() != "" { - return &AzureOptions{ + return AzureOptions{ SubscriptionID: params.GetAzureSubscriptionId(), ClientID: params.GetAzureClientId(), ClientSecret: params.GetAzureClientSecret(), @@ -151,7 +141,7 @@ func AzureOptionsFromRequest(params AzureOptionsParams) *AzureOptions { ResourceGroup: params.GetAzureResourceGroup(), } } - return nil + return AzureOptions{} } func checkUniqueAgentID(q *reform.Querier, id string) error { @@ -644,7 +634,7 @@ func CreateNodeExporter(q *reform.Querier, PMMAgentID: &pmmAgentID, NodeID: pmmAgent.RunsOnNodeID, AgentPassword: agentPassword, - ExporterOptions: &ExporterOptions{ + ExporterOptions: ExporterOptions{ ExposeExporter: exposeExporter, PushMetrics: pushMetrics, DisabledCollectors: disableCollectors, @@ -734,7 +724,7 @@ func CreateExternalExporter(q *reform.Querier, params *CreateExternalExporterPar Username: pointer.ToStringOrNil(params.Username), Password: pointer.ToStringOrNil(params.Password), ListenPort: pointer.ToUint16(uint16(params.ListenPort)), - ExporterOptions: &ExporterOptions{ + ExporterOptions: ExporterOptions{ PushMetrics: params.PushMetrics, MetricsPath: metricsPath, MetricsScheme: scheme, @@ -765,13 +755,13 @@ type CreateAgentParams struct { TLS bool TLSSkipVerify bool LogLevel string - ExporterOptions *ExporterOptions - QANOptions *QANOptions - AWSOptions *AWSOptions - AzureOptions *AzureOptions - MongoDBOptions *MongoDBOptions - MySQLOptions *MySQLOptions - PostgreSQLOptions *PostgreSQLOptions + ExporterOptions ExporterOptions + QANOptions QANOptions + AWSOptions AWSOptions + AzureOptions AzureOptions + MongoDBOptions MongoDBOptions + MySQLOptions MySQLOptions + PostgreSQLOptions PostgreSQLOptions } func compatibleNodeAndAgent(nodeType NodeType, agentType AgentType) bool { @@ -852,32 +842,6 @@ func compatibleServiceAndAgent(serviceType ServiceType, agentType AgentType) boo return false } -func prepareOptionsParams(params *CreateAgentParams) *CreateAgentParams { - if params.ExporterOptions == nil { - params.ExporterOptions = &ExporterOptions{} - } - if params.QANOptions == nil { - params.QANOptions = &QANOptions{} - } - if params.AWSOptions == nil { - params.AWSOptions = &AWSOptions{} - } - if params.AzureOptions == nil { - params.AzureOptions = &AzureOptions{} - } - if params.MongoDBOptions == nil { - params.MongoDBOptions = &MongoDBOptions{} - } - if params.MySQLOptions == nil { - params.MySQLOptions = &MySQLOptions{} - } - if params.PostgreSQLOptions == nil { - params.PostgreSQLOptions = &PostgreSQLOptions{} - } - - return params -} - // CreateAgent creates Agent with given type. func CreateAgent(q *reform.Querier, agentType AgentType, params *CreateAgentParams) (*Agent, error) { //nolint:unparam id := uuid.New().String() @@ -885,8 +849,6 @@ func CreateAgent(q *reform.Querier, agentType AgentType, params *CreateAgentPara return nil, err } - params = prepareOptionsParams(params) - pmmAgent, err := FindAgentByID(q, params.PMMAgentID) if err != nil { return nil, err diff --git a/managed/models/agent_helpers_test.go b/managed/models/agent_helpers_test.go index b4706fee0e..3fed20a0eb 100644 --- a/managed/models/agent_helpers_test.go +++ b/managed/models/agent_helpers_test.go @@ -104,7 +104,7 @@ func TestAgentHelpers(t *testing.T) { RunsOnNodeID: nil, NodeID: pointer.ToString("N2"), ListenPort: pointer.ToUint16(8200), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: true, }, }, @@ -125,14 +125,14 @@ func TestAgentHelpers(t *testing.T) { ListenPort: pointer.ToUint16(8200), TLS: true, TLSSkipVerify: true, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ MetricsResolutions: &models.MetricsResolutions{ HR: 1 * time.Minute, MR: 5 * time.Minute, LR: 15 * time.Minute, }, }, - PostgreSQLOptions: &models.PostgreSQLOptions{ + PostgreSQLOptions: models.PostgreSQLOptions{ SSLCa: "ssl_ca", SSLCert: "ssl_cert", SSLKey: "ssl_key", @@ -147,7 +147,7 @@ func TestAgentHelpers(t *testing.T) { ListenPort: pointer.ToUint16(8200), TLS: true, TLSSkipVerify: true, - MongoDBOptions: &models.MongoDBOptions{ + MongoDBOptions: models.MongoDBOptions{ TLSCertificateKey: "tls_certificate_key", TLSCertificateKeyFilePassword: "tls_certificate_key_file_password", TLSCa: "tls_ca", @@ -166,7 +166,7 @@ func TestAgentHelpers(t *testing.T) { ListenPort: pointer.ToUint16(8200), TLS: true, TLSSkipVerify: true, - MongoDBOptions: &models.MongoDBOptions{ + MongoDBOptions: models.MongoDBOptions{ TLSCertificateKey: "tls_certificate_key", TLSCertificateKeyFilePassword: "tls_certificate_key_file_password", TLSCa: "tls_ca", @@ -218,13 +218,13 @@ func TestAgentHelpers(t *testing.T) { ListenPort: pointer.ToUint16(8200), TLS: true, TLSSkipVerify: true, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }, { AgentID: "A3", @@ -235,13 +235,13 @@ func TestAgentHelpers(t *testing.T) { UpdatedAt: now, NodeID: pointer.ToString("N1"), Status: models.AgentStatusUnknown, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }, { AgentID: "A7", @@ -254,19 +254,19 @@ func TestAgentHelpers(t *testing.T) { ListenPort: pointer.ToUint16OrNil(8200), TLS: true, TLSSkipVerify: true, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ MetricsResolutions: &models.MetricsResolutions{ HR: 1 * time.Minute, MR: 5 * time.Minute, LR: 15 * time.Minute, }, }, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{ + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{ SSLCa: "ssl_ca", SSLCert: "ssl_cert", SSLKey: "ssl_key", @@ -283,11 +283,11 @@ func TestAgentHelpers(t *testing.T) { ListenPort: pointer.ToUint16OrNil(8200), TLS: true, TLSSkipVerify: true, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{ + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{ TLSCertificateKey: "tls_certificate_key", TLSCertificateKeyFilePassword: "tls_certificate_key_file_password", TLSCa: "tls_ca", @@ -296,8 +296,8 @@ func TestAgentHelpers(t *testing.T) { StatsCollections: nil, CollectionsLimit: 0, // no limit }, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }, { AgentID: "A9", @@ -310,11 +310,11 @@ func TestAgentHelpers(t *testing.T) { ListenPort: pointer.ToUint16OrNil(8200), TLS: true, TLSSkipVerify: true, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{ + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{ TLSCertificateKey: "tls_certificate_key", TLSCertificateKeyFilePassword: "tls_certificate_key_file_password", TLSCa: "tls_ca", @@ -324,8 +324,8 @@ func TestAgentHelpers(t *testing.T) { CollectionsLimit: 79014, EnableAllCollectors: true, }, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }, } assert.Equal(t, expected, agents) @@ -346,13 +346,13 @@ func TestAgentHelpers(t *testing.T) { CreatedAt: now, UpdatedAt: now, Status: models.AgentStatusUnknown, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }, { AgentID: "A3", AgentType: models.NodeExporterType, @@ -362,13 +362,13 @@ func TestAgentHelpers(t *testing.T) { CreatedAt: now, UpdatedAt: now, Status: models.AgentStatusUnknown, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }} assert.Equal(t, expected, agents) }) @@ -388,13 +388,13 @@ func TestAgentHelpers(t *testing.T) { CreatedAt: now, UpdatedAt: now, Status: models.AgentStatusUnknown, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }} assert.Equal(t, expected, agents) }) @@ -414,13 +414,13 @@ func TestAgentHelpers(t *testing.T) { CreatedAt: now, UpdatedAt: now, Status: models.AgentStatusUnknown, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }} assert.Equal(t, expected, agents) @@ -435,13 +435,13 @@ func TestAgentHelpers(t *testing.T) { CreatedAt: now, UpdatedAt: now, Status: models.AgentStatusUnknown, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, }} assert.Equal(t, expected, agents) @@ -476,13 +476,13 @@ func TestAgentHelpers(t *testing.T) { RunsOnNodeID: pointer.ToString("N1"), CreatedAt: now, UpdatedAt: now, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - AWSOptions: &models.AWSOptions{}, - AzureOptions: &models.AzureOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + AWSOptions: models.AWSOptions{}, + AzureOptions: models.AzureOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } agent, err = models.RemoveAgent(q, "A1", models.RemoveCascade) assert.Equal(t, expected, agent) @@ -545,7 +545,7 @@ func TestAgentHelpers(t *testing.T) { RunsOnNodeID: pointer.ToString("N1"), ServiceID: pointer.ToString("S1"), ListenPort: pointer.ToUint16(9104), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ MetricsPath: "/metrics", MetricsScheme: "http", }, diff --git a/managed/models/agent_model.go b/managed/models/agent_model.go index 5cc5b70ca8..78f0c934be 100644 --- a/managed/models/agent_model.go +++ b/managed/models/agent_model.go @@ -89,7 +89,7 @@ type ExporterOptions struct { } // Value implements database/sql/driver.Valuer interface. Should be defined on the value. -func (c *ExporterOptions) Value() (driver.Value, error) { return jsonValue(c) } +func (c ExporterOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *ExporterOptions) Scan(src interface{}) error { return jsonScan(c, src) } @@ -103,7 +103,7 @@ type QANOptions struct { } // Value implements database/sql/driver.Valuer interface. Should be defined on the value. -func (c *QANOptions) Value() (driver.Value, error) { return jsonValue(c) } +func (c QANOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *QANOptions) Scan(src interface{}) error { return jsonScan(c, src) } @@ -117,11 +117,18 @@ type AWSOptions struct { } // Value implements database/sql/driver.Valuer interface. Should be defined on the value. -func (c *AWSOptions) Value() (driver.Value, error) { return jsonValue(c) } +func (c AWSOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *AWSOptions) Scan(src interface{}) error { return jsonScan(c, src) } +func (c AWSOptions) IsEmpty() bool { + return c.AWSAccessKey == "" && + c.AWSSecretKey == "" && + !c.RDSBasicMetricsDisabled && + !c.RDSEnhancedMetricsDisabled +} + // AzureOptions represents structure for special Azure options. type AzureOptions struct { SubscriptionID string `json:"subscription_id"` @@ -132,11 +139,19 @@ type AzureOptions struct { } // Value implements database/sql/driver.Valuer interface. Should be defined on the value. -func (c *AzureOptions) Value() (driver.Value, error) { return jsonValue(c) } +func (c AzureOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *AzureOptions) Scan(src interface{}) error { return jsonScan(c, src) } +func (c AzureOptions) IsEmpty() bool { + return c.SubscriptionID == "" && + c.ClientID == "" && + c.ClientSecret == "" && + c.TenantID == "" && + c.ResourceGroup == "" +} + // MongoDBOptions represents structure for special MongoDB options. type MongoDBOptions struct { TLSCertificateKey string `json:"tls_certificate_key"` @@ -150,11 +165,22 @@ type MongoDBOptions struct { } // Value implements database/sql/driver.Valuer interface. Should be defined on the value. -func (c *MongoDBOptions) Value() (driver.Value, error) { return jsonValue(c) } +func (c MongoDBOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *MongoDBOptions) Scan(src interface{}) error { return jsonScan(c, src) } +func (c MongoDBOptions) IsEmpty() bool { + return c.TLSCertificateKey == "" && + c.TLSCertificateKeyFilePassword == "" && + c.TLSCa == "" && + c.AuthenticationMechanism == "" && + c.AuthenticationDatabase == "" && + len(c.StatsCollections) == 0 && + c.CollectionsLimit == 0 && + !c.EnableAllCollectors +} + // MySQLOptions represents structure for special MySQL options. type MySQLOptions struct { TLSCa string `json:"tls_ca"` @@ -172,11 +198,19 @@ type MySQLOptions struct { } // Value implements database/sql/driver.Valuer interface. Should be defined on the value. -func (c *MySQLOptions) Value() (driver.Value, error) { return jsonValue(c) } +func (c MySQLOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *MySQLOptions) Scan(src interface{}) error { return jsonScan(c, src) } +func (c MySQLOptions) IsEmpty() bool { + return c.TLSCa == "" && + c.TLSCert == "" && + c.TLSKey == "" && + c.TableCount == nil && + c.TableCountTablestatsGroupLimit == 0 +} + // PostgreSQLOptions represents structure for special PostgreSQL options. type PostgreSQLOptions struct { SSLCa string `json:"ssl_ca"` @@ -189,11 +223,21 @@ type PostgreSQLOptions struct { } // Value implements database/sql/driver.Valuer interface. Should be defined on the value. -func (c *PostgreSQLOptions) Value() (driver.Value, error) { return jsonValue(c) } +func (c PostgreSQLOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *PostgreSQLOptions) Scan(src interface{}) error { return jsonScan(c, src) } +func (c PostgreSQLOptions) IsEmpty() bool { + return c.SSLCa == "" && + c.SSLCert == "" && + c.SSLKey == "" && + c.AutoDiscoveryLimit == nil && + c.DatabaseCount == 0 && + c.PGSMVersion == nil && + c.MaxExporterConnections == 0 +} + // PMMAgentWithPushMetricsSupport - version of pmmAgent, // that support vmagent and push metrics mode // will be released with PMM Agent v2.12. @@ -227,14 +271,14 @@ type Agent struct { LogLevel *string `reform:"log_level"` - ExporterOptions *ExporterOptions `reform:"exporter_options"` - QANOptions *QANOptions `reform:"qan_options"` + ExporterOptions ExporterOptions `reform:"exporter_options"` + QANOptions QANOptions `reform:"qan_options"` - AWSOptions *AWSOptions `reform:"aws_options"` - AzureOptions *AzureOptions `reform:"azure_options"` - MongoDBOptions *MongoDBOptions `reform:"mongo_options"` - MySQLOptions *MySQLOptions `reform:"mysql_options"` - PostgreSQLOptions *PostgreSQLOptions `reform:"postgresql_options"` + AWSOptions AWSOptions `reform:"aws_options"` + AzureOptions AzureOptions `reform:"azure_options"` + MongoDBOptions MongoDBOptions `reform:"mongo_options"` + MySQLOptions MySQLOptions `reform:"mysql_options"` + PostgreSQLOptions PostgreSQLOptions `reform:"postgresql_options"` } // BeforeInsert implements reform.BeforeInserter interface. diff --git a/managed/models/agent_model_reform.go b/managed/models/agent_model_reform.go index 2bce8110e1..e971c44c1a 100644 --- a/managed/models/agent_model_reform.go +++ b/managed/models/agent_model_reform.go @@ -99,13 +99,13 @@ var AgentTable = &agentTableType{ {Name: "TLS", Type: "bool", Column: "tls"}, {Name: "TLSSkipVerify", Type: "bool", Column: "tls_skip_verify"}, {Name: "LogLevel", Type: "*string", Column: "log_level"}, - {Name: "ExporterOptions", Type: "*ExporterOptions", Column: "exporter_options"}, - {Name: "QANOptions", Type: "*QANOptions", Column: "qan_options"}, - {Name: "AWSOptions", Type: "*AWSOptions", Column: "aws_options"}, - {Name: "AzureOptions", Type: "*AzureOptions", Column: "azure_options"}, - {Name: "MongoDBOptions", Type: "*MongoDBOptions", Column: "mongo_options"}, - {Name: "MySQLOptions", Type: "*MySQLOptions", Column: "mysql_options"}, - {Name: "PostgreSQLOptions", Type: "*PostgreSQLOptions", Column: "postgresql_options"}, + {Name: "ExporterOptions", Type: "ExporterOptions", Column: "exporter_options"}, + {Name: "QANOptions", Type: "QANOptions", Column: "qan_options"}, + {Name: "AWSOptions", Type: "AWSOptions", Column: "aws_options"}, + {Name: "AzureOptions", Type: "AzureOptions", Column: "azure_options"}, + {Name: "MongoDBOptions", Type: "MongoDBOptions", Column: "mongo_options"}, + {Name: "MySQLOptions", Type: "MySQLOptions", Column: "mysql_options"}, + {Name: "PostgreSQLOptions", Type: "PostgreSQLOptions", Column: "postgresql_options"}, }, PKFieldIndex: 0, }, diff --git a/managed/models/agent_model_test.go b/managed/models/agent_model_test.go index 1b7ab39dbc..fe35c68788 100644 --- a/managed/models/agent_model_test.go +++ b/managed/models/agent_model_test.go @@ -50,11 +50,11 @@ func TestAgent(t *testing.T) { agent := &models.Agent{ Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } service := &models.Service{ Address: pointer.ToString("1.2.3.4"), @@ -87,9 +87,9 @@ func TestAgent(t *testing.T) { agent := &models.Agent{ Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - MySQLOptions: &models.MySQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + MySQLOptions: models.MySQLOptions{}, } service := &models.Service{ Socket: pointer.ToString("/var/run/mysqld/mysqld.sock"), @@ -111,9 +111,9 @@ func TestAgent(t *testing.T) { agent := &models.Agent{ Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } service := &models.Service{ Socket: pointer.ToString("/var/run/mysqld/mysqld.sock"), @@ -150,7 +150,7 @@ func TestAgent(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), TLS: true, - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, MongoDBOptions: &mongoDBOptions, MySQLOptions: &mysqlOptions, PostgreSQLOptions: &postgresqlOptions, @@ -213,11 +213,11 @@ func TestAgent(t *testing.T) { Password: pointer.ToString("s3cur3 p@$$w0r4."), TLS: true, TLSSkipVerify: true, - ExporterOptions: &models.ExporterOptions{}, - QANOptions: &models.QANOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, - MySQLOptions: &models.MySQLOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + QANOptions: models.QANOptions{}, + MongoDBOptions: models.MongoDBOptions{}, + MySQLOptions: models.MySQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } service := &models.Service{ Address: pointer.ToString("1.2.3.4"), @@ -252,8 +252,8 @@ func TestPostgresAgentTLS(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), AgentType: models.PostgresExporterType, - ExporterOptions: &models.ExporterOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } service := &models.Service{ Address: pointer.ToString("1.2.3.4"), @@ -279,7 +279,7 @@ func TestPostgresAgentTLS(t *testing.T) { t.Run(fmt.Sprintf("AutodiscoveryLimit set TLS:%v/TLSSkipVerify:%v", testCase.tls, testCase.tlsSkipVerify), func(t *testing.T) { agent.TLS = testCase.tls agent.TLSSkipVerify = testCase.tlsSkipVerify - agent.PostgreSQLOptions = &models.PostgreSQLOptions{AutoDiscoveryLimit: pointer.ToInt32(10)} + agent.PostgreSQLOptions = models.PostgreSQLOptions{AutoDiscoveryLimit: pointer.ToInt32(10)} assert.Equal(t, testCase.expected, agent.DSN(service, models.DSNParams{DialTimeout: time.Second, Database: "database"}, nil, nil)) }) } @@ -292,8 +292,8 @@ func TestPostgresWithSocket(t *testing.T) { AgentType: models.PostgresExporterType, TLS: true, TLSSkipVerify: false, - ExporterOptions: &models.ExporterOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } service := &models.Service{ Socket: pointer.ToString("/var/run/postgres"), @@ -305,8 +305,8 @@ func TestPostgresWithSocket(t *testing.T) { t.Run("empty-user-password", func(t *testing.T) { agent := &models.Agent{ AgentType: models.PostgresExporterType, - ExporterOptions: &models.ExporterOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } service := &models.Service{ Socket: pointer.ToString("/var/run/postgres"), @@ -318,8 +318,8 @@ func TestPostgresWithSocket(t *testing.T) { t.Run("dir-with-symbols", func(t *testing.T) { agent := &models.Agent{ AgentType: models.PostgresExporterType, - ExporterOptions: &models.ExporterOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } service := &models.Service{ Socket: pointer.ToString(`/tmp/123\ A0m\%\$\@\8\,\+\-`), @@ -336,8 +336,8 @@ func TestMongoWithSocket(t *testing.T) { AgentType: models.MongoDBExporterType, TLS: true, TLSSkipVerify: false, - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } service := &models.Service{ Socket: pointer.ToString("/tmp/mongodb-27017.sock"), @@ -349,8 +349,8 @@ func TestMongoWithSocket(t *testing.T) { t.Run("empty-user-password", func(t *testing.T) { agent := &models.Agent{ AgentType: models.MongoDBExporterType, - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } service := &models.Service{ Socket: pointer.ToString("/tmp/mongodb-27017.sock"), @@ -362,8 +362,8 @@ func TestMongoWithSocket(t *testing.T) { t.Run("dir-with-symbols", func(t *testing.T) { agent := &models.Agent{ AgentType: models.MongoDBExporterType, - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } service := &models.Service{ Socket: pointer.ToString(`/tmp/123\ A0m\%\$\@\8\,\+\-/mongodb-27017.sock`), @@ -396,7 +396,7 @@ func TestIsMySQLTablestatsGroupEnabled(t *testing.T) { t.Run(fmt.Sprintf("Count:%s/Limit:%d", c, testCase.limit), func(t *testing.T) { agent := &models.Agent{ AgentType: models.MySQLdExporterType, - MySQLOptions: &models.MySQLOptions{ + MySQLOptions: models.MySQLOptions{ TableCount: testCase.count, TableCountTablestatsGroupLimit: testCase.limit, }, @@ -477,7 +477,7 @@ func TestExporterURL(t *testing.T) { ServiceID: pointer.ToString("external"), RunsOnNodeID: pointer.ToString("ExporterNodeID"), ListenPort: pointer.ToUint16(9121), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: true, MetricsPath: "/metrics", MetricsScheme: "http", @@ -492,7 +492,7 @@ func TestExporterURL(t *testing.T) { ListenPort: pointer.ToUint16(9121), Username: pointer.ToString("user"), Password: pointer.ToString("secret"), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: false, MetricsPath: "/metrics", MetricsScheme: "http", @@ -507,7 +507,7 @@ func TestExporterURL(t *testing.T) { ListenPort: pointer.ToUint16(9121), Username: pointer.ToString("user"), Password: pointer.ToString("secret"), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: false, MetricsPath: "/metrics", MetricsScheme: "http", @@ -522,7 +522,7 @@ func TestExporterURL(t *testing.T) { ListenPort: pointer.ToUint16(9121), Username: pointer.ToString("user"), Password: pointer.ToString("secret"), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: false, MetricsPath: "/metrics?format=prometheus&output=json", MetricsScheme: "http", @@ -537,7 +537,7 @@ func TestExporterURL(t *testing.T) { ListenPort: pointer.ToUint16(9121), Username: pointer.ToString("user"), Password: pointer.ToString("secret"), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: false, MetricsPath: "/", MetricsScheme: "http", diff --git a/managed/models/database.go b/managed/models/database.go index 7126979431..3185d42bab 100644 --- a/managed/models/database.go +++ b/managed/models/database.go @@ -1487,12 +1487,12 @@ func setupPMMServerAgents(q *reform.Querier, params SetupDBParams) error { TLSSkipVerify: params.SSLMode == DisableSSLMode || params.SSLMode == VerifyCaSSLMode, Username: params.Username, Password: params.Password, - QANOptions: &QANOptions{ + QANOptions: QANOptions{ CommentsParsingDisabled: true, }, } if ap.TLS { - ap.PostgreSQLOptions = &PostgreSQLOptions{} + ap.PostgreSQLOptions = PostgreSQLOptions{} for path, field := range map[string]*string{ params.SSLCAPath: &ap.PostgreSQLOptions.SSLCa, params.SSLCertPath: &ap.PostgreSQLOptions.SSLCert, diff --git a/managed/models/dsn_helpers_test.go b/managed/models/dsn_helpers_test.go index 4c8574618e..f7c49c4438 100644 --- a/managed/models/dsn_helpers_test.go +++ b/managed/models/dsn_helpers_test.go @@ -141,7 +141,7 @@ func TestFindDSNByServiceID(t *testing.T) { RunsOnNodeID: nil, ServiceID: pointer.ToString("S3"), TLS: true, - MySQLOptions: &models.MySQLOptions{ + MySQLOptions: models.MySQLOptions{ TLSCa: "content-of-tls-ca", TLSCert: "content-of-tls-cert", TLSKey: "content-of-tls-key", @@ -155,7 +155,7 @@ func TestFindDSNByServiceID(t *testing.T) { Username: pointer.ToString("pmm-user{{"), ServiceID: pointer.ToString("S4"), TLS: true, - MongoDBOptions: &models.MongoDBOptions{ + MongoDBOptions: models.MongoDBOptions{ TLSCertificateKey: "content-of-tls-certificate-key", TLSCertificateKeyFilePassword: "passwordoftls", TLSCa: "content-of-tls-ca", diff --git a/managed/models/encryption_helpers.go b/managed/models/encryption_helpers.go index e7929dc13d..275385d290 100644 --- a/managed/models/encryption_helpers.go +++ b/managed/models/encryption_helpers.go @@ -60,7 +60,7 @@ func agentEncryption(agent Agent, handler func(string) (string, error)) Agent { } var err error - if agent.AWSOptions != nil { + if !agent.AWSOptions.IsEmpty() { agent.AWSOptions.AWSAccessKey, err = handler(agent.AWSOptions.AWSAccessKey) if err != nil { logrus.Warning(err) @@ -72,7 +72,7 @@ func agentEncryption(agent Agent, handler func(string) (string, error)) Agent { } } - if agent.AzureOptions != nil { + if !agent.AzureOptions.IsEmpty() { agent.AzureOptions.ClientID, err = handler(agent.AzureOptions.ClientID) if err != nil { logrus.Warning(err) @@ -91,7 +91,7 @@ func agentEncryption(agent Agent, handler func(string) (string, error)) Agent { } } - if agent.MongoDBOptions != nil { + if !agent.MongoDBOptions.IsEmpty() { agent.MongoDBOptions.TLSCertificateKey, err = handler(agent.MongoDBOptions.TLSCertificateKey) if err != nil { logrus.Warning(err) @@ -102,7 +102,7 @@ func agentEncryption(agent Agent, handler func(string) (string, error)) Agent { } } - if agent.MySQLOptions != nil { + if !agent.MySQLOptions.IsEmpty() { agent.MySQLOptions.TLSCert, err = handler(agent.MySQLOptions.TLSCert) if err != nil { logrus.Warning(err) @@ -113,7 +113,7 @@ func agentEncryption(agent Agent, handler func(string) (string, error)) Agent { } } - if agent.PostgreSQLOptions != nil { + if !agent.PostgreSQLOptions.IsEmpty() { agent.PostgreSQLOptions.SSLCert, err = handler(agent.PostgreSQLOptions.SSLCert) if err != nil { logrus.Warning(err) diff --git a/managed/services/agents/agents.go b/managed/services/agents/agents.go index 90c898be57..6c387a60d9 100644 --- a/managed/services/agents/agents.go +++ b/managed/services/agents/agents.go @@ -101,33 +101,23 @@ func redactWords(agent *models.Agent) []string { if s := pointer.GetString(agent.AgentPassword); s != "" { words = append(words, s) } - if agent.AWSOptions != nil { - if s := agent.AWSOptions.AWSSecretKey; s != "" { - words = append(words, s) - } + if s := agent.AWSOptions.AWSSecretKey; s != "" { + words = append(words, s) } - if agent.AzureOptions != nil { - if s := agent.AzureOptions.ClientSecret; s != "" { - words = append(words, s) - } + if s := agent.AzureOptions.ClientSecret; s != "" { + words = append(words, s) } - if agent.MongoDBOptions != nil { - if s := agent.MongoDBOptions.TLSCertificateKey; s != "" { - words = append(words, s) - } - if s := agent.MongoDBOptions.TLSCertificateKeyFilePassword; s != "" { - words = append(words, s) - } + if s := agent.MongoDBOptions.TLSCertificateKey; s != "" { + words = append(words, s) } - if agent.MySQLOptions != nil { - if s := agent.MySQLOptions.TLSKey; s != "" { - words = append(words, s) - } + if s := agent.MongoDBOptions.TLSCertificateKeyFilePassword; s != "" { + words = append(words, s) } - if agent.PostgreSQLOptions != nil { - if s := agent.PostgreSQLOptions.SSLKey; s != "" { - words = append(words, s) - } + if s := agent.MySQLOptions.TLSKey; s != "" { + words = append(words, s) + } + if s := agent.PostgreSQLOptions.SSLKey; s != "" { + words = append(words, s) } return words diff --git a/managed/services/agents/agents_test.go b/managed/services/agents/agents_test.go index 846700ac39..782f9432c5 100644 --- a/managed/services/agents/agents_test.go +++ b/managed/services/agents/agents_test.go @@ -56,7 +56,7 @@ func TestGetExporterListenAddress(t *testing.T) { Address: "1.2.3.4", } exporter := &models.Agent{ - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: true, }, } @@ -68,7 +68,7 @@ func TestGetExporterListenAddress(t *testing.T) { Address: "1.2.3.4", } exporter := &models.Agent{ - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ ExposeExporter: true, PushMetrics: true, }, @@ -81,7 +81,7 @@ func TestGetExporterListenAddress(t *testing.T) { Address: "1.2.3.4", } exporter := &models.Agent{ - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ ExposeExporter: true, PushMetrics: false, }, @@ -91,7 +91,7 @@ func TestGetExporterListenAddress(t *testing.T) { }) t.Run("exposes exporter address if node IP is unavailable in pull mode", func(t *testing.T) { exporter := &models.Agent{ - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: false, }, } diff --git a/managed/services/agents/azure_database.go b/managed/services/agents/azure_database.go index 5b9e2634b4..158c290aad 100644 --- a/managed/services/agents/azure_database.go +++ b/managed/services/agents/azure_database.go @@ -79,7 +79,7 @@ func azureDatabaseExporterConfig(exporter *models.Agent, service *models.Service options := struct { models.AzureOptions ResourceTypes string - }{*exporter.AzureOptions, resourceTypes} + }{exporter.AzureOptions, resourceTypes} if err = t.Execute(&config, options); err != nil { return nil, err diff --git a/managed/services/agents/azure_database_test.go b/managed/services/agents/azure_database_test.go index fbea853761..b5a1406a14 100644 --- a/managed/services/agents/azure_database_test.go +++ b/managed/services/agents/azure_database_test.go @@ -59,7 +59,7 @@ func TestAzureExporterConfig(t *testing.T) { AgentType: models.AzureDatabaseExporterType, NodeID: &node1.NodeID, ServiceID: &service1.ServiceID, - AzureOptions: &models.AzureOptions{ + AzureOptions: models.AzureOptions{ ClientID: "azure_database_client_id", ClientSecret: "azure_database_client_secret", TenantID: "azure_database_tenant_id", diff --git a/managed/services/agents/handler.go b/managed/services/agents/handler.go index d9dcdacde6..1442c4833c 100644 --- a/managed/services/agents/handler.go +++ b/managed/services/agents/handler.go @@ -18,6 +18,7 @@ package agents import ( "context" "runtime/pprof" + "strings" "time" "github.com/AlekSi/pointer" @@ -191,6 +192,7 @@ func (h *Handler) stateChanged(ctx context.Context, req *agentv1.StateChangedReq errTX := h.db.InTransaction(func(tx *reform.TX) error { var agentIDs []string var err error + req.AgentId = strings.TrimPrefix(req.AgentId, "/agent_id/") PMMAgentID, agentIDs, err = h.r.roster.get(req.AgentId) if err != nil { return err diff --git a/managed/services/agents/mongodb_test.go b/managed/services/agents/mongodb_test.go index 786d5995ad..cf9fca0351 100644 --- a/managed/services/agents/mongodb_test.go +++ b/managed/services/agents/mongodb_test.go @@ -43,8 +43,8 @@ func TestMongodbExporterConfig225(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), AgentPassword: pointer.ToString("agent-password"), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, exporter, redactSecrets, pmmAgentVersion) @@ -72,7 +72,7 @@ func TestMongodbExporterConfig225(t *testing.T) { require.Equal(t, expected, actual) t.Run("Having collstats limit", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ StatsCollections: []string{"col1", "col2", "col3"}, CollectionsLimit: 79014, } @@ -105,8 +105,8 @@ func TestMongodbExporterConfig226(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), AgentPassword: pointer.ToString("agent-password"), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, exporter, redactSecrets, pmmAgentVersion) expected := &agentv1.SetStateRequest_AgentProcess{ @@ -135,7 +135,7 @@ func TestMongodbExporterConfig226(t *testing.T) { require.Equal(t, expected, actual) t.Run("Having collstats limit", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ StatsCollections: []string{"col1", "col2", "col3"}, CollectionsLimit: 79014, } @@ -156,7 +156,7 @@ func TestMongodbExporterConfig226(t *testing.T) { }) t.Run("Enabling all collectors with non zero limit", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ StatsCollections: []string{"col1", "col2", "col3"}, CollectionsLimit: 79014, EnableAllCollectors: true, @@ -183,7 +183,7 @@ func TestMongodbExporterConfig226(t *testing.T) { }) t.Run("Enabling all collectors", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ EnableAllCollectors: true, StatsCollections: []string{"db1.col1.one", "db2.col2", "db3"}, } @@ -211,7 +211,7 @@ func TestMongodbExporterConfig226(t *testing.T) { }) t.Run("collstats-limit=-1 -> automatically set the limit", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ EnableAllCollectors: true, StatsCollections: []string{"db1.col1.one", "db2.col2", "db3"}, CollectionsLimit: -1, @@ -253,8 +253,8 @@ func TestMongodbExporterConfig2411(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), AgentPassword: pointer.ToString("agent-password"), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, exporter, redactSecrets, pmmAgentVersion) expected := &agentv1.SetStateRequest_AgentProcess{ @@ -286,7 +286,7 @@ func TestMongodbExporterConfig2411(t *testing.T) { require.Equal(t, expected, actual) t.Run("Having collstats limit", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ StatsCollections: []string{"col1", "col2", "col3"}, CollectionsLimit: 79014, } @@ -308,7 +308,7 @@ func TestMongodbExporterConfig2411(t *testing.T) { }) t.Run("Enabling all collectors with non zero limit", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ StatsCollections: []string{"col1", "col2", "col3"}, CollectionsLimit: 79014, EnableAllCollectors: true, @@ -337,7 +337,7 @@ func TestMongodbExporterConfig2411(t *testing.T) { }) t.Run("Enabling all collectors", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ EnableAllCollectors: true, StatsCollections: []string{"db1.col1.one", "db2.col2", "db3"}, } @@ -367,7 +367,7 @@ func TestMongodbExporterConfig2411(t *testing.T) { }) t.Run("collstats-limit=-1 -> automatically set the limit", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ EnableAllCollectors: true, StatsCollections: []string{"db1.col1.one", "db2.col2", "db3"}, CollectionsLimit: -1, @@ -396,10 +396,10 @@ func TestMongodbExporterConfig2411(t *testing.T) { }) t.Run("Enable all collectors and disable some", func(t *testing.T) { - exporter.ExporterOptions = &models.ExporterOptions{ + exporter.ExporterOptions = models.ExporterOptions{ DisabledCollectors: []string{"dbstats", "topmetrics"}, } - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ EnableAllCollectors: true, StatsCollections: []string{"db1.col1.one", "db2.col2", "db3"}, } @@ -442,8 +442,8 @@ func TestMongodbExporterConfig2432(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), AgentPassword: pointer.ToString("agent-password"), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, exporter, redactSecrets, pmmAgentVersion) expected := &agentv1.SetStateRequest_AgentProcess{ @@ -477,7 +477,7 @@ func TestMongodbExporterConfig2432(t *testing.T) { require.Equal(t, expected, actual) t.Run("Enabling all collectors", func(t *testing.T) { - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ EnableAllCollectors: true, StatsCollections: []string{"db1.col1.one", "db2.col2", "db3"}, } @@ -525,8 +525,8 @@ func TestMongodbExporterConfig(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), AgentPassword: pointer.ToString("agent-password"), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, exporter, redactSecrets, pmmAgentVersion) expected := &agentv1.SetStateRequest_AgentProcess{ @@ -568,7 +568,7 @@ func TestMongodbExporterConfig(t *testing.T) { }) t.Run("SSLEnabled", func(t *testing.T) { exporter.TLS = true - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ TLSCertificateKey: "content-of-tls-certificate-key", TLSCertificateKeyFilePassword: "passwordoftls", TLSCa: "content-of-tls-ca", @@ -587,7 +587,7 @@ func TestMongodbExporterConfig(t *testing.T) { t.Run("AuthenticationDatabase", func(t *testing.T) { exporter.TLS = true - exporter.MongoDBOptions = &models.MongoDBOptions{ + exporter.MongoDBOptions = models.MongoDBOptions{ TLSCertificateKey: "content-of-tls-certificate-key", TLSCertificateKeyFilePassword: "passwordoftls", TLSCa: "content-of-tls-ca", @@ -613,7 +613,7 @@ func TestMongodbExporterConfig(t *testing.T) { }) t.Run("DisabledCollectors", func(t *testing.T) { - exporter.ExporterOptions = &models.ExporterOptions{ + exporter.ExporterOptions = models.ExporterOptions{ DisabledCollectors: []string{"topmetrics"}, } actual, err := mongodbExporterConfig(node, mongodb, exporter, exposeSecrets, pmmAgentVersion) @@ -649,8 +649,8 @@ func TestNewMongodbExporterConfig(t *testing.T) { AgentType: models.MongoDBExporterType, Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, exporter, redactSecrets, pmmAgentVersion) require.NoError(t, err) @@ -707,8 +707,8 @@ func TestMongodbExporterConfig228_WebConfigAuth(t *testing.T) { AgentType: models.MongoDBExporterType, Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } expectedArgs := []string{ @@ -735,8 +735,8 @@ func TestMongodbExporterConfig228_WebConfigAuth(t *testing.T) { Username: exporter.Username, Password: exporter.Password, AgentPassword: pointer.ToString("agent-custom-password"), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, localExporter, redactSecrets, pmmAgentVersion) @@ -765,8 +765,8 @@ func TestMongodbExporterConfig228_WebConfigAuth(t *testing.T) { AgentType: exporter.AgentType, Username: exporter.Username, Password: exporter.Password, - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } actual, err := mongodbExporterConfig(node, mongodb, localExporter, redactSecrets, pmmAgentVersion) diff --git a/managed/services/agents/mysql_test.go b/managed/services/agents/mysql_test.go index 8bd6ca1f4e..d3ed5a3a7b 100644 --- a/managed/services/agents/mysql_test.go +++ b/managed/services/agents/mysql_test.go @@ -42,8 +42,8 @@ func TestMySQLdExporterConfig(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), AgentPassword: pointer.ToString("agent-password"), - ExporterOptions: &models.ExporterOptions{}, - MySQLOptions: &models.MySQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + MySQLOptions: models.MySQLOptions{}, } pmmAgentVersion := version.MustParse("2.21.0") @@ -117,7 +117,7 @@ func TestMySQLdExporterConfig(t *testing.T) { t.Run("SSLEnabled", func(t *testing.T) { exporter.TLS = true - exporter.MySQLOptions = &models.MySQLOptions{ + exporter.MySQLOptions = models.MySQLOptions{ TLSCa: "content-of-tls-ca", TLSCert: "content-of-tls-certificate-key", TLSKey: "content-of-tls-key", @@ -148,8 +148,8 @@ func TestMySQLdExporterConfigTablestatsGroupDisabled(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), TLS: true, - ExporterOptions: &models.ExporterOptions{}, - MySQLOptions: &models.MySQLOptions{ + ExporterOptions: models.ExporterOptions{}, + MySQLOptions: models.MySQLOptions{ TableCountTablestatsGroupLimit: -1, TLSCa: "content-of-tls-ca", TLSCert: "content-of-tls-cert", @@ -252,10 +252,10 @@ func TestMySQLdExporterConfigDisabledCollectors(t *testing.T) { AgentType: models.MySQLdExporterType, Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ DisabledCollectors: []string{"heartbeat", "info_schema.clientstats", "perf_schema.eventsstatements", "custom_query.hr"}, }, - MySQLOptions: &models.MySQLOptions{}, + MySQLOptions: models.MySQLOptions{}, } pmmAgentVersion := version.MustParse("2.24.0") diff --git a/managed/services/agents/node_test.go b/managed/services/agents/node_test.go index 8b70d371d3..d43445984f 100644 --- a/managed/services/agents/node_test.go +++ b/managed/services/agents/node_test.go @@ -36,7 +36,7 @@ func TestAuthWebConfig(t *testing.T) { exporter := &models.Agent{ AgentID: "agent-id", AgentType: models.NodeExporterType, - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } agentVersion := version.MustParse("2.26.1") @@ -61,7 +61,7 @@ func TestAuthWebConfig(t *testing.T) { exporter := &models.Agent{ AgentID: "agent-id", AgentType: models.NodeExporterType, - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } agentVersion := version.MustParse("2.28.0") @@ -87,7 +87,7 @@ func TestAuthWebConfig(t *testing.T) { exporter := &models.Agent{ AgentID: "agent-id", AgentType: models.NodeExporterType, - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } agentVersion := version.MustParse("3.0.0") @@ -119,7 +119,7 @@ func TestNodeExporterConfig(t *testing.T) { exporter := &models.Agent{ AgentID: "agent-id", AgentType: models.NodeExporterType, - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } agentVersion := version.MustParse("2.15.1") @@ -212,7 +212,7 @@ func TestNodeExporterConfig(t *testing.T) { exporter := &models.Agent{ AgentID: "agent-id", AgentType: models.NodeExporterType, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ DisabledCollectors: []string{"cpu", "netstat", "netstat.fields", "vmstat", "meminfo"}, }, } @@ -299,7 +299,7 @@ func TestNodeExporterConfig(t *testing.T) { exporter := &models.Agent{ AgentID: "agent-id", AgentType: models.NodeExporterType, - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } agentVersion := version.MustParse("2.15.1") diff --git a/managed/services/agents/postgresql_test.go b/managed/services/agents/postgresql_test.go index a1d115f127..b606bd8303 100644 --- a/managed/services/agents/postgresql_test.go +++ b/managed/services/agents/postgresql_test.go @@ -78,9 +78,9 @@ func (s *PostgresExporterConfigTestSuite) SetupTest() { } func (s *PostgresExporterConfigTestSuite) TestConfig() { - s.exporter.ExporterOptions = &models.ExporterOptions{} - s.exporter.AzureOptions = &models.AzureOptions{} - s.exporter.PostgreSQLOptions = &models.PostgreSQLOptions{} + s.exporter.ExporterOptions = models.ExporterOptions{} + s.exporter.AzureOptions = models.AzureOptions{} + s.exporter.PostgreSQLOptions = models.PostgreSQLOptions{} actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, redactSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") @@ -96,9 +96,9 @@ func (s *PostgresExporterConfigTestSuite) TestDatabaseName() { s.postgresql.DatabaseName = "db1" s.expected.Env[0] = "DATA_SOURCE_NAME=postgres://username:s3cur3%20p%40$$w0r4.@1.2.3.4:5432/db1?connect_timeout=1&sslmode=disable" - s.exporter.ExporterOptions = &models.ExporterOptions{} - s.exporter.AzureOptions = &models.AzureOptions{} - s.exporter.PostgreSQLOptions = &models.PostgreSQLOptions{} + s.exporter.ExporterOptions = models.ExporterOptions{} + s.exporter.AzureOptions = models.AzureOptions{} + s.exporter.PostgreSQLOptions = models.PostgreSQLOptions{} actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, redactSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") @@ -110,9 +110,9 @@ func (s *PostgresExporterConfigTestSuite) TestDatabaseName() { s.postgresql.DatabaseName = "" s.Require().PanicsWithValue("database name not set", func() { - s.exporter.ExporterOptions = &models.ExporterOptions{} - s.exporter.AzureOptions = &models.AzureOptions{} - s.exporter.PostgreSQLOptions = &models.PostgreSQLOptions{} + s.exporter.ExporterOptions = models.ExporterOptions{} + s.exporter.AzureOptions = models.AzureOptions{} + s.exporter.PostgreSQLOptions = models.PostgreSQLOptions{} _, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, redactSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") @@ -122,9 +122,9 @@ func (s *PostgresExporterConfigTestSuite) TestDatabaseName() { func (s *PostgresExporterConfigTestSuite) TestEmptyPassword() { s.exporter.Password = nil - s.exporter.ExporterOptions = &models.ExporterOptions{} - s.exporter.AzureOptions = &models.AzureOptions{} - s.exporter.PostgreSQLOptions = &models.PostgreSQLOptions{} + s.exporter.ExporterOptions = models.ExporterOptions{} + s.exporter.AzureOptions = models.AzureOptions{} + s.exporter.PostgreSQLOptions = models.PostgreSQLOptions{} actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") @@ -134,9 +134,9 @@ func (s *PostgresExporterConfigTestSuite) TestEmptyPassword() { func (s *PostgresExporterConfigTestSuite) TestEmptyUsername() { s.exporter.Username = nil - s.exporter.ExporterOptions = &models.ExporterOptions{} - s.exporter.AzureOptions = &models.AzureOptions{} - s.exporter.PostgreSQLOptions = &models.PostgreSQLOptions{} + s.exporter.ExporterOptions = models.ExporterOptions{} + s.exporter.AzureOptions = models.AzureOptions{} + s.exporter.PostgreSQLOptions = models.PostgreSQLOptions{} actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") @@ -147,9 +147,9 @@ func (s *PostgresExporterConfigTestSuite) TestEmptyUsername() { func (s *PostgresExporterConfigTestSuite) TestEmptyUsernameAndPassword() { s.exporter.Username = nil s.exporter.Password = nil - s.exporter.ExporterOptions = &models.ExporterOptions{} - s.exporter.AzureOptions = &models.AzureOptions{} - s.exporter.PostgreSQLOptions = &models.PostgreSQLOptions{} + s.exporter.ExporterOptions = models.ExporterOptions{} + s.exporter.AzureOptions = models.AzureOptions{} + s.exporter.PostgreSQLOptions = models.PostgreSQLOptions{} actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") @@ -163,9 +163,9 @@ func (s *PostgresExporterConfigTestSuite) TestSocket() { s.postgresql.Address = nil s.postgresql.Port = nil s.postgresql.Socket = pointer.ToString("/var/run/postgres") - s.exporter.ExporterOptions = &models.ExporterOptions{} - s.exporter.AzureOptions = &models.AzureOptions{} - s.exporter.PostgreSQLOptions = &models.PostgreSQLOptions{} + s.exporter.ExporterOptions = models.ExporterOptions{} + s.exporter.AzureOptions = models.AzureOptions{} + s.exporter.PostgreSQLOptions = models.PostgreSQLOptions{} actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") @@ -178,11 +178,11 @@ func (s *PostgresExporterConfigTestSuite) TestDisabledCollectors() { s.postgresql.Address = nil s.postgresql.Port = nil s.postgresql.Socket = pointer.ToString("/var/run/postgres") - s.exporter.ExporterOptions = &models.ExporterOptions{ + s.exporter.ExporterOptions = models.ExporterOptions{ DisabledCollectors: []string{"custom_query.hr", "custom_query.hr.directory", "locks"}, } - s.exporter.AzureOptions = &models.AzureOptions{} - s.exporter.PostgreSQLOptions = &models.PostgreSQLOptions{} + s.exporter.AzureOptions = models.AzureOptions{} + s.exporter.PostgreSQLOptions = models.PostgreSQLOptions{} actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") @@ -226,9 +226,9 @@ func TestAutoDiscovery(t *testing.T) { AgentType: models.PostgresExporterType, Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, - AzureOptions: &models.AzureOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + AzureOptions: models.AzureOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } expected := &agentv1.SetStateRequest_AgentProcess{ @@ -268,7 +268,7 @@ func TestAutoDiscovery(t *testing.T) { }) t.Run("Database count more than limit - disabled", func(t *testing.T) { - exporter.PostgreSQLOptions = &models.PostgreSQLOptions{ + exporter.PostgreSQLOptions = models.PostgreSQLOptions{ AutoDiscoveryLimit: pointer.ToInt32(5), DatabaseCount: 10, } @@ -279,7 +279,7 @@ func TestAutoDiscovery(t *testing.T) { }) t.Run("Database count equal to limit - enabled", func(t *testing.T) { - exporter.PostgreSQLOptions = &models.PostgreSQLOptions{ + exporter.PostgreSQLOptions = models.PostgreSQLOptions{ AutoDiscoveryLimit: pointer.ToInt32(5), DatabaseCount: 5, } @@ -290,7 +290,7 @@ func TestAutoDiscovery(t *testing.T) { }) t.Run("Database count less than limit - enabled", func(t *testing.T) { - exporter.PostgreSQLOptions = &models.PostgreSQLOptions{ + exporter.PostgreSQLOptions = models.PostgreSQLOptions{ AutoDiscoveryLimit: pointer.ToInt32(5), DatabaseCount: 3, } @@ -301,7 +301,7 @@ func TestAutoDiscovery(t *testing.T) { }) t.Run("Negative limit - disabled", func(t *testing.T) { - exporter.PostgreSQLOptions = &models.PostgreSQLOptions{ + exporter.PostgreSQLOptions = models.PostgreSQLOptions{ AutoDiscoveryLimit: pointer.ToInt32(-1), DatabaseCount: 3, } @@ -312,7 +312,7 @@ func TestAutoDiscovery(t *testing.T) { }) t.Run("Default - enabled", func(t *testing.T) { - exporter.PostgreSQLOptions = &models.PostgreSQLOptions{ + exporter.PostgreSQLOptions = models.PostgreSQLOptions{ AutoDiscoveryLimit: pointer.ToInt32(0), DatabaseCount: 3, } @@ -341,9 +341,9 @@ func TestMaxConnections(t *testing.T) { AgentType: models.PostgresExporterType, Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, - AzureOptions: &models.AzureOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{ + ExporterOptions: models.ExporterOptions{}, + AzureOptions: models.AzureOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{ MaxExporterConnections: 10, }, } @@ -385,7 +385,7 @@ func TestMaxConnections(t *testing.T) { }) t.Run("Max exporter connections set to 0 - ignore", func(t *testing.T) { - exporter.PostgreSQLOptions = &models.PostgreSQLOptions{ + exporter.PostgreSQLOptions = models.PostgreSQLOptions{ MaxExporterConnections: 0, } res, err := postgresExporterConfig(node, postgresql, exporter, redactSecrets, pmmAgentVersion) @@ -394,7 +394,7 @@ func TestMaxConnections(t *testing.T) { }) t.Run("Max exporter connections set to 5 - apply", func(t *testing.T) { - exporter.PostgreSQLOptions = &models.PostgreSQLOptions{ + exporter.PostgreSQLOptions = models.PostgreSQLOptions{ MaxExporterConnections: 5, } res, err := postgresExporterConfig(node, postgresql, exporter, redactSecrets, pmmAgentVersion) @@ -416,15 +416,15 @@ func (s *PostgresExporterConfigTestSuite) TestAzureTimeout() { AgentType: models.PostgresExporterType, Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, - AzureOptions: &models.AzureOptions{ + ExporterOptions: models.ExporterOptions{}, + AzureOptions: models.AzureOptions{ SubscriptionID: "subscription_id", ClientID: "client_id", ClientSecret: "client_secret", TenantID: "tenant_id", ResourceGroup: "resource_group", }, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, redactSecrets, s.pmmAgentVersion) @@ -471,9 +471,9 @@ func (s *PostgresExporterConfigTestSuite) TestPrometheusWebConfig() { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), TLS: true, - ExporterOptions: &models.ExporterOptions{}, - AzureOptions: &models.AzureOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + AzureOptions: models.AzureOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, redactSecrets, s.pmmAgentVersion) @@ -523,9 +523,9 @@ func (s *PostgresExporterConfigTestSuite) TestSSLSni() { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), TLS: true, - ExporterOptions: &models.ExporterOptions{}, - AzureOptions: &models.AzureOptions{}, - PostgreSQLOptions: &models.PostgreSQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + AzureOptions: models.AzureOptions{}, + PostgreSQLOptions: models.PostgreSQLOptions{}, } actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, redactSecrets, s.pmmAgentVersion) diff --git a/managed/services/agents/proxysql_test.go b/managed/services/agents/proxysql_test.go index ba33c65943..4c4b161d83 100644 --- a/managed/services/agents/proxysql_test.go +++ b/managed/services/agents/proxysql_test.go @@ -44,7 +44,7 @@ func TestProxySQLExporterConfig(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), AgentPassword: pointer.ToString("agent-password"), - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } actual := proxysqlExporterConfig(node, proxysql, exporter, redactSecrets, pmmAgentVersion) expected := &agentv1.SetStateRequest_AgentProcess{ @@ -109,7 +109,7 @@ func TestProxySQLExporterConfig(t *testing.T) { AgentType: models.ProxySQLExporterType, Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } actual := proxysqlExporterConfig(node, proxysql, exporter, redactSecrets, pmmAgentVersion) expected := &agentv1.SetStateRequest_AgentProcess{ @@ -150,7 +150,7 @@ func TestProxySQLExporterConfig(t *testing.T) { AgentType: models.ProxySQLExporterType, Username: pointer.ToString("username"), Password: pointer.ToString("s3cur3 p@$$w0r4."), - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } actual := proxysqlExporterConfig(node, proxysql, exporter, redactSecrets, pmmAgentVersion) expected := &agentv1.SetStateRequest_AgentProcess{ diff --git a/managed/services/agents/rds_test.go b/managed/services/agents/rds_test.go index 3cecdef1c6..428c3233ad 100644 --- a/managed/services/agents/rds_test.go +++ b/managed/services/agents/rds_test.go @@ -48,7 +48,7 @@ func TestRDSExporterConfig(t *testing.T) { AgentID: "agent1", AgentType: models.RDSExporterType, NodeID: &node1.NodeID, - AWSOptions: &models.AWSOptions{ + AWSOptions: models.AWSOptions{ AWSAccessKey: "access_key1", AWSSecretKey: "secret_key1", RDSBasicMetricsDisabled: true, @@ -72,7 +72,7 @@ func TestRDSExporterConfig(t *testing.T) { AgentID: "agent2", AgentType: models.RDSExporterType, NodeID: &node2.NodeID, - AWSOptions: &models.AWSOptions{ + AWSOptions: models.AWSOptions{ AWSAccessKey: "access_key2", AWSSecretKey: "secret_key2", }, diff --git a/managed/services/agents/registry.go b/managed/services/agents/registry.go index 3b63fc19dc..7d60c87883 100644 --- a/managed/services/agents/registry.go +++ b/managed/services/agents/registry.go @@ -323,7 +323,7 @@ func (r *Registry) addVMAgentToPMMAgent(q *reform.Querier, pmmAgentID, runsOnNod if _, err := models.CreateAgent(q, models.VMAgentType, &models.CreateAgentParams{ PMMAgentID: pmmAgentID, NodeID: runsOnNodeID, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: true, }, }); err != nil { diff --git a/managed/services/agents/roster_test.go b/managed/services/agents/roster_test.go index f7b8b5fcf4..7eda8a156b 100644 --- a/managed/services/agents/roster_test.go +++ b/managed/services/agents/roster_test.go @@ -57,7 +57,7 @@ func TestRoster(t *testing.T) { exporters[node] = &models.Agent{ AgentID: "agent1", AgentType: models.RDSExporterType, - AWSOptions: &models.AWSOptions{ + AWSOptions: models.AWSOptions{ AWSAccessKey: awsAccessKey, }, } @@ -97,7 +97,7 @@ func TestRoster(t *testing.T) { exporters[node] = &models.Agent{ AgentID: "agent1", AgentType: models.RDSExporterType, - AWSOptions: &models.AWSOptions{ + AWSOptions: models.AWSOptions{ AWSAccessKey: awsAccessKey, }, } diff --git a/managed/services/alerting/mock_grafana_client_test.go b/managed/services/alerting/mock_grafana_client_test.go deleted file mode 100644 index b0af805207..0000000000 --- a/managed/services/alerting/mock_grafana_client_test.go +++ /dev/null @@ -1,108 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package alerting - -import ( - context "context" - - gapi "github.com/grafana/grafana-api-golang-client" - mock "github.com/stretchr/testify/mock" - - services "github.com/percona/pmm/managed/services" -) - -// mockGrafanaClient is an autogenerated mock type for the grafanaClient type -type mockGrafanaClient struct { - mock.Mock -} - -// CreateAlertRule provides a mock function with given fields: ctx, folderUID, groupName, interval, rule -func (_m *mockGrafanaClient) CreateAlertRule(ctx context.Context, folderUID string, groupName string, interval string, rule *services.Rule) error { - ret := _m.Called(ctx, folderUID, groupName, interval, rule) - - if len(ret) == 0 { - panic("no return value specified for CreateAlertRule") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *services.Rule) error); ok { - r0 = rf(ctx, folderUID, groupName, interval, rule) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetDatasourceUIDByID provides a mock function with given fields: ctx, id -func (_m *mockGrafanaClient) GetDatasourceUIDByID(ctx context.Context, id int64) (string, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetDatasourceUIDByID") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, int64) (string, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, int64) string); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetFolderByUID provides a mock function with given fields: ctx, uid -func (_m *mockGrafanaClient) GetFolderByUID(ctx context.Context, uid string) (*gapi.Folder, error) { - ret := _m.Called(ctx, uid) - - if len(ret) == 0 { - panic("no return value specified for GetFolderByUID") - } - - var r0 *gapi.Folder - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (*gapi.Folder, error)); ok { - return rf(ctx, uid) - } - if rf, ok := ret.Get(0).(func(context.Context, string) *gapi.Folder); ok { - r0 = rf(ctx, uid) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*gapi.Folder) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, uid) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockGrafanaClient creates a new instance of mockGrafanaClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockGrafanaClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockGrafanaClient { - mock := &mockGrafanaClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/backup/mock_agent_service_test.go b/managed/services/backup/mock_agent_service_test.go deleted file mode 100644 index 8c94ca89f5..0000000000 --- a/managed/services/backup/mock_agent_service_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - mock "github.com/stretchr/testify/mock" - - models "github.com/percona/pmm/managed/models" -) - -// mockAgentService is an autogenerated mock type for the agentService type -type mockAgentService struct { - mock.Mock -} - -// PBMSwitchPITR provides a mock function with given fields: pmmAgentID, dsn, files, tdp, enabled -func (_m *mockAgentService) PBMSwitchPITR(pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair, enabled bool) error { - ret := _m.Called(pmmAgentID, dsn, files, tdp, enabled) - - if len(ret) == 0 { - panic("no return value specified for PBMSwitchPITR") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string, map[string]string, *models.DelimiterPair, bool) error); ok { - r0 = rf(pmmAgentID, dsn, files, tdp, enabled) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockAgentService creates a new instance of mockAgentService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAgentService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAgentService { - mock := &mockAgentService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/backup/mock_compatibility_service_test.go b/managed/services/backup/mock_compatibility_service_test.go deleted file mode 100644 index 8573887dfb..0000000000 --- a/managed/services/backup/mock_compatibility_service_test.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockCompatibilityService is an autogenerated mock type for the compatibilityService type -type mockCompatibilityService struct { - mock.Mock -} - -// CheckArtifactCompatibility provides a mock function with given fields: artifactID, targetDBVersion -func (_m *mockCompatibilityService) CheckArtifactCompatibility(artifactID string, targetDBVersion string) error { - ret := _m.Called(artifactID, targetDBVersion) - - if len(ret) == 0 { - panic("no return value specified for CheckArtifactCompatibility") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string) error); ok { - r0 = rf(artifactID, targetDBVersion) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// CheckSoftwareCompatibilityForService provides a mock function with given fields: ctx, serviceID -func (_m *mockCompatibilityService) CheckSoftwareCompatibilityForService(ctx context.Context, serviceID string) (string, error) { - ret := _m.Called(ctx, serviceID) - - if len(ret) == 0 { - panic("no return value specified for CheckSoftwareCompatibilityForService") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { - return rf(ctx, serviceID) - } - if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { - r0 = rf(ctx, serviceID) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, serviceID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockCompatibilityService creates a new instance of mockCompatibilityService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockCompatibilityService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockCompatibilityService { - mock := &mockCompatibilityService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/backup/mock_jobs_service_test.go b/managed/services/backup/mock_jobs_service_test.go deleted file mode 100644 index 8d75301db5..0000000000 --- a/managed/services/backup/mock_jobs_service_test.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - time "time" - - mock "github.com/stretchr/testify/mock" - - models "github.com/percona/pmm/managed/models" -) - -// mockJobsService is an autogenerated mock type for the jobsService type -type mockJobsService struct { - mock.Mock -} - -// StartMongoDBBackupJob provides a mock function with given fields: service, jobID, pmmAgentID, timeout, name, mode, dataModel, locationConfig, folder -func (_m *mockJobsService) StartMongoDBBackupJob(service *models.Service, jobID string, pmmAgentID string, timeout time.Duration, name string, mode models.BackupMode, dataModel models.DataModel, locationConfig *models.BackupLocationConfig, folder string) error { - ret := _m.Called(service, jobID, pmmAgentID, timeout, name, mode, dataModel, locationConfig, folder) - - if len(ret) == 0 { - panic("no return value specified for StartMongoDBBackupJob") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*models.Service, string, string, time.Duration, string, models.BackupMode, models.DataModel, *models.BackupLocationConfig, string) error); ok { - r0 = rf(service, jobID, pmmAgentID, timeout, name, mode, dataModel, locationConfig, folder) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMongoDBRestoreBackupJob provides a mock function with given fields: service, jobID, pmmAgentID, timeout, name, pbmBackupName, dataModel, locationConfig, pitrTimestamp, folder -func (_m *mockJobsService) StartMongoDBRestoreBackupJob(service *models.Service, jobID string, pmmAgentID string, timeout time.Duration, name string, pbmBackupName string, dataModel models.DataModel, locationConfig *models.BackupLocationConfig, pitrTimestamp time.Time, folder string) error { - ret := _m.Called(service, jobID, pmmAgentID, timeout, name, pbmBackupName, dataModel, locationConfig, pitrTimestamp, folder) - - if len(ret) == 0 { - panic("no return value specified for StartMongoDBRestoreBackupJob") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*models.Service, string, string, time.Duration, string, string, models.DataModel, *models.BackupLocationConfig, time.Time, string) error); ok { - r0 = rf(service, jobID, pmmAgentID, timeout, name, pbmBackupName, dataModel, locationConfig, pitrTimestamp, folder) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMySQLBackupJob provides a mock function with given fields: jobID, pmmAgentID, timeout, name, dbConfig, locationConfig, folder -func (_m *mockJobsService) StartMySQLBackupJob(jobID string, pmmAgentID string, timeout time.Duration, name string, dbConfig *models.DBConfig, locationConfig *models.BackupLocationConfig, folder string) error { - ret := _m.Called(jobID, pmmAgentID, timeout, name, dbConfig, locationConfig, folder) - - if len(ret) == 0 { - panic("no return value specified for StartMySQLBackupJob") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string, time.Duration, string, *models.DBConfig, *models.BackupLocationConfig, string) error); ok { - r0 = rf(jobID, pmmAgentID, timeout, name, dbConfig, locationConfig, folder) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMySQLRestoreBackupJob provides a mock function with given fields: jobID, pmmAgentID, serviceID, timeout, name, locationConfig, folder -func (_m *mockJobsService) StartMySQLRestoreBackupJob(jobID string, pmmAgentID string, serviceID string, timeout time.Duration, name string, locationConfig *models.BackupLocationConfig, folder string) error { - ret := _m.Called(jobID, pmmAgentID, serviceID, timeout, name, locationConfig, folder) - - if len(ret) == 0 { - panic("no return value specified for StartMySQLRestoreBackupJob") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, string, string, time.Duration, string, *models.BackupLocationConfig, string) error); ok { - r0 = rf(jobID, pmmAgentID, serviceID, timeout, name, locationConfig, folder) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StopJob provides a mock function with given fields: jobID -func (_m *mockJobsService) StopJob(jobID string) error { - ret := _m.Called(jobID) - - if len(ret) == 0 { - panic("no return value specified for StopJob") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(jobID) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockJobsService creates a new instance of mockJobsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockJobsService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockJobsService { - mock := &mockJobsService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/backup/mock_pbm_pitr_service_test.go b/managed/services/backup/mock_pbm_pitr_service_test.go deleted file mode 100644 index f082a303ce..0000000000 --- a/managed/services/backup/mock_pbm_pitr_service_test.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - context "context" - time "time" - - mock "github.com/stretchr/testify/mock" - - models "github.com/percona/pmm/managed/models" -) - -// mockPbmPITRService is an autogenerated mock type for the pbmPITRService type -type mockPbmPITRService struct { - mock.Mock -} - -// GetPITRFiles provides a mock function with given fields: ctx, locationClient, location, artifact, until -func (_m *mockPbmPITRService) GetPITRFiles(ctx context.Context, locationClient Storage, location *models.BackupLocation, artifact *models.Artifact, until *time.Time) ([]*oplogChunk, error) { - ret := _m.Called(ctx, locationClient, location, artifact, until) - - if len(ret) == 0 { - panic("no return value specified for GetPITRFiles") - } - - var r0 []*oplogChunk - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact, *time.Time) ([]*oplogChunk, error)); ok { - return rf(ctx, locationClient, location, artifact, until) - } - if rf, ok := ret.Get(0).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact, *time.Time) []*oplogChunk); ok { - r0 = rf(ctx, locationClient, location, artifact, until) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*oplogChunk) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact, *time.Time) error); ok { - r1 = rf(ctx, locationClient, location, artifact, until) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListPITRTimeranges provides a mock function with given fields: ctx, locationClient, location, artifact -func (_m *mockPbmPITRService) ListPITRTimeranges(ctx context.Context, locationClient Storage, location *models.BackupLocation, artifact *models.Artifact) ([]Timeline, error) { - ret := _m.Called(ctx, locationClient, location, artifact) - - if len(ret) == 0 { - panic("no return value specified for ListPITRTimeranges") - } - - var r0 []Timeline - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact) ([]Timeline, error)); ok { - return rf(ctx, locationClient, location, artifact) - } - if rf, ok := ret.Get(0).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact) []Timeline); ok { - r0 = rf(ctx, locationClient, location, artifact) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]Timeline) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact) error); ok { - r1 = rf(ctx, locationClient, location, artifact) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockPbmPITRService creates a new instance of mockPbmPITRService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockPbmPITRService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockPbmPITRService { - mock := &mockPbmPITRService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/backup/mock_removal_service_test.go b/managed/services/backup/mock_removal_service_test.go deleted file mode 100644 index 710a5691ca..0000000000 --- a/managed/services/backup/mock_removal_service_test.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import mock "github.com/stretchr/testify/mock" - -// mockRemovalService is an autogenerated mock type for the removalService type -type mockRemovalService struct { - mock.Mock -} - -// DeleteArtifact provides a mock function with given fields: storage, artifactID, removeFiles -func (_m *mockRemovalService) DeleteArtifact(storage Storage, artifactID string, removeFiles bool) error { - ret := _m.Called(storage, artifactID, removeFiles) - - if len(ret) == 0 { - panic("no return value specified for DeleteArtifact") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Storage, string, bool) error); ok { - r0 = rf(storage, artifactID, removeFiles) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// TrimPITRArtifact provides a mock function with given fields: storage, artifactID, firstN -func (_m *mockRemovalService) TrimPITRArtifact(storage Storage, artifactID string, firstN int) error { - ret := _m.Called(storage, artifactID, firstN) - - if len(ret) == 0 { - panic("no return value specified for TrimPITRArtifact") - } - - var r0 error - if rf, ok := ret.Get(0).(func(Storage, string, int) error); ok { - r0 = rf(storage, artifactID, firstN) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockRemovalService creates a new instance of mockRemovalService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockRemovalService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockRemovalService { - mock := &mockRemovalService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/backup/mock_storage_test.go b/managed/services/backup/mock_storage_test.go deleted file mode 100644 index f39dd8a564..0000000000 --- a/managed/services/backup/mock_storage_test.go +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - minio "github.com/percona/pmm/managed/services/minio" -) - -// MockStorage is an autogenerated mock type for the Storage type -type MockStorage struct { - mock.Mock -} - -// FileStat provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, name -func (_m *MockStorage) FileStat(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, name string) (minio.FileInfo, error) { - ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, name) - - if len(ret) == 0 { - panic("no return value specified for FileStat") - } - - var r0 minio.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) (minio.FileInfo, error)); ok { - return rf(ctx, endpoint, accessKey, secretKey, bucketName, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) minio.FileInfo); ok { - r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, name) - } else { - r0 = ret.Get(0).(minio.FileInfo) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, string) error); ok { - r1 = rf(ctx, endpoint, accessKey, secretKey, bucketName, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// List provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix -func (_m *MockStorage) List(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, prefix string, suffix string) ([]minio.FileInfo, error) { - ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix) - - if len(ret) == 0 { - panic("no return value specified for List") - } - - var r0 []minio.FileInfo - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, string) ([]minio.FileInfo, error)); ok { - return rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, string) []minio.FileInfo); ok { - r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]minio.FileInfo) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, string, string) error); ok { - r1 = rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Remove provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, objectName -func (_m *MockStorage) Remove(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, objectName string) error { - ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, objectName) - - if len(ret) == 0 { - panic("no return value specified for Remove") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) error); ok { - r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, objectName) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// RemoveRecursive provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, prefix -func (_m *MockStorage) RemoveRecursive(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, prefix string) error { - ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, prefix) - - if len(ret) == 0 { - panic("no return value specified for RemoveRecursive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) error); ok { - r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// NewMockStorage creates a new instance of MockStorage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockStorage(t interface { - mock.TestingT - Cleanup(func()) -}, -) *MockStorage { - mock := &MockStorage{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/backup/mock_versioner_test.go b/managed/services/backup/mock_versioner_test.go deleted file mode 100644 index 649d52c382..0000000000 --- a/managed/services/backup/mock_versioner_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - mock "github.com/stretchr/testify/mock" - - agents "github.com/percona/pmm/managed/services/agents" -) - -// mockVersioner is an autogenerated mock type for the versioner type -type mockVersioner struct { - mock.Mock -} - -// GetVersions provides a mock function with given fields: pmmAgentID, softwares -func (_m *mockVersioner) GetVersions(pmmAgentID string, softwares []agents.Software) ([]agents.Version, error) { - ret := _m.Called(pmmAgentID, softwares) - - if len(ret) == 0 { - panic("no return value specified for GetVersions") - } - - var r0 []agents.Version - var r1 error - if rf, ok := ret.Get(0).(func(string, []agents.Software) ([]agents.Version, error)); ok { - return rf(pmmAgentID, softwares) - } - if rf, ok := ret.Get(0).(func(string, []agents.Software) []agents.Version); ok { - r0 = rf(pmmAgentID, softwares) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]agents.Version) - } - } - - if rf, ok := ret.Get(1).(func(string, []agents.Software) error); ok { - r1 = rf(pmmAgentID, softwares) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockVersioner creates a new instance of mockVersioner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockVersioner(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockVersioner { - mock := &mockVersioner{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/checks/mock_agents_registry_test.go b/managed/services/checks/mock_agents_registry_test.go deleted file mode 100644 index c1b5b37b7f..0000000000 --- a/managed/services/checks/mock_agents_registry_test.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package checks - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - models "github.com/percona/pmm/managed/models" -) - -// mockAgentsRegistry is an autogenerated mock type for the agentsRegistry type -type mockAgentsRegistry struct { - mock.Mock -} - -// StartMongoDBQueryBuildInfoAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp -func (_m *mockAgentsRegistry) StartMongoDBQueryBuildInfoAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) - - if len(ret) == 0 { - panic("no return value specified for StartMongoDBQueryBuildInfoAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMongoDBQueryGetCmdLineOptsAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp -func (_m *mockAgentsRegistry) StartMongoDBQueryGetCmdLineOptsAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) - - if len(ret) == 0 { - panic("no return value specified for StartMongoDBQueryGetCmdLineOptsAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMongoDBQueryGetDiagnosticDataAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp -func (_m *mockAgentsRegistry) StartMongoDBQueryGetDiagnosticDataAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) - - if len(ret) == 0 { - panic("no return value specified for StartMongoDBQueryGetDiagnosticDataAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMongoDBQueryGetParameterAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp -func (_m *mockAgentsRegistry) StartMongoDBQueryGetParameterAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) - - if len(ret) == 0 { - panic("no return value specified for StartMongoDBQueryGetParameterAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMongoDBQueryReplSetGetStatusAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp -func (_m *mockAgentsRegistry) StartMongoDBQueryReplSetGetStatusAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) - - if len(ret) == 0 { - panic("no return value specified for StartMongoDBQueryReplSetGetStatusAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMySQLQuerySelectAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify -func (_m *mockAgentsRegistry) StartMySQLQuerySelectAction(ctx context.Context, id string, pmmAgentID string, dsn string, query string, files map[string]string, tdp *models.DelimiterPair, tlsSkipVerify bool) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify) - - if len(ret) == 0 { - panic("no return value specified for StartMySQLQuerySelectAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, map[string]string, *models.DelimiterPair, bool) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartMySQLQueryShowAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify -func (_m *mockAgentsRegistry) StartMySQLQueryShowAction(ctx context.Context, id string, pmmAgentID string, dsn string, query string, files map[string]string, tdp *models.DelimiterPair, tlsSkipVerify bool) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify) - - if len(ret) == 0 { - panic("no return value specified for StartMySQLQueryShowAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, map[string]string, *models.DelimiterPair, bool) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartPostgreSQLQuerySelectAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, query -func (_m *mockAgentsRegistry) StartPostgreSQLQuerySelectAction(ctx context.Context, id string, pmmAgentID string, dsn string, query string) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn, query) - - if len(ret) == 0 { - panic("no return value specified for StartPostgreSQLQuerySelectAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn, query) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// StartPostgreSQLQueryShowAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn -func (_m *mockAgentsRegistry) StartPostgreSQLQueryShowAction(ctx context.Context, id string, pmmAgentID string, dsn string) error { - ret := _m.Called(ctx, id, pmmAgentID, dsn) - - if len(ret) == 0 { - panic("no return value specified for StartPostgreSQLQueryShowAction") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { - r0 = rf(ctx, id, pmmAgentID, dsn) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockAgentsRegistry creates a new instance of mockAgentsRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAgentsRegistry(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAgentsRegistry { - mock := &mockAgentsRegistry{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/inventory/agents.go b/managed/services/inventory/agents.go index 9f6a39baaf..a2055ee503 100644 --- a/managed/services/inventory/agents.go +++ b/managed/services/inventory/agents.go @@ -275,7 +275,7 @@ func (as *AgentsService) AddMySQLdExporter(ctx context.Context, p *inventoryv1.A CustomLabels: p.CustomLabels, TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: p.PushMetrics, DisabledCollectors: p.DisableCollectors, }, @@ -363,7 +363,7 @@ func (as *AgentsService) AddMongoDBExporter(ctx context.Context, p *inventoryv1. TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, MongoDBOptions: models.MongoDBOptionsFromRequest(p), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: p.PushMetrics, DisabledCollectors: p.DisableCollectors, }, @@ -447,7 +447,7 @@ func (as *AgentsService) AddQANMySQLPerfSchemaAgent(ctx context.Context, p *inve CustomLabels: p.CustomLabels, TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: p.MaxQueryLength, QueryExamplesDisabled: p.DisableQueryExamples, CommentsParsingDisabled: p.DisableCommentsParsing, @@ -533,7 +533,7 @@ func (as *AgentsService) AddQANMySQLSlowlogAgent(ctx context.Context, p *invento CustomLabels: p.CustomLabels, TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: p.MaxQueryLength, QueryExamplesDisabled: p.DisableQueryExamples, CommentsParsingDisabled: p.DisableCommentsParsing, @@ -615,7 +615,7 @@ func (as *AgentsService) AddPostgresExporter(ctx context.Context, p *inventoryv1 CustomLabels: p.CustomLabels, TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: p.PushMetrics, DisabledCollectors: p.DisableCollectors, }, @@ -700,7 +700,7 @@ func (as *AgentsService) AddQANMongoDBProfilerAgent(ctx context.Context, p *inve CustomLabels: p.CustomLabels, TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: p.MaxQueryLength, // TODO QueryExamplesDisabled https://jira.percona.com/browse/PMM-4650 - done, but not included in params. }, @@ -782,7 +782,7 @@ func (as *AgentsService) AddProxySQLExporter(ctx context.Context, p *inventoryv1 CustomLabels: p.CustomLabels, TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: p.PushMetrics, DisabledCollectors: p.DisableCollectors, }, @@ -865,7 +865,7 @@ func (as *AgentsService) AddQANPostgreSQLPgStatementsAgent(ctx context.Context, CustomLabels: p.CustomLabels, TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: p.MaxQueryLength, CommentsParsingDisabled: p.DisableCommentsParsing, }, @@ -944,7 +944,7 @@ func (as *AgentsService) AddQANPostgreSQLPgStatMonitorAgent(ctx context.Context, CustomLabels: p.CustomLabels, TLS: p.Tls, TLSSkipVerify: p.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: p.MaxQueryLength, QueryExamplesDisabled: p.DisableQueryExamples, CommentsParsingDisabled: p.DisableCommentsParsing, @@ -1020,10 +1020,10 @@ func (as *AgentsService) AddRDSExporter(ctx context.Context, p *inventoryv1.AddR PMMAgentID: p.PmmAgentId, NodeID: p.NodeId, CustomLabels: p.CustomLabels, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: p.PushMetrics, }, - AWSOptions: &models.AWSOptions{ + AWSOptions: models.AWSOptions{ AWSAccessKey: p.AwsAccessKey, AWSSecretKey: p.AwsSecretKey, RDSBasicMetricsDisabled: p.DisableBasicMetrics, @@ -1173,7 +1173,7 @@ func (as *AgentsService) AddAzureDatabaseExporter(ctx context.Context, p *invent PMMAgentID: p.PmmAgentId, NodeID: p.NodeId, CustomLabels: p.CustomLabels, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: p.PushMetrics, }, AzureOptions: models.AzureOptionsFromRequest(p), diff --git a/managed/services/inventory/mock_agent_service_test.go b/managed/services/inventory/mock_agent_service_test.go deleted file mode 100644 index e529b62739..0000000000 --- a/managed/services/inventory/mock_agent_service_test.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package inventory - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockAgentService is an autogenerated mock type for the agentService type -type mockAgentService struct { - mock.Mock -} - -// Logs provides a mock function with given fields: ctx, pmmAgentID, agentID, limit -func (_m *mockAgentService) Logs(ctx context.Context, pmmAgentID string, agentID string, limit uint32) ([]string, uint32, error) { - ret := _m.Called(ctx, pmmAgentID, agentID, limit) - - if len(ret) == 0 { - panic("no return value specified for Logs") - } - - var r0 []string - var r1 uint32 - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, uint32) ([]string, uint32, error)); ok { - return rf(ctx, pmmAgentID, agentID, limit) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, uint32) []string); ok { - r0 = rf(ctx, pmmAgentID, agentID, limit) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, uint32) uint32); ok { - r1 = rf(ctx, pmmAgentID, agentID, limit) - } else { - r1 = ret.Get(1).(uint32) - } - - if rf, ok := ret.Get(2).(func(context.Context, string, string, uint32) error); ok { - r2 = rf(ctx, pmmAgentID, agentID, limit) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// newMockAgentService creates a new instance of mockAgentService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAgentService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAgentService { - mock := &mockAgentService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/inventory/mock_agents_registry_test.go b/managed/services/inventory/mock_agents_registry_test.go deleted file mode 100644 index 6fd0ab4aa6..0000000000 --- a/managed/services/inventory/mock_agents_registry_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package inventory - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockAgentsRegistry is an autogenerated mock type for the agentsRegistry type -type mockAgentsRegistry struct { - mock.Mock -} - -// IsConnected provides a mock function with given fields: pmmAgentID -func (_m *mockAgentsRegistry) IsConnected(pmmAgentID string) bool { - ret := _m.Called(pmmAgentID) - - if len(ret) == 0 { - panic("no return value specified for IsConnected") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(pmmAgentID) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Kick provides a mock function with given fields: ctx, pmmAgentID -func (_m *mockAgentsRegistry) Kick(ctx context.Context, pmmAgentID string) { - _m.Called(ctx, pmmAgentID) -} - -// newMockAgentsRegistry creates a new instance of mockAgentsRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAgentsRegistry(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAgentsRegistry { - mock := &mockAgentsRegistry{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/inventory/mock_agents_state_updater_test.go b/managed/services/inventory/mock_agents_state_updater_test.go deleted file mode 100644 index 2791d7718b..0000000000 --- a/managed/services/inventory/mock_agents_state_updater_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package inventory - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockAgentsStateUpdater is an autogenerated mock type for the agentsStateUpdater type -type mockAgentsStateUpdater struct { - mock.Mock -} - -// RequestStateUpdate provides a mock function with given fields: ctx, pmmAgentID -func (_m *mockAgentsStateUpdater) RequestStateUpdate(ctx context.Context, pmmAgentID string) { - _m.Called(ctx, pmmAgentID) -} - -// newMockAgentsStateUpdater creates a new instance of mockAgentsStateUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAgentsStateUpdater(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAgentsStateUpdater { - mock := &mockAgentsStateUpdater{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/inventory/mock_connection_checker_test.go b/managed/services/inventory/mock_connection_checker_test.go deleted file mode 100644 index b7f27f1bdb..0000000000 --- a/managed/services/inventory/mock_connection_checker_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package inventory - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - reform "gopkg.in/reform.v1" - - models "github.com/percona/pmm/managed/models" -) - -// mockConnectionChecker is an autogenerated mock type for the connectionChecker type -type mockConnectionChecker struct { - mock.Mock -} - -// CheckConnectionToService provides a mock function with given fields: ctx, q, service, agent -func (_m *mockConnectionChecker) CheckConnectionToService(ctx context.Context, q *reform.Querier, service *models.Service, agent *models.Agent) error { - ret := _m.Called(ctx, q, service, agent) - - if len(ret) == 0 { - panic("no return value specified for CheckConnectionToService") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *reform.Querier, *models.Service, *models.Agent) error); ok { - r0 = rf(ctx, q, service, agent) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockConnectionChecker creates a new instance of mockConnectionChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockConnectionChecker(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockConnectionChecker { - mock := &mockConnectionChecker{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/inventory/mock_inventory_metrics_test.go b/managed/services/inventory/mock_inventory_metrics_test.go deleted file mode 100644 index 8fdd570b86..0000000000 --- a/managed/services/inventory/mock_inventory_metrics_test.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package inventory - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockInventoryMetrics is an autogenerated mock type for the inventoryMetrics type -type mockInventoryMetrics struct { - mock.Mock -} - -// GetAgentMetrics provides a mock function with given fields: ctx -func (_m *mockInventoryMetrics) GetAgentMetrics(ctx context.Context) ([]Metric, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetAgentMetrics") - } - - var r0 []Metric - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]Metric, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []Metric); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]Metric) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetNodeMetrics provides a mock function with given fields: ctx -func (_m *mockInventoryMetrics) GetNodeMetrics(ctx context.Context) ([]Metric, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetNodeMetrics") - } - - var r0 []Metric - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]Metric, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []Metric); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]Metric) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetServiceMetrics provides a mock function with given fields: ctx -func (_m *mockInventoryMetrics) GetServiceMetrics(ctx context.Context) ([]Metric, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetServiceMetrics") - } - - var r0 []Metric - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) ([]Metric, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) []Metric); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]Metric) - } - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockInventoryMetrics creates a new instance of mockInventoryMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockInventoryMetrics(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockInventoryMetrics { - mock := &mockInventoryMetrics{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/inventory/mock_prometheus_service_test.go b/managed/services/inventory/mock_prometheus_service_test.go deleted file mode 100644 index fc1e1e2144..0000000000 --- a/managed/services/inventory/mock_prometheus_service_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package inventory - -import mock "github.com/stretchr/testify/mock" - -// mockPrometheusService is an autogenerated mock type for the prometheusService type -type mockPrometheusService struct { - mock.Mock -} - -// RequestConfigurationUpdate provides a mock function with given fields: -func (_m *mockPrometheusService) RequestConfigurationUpdate() { - _m.Called() -} - -// newMockPrometheusService creates a new instance of mockPrometheusService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockPrometheusService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockPrometheusService { - mock := &mockPrometheusService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/inventory/mock_service_info_broker_test.go b/managed/services/inventory/mock_service_info_broker_test.go deleted file mode 100644 index 0329393a2e..0000000000 --- a/managed/services/inventory/mock_service_info_broker_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package inventory - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - reform "gopkg.in/reform.v1" - - models "github.com/percona/pmm/managed/models" -) - -// mockServiceInfoBroker is an autogenerated mock type for the serviceInfoBroker type -type mockServiceInfoBroker struct { - mock.Mock -} - -// GetInfoFromService provides a mock function with given fields: ctx, q, service, agent -func (_m *mockServiceInfoBroker) GetInfoFromService(ctx context.Context, q *reform.Querier, service *models.Service, agent *models.Agent) error { - ret := _m.Called(ctx, q, service, agent) - - if len(ret) == 0 { - panic("no return value specified for GetInfoFromService") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *reform.Querier, *models.Service, *models.Agent) error); ok { - r0 = rf(ctx, q, service, agent) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockServiceInfoBroker creates a new instance of mockServiceInfoBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockServiceInfoBroker(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockServiceInfoBroker { - mock := &mockServiceInfoBroker{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/inventory/mock_version_cache_test.go b/managed/services/inventory/mock_version_cache_test.go deleted file mode 100644 index 5957bb2798..0000000000 --- a/managed/services/inventory/mock_version_cache_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package inventory - -import mock "github.com/stretchr/testify/mock" - -// mockVersionCache is an autogenerated mock type for the versionCache type -type mockVersionCache struct { - mock.Mock -} - -// RequestSoftwareVersionsUpdate provides a mock function with given fields: -func (_m *mockVersionCache) RequestSoftwareVersionsUpdate() { - _m.Called() -} - -// newMockVersionCache creates a new instance of mockVersionCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockVersionCache(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockVersionCache { - mock := &mockVersionCache{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/agent.go b/managed/services/management/agent.go index 85077bcc67..99c221ca63 100644 --- a/managed/services/management/agent.go +++ b/managed/services/management/agent.go @@ -146,30 +146,26 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive Version: pointer.GetString(agent.Version), } - if agent.ExporterOptions != nil { - ua.DisabledCollectors = agent.ExporterOptions.DisabledCollectors - ua.MetricsPath = agent.ExporterOptions.MetricsPath - ua.MetricsScheme = agent.ExporterOptions.MetricsScheme - ua.PushMetrics = agent.ExporterOptions.PushMetrics - ua.ExposeExporter = agent.ExporterOptions.ExposeExporter - } - - if agent.QANOptions != nil { - ua.MaxQueryLength = agent.QANOptions.MaxQueryLength - ua.MaxQueryLogSize = agent.QANOptions.MaxQueryLogSize - ua.QueryExamplesDisabled = agent.QANOptions.QueryExamplesDisabled - ua.CommentsParsingDisabled = agent.QANOptions.CommentsParsingDisabled - } - - if agent.AWSOptions != nil { - ua.IsAwsSecretKeySet = agent.AWSOptions.AWSAccessKey != "" - ua.AwsAccessKey = agent.AWSOptions.AWSAccessKey - ua.RdsBasicMetricsDisabled = agent.AWSOptions.RDSBasicMetricsDisabled - ua.RdsEnhancedMetricsDisabled = agent.AWSOptions.RDSEnhancedMetricsDisabled - - } - - if agent.AzureOptions != nil { + // Exporter options + ua.DisabledCollectors = agent.ExporterOptions.DisabledCollectors + ua.MetricsPath = agent.ExporterOptions.MetricsPath + ua.MetricsScheme = agent.ExporterOptions.MetricsScheme + ua.PushMetrics = agent.ExporterOptions.PushMetrics + ua.ExposeExporter = agent.ExporterOptions.ExposeExporter + + // QAN options + ua.MaxQueryLength = agent.QANOptions.MaxQueryLength + ua.MaxQueryLogSize = agent.QANOptions.MaxQueryLogSize + ua.QueryExamplesDisabled = agent.QANOptions.QueryExamplesDisabled + ua.CommentsParsingDisabled = agent.QANOptions.CommentsParsingDisabled + + // AWS options + ua.IsAwsSecretKeySet = agent.AWSOptions.AWSAccessKey != "" + ua.AwsAccessKey = agent.AWSOptions.AWSAccessKey + ua.RdsBasicMetricsDisabled = agent.AWSOptions.RDSBasicMetricsDisabled + ua.RdsEnhancedMetricsDisabled = agent.AWSOptions.RDSEnhancedMetricsDisabled + + if !agent.AzureOptions.IsEmpty() { ua.AzureOptions = &managementv1.UniversalAgent_AzureOptions{ ClientId: agent.AzureOptions.ClientID, IsClientSecretSet: agent.AzureOptions.ClientSecret != "", @@ -179,7 +175,7 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive } } - if agent.MongoDBOptions != nil { + if !agent.MongoDBOptions.IsEmpty() { ua.MongoDbOptions = &managementv1.UniversalAgent_MongoDBOptions{ AuthenticationMechanism: agent.MongoDBOptions.AuthenticationMechanism, AuthenticationDatabase: agent.MongoDBOptions.AuthenticationDatabase, @@ -191,7 +187,7 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive } } - if agent.MySQLOptions != nil { + if !agent.MySQLOptions.IsEmpty() { ua.MysqlOptions = &managementv1.UniversalAgent_MySQLOptions{ IsTlsKeySet: agent.MySQLOptions.TLSKey != "", } @@ -200,7 +196,7 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive } - if agent.PostgreSQLOptions != nil { + if !agent.PostgreSQLOptions.IsEmpty() { ua.PostgresqlOptions = &managementv1.UniversalAgent_PostgreSQLOptions{ IsSslKeySet: agent.PostgreSQLOptions.SSLKey != "", AutoDiscoveryLimit: pointer.GetInt32(agent.PostgreSQLOptions.AutoDiscoveryLimit), diff --git a/managed/services/management/azure_database.go b/managed/services/management/azure_database.go index d98af5d1aa..f5d226ef9d 100644 --- a/managed/services/management/azure_database.go +++ b/managed/services/management/azure_database.go @@ -277,7 +277,7 @@ func (s *ManagementService) AddAzureDatabase(ctx context.Context, req *managemen Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - MySQLOptions: &models.MySQLOptions{ + MySQLOptions: models.MySQLOptions{ TableCountTablestatsGroupLimit: tablestatsGroupTableLimit, }, }) @@ -303,7 +303,7 @@ func (s *ManagementService) AddAzureDatabase(ctx context.Context, req *managemen Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ QueryExamplesDisabled: req.DisableQueryExamples, }, }) diff --git a/managed/services/management/backup/mock_aws_s3_test.go b/managed/services/management/backup/mock_aws_s3_test.go deleted file mode 100644 index 87a2f17d1a..0000000000 --- a/managed/services/management/backup/mock_aws_s3_test.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockAwsS3 is an autogenerated mock type for the awsS3 type -type mockAwsS3 struct { - mock.Mock -} - -// BucketExists provides a mock function with given fields: ctx, host, accessKey, secretKey, name -func (_m *mockAwsS3) BucketExists(ctx context.Context, host string, accessKey string, secretKey string, name string) (bool, error) { - ret := _m.Called(ctx, host, accessKey, secretKey, name) - - if len(ret) == 0 { - panic("no return value specified for BucketExists") - } - - var r0 bool - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) (bool, error)); ok { - return rf(ctx, host, accessKey, secretKey, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) bool); ok { - r0 = rf(ctx, host, accessKey, secretKey, name) - } else { - r0 = ret.Get(0).(bool) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { - r1 = rf(ctx, host, accessKey, secretKey, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetBucketLocation provides a mock function with given fields: ctx, host, accessKey, secretKey, name -func (_m *mockAwsS3) GetBucketLocation(ctx context.Context, host string, accessKey string, secretKey string, name string) (string, error) { - ret := _m.Called(ctx, host, accessKey, secretKey, name) - - if len(ret) == 0 { - panic("no return value specified for GetBucketLocation") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) (string, error)); ok { - return rf(ctx, host, accessKey, secretKey, name) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) string); ok { - r0 = rf(ctx, host, accessKey, secretKey, name) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { - r1 = rf(ctx, host, accessKey, secretKey, name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RemoveRecursive provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, prefix -func (_m *mockAwsS3) RemoveRecursive(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, prefix string) error { - ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, prefix) - - if len(ret) == 0 { - panic("no return value specified for RemoveRecursive") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) error); ok { - r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockAwsS3 creates a new instance of mockAwsS3. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAwsS3(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAwsS3 { - mock := &mockAwsS3{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/backup/mock_backup_service_test.go b/managed/services/management/backup/mock_backup_service_test.go deleted file mode 100644 index da3008674d..0000000000 --- a/managed/services/management/backup/mock_backup_service_test.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - context "context" - time "time" - - mock "github.com/stretchr/testify/mock" - - servicesbackup "github.com/percona/pmm/managed/services/backup" -) - -// mockBackupService is an autogenerated mock type for the backupService type -type mockBackupService struct { - mock.Mock -} - -// PerformBackup provides a mock function with given fields: ctx, params -func (_m *mockBackupService) PerformBackup(ctx context.Context, params servicesbackup.PerformBackupParams) (string, error) { - ret := _m.Called(ctx, params) - - if len(ret) == 0 { - panic("no return value specified for PerformBackup") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, servicesbackup.PerformBackupParams) (string, error)); ok { - return rf(ctx, params) - } - if rf, ok := ret.Get(0).(func(context.Context, servicesbackup.PerformBackupParams) string); ok { - r0 = rf(ctx, params) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, servicesbackup.PerformBackupParams) error); ok { - r1 = rf(ctx, params) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RestoreBackup provides a mock function with given fields: ctx, serviceID, artifactID, pitrTimestamp -func (_m *mockBackupService) RestoreBackup(ctx context.Context, serviceID string, artifactID string, pitrTimestamp time.Time) (string, error) { - ret := _m.Called(ctx, serviceID, artifactID, pitrTimestamp) - - if len(ret) == 0 { - panic("no return value specified for RestoreBackup") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Time) (string, error)); ok { - return rf(ctx, serviceID, artifactID, pitrTimestamp) - } - if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Time) string); ok { - r0 = rf(ctx, serviceID, artifactID, pitrTimestamp) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, string, time.Time) error); ok { - r1 = rf(ctx, serviceID, artifactID, pitrTimestamp) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SwitchMongoPITR provides a mock function with given fields: ctx, serviceID, enabled -func (_m *mockBackupService) SwitchMongoPITR(ctx context.Context, serviceID string, enabled bool) error { - ret := _m.Called(ctx, serviceID, enabled) - - if len(ret) == 0 { - panic("no return value specified for SwitchMongoPITR") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, bool) error); ok { - r0 = rf(ctx, serviceID, enabled) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockBackupService creates a new instance of mockBackupService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockBackupService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockBackupService { - mock := &mockBackupService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/backup/mock_pbm_pitr_service_test.go b/managed/services/management/backup/mock_pbm_pitr_service_test.go deleted file mode 100644 index fdb7789adf..0000000000 --- a/managed/services/management/backup/mock_pbm_pitr_service_test.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - models "github.com/percona/pmm/managed/models" - servicesbackup "github.com/percona/pmm/managed/services/backup" -) - -// mockPbmPITRService is an autogenerated mock type for the pbmPITRService type -type mockPbmPITRService struct { - mock.Mock -} - -// ListPITRTimeranges provides a mock function with given fields: ctx, locationClient, location, artifact -func (_m *mockPbmPITRService) ListPITRTimeranges(ctx context.Context, locationClient servicesbackup.Storage, location *models.BackupLocation, artifact *models.Artifact) ([]servicesbackup.Timeline, error) { - ret := _m.Called(ctx, locationClient, location, artifact) - - if len(ret) == 0 { - panic("no return value specified for ListPITRTimeranges") - } - - var r0 []servicesbackup.Timeline - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, servicesbackup.Storage, *models.BackupLocation, *models.Artifact) ([]servicesbackup.Timeline, error)); ok { - return rf(ctx, locationClient, location, artifact) - } - if rf, ok := ret.Get(0).(func(context.Context, servicesbackup.Storage, *models.BackupLocation, *models.Artifact) []servicesbackup.Timeline); ok { - r0 = rf(ctx, locationClient, location, artifact) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]servicesbackup.Timeline) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, servicesbackup.Storage, *models.BackupLocation, *models.Artifact) error); ok { - r1 = rf(ctx, locationClient, location, artifact) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockPbmPITRService creates a new instance of mockPbmPITRService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockPbmPITRService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockPbmPITRService { - mock := &mockPbmPITRService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/backup/mock_removal_service_test.go b/managed/services/management/backup/mock_removal_service_test.go deleted file mode 100644 index 5c584ca301..0000000000 --- a/managed/services/management/backup/mock_removal_service_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - mock "github.com/stretchr/testify/mock" - - servicesbackup "github.com/percona/pmm/managed/services/backup" -) - -// mockRemovalService is an autogenerated mock type for the removalService type -type mockRemovalService struct { - mock.Mock -} - -// DeleteArtifact provides a mock function with given fields: storage, artifactID, removeFiles -func (_m *mockRemovalService) DeleteArtifact(storage servicesbackup.Storage, artifactID string, removeFiles bool) error { - ret := _m.Called(storage, artifactID, removeFiles) - - if len(ret) == 0 { - panic("no return value specified for DeleteArtifact") - } - - var r0 error - if rf, ok := ret.Get(0).(func(servicesbackup.Storage, string, bool) error); ok { - r0 = rf(storage, artifactID, removeFiles) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockRemovalService creates a new instance of mockRemovalService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockRemovalService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockRemovalService { - mock := &mockRemovalService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/backup/mock_schedule_service_test.go b/managed/services/management/backup/mock_schedule_service_test.go deleted file mode 100644 index 524fd66d88..0000000000 --- a/managed/services/management/backup/mock_schedule_service_test.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package backup - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - models "github.com/percona/pmm/managed/models" - scheduler "github.com/percona/pmm/managed/services/scheduler" -) - -// mockScheduleService is an autogenerated mock type for the scheduleService type -type mockScheduleService struct { - mock.Mock -} - -// Add provides a mock function with given fields: task, params -func (_m *mockScheduleService) Add(task scheduler.Task, params scheduler.AddParams) (*models.ScheduledTask, error) { - ret := _m.Called(task, params) - - if len(ret) == 0 { - panic("no return value specified for Add") - } - - var r0 *models.ScheduledTask - var r1 error - if rf, ok := ret.Get(0).(func(scheduler.Task, scheduler.AddParams) (*models.ScheduledTask, error)); ok { - return rf(task, params) - } - if rf, ok := ret.Get(0).(func(scheduler.Task, scheduler.AddParams) *models.ScheduledTask); ok { - r0 = rf(task, params) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*models.ScheduledTask) - } - } - - if rf, ok := ret.Get(1).(func(scheduler.Task, scheduler.AddParams) error); ok { - r1 = rf(task, params) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Remove provides a mock function with given fields: id -func (_m *mockScheduleService) Remove(id string) error { - ret := _m.Called(id) - - if len(ret) == 0 { - panic("no return value specified for Remove") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Run provides a mock function with given fields: ctx -func (_m *mockScheduleService) Run(ctx context.Context) { - _m.Called(ctx) -} - -// Update provides a mock function with given fields: id, params -func (_m *mockScheduleService) Update(id string, params models.ChangeScheduledTaskParams) error { - ret := _m.Called(id, params) - - if len(ret) == 0 { - panic("no return value specified for Update") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string, models.ChangeScheduledTaskParams) error); ok { - r0 = rf(id, params) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockScheduleService creates a new instance of mockScheduleService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockScheduleService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockScheduleService { - mock := &mockScheduleService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/dump/mock_dump_service_test.go b/managed/services/management/dump/mock_dump_service_test.go deleted file mode 100644 index 137a00f8e6..0000000000 --- a/managed/services/management/dump/mock_dump_service_test.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package dump - -import ( - mock "github.com/stretchr/testify/mock" - - servicesdump "github.com/percona/pmm/managed/services/dump" -) - -// mockDumpService is an autogenerated mock type for the dumpService type -type mockDumpService struct { - mock.Mock -} - -// DeleteDump provides a mock function with given fields: dumpID -func (_m *mockDumpService) DeleteDump(dumpID string) error { - ret := _m.Called(dumpID) - - if len(ret) == 0 { - panic("no return value specified for DeleteDump") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(dumpID) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetFilePathsForDumps provides a mock function with given fields: dumpIDs -func (_m *mockDumpService) GetFilePathsForDumps(dumpIDs []string) (map[string]string, error) { - ret := _m.Called(dumpIDs) - - if len(ret) == 0 { - panic("no return value specified for GetFilePathsForDumps") - } - - var r0 map[string]string - var r1 error - if rf, ok := ret.Get(0).(func([]string) (map[string]string, error)); ok { - return rf(dumpIDs) - } - if rf, ok := ret.Get(0).(func([]string) map[string]string); ok { - r0 = rf(dumpIDs) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]string) - } - } - - if rf, ok := ret.Get(1).(func([]string) error); ok { - r1 = rf(dumpIDs) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// StartDump provides a mock function with given fields: params -func (_m *mockDumpService) StartDump(params *servicesdump.Params) (string, error) { - ret := _m.Called(params) - - if len(ret) == 0 { - panic("no return value specified for StartDump") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(*servicesdump.Params) (string, error)); ok { - return rf(params) - } - if rf, ok := ret.Get(0).(func(*servicesdump.Params) string); ok { - r0 = rf(params) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(*servicesdump.Params) error); ok { - r1 = rf(params) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockDumpService creates a new instance of mockDumpService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockDumpService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockDumpService { - mock := &mockDumpService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_agents_registry_test.go b/managed/services/management/mock_agents_registry_test.go deleted file mode 100644 index 964290878f..0000000000 --- a/managed/services/management/mock_agents_registry_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockAgentsRegistry is an autogenerated mock type for the agentsRegistry type -type mockAgentsRegistry struct { - mock.Mock -} - -// IsConnected provides a mock function with given fields: pmmAgentID -func (_m *mockAgentsRegistry) IsConnected(pmmAgentID string) bool { - ret := _m.Called(pmmAgentID) - - if len(ret) == 0 { - panic("no return value specified for IsConnected") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(pmmAgentID) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Kick provides a mock function with given fields: ctx, pmmAgentID -func (_m *mockAgentsRegistry) Kick(ctx context.Context, pmmAgentID string) { - _m.Called(ctx, pmmAgentID) -} - -// newMockAgentsRegistry creates a new instance of mockAgentsRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAgentsRegistry(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAgentsRegistry { - mock := &mockAgentsRegistry{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_agents_state_updater_test.go b/managed/services/management/mock_agents_state_updater_test.go deleted file mode 100644 index 369404d302..0000000000 --- a/managed/services/management/mock_agents_state_updater_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockAgentsStateUpdater is an autogenerated mock type for the agentsStateUpdater type -type mockAgentsStateUpdater struct { - mock.Mock -} - -// RequestStateUpdate provides a mock function with given fields: ctx, pmmAgentID -func (_m *mockAgentsStateUpdater) RequestStateUpdate(ctx context.Context, pmmAgentID string) { - _m.Called(ctx, pmmAgentID) -} - -// newMockAgentsStateUpdater creates a new instance of mockAgentsStateUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAgentsStateUpdater(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAgentsStateUpdater { - mock := &mockAgentsStateUpdater{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_checks_service_test.go b/managed/services/management/mock_checks_service_test.go deleted file mode 100644 index b0bd6a7b49..0000000000 --- a/managed/services/management/mock_checks_service_test.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import ( - context "context" - - check "github.com/percona/saas/pkg/check" - mock "github.com/stretchr/testify/mock" - - services "github.com/percona/pmm/managed/services" -) - -// mockChecksService is an autogenerated mock type for the checksService type -type mockChecksService struct { - mock.Mock -} - -// ChangeInterval provides a mock function with given fields: params -func (_m *mockChecksService) ChangeInterval(params map[string]check.Interval) error { - ret := _m.Called(params) - - if len(ret) == 0 { - panic("no return value specified for ChangeInterval") - } - - var r0 error - if rf, ok := ret.Get(0).(func(map[string]check.Interval) error); ok { - r0 = rf(params) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// DisableChecks provides a mock function with given fields: checkNames -func (_m *mockChecksService) DisableChecks(checkNames []string) error { - ret := _m.Called(checkNames) - - if len(ret) == 0 { - panic("no return value specified for DisableChecks") - } - - var r0 error - if rf, ok := ret.Get(0).(func([]string) error); ok { - r0 = rf(checkNames) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// EnableChecks provides a mock function with given fields: checkNames -func (_m *mockChecksService) EnableChecks(checkNames []string) error { - ret := _m.Called(checkNames) - - if len(ret) == 0 { - panic("no return value specified for EnableChecks") - } - - var r0 error - if rf, ok := ret.Get(0).(func([]string) error); ok { - r0 = rf(checkNames) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetAdvisors provides a mock function with given fields: -func (_m *mockChecksService) GetAdvisors() ([]check.Advisor, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAdvisors") - } - - var r0 []check.Advisor - var r1 error - if rf, ok := ret.Get(0).(func() ([]check.Advisor, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []check.Advisor); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]check.Advisor) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetChecks provides a mock function with given fields: -func (_m *mockChecksService) GetChecks() (map[string]check.Check, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetChecks") - } - - var r0 map[string]check.Check - var r1 error - if rf, ok := ret.Get(0).(func() (map[string]check.Check, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() map[string]check.Check); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(map[string]check.Check) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetChecksResults provides a mock function with given fields: ctx, serviceID -func (_m *mockChecksService) GetChecksResults(ctx context.Context, serviceID string) ([]services.CheckResult, error) { - ret := _m.Called(ctx, serviceID) - - if len(ret) == 0 { - panic("no return value specified for GetChecksResults") - } - - var r0 []services.CheckResult - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) ([]services.CheckResult, error)); ok { - return rf(ctx, serviceID) - } - if rf, ok := ret.Get(0).(func(context.Context, string) []services.CheckResult); ok { - r0 = rf(ctx, serviceID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]services.CheckResult) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, serviceID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetDisabledChecks provides a mock function with given fields: -func (_m *mockChecksService) GetDisabledChecks() ([]string, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDisabledChecks") - } - - var r0 []string - var r1 error - if rf, ok := ret.Get(0).(func() ([]string, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// StartChecks provides a mock function with given fields: checkNames -func (_m *mockChecksService) StartChecks(checkNames []string) error { - ret := _m.Called(checkNames) - - if len(ret) == 0 { - panic("no return value specified for StartChecks") - } - - var r0 error - if rf, ok := ret.Get(0).(func([]string) error); ok { - r0 = rf(checkNames) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockChecksService creates a new instance of mockChecksService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockChecksService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockChecksService { - mock := &mockChecksService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_connection_checker_test.go b/managed/services/management/mock_connection_checker_test.go deleted file mode 100644 index b0ea5d8d68..0000000000 --- a/managed/services/management/mock_connection_checker_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - reform "gopkg.in/reform.v1" - - models "github.com/percona/pmm/managed/models" -) - -// mockConnectionChecker is an autogenerated mock type for the connectionChecker type -type mockConnectionChecker struct { - mock.Mock -} - -// CheckConnectionToService provides a mock function with given fields: ctx, q, service, agent -func (_m *mockConnectionChecker) CheckConnectionToService(ctx context.Context, q *reform.Querier, service *models.Service, agent *models.Agent) error { - ret := _m.Called(ctx, q, service, agent) - - if len(ret) == 0 { - panic("no return value specified for CheckConnectionToService") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *reform.Querier, *models.Service, *models.Agent) error); ok { - r0 = rf(ctx, q, service, agent) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockConnectionChecker creates a new instance of mockConnectionChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockConnectionChecker(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockConnectionChecker { - mock := &mockConnectionChecker{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_grafana_client_test.go b/managed/services/management/mock_grafana_client_test.go deleted file mode 100644 index cd58f21d8e..0000000000 --- a/managed/services/management/mock_grafana_client_test.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import ( - context "context" - time "time" - - mock "github.com/stretchr/testify/mock" -) - -// mockGrafanaClient is an autogenerated mock type for the grafanaClient type -type mockGrafanaClient struct { - mock.Mock -} - -// CreateAnnotation provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4 -func (_m *mockGrafanaClient) CreateAnnotation(_a0 context.Context, _a1 []string, _a2 time.Time, _a3 string, _a4 string) (string, error) { - ret := _m.Called(_a0, _a1, _a2, _a3, _a4) - - if len(ret) == 0 { - panic("no return value specified for CreateAnnotation") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []string, time.Time, string, string) (string, error)); ok { - return rf(_a0, _a1, _a2, _a3, _a4) - } - if rf, ok := ret.Get(0).(func(context.Context, []string, time.Time, string, string) string); ok { - r0 = rf(_a0, _a1, _a2, _a3, _a4) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, []string, time.Time, string, string) error); ok { - r1 = rf(_a0, _a1, _a2, _a3, _a4) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CreateServiceAccount provides a mock function with given fields: ctx, noneName, reregister -func (_m *mockGrafanaClient) CreateServiceAccount(ctx context.Context, noneName string, reregister bool) (int, string, error) { - ret := _m.Called(ctx, noneName, reregister) - - if len(ret) == 0 { - panic("no return value specified for CreateServiceAccount") - } - - var r0 int - var r1 string - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, string, bool) (int, string, error)); ok { - return rf(ctx, noneName, reregister) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bool) int); ok { - r0 = rf(ctx, noneName, reregister) - } else { - r0 = ret.Get(0).(int) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bool) string); ok { - r1 = rf(ctx, noneName, reregister) - } else { - r1 = ret.Get(1).(string) - } - - if rf, ok := ret.Get(2).(func(context.Context, string, bool) error); ok { - r2 = rf(ctx, noneName, reregister) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// DeleteServiceAccount provides a mock function with given fields: ctx, noneName, force -func (_m *mockGrafanaClient) DeleteServiceAccount(ctx context.Context, noneName string, force bool) (string, error) { - ret := _m.Called(ctx, noneName, force) - - if len(ret) == 0 { - panic("no return value specified for DeleteServiceAccount") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, bool) (string, error)); ok { - return rf(ctx, noneName, force) - } - if rf, ok := ret.Get(0).(func(context.Context, string, bool) string); ok { - r0 = rf(ctx, noneName, force) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { - r1 = rf(ctx, noneName, force) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockGrafanaClient creates a new instance of mockGrafanaClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockGrafanaClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockGrafanaClient { - mock := &mockGrafanaClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_jobs_service_test.go b/managed/services/management/mock_jobs_service_test.go deleted file mode 100644 index 1c781180de..0000000000 --- a/managed/services/management/mock_jobs_service_test.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import mock "github.com/stretchr/testify/mock" - -// mockJobsService is an autogenerated mock type for the jobsService type -type mockJobsService struct { - mock.Mock -} - -// StopJob provides a mock function with given fields: jobID -func (_m *mockJobsService) StopJob(jobID string) error { - ret := _m.Called(jobID) - - if len(ret) == 0 { - panic("no return value specified for StopJob") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(jobID) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockJobsService creates a new instance of mockJobsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockJobsService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockJobsService { - mock := &mockJobsService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_prometheus_service_test.go b/managed/services/management/mock_prometheus_service_test.go deleted file mode 100644 index 1648abb75b..0000000000 --- a/managed/services/management/mock_prometheus_service_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import mock "github.com/stretchr/testify/mock" - -// mockPrometheusService is an autogenerated mock type for the prometheusService type -type mockPrometheusService struct { - mock.Mock -} - -// RequestConfigurationUpdate provides a mock function with given fields: -func (_m *mockPrometheusService) RequestConfigurationUpdate() { - _m.Called() -} - -// newMockPrometheusService creates a new instance of mockPrometheusService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockPrometheusService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockPrometheusService { - mock := &mockPrometheusService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_service_info_broker_test.go b/managed/services/management/mock_service_info_broker_test.go deleted file mode 100644 index d3bcf6aa12..0000000000 --- a/managed/services/management/mock_service_info_broker_test.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - reform "gopkg.in/reform.v1" - - models "github.com/percona/pmm/managed/models" -) - -// mockServiceInfoBroker is an autogenerated mock type for the serviceInfoBroker type -type mockServiceInfoBroker struct { - mock.Mock -} - -// GetInfoFromService provides a mock function with given fields: ctx, q, service, agent -func (_m *mockServiceInfoBroker) GetInfoFromService(ctx context.Context, q *reform.Querier, service *models.Service, agent *models.Agent) error { - ret := _m.Called(ctx, q, service, agent) - - if len(ret) == 0 { - panic("no return value specified for GetInfoFromService") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *reform.Querier, *models.Service, *models.Agent) error); ok { - r0 = rf(ctx, q, service, agent) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockServiceInfoBroker creates a new instance of mockServiceInfoBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockServiceInfoBroker(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockServiceInfoBroker { - mock := &mockServiceInfoBroker{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_version_cache_test.go b/managed/services/management/mock_version_cache_test.go deleted file mode 100644 index 1c30b27082..0000000000 --- a/managed/services/management/mock_version_cache_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import mock "github.com/stretchr/testify/mock" - -// mockVersionCache is an autogenerated mock type for the versionCache type -type mockVersionCache struct { - mock.Mock -} - -// RequestSoftwareVersionsUpdate provides a mock function with given fields: -func (_m *mockVersionCache) RequestSoftwareVersionsUpdate() { - _m.Called() -} - -// newMockVersionCache creates a new instance of mockVersionCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockVersionCache(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockVersionCache { - mock := &mockVersionCache{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mock_victoria_metrics_client_test.go b/managed/services/management/mock_victoria_metrics_client_test.go deleted file mode 100644 index e3ee63ad93..0000000000 --- a/managed/services/management/mock_victoria_metrics_client_test.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package management - -import ( - context "context" - time "time" - - v1 "github.com/prometheus/client_golang/api/prometheus/v1" - model "github.com/prometheus/common/model" - mock "github.com/stretchr/testify/mock" -) - -// mockVictoriaMetricsClient is an autogenerated mock type for the victoriaMetricsClient type -type mockVictoriaMetricsClient struct { - mock.Mock -} - -// Query provides a mock function with given fields: ctx, query, ts, opts -func (_m *mockVictoriaMetricsClient) Query(ctx context.Context, query string, ts time.Time, opts ...v1.Option) (model.Value, v1.Warnings, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, query, ts) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Query") - } - - var r0 model.Value - var r1 v1.Warnings - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, string, time.Time, ...v1.Option) (model.Value, v1.Warnings, error)); ok { - return rf(ctx, query, ts, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, string, time.Time, ...v1.Option) model.Value); ok { - r0 = rf(ctx, query, ts, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(model.Value) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, time.Time, ...v1.Option) v1.Warnings); ok { - r1 = rf(ctx, query, ts, opts...) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(v1.Warnings) - } - } - - if rf, ok := ret.Get(2).(func(context.Context, string, time.Time, ...v1.Option) error); ok { - r2 = rf(ctx, query, ts, opts...) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// newMockVictoriaMetricsClient creates a new instance of mockVictoriaMetricsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockVictoriaMetricsClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockVictoriaMetricsClient { - mock := &mockVictoriaMetricsClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/management/mongodb.go b/managed/services/management/mongodb.go index 34b7e9d7ca..387c5432e0 100644 --- a/managed/services/management/mongodb.go +++ b/managed/services/management/mongodb.go @@ -72,7 +72,7 @@ func (s *ManagementService) addMongoDB(ctx context.Context, req *managementv1.Ad TLSSkipVerify: req.TlsSkipVerify, MongoDBOptions: models.MongoDBOptionsFromRequest(req), LogLevel: services.SpecifyLogLevel(req.LogLevel, inventoryv1.LogLevel_LOG_LEVEL_FATAL), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ ExposeExporter: req.ExposeExporter, PushMetrics: isPushMode(req.MetricsMode), DisabledCollectors: req.DisableCollectors, @@ -106,7 +106,7 @@ func (s *ManagementService) addMongoDB(ctx context.Context, req *managementv1.Ad Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: req.MaxQueryLength, // TODO QueryExamplesDisabled https://jira.percona.com/browse/PMM-7860 }, diff --git a/managed/services/management/mysql.go b/managed/services/management/mysql.go index 112de34e5a..160fe79ed3 100644 --- a/managed/services/management/mysql.go +++ b/managed/services/management/mysql.go @@ -98,7 +98,7 @@ func (s *ManagementService) addMySQL(ctx context.Context, req *managementv1.AddM TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, MySQLOptions: mysqlOptions, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ ExposeExporter: req.ExposeExporter, PushMetrics: isPushMode(req.MetricsMode), DisabledCollectors: req.DisableCollectors, @@ -134,7 +134,7 @@ func (s *ManagementService) addMySQL(ctx context.Context, req *managementv1.AddM Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: req.MaxQueryLength, QueryExamplesDisabled: req.DisableQueryExamples, CommentsParsingDisabled: req.DisableCommentsParsing, @@ -162,7 +162,7 @@ func (s *ManagementService) addMySQL(ctx context.Context, req *managementv1.AddM TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, MySQLOptions: models.MySQLOptionsFromRequest(req), - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: req.MaxQueryLength, QueryExamplesDisabled: req.DisableQueryExamples, CommentsParsingDisabled: req.DisableCommentsParsing, diff --git a/managed/services/management/postgresql.go b/managed/services/management/postgresql.go index 63bb85171d..81af3b5008 100644 --- a/managed/services/management/postgresql.go +++ b/managed/services/management/postgresql.go @@ -72,7 +72,7 @@ func (s *ManagementService) addPostgreSQL(ctx context.Context, req *managementv1 AgentPassword: req.AgentPassword, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ ExposeExporter: req.ExposeExporter, PushMetrics: isPushMode(req.MetricsMode), DisabledCollectors: req.DisableCollectors, @@ -113,7 +113,7 @@ func (s *ManagementService) addPostgreSQL(ctx context.Context, req *managementv1 ServiceID: service.ServiceID, Username: req.Username, Password: req.Password, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: req.MaxQueryLength, QueryExamplesDisabled: req.DisableQueryExamples, CommentsParsingDisabled: req.DisableCommentsParsing, @@ -142,7 +142,7 @@ func (s *ManagementService) addPostgreSQL(ctx context.Context, req *managementv1 Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ MaxQueryLength: req.MaxQueryLength, QueryExamplesDisabled: req.DisableQueryExamples, CommentsParsingDisabled: req.DisableCommentsParsing, diff --git a/managed/services/management/proxysql.go b/managed/services/management/proxysql.go index d1f5eb6bce..430cb6af2f 100644 --- a/managed/services/management/proxysql.go +++ b/managed/services/management/proxysql.go @@ -70,7 +70,7 @@ func (s *ManagementService) addProxySQL(ctx context.Context, req *managementv1.A AgentPassword: req.AgentPassword, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ ExposeExporter: req.ExposeExporter, PushMetrics: isPushMode(req.MetricsMode), DisabledCollectors: req.DisableCollectors, diff --git a/managed/services/management/rds.go b/managed/services/management/rds.go index 6e3edfea89..ac4afa2b2d 100644 --- a/managed/services/management/rds.go +++ b/managed/services/management/rds.go @@ -276,13 +276,13 @@ func (s *ManagementService) addRDS(ctx context.Context, req *managementv1.AddRDS rdsExporter, err := models.CreateAgent(tx.Querier, models.RDSExporterType, &models.CreateAgentParams{ PMMAgentID: pmmAgentID, NodeID: node.NodeID, - AWSOptions: &models.AWSOptions{ + AWSOptions: models.AWSOptions{ AWSAccessKey: req.AwsAccessKey, AWSSecretKey: req.AwsSecretKey, RDSBasicMetricsDisabled: req.DisableBasicMetrics, RDSEnhancedMetricsDisabled: req.DisableEnhancedMetrics, }, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: isPushMode(metricsMode), }, }) @@ -326,10 +326,10 @@ func (s *ManagementService) addRDS(ctx context.Context, req *managementv1.AddRDS Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: isPushMode(metricsMode), }, - MySQLOptions: &models.MySQLOptions{ + MySQLOptions: models.MySQLOptions{ TableCountTablestatsGroupLimit: tablestatsGroupTableLimit, }, }) @@ -360,7 +360,7 @@ func (s *ManagementService) addRDS(ctx context.Context, req *managementv1.AddRDS Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ QueryExamplesDisabled: req.DisableQueryExamples, CommentsParsingDisabled: req.DisableCommentsParsing, }, @@ -407,14 +407,14 @@ func (s *ManagementService) addRDS(ctx context.Context, req *managementv1.AddRDS Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ PushMetrics: isPushMode(metricsMode), }, - MySQLOptions: &models.MySQLOptions{ + MySQLOptions: models.MySQLOptions{ TableCountTablestatsGroupLimit: tablestatsGroupTableLimit, }, - PostgreSQLOptions: &models.PostgreSQLOptions{ + PostgreSQLOptions: models.PostgreSQLOptions{ AutoDiscoveryLimit: pointer.ToInt32(req.AutoDiscoveryLimit), MaxExporterConnections: req.MaxPostgresqlExporterConnections, }, @@ -446,7 +446,7 @@ func (s *ManagementService) addRDS(ctx context.Context, req *managementv1.AddRDS Password: req.Password, TLS: req.Tls, TLSSkipVerify: req.TlsSkipVerify, - QANOptions: &models.QANOptions{ + QANOptions: models.QANOptions{ QueryExamplesDisabled: req.DisableQueryExamples, CommentsParsingDisabled: req.DisableCommentsParsing, }, diff --git a/managed/services/qan/mock_qan_collector_client_test.go b/managed/services/qan/mock_qan_collector_client_test.go deleted file mode 100644 index 1d8f83b3c5..0000000000 --- a/managed/services/qan/mock_qan_collector_client_test.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package qan - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - grpc "google.golang.org/grpc" - - qanv1 "github.com/percona/pmm/api/qan/v1" -) - -// mockQanCollectorClient is an autogenerated mock type for the qanCollectorClient type -type mockQanCollectorClient struct { - mock.Mock -} - -// Collect provides a mock function with given fields: ctx, in, opts -func (_m *mockQanCollectorClient) Collect(ctx context.Context, in *qanv1.CollectRequest, opts ...grpc.CallOption) (*qanv1.CollectResponse, error) { - _va := make([]interface{}, len(opts)) - for _i := range opts { - _va[_i] = opts[_i] - } - var _ca []interface{} - _ca = append(_ca, ctx, in) - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for Collect") - } - - var r0 *qanv1.CollectResponse - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *qanv1.CollectRequest, ...grpc.CallOption) (*qanv1.CollectResponse, error)); ok { - return rf(ctx, in, opts...) - } - if rf, ok := ret.Get(0).(func(context.Context, *qanv1.CollectRequest, ...grpc.CallOption) *qanv1.CollectResponse); ok { - r0 = rf(ctx, in, opts...) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*qanv1.CollectResponse) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *qanv1.CollectRequest, ...grpc.CallOption) error); ok { - r1 = rf(ctx, in, opts...) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockQanCollectorClient creates a new instance of mockQanCollectorClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockQanCollectorClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockQanCollectorClient { - mock := &mockQanCollectorClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/scheduler/mock_backup_service_test.go b/managed/services/scheduler/mock_backup_service_test.go deleted file mode 100644 index d9862f38f2..0000000000 --- a/managed/services/scheduler/mock_backup_service_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package scheduler - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - backup "github.com/percona/pmm/managed/services/backup" -) - -// mockBackupService is an autogenerated mock type for the backupService type -type mockBackupService struct { - mock.Mock -} - -// PerformBackup provides a mock function with given fields: ctx, params -func (_m *mockBackupService) PerformBackup(ctx context.Context, params backup.PerformBackupParams) (string, error) { - ret := _m.Called(ctx, params) - - if len(ret) == 0 { - panic("no return value specified for PerformBackup") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, backup.PerformBackupParams) (string, error)); ok { - return rf(ctx, params) - } - if rf, ok := ret.Get(0).(func(context.Context, backup.PerformBackupParams) string); ok { - r0 = rf(ctx, params) - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func(context.Context, backup.PerformBackupParams) error); ok { - r1 = rf(ctx, params) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockBackupService creates a new instance of mockBackupService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockBackupService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockBackupService { - mock := &mockBackupService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/mock_agents_state_updater_test.go b/managed/services/server/mock_agents_state_updater_test.go deleted file mode 100644 index 5ed1085f3f..0000000000 --- a/managed/services/server/mock_agents_state_updater_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockAgentsStateUpdater is an autogenerated mock type for the agentsStateUpdater type -type mockAgentsStateUpdater struct { - mock.Mock -} - -// UpdateAgentsState provides a mock function with given fields: ctx -func (_m *mockAgentsStateUpdater) UpdateAgentsState(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for UpdateAgentsState") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockAgentsStateUpdater creates a new instance of mockAgentsStateUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockAgentsStateUpdater(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockAgentsStateUpdater { - mock := &mockAgentsStateUpdater{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/mock_checks_service_test.go b/managed/services/server/mock_checks_service_test.go deleted file mode 100644 index 2f2e1d04e8..0000000000 --- a/managed/services/server/mock_checks_service_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - context "context" - time "time" - - mock "github.com/stretchr/testify/mock" -) - -// mockChecksService is an autogenerated mock type for the checksService type -type mockChecksService struct { - mock.Mock -} - -// CleanupAlerts provides a mock function with given fields: -func (_m *mockChecksService) CleanupAlerts() { - _m.Called() -} - -// CollectAdvisors provides a mock function with given fields: ctx -func (_m *mockChecksService) CollectAdvisors(ctx context.Context) { - _m.Called(ctx) -} - -// StartChecks provides a mock function with given fields: checkNames -func (_m *mockChecksService) StartChecks(checkNames []string) error { - ret := _m.Called(checkNames) - - if len(ret) == 0 { - panic("no return value specified for StartChecks") - } - - var r0 error - if rf, ok := ret.Get(0).(func([]string) error); ok { - r0 = rf(checkNames) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// UpdateIntervals provides a mock function with given fields: rare, standard, frequent -func (_m *mockChecksService) UpdateIntervals(rare time.Duration, standard time.Duration, frequent time.Duration) { - _m.Called(rare, standard, frequent) -} - -// newMockChecksService creates a new instance of mockChecksService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockChecksService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockChecksService { - mock := &mockChecksService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/mock_grafana_client_test.go b/managed/services/server/mock_grafana_client_test.go deleted file mode 100644 index ae782b1e40..0000000000 --- a/managed/services/server/mock_grafana_client_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockGrafanaClient is an autogenerated mock type for the grafanaClient type -type mockGrafanaClient struct { - mock.Mock -} - -// IsReady provides a mock function with given fields: ctx -func (_m *mockGrafanaClient) IsReady(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for IsReady") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockGrafanaClient creates a new instance of mockGrafanaClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockGrafanaClient(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockGrafanaClient { - mock := &mockGrafanaClient{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/mock_prometheus_service_test.go b/managed/services/server/mock_prometheus_service_test.go deleted file mode 100644 index 352ea8b250..0000000000 --- a/managed/services/server/mock_prometheus_service_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockPrometheusService is an autogenerated mock type for the prometheusService type -type mockPrometheusService struct { - mock.Mock -} - -// IsReady provides a mock function with given fields: ctx -func (_m *mockPrometheusService) IsReady(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for IsReady") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// RequestConfigurationUpdate provides a mock function with given fields: -func (_m *mockPrometheusService) RequestConfigurationUpdate() { - _m.Called() -} - -// newMockPrometheusService creates a new instance of mockPrometheusService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockPrometheusService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockPrometheusService { - mock := &mockPrometheusService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/mock_supervisord_service_test.go b/managed/services/server/mock_supervisord_service_test.go deleted file mode 100644 index 792e5987f1..0000000000 --- a/managed/services/server/mock_supervisord_service_test.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - mock "github.com/stretchr/testify/mock" - - models "github.com/percona/pmm/managed/models" -) - -// mockSupervisordService is an autogenerated mock type for the supervisordService type -type mockSupervisordService struct { - mock.Mock -} - -// UpdateConfiguration provides a mock function with given fields: settings, ssoDetails -func (_m *mockSupervisordService) UpdateConfiguration(settings *models.Settings, ssoDetails *models.PerconaSSODetails) error { - ret := _m.Called(settings, ssoDetails) - - if len(ret) == 0 { - panic("no return value specified for UpdateConfiguration") - } - - var r0 error - if rf, ok := ret.Get(0).(func(*models.Settings, *models.PerconaSSODetails) error); ok { - r0 = rf(settings, ssoDetails) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockSupervisordService creates a new instance of mockSupervisordService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockSupervisordService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockSupervisordService { - mock := &mockSupervisordService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/mock_telemetry_service_test.go b/managed/services/server/mock_telemetry_service_test.go deleted file mode 100644 index 4b94e03f27..0000000000 --- a/managed/services/server/mock_telemetry_service_test.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - mock "github.com/stretchr/testify/mock" - - serverv1 "github.com/percona/pmm/api/server/v1" -) - -// mockTelemetryService is an autogenerated mock type for the telemetryService type -type mockTelemetryService struct { - mock.Mock -} - -// DistributionMethod provides a mock function with given fields: -func (_m *mockTelemetryService) DistributionMethod() serverv1.DistributionMethod { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for DistributionMethod") - } - - var r0 serverv1.DistributionMethod - if rf, ok := ret.Get(0).(func() serverv1.DistributionMethod); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(serverv1.DistributionMethod) - } - - return r0 -} - -// GetSummaries provides a mock function with given fields: -func (_m *mockTelemetryService) GetSummaries() []string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetSummaries") - } - - var r0 []string - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - return r0 -} - -// newMockTelemetryService creates a new instance of mockTelemetryService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockTelemetryService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockTelemetryService { - mock := &mockTelemetryService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/mock_templates_service_test.go b/managed/services/server/mock_templates_service_test.go deleted file mode 100644 index e0f75bcf0c..0000000000 --- a/managed/services/server/mock_templates_service_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockTemplatesService is an autogenerated mock type for the templatesService type -type mockTemplatesService struct { - mock.Mock -} - -// CollectTemplates provides a mock function with given fields: ctx -func (_m *mockTemplatesService) CollectTemplates(ctx context.Context) { - _m.Called(ctx) -} - -// newMockTemplatesService creates a new instance of mockTemplatesService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockTemplatesService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockTemplatesService { - mock := &mockTemplatesService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/server/mock_vm_alert_external_rules_test.go b/managed/services/server/mock_vm_alert_external_rules_test.go deleted file mode 100644 index 80b12640e9..0000000000 --- a/managed/services/server/mock_vm_alert_external_rules_test.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package server - -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) - -// mockVmAlertExternalRules is an autogenerated mock type for the vmAlertExternalRules type -type mockVmAlertExternalRules struct { - mock.Mock -} - -// ReadRules provides a mock function with given fields: -func (_m *mockVmAlertExternalRules) ReadRules() (string, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ReadRules") - } - - var r0 string - var r1 error - if rf, ok := ret.Get(0).(func() (string, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// RemoveRulesFile provides a mock function with given fields: -func (_m *mockVmAlertExternalRules) RemoveRulesFile() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for RemoveRulesFile") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ValidateRules provides a mock function with given fields: ctx, rules -func (_m *mockVmAlertExternalRules) ValidateRules(ctx context.Context, rules string) error { - ret := _m.Called(ctx, rules) - - if len(ret) == 0 { - panic("no return value specified for ValidateRules") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(ctx, rules) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WriteRules provides a mock function with given fields: rules -func (_m *mockVmAlertExternalRules) WriteRules(rules string) error { - ret := _m.Called(rules) - - if len(ret) == 0 { - panic("no return value specified for WriteRules") - } - - var r0 error - if rf, ok := ret.Get(0).(func(string) error); ok { - r0 = rf(rules) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockVmAlertExternalRules creates a new instance of mockVmAlertExternalRules. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockVmAlertExternalRules(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockVmAlertExternalRules { - mock := &mockVmAlertExternalRules{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/telemetry/mock_data_source_locator_test.go b/managed/services/telemetry/mock_data_source_locator_test.go deleted file mode 100644 index 8663cd5ee0..0000000000 --- a/managed/services/telemetry/mock_data_source_locator_test.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package telemetry - -import mock "github.com/stretchr/testify/mock" - -// mockDataSourceLocator is an autogenerated mock type for the DataSourceLocator type -type mockDataSourceLocator struct { - mock.Mock -} - -// LocateTelemetryDataSource provides a mock function with given fields: name -func (_m *mockDataSourceLocator) LocateTelemetryDataSource(name string) (DataSource, error) { - ret := _m.Called(name) - - if len(ret) == 0 { - panic("no return value specified for LocateTelemetryDataSource") - } - - var r0 DataSource - var r1 error - if rf, ok := ret.Get(0).(func(string) (DataSource, error)); ok { - return rf(name) - } - if rf, ok := ret.Get(0).(func(string) DataSource); ok { - r0 = rf(name) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(DataSource) - } - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(name) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// newMockDataSourceLocator creates a new instance of mockDataSourceLocator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockDataSourceLocator(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockDataSourceLocator { - mock := &mockDataSourceLocator{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/telemetry/mock_data_source_test.go b/managed/services/telemetry/mock_data_source_test.go deleted file mode 100644 index e6b004ebb5..0000000000 --- a/managed/services/telemetry/mock_data_source_test.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package telemetry - -import ( - context "context" - - genericv1 "github.com/percona/saas/gen/telemetry/generic" - mock "github.com/stretchr/testify/mock" -) - -// mockDataSource is an autogenerated mock type for the DataSource type -type mockDataSource struct { - mock.Mock -} - -// Dispose provides a mock function with given fields: ctx -func (_m *mockDataSource) Dispose(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Dispose") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Enabled provides a mock function with given fields: -func (_m *mockDataSource) Enabled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Enabled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// FetchMetrics provides a mock function with given fields: ctx, config -func (_m *mockDataSource) FetchMetrics(ctx context.Context, config Config) ([]*genericv1.GenericReport_Metric, error) { - ret := _m.Called(ctx, config) - - if len(ret) == 0 { - panic("no return value specified for FetchMetrics") - } - - var r0 []*genericv1.GenericReport_Metric - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, Config) ([]*genericv1.GenericReport_Metric, error)); ok { - return rf(ctx, config) - } - if rf, ok := ret.Get(0).(func(context.Context, Config) []*genericv1.GenericReport_Metric); ok { - r0 = rf(ctx, config) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*genericv1.GenericReport_Metric) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, Config) error); ok { - r1 = rf(ctx, config) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Init provides a mock function with given fields: ctx -func (_m *mockDataSource) Init(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Init") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockDataSource creates a new instance of mockDataSource. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockDataSource(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockDataSource { - mock := &mockDataSource{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/telemetry/mock_distribution_util_service_test.go b/managed/services/telemetry/mock_distribution_util_service_test.go deleted file mode 100644 index d4c8871399..0000000000 --- a/managed/services/telemetry/mock_distribution_util_service_test.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package telemetry - -import ( - pmmv1 "github.com/percona/saas/gen/telemetry/events/pmm" - mock "github.com/stretchr/testify/mock" - - serverv1 "github.com/percona/pmm/api/server/v1" -) - -// mockDistributionUtilService is an autogenerated mock type for the distributionUtilService type -type mockDistributionUtilService struct { - mock.Mock -} - -// GetDistributionMethodAndOS provides a mock function with given fields: -func (_m *mockDistributionUtilService) GetDistributionMethodAndOS() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetDistributionMethodAndOS") - } - - var r0 serverv1.DistributionMethod - var r1 pmmv1.DistributionMethod - var r2 string - if rf, ok := ret.Get(0).(func() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() serverv1.DistributionMethod); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(serverv1.DistributionMethod) - } - - if rf, ok := ret.Get(1).(func() pmmv1.DistributionMethod); ok { - r1 = rf() - } else { - r1 = ret.Get(1).(pmmv1.DistributionMethod) - } - - if rf, ok := ret.Get(2).(func() string); ok { - r2 = rf() - } else { - r2 = ret.Get(2).(string) - } - - return r0, r1, r2 -} - -// newMockDistributionUtilService creates a new instance of mockDistributionUtilService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockDistributionUtilService(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockDistributionUtilService { - mock := &mockDistributionUtilService{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/telemetry/mock_sender_test.go b/managed/services/telemetry/mock_sender_test.go deleted file mode 100644 index 3c943e8de4..0000000000 --- a/managed/services/telemetry/mock_sender_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package telemetry - -import ( - context "context" - - genericv1 "github.com/percona/saas/gen/telemetry/generic" - mock "github.com/stretchr/testify/mock" -) - -// mockSender is an autogenerated mock type for the sender type -type mockSender struct { - mock.Mock -} - -// SendTelemetry provides a mock function with given fields: ctx, report -func (_m *mockSender) SendTelemetry(ctx context.Context, report *genericv1.ReportRequest) error { - ret := _m.Called(ctx, report) - - if len(ret) == 0 { - panic("no return value specified for SendTelemetry") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *genericv1.ReportRequest) error); ok { - r0 = rf(ctx, report) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// newMockSender creates a new instance of mockSender. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func newMockSender(t interface { - mock.TestingT - Cleanup(func()) -}, -) *mockSender { - mock := &mockSender{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/versioncache/mock_versioner_test.go b/managed/services/versioncache/mock_versioner_test.go deleted file mode 100644 index ce2ca7190c..0000000000 --- a/managed/services/versioncache/mock_versioner_test.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by mockery. DO NOT EDIT. - -package versioncache - -import ( - mock "github.com/stretchr/testify/mock" - - agents "github.com/percona/pmm/managed/services/agents" -) - -// MockVersioner is an autogenerated mock type for the Versioner type -type MockVersioner struct { - mock.Mock -} - -// GetVersions provides a mock function with given fields: pmmAgentID, softwares -func (_m *MockVersioner) GetVersions(pmmAgentID string, softwares []agents.Software) ([]agents.Version, error) { - ret := _m.Called(pmmAgentID, softwares) - - if len(ret) == 0 { - panic("no return value specified for GetVersions") - } - - var r0 []agents.Version - var r1 error - if rf, ok := ret.Get(0).(func(string, []agents.Software) ([]agents.Version, error)); ok { - return rf(pmmAgentID, softwares) - } - if rf, ok := ret.Get(0).(func(string, []agents.Software) []agents.Version); ok { - r0 = rf(pmmAgentID, softwares) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]agents.Version) - } - } - - if rf, ok := ret.Get(1).(func(string, []agents.Software) error); ok { - r1 = rf(pmmAgentID, softwares) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewMockVersioner creates a new instance of MockVersioner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMockVersioner(t interface { - mock.TestingT - Cleanup(func()) -}, -) *MockVersioner { - mock := &MockVersioner{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/managed/services/victoriametrics/scrape_configs_test.go b/managed/services/victoriametrics/scrape_configs_test.go index e87462bd12..e7e13b79fd 100644 --- a/managed/services/victoriametrics/scrape_configs_test.go +++ b/managed/services/victoriametrics/scrape_configs_test.go @@ -51,7 +51,7 @@ func TestScrapeConfig(t *testing.T) { AgentType: models.NodeExporterType, CustomLabels: []byte(`{"_some_agent_label": "baz"}`), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ DisabledCollectors: []string{"cpu", "entropy"}, }, } @@ -188,7 +188,7 @@ func TestScrapeConfig(t *testing.T) { AgentType: models.NodeExporterType, CustomLabels: []byte(`{"_some_agent_label": "baz"}`), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ DisabledCollectors: []string{"cpu", "time"}, }, } @@ -261,8 +261,8 @@ func TestScrapeConfig(t *testing.T) { AgentType: models.MySQLdExporterType, CustomLabels: []byte(`{"_some_agent_label": "baz"}`), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, - MySQLOptions: &models.MySQLOptions{}, + ExporterOptions: models.ExporterOptions{}, + MySQLOptions: models.MySQLOptions{}, } expected := []*config.ScrapeConfig{{ @@ -417,10 +417,10 @@ func TestScrapeConfig(t *testing.T) { AgentType: models.MySQLdExporterType, CustomLabels: []byte(`{"_some_agent_label": "baz"}`), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ DisabledCollectors: []string{"global_status", "info_schema.innodb_cmp", "info_schema.query_response_time", "perf_schema.eventsstatements", "heartbeat"}, }, - MySQLOptions: &models.MySQLOptions{}, + MySQLOptions: models.MySQLOptions{}, } expected := []*config.ScrapeConfig{{ @@ -567,8 +567,8 @@ func TestScrapeConfig(t *testing.T) { AgentID: "75bb30d3-ef4a-4147-97a8-621a996611dd", AgentType: models.MySQLdExporterType, ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, - MySQLOptions: &models.MySQLOptions{ + ExporterOptions: models.ExporterOptions{}, + MySQLOptions: models.MySQLOptions{ TableCount: pointer.ToInt32(100500), TableCountTablestatsGroupLimit: 1000, }, @@ -698,7 +698,7 @@ func TestScrapeConfig(t *testing.T) { agent := &models.Agent{ CustomLabels: []byte("{"), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } _, err := scrapeConfigsForMySQLdExporter(&scrapeConfigParams{ @@ -731,8 +731,8 @@ func TestScrapeConfig(t *testing.T) { AgentType: models.MongoDBExporterType, CustomLabels: []byte(`{"_some_agent_label": "baz"}`), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{EnableAllCollectors: true}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{EnableAllCollectors: true}, } expected := []*config.ScrapeConfig{ @@ -831,8 +831,8 @@ func TestScrapeConfig(t *testing.T) { AgentType: models.MongoDBExporterType, CustomLabels: []byte(`{"_some_agent_label": "baz"}`), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, - MongoDBOptions: &models.MongoDBOptions{}, + ExporterOptions: models.ExporterOptions{}, + MongoDBOptions: models.MongoDBOptions{}, } expected := []*config.ScrapeConfig{ @@ -921,7 +921,7 @@ func TestScrapeConfig(t *testing.T) { agent := &models.Agent{ CustomLabels: []byte("{"), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } _, err := scrapeConfigsForMongoDBExporter(&scrapeConfigParams{ @@ -955,7 +955,7 @@ func TestScrapeConfig(t *testing.T) { AgentType: models.PostgresExporterType, CustomLabels: []byte(`{"_some_agent_label": "baz"}`), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ DisabledCollectors: []string{"standard.process", "custom_query.lr"}, }, } @@ -1073,7 +1073,7 @@ func TestScrapeConfig(t *testing.T) { agent := &models.Agent{ CustomLabels: []byte("{"), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } _, err := scrapeConfigsForPostgresExporter(&scrapeConfigParams{ @@ -1294,7 +1294,7 @@ func TestScrapeConfig(t *testing.T) { AgentType: models.ExternalExporterType, CustomLabels: []byte(`{"_some_agent_label": "baz"}`), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } expected := []*config.ScrapeConfig{{ @@ -1341,7 +1341,7 @@ func TestScrapeConfig(t *testing.T) { Username: pointer.ToString("username"), Password: pointer.ToString("password"), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{ + ExporterOptions: models.ExporterOptions{ MetricsPath: "/some-metric-path", MetricsScheme: "https", }, @@ -1395,7 +1395,7 @@ func TestScrapeConfig(t *testing.T) { agent := &models.Agent{ CustomLabels: []byte("{"), ListenPort: pointer.ToUint16(12345), - ExporterOptions: &models.ExporterOptions{}, + ExporterOptions: models.ExporterOptions{}, } _, err := scrapeConfigsForMongoDBExporter(&scrapeConfigParams{ diff --git a/managed/services/victoriametrics/victoriametrics_test.go b/managed/services/victoriametrics/victoriametrics_test.go index 90633cc34e..198a8f6847 100644 --- a/managed/services/victoriametrics/victoriametrics_test.go +++ b/managed/services/victoriametrics/victoriametrics_test.go @@ -154,7 +154,7 @@ func TestVictoriaMetrics(t *testing.T) { ServiceID: pointer.ToString("acds89846-3cd2-47f8-a5f9-ac789513cde4"), CustomLabels: []byte(`{"_agent_label": "mongodb-baz"}`), ListenPort: pointer.ToUint16(12346), - MongoDBOptions: &models.MongoDBOptions{EnableAllCollectors: true}, + MongoDBOptions: models.MongoDBOptions{EnableAllCollectors: true}, }, &models.Agent{ @@ -229,8 +229,8 @@ func TestVictoriaMetrics(t *testing.T) { ServiceID: pointer.ToString("1eae647b-f1e2-4e15-bc58-dfdbc3c37cbf"), CustomLabels: []byte(`{"_agent_label": "mongodb-baz-push"}`), ListenPort: pointer.ToUint16(12346), - MongoDBOptions: &models.MongoDBOptions{EnableAllCollectors: true}, - ExporterOptions: &models.ExporterOptions{ + MongoDBOptions: models.MongoDBOptions{EnableAllCollectors: true}, + ExporterOptions: models.ExporterOptions{ PushMetrics: true, }, }, @@ -243,8 +243,8 @@ func TestVictoriaMetrics(t *testing.T) { ServiceID: pointer.ToString("1eae647b-f1e2-4e15-bc58-dfdbc3c37cbf"), CustomLabels: []byte(`{"_agent_label": "mongodb-baz-pull"}`), ListenPort: pointer.ToUint16(12346), - MongoDBOptions: &models.MongoDBOptions{EnableAllCollectors: true}, - ExporterOptions: &models.ExporterOptions{ + MongoDBOptions: models.MongoDBOptions{EnableAllCollectors: true}, + ExporterOptions: models.ExporterOptions{ PushMetrics: false, }, }, From 9918b6ab690f4602acff3b7c14ef04062669a91c Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Thu, 19 Dec 2024 21:39:07 +0300 Subject: [PATCH 02/10] PMM-13629 make gen. --- .../pmm/server/docker/mock_functions_test.go | 416 ++++++++++++++++++ agent/agentlocal/mock_client_test.go | 115 +++++ agent/agentlocal/mock_supervisor_test.go | 69 +++ agent/client/mock_connection_checker_test.go | 51 +++ agent/client/mock_service_info_broker_test.go | 51 +++ agent/client/mock_supervisor_test.go | 146 ++++++ agent/versioner/mock_exec_functions_test.go | 84 ++++ api/accesscontrol/v1beta1/accesscontrol.pb.go | 44 +- .../v1beta1/accesscontrol.pb.gw.go | 48 +- .../v1beta1/accesscontrol.pb.validate.go | 2 - .../v1beta1/accesscontrol_grpc.pb.go | 7 + .../assign_roles_parameters.go | 2 - .../assign_roles_responses.go | 10 - .../create_role_parameters.go | 2 - .../create_role_responses.go | 11 - .../delete_role_parameters.go | 3 - .../delete_role_responses.go | 9 - .../get_role_parameters.go | 2 - .../get_role_responses.go | 10 - .../list_roles_parameters.go | 1 - .../list_roles_responses.go | 14 - .../set_default_role_parameters.go | 2 - .../set_default_role_responses.go | 10 - .../update_role_parameters.go | 2 - .../update_role_responses.go | 10 - api/actions/v1/actions.pb.go | 82 ++-- api/actions/v1/actions.pb.gw.go | 32 +- api/actions/v1/actions_grpc.pb.go | 4 + .../cancel_action_parameters.go | 2 - .../cancel_action_responses.go | 10 - .../actions_service/get_action_parameters.go | 2 - .../actions_service/get_action_responses.go | 10 - .../start_pt_summary_action_parameters.go | 2 - .../start_pt_summary_action_responses.go | 11 - .../start_service_action_parameters.go | 2 - .../start_service_action_responses.go | 59 --- api/advisors/v1/advisors.pb.go | 65 +-- api/advisors/v1/advisors.pb.gw.go | 44 +- api/advisors/v1/advisors.pb.validate.go | 4 - api/advisors/v1/advisors_grpc.pb.go | 6 + .../change_advisor_checks_parameters.go | 2 - .../change_advisor_checks_responses.go | 14 - .../get_failed_checks_parameters.go | 5 - .../get_failed_checks_responses.go | 14 - .../list_advisor_checks_parameters.go | 1 - .../list_advisor_checks_responses.go | 14 - .../list_advisors_parameters.go | 1 - .../list_advisors_responses.go | 18 - .../list_failed_services_parameters.go | 1 - .../list_failed_services_responses.go | 14 - .../start_advisor_checks_parameters.go | 2 - .../start_advisor_checks_responses.go | 10 - api/agent/pb/agent.pb.go | 7 +- api/agent/pb/agent_grpc.pb.go | 4 +- api/agent/v1/agent.pb.go | 227 +++++----- api/agent/v1/agent.pb.validate.go | 1 - api/agent/v1/agent_grpc.pb.go | 1 + api/agent/v1/collector.pb.go | 39 +- api/agentlocal/v1/agentlocal.pb.go | 37 +- api/agentlocal/v1/agentlocal.pb.gw.go | 32 +- api/agentlocal/v1/agentlocal_grpc.pb.go | 2 + .../agent_local_service/reload_parameters.go | 2 - .../agent_local_service/reload_responses.go | 9 - .../agent_local_service/status2_parameters.go | 3 - .../agent_local_service/status2_responses.go | 16 - .../agent_local_service/status_parameters.go | 2 - .../agent_local_service/status_responses.go | 17 - api/alerting/v1/alerting.pb.go | 73 +-- api/alerting/v1/alerting.pb.gw.go | 38 +- api/alerting/v1/alerting.pb.validate.go | 4 - api/alerting/v1/alerting_grpc.pb.go | 5 + .../create_rule_parameters.go | 2 - .../alerting_service/create_rule_responses.go | 18 - .../create_template_parameters.go | 2 - .../create_template_responses.go | 10 - .../delete_template_parameters.go | 2 - .../delete_template_responses.go | 9 - .../list_templates_parameters.go | 5 - .../list_templates_responses.go | 24 - .../update_template_parameters.go | 2 - .../update_template_responses.go | 10 - api/alerting/v1/params.pb.go | 18 +- api/backup/v1/artifacts.pb.go | 42 +- api/backup/v1/backup.pb.go | 73 +-- api/backup/v1/backup.pb.gw.go | 64 +-- api/backup/v1/backup_grpc.pb.go | 10 + api/backup/v1/common.pb.go | 30 +- api/backup/v1/errors.pb.go | 20 +- .../change_scheduled_backup_parameters.go | 2 - .../change_scheduled_backup_responses.go | 10 - .../delete_artifact_parameters.go | 3 - .../delete_artifact_responses.go | 9 - .../backup_service/get_logs_parameters.go | 4 - .../backup_service/get_logs_responses.go | 14 - ...artifact_compatible_services_parameters.go | 2 - ..._artifact_compatible_services_responses.go | 18 - .../list_artifacts_parameters.go | 1 - .../list_artifacts_responses.go | 24 - .../list_pitr_timeranges_parameters.go | 2 - .../list_pitr_timeranges_responses.go | 14 - .../list_scheduled_backups_parameters.go | 1 - .../list_scheduled_backups_responses.go | 14 - .../remove_scheduled_backup_parameters.go | 2 - .../remove_scheduled_backup_responses.go | 9 - .../schedule_backup_parameters.go | 2 - .../schedule_backup_responses.go | 11 - .../backup_service/start_backup_parameters.go | 2 - .../backup_service/start_backup_responses.go | 11 - .../add_location_parameters.go | 2 - .../add_location_responses.go | 15 - .../change_location_parameters.go | 2 - .../change_location_responses.go | 14 - .../list_locations_parameters.go | 1 - .../list_locations_responses.go | 18 - .../remove_location_parameters.go | 3 - .../remove_location_responses.go | 9 - .../test_location_config_parameters.go | 2 - .../test_location_config_responses.go | 14 - .../get_logs_mixin5_parameters.go | 4 - .../get_logs_mixin5_responses.go | 14 - .../list_restores_parameters.go | 1 - .../list_restores_responses.go | 14 - .../restore_backup_parameters.go | 2 - .../restore_backup_responses.go | 11 - api/backup/v1/locations.pb.go | 40 +- api/backup/v1/locations.pb.gw.go | 40 +- api/backup/v1/locations_grpc.pb.go | 5 + api/backup/v1/restores.pb.go | 38 +- api/backup/v1/restores.pb.gw.go | 32 +- api/backup/v1/restores_grpc.pb.go | 3 + api/common/common.pb.go | 20 +- api/common/metrics_resolutions.pb.go | 18 +- api/dump/v1beta1/dump.pb.go | 46 +- api/dump/v1beta1/dump.pb.gw.go | 40 +- api/dump/v1beta1/dump_grpc.pb.go | 5 + .../dump_service/delete_dump_parameters.go | 2 - .../dump_service/delete_dump_responses.go | 10 - .../dump_service/get_dump_logs_parameters.go | 4 - .../dump_service/get_dump_logs_responses.go | 14 - .../dump_service/list_dumps_parameters.go | 1 - .../dump_service/list_dumps_responses.go | 14 - .../dump_service/start_dump_parameters.go | 2 - .../dump_service/start_dump_responses.go | 11 - .../dump_service/upload_dump_parameters.go | 2 - .../dump_service/upload_dump_responses.go | 12 - api/inventory/v1/agent_status.pb.go | 16 +- api/inventory/v1/agents.pb.go | 195 ++++---- api/inventory/v1/agents.pb.gw.go | 50 +-- api/inventory/v1/agents.pb.validate.go | 28 -- api/inventory/v1/agents_grpc.pb.go | 6 + .../agents_service/add_agent_parameters.go | 2 - .../agents_service/add_agent_responses.go | 83 ---- .../agents_service/change_agent_parameters.go | 2 - .../agents_service/change_agent_responses.go | 131 ------ .../get_agent_logs_parameters.go | 3 - .../get_agent_logs_responses.go | 10 - .../agents_service/get_agent_parameters.go | 2 - .../agents_service/get_agent_responses.go | 56 --- .../agents_service/list_agents_parameters.go | 10 +- .../agents_service/list_agents_responses.go | 86 ---- .../agents_service/remove_agent_parameters.go | 3 - .../agents_service/remove_agent_responses.go | 9 - .../nodes_service/add_node_parameters.go | 2 - .../nodes_service/add_node_responses.go | 31 -- .../nodes_service/get_node_parameters.go | 2 - .../nodes_service/get_node_responses.go | 20 - .../nodes_service/list_nodes_parameters.go | 7 +- .../nodes_service/list_nodes_responses.go | 30 -- .../nodes_service/remove_node_parameters.go | 3 - .../nodes_service/remove_node_responses.go | 9 - .../add_service_parameters.go | 2 - .../services_service/add_service_responses.go | 35 -- .../change_service_parameters.go | 2 - .../change_service_responses.go | 25 -- .../get_service_parameters.go | 2 - .../services_service/get_service_responses.go | 22 - .../list_active_service_types_parameters.go | 2 - .../list_active_service_types_responses.go | 10 - .../list_services_parameters.go | 9 +- .../list_services_responses.go | 34 -- .../remove_service_parameters.go | 3 - .../remove_service_responses.go | 9 - api/inventory/v1/log_level.pb.go | 16 +- api/inventory/v1/nodes.pb.go | 74 ++-- api/inventory/v1/nodes.pb.gw.go | 38 +- api/inventory/v1/nodes_grpc.pb.go | 4 + api/inventory/v1/services.pb.go | 95 ++-- api/inventory/v1/services.pb.gw.go | 46 +- api/inventory/v1/services.pb.validate.go | 2 - api/inventory/v1/services_grpc.pb.go | 6 + api/management/v1/agent.pb.go | 47 +- api/management/v1/annotation.pb.go | 18 +- api/management/v1/azure.pb.go | 30 +- api/management/v1/external.pb.go | 31 +- api/management/v1/haproxy.pb.go | 31 +- .../add_annotation_parameters.go | 2 - .../add_annotation_responses.go | 10 - .../add_azure_database_parameters.go | 2 - .../add_azure_database_responses.go | 10 - .../add_service_parameters.go | 2 - .../add_service_responses.go | 119 ----- .../discover_azure_database_parameters.go | 2 - .../discover_azure_database_responses.go | 15 - .../discover_rds_parameters.go | 2 - .../discover_rds_responses.go | 15 - .../management_service/get_node_parameters.go | 2 - .../management_service/get_node_responses.go | 20 - .../list_agent_versions_parameters.go | 1 - .../list_agent_versions_responses.go | 14 - .../list_agents_parameters.go | 4 - .../list_agents_responses.go | 22 - .../list_nodes_parameters.go | 7 +- .../list_nodes_responses.go | 22 - .../list_services_parameters.go | 9 +- .../list_services_responses.go | 26 -- .../register_node_parameters.go | 2 - .../register_node_responses.go | 17 - .../remove_service_parameters.go | 7 +- .../remove_service_responses.go | 9 - .../unregister_node_parameters.go | 3 - .../unregister_node_responses.go | 10 - api/management/v1/metrics.pb.go | 16 +- api/management/v1/mongodb.pb.go | 35 +- api/management/v1/mysql.pb.go | 37 +- api/management/v1/node.pb.go | 63 +-- api/management/v1/postgresql.pb.go | 37 +- api/management/v1/proxysql.pb.go | 33 +- api/management/v1/rds.pb.go | 51 ++- api/management/v1/service.pb.go | 111 ++--- api/management/v1/service.pb.gw.go | 88 +--- api/management/v1/service_grpc.pb.go | 13 + api/management/v1/severity.pb.go | 16 +- .../platform_service/connect_parameters.go | 2 - .../platform_service/connect_responses.go | 10 - .../platform_service/disconnect_parameters.go | 2 - .../platform_service/disconnect_responses.go | 10 - .../get_contact_information_parameters.go | 1 - .../get_contact_information_responses.go | 12 - ...ch_organization_entitlements_parameters.go | 1 - ...rch_organization_entitlements_responses.go | 16 - .../search_organization_tickets_parameters.go | 1 - .../search_organization_tickets_responses.go | 14 - .../server_info_parameters.go | 1 - .../platform_service/server_info_responses.go | 10 - .../user_status_parameters.go | 1 - .../platform_service/user_status_responses.go | 10 - api/platform/v1/platform.pb.go | 52 ++- api/platform/v1/platform.pb.gw.go | 44 +- api/platform/v1/platform_grpc.pb.go | 7 + api/qan/v1/collector.pb.go | 33 +- api/qan/v1/collector_grpc.pb.go | 1 + api/qan/v1/filters.pb.go | 28 +- ...lain_fingerprint_by_query_id_parameters.go | 2 - ...plain_fingerprint_by_query_id_responses.go | 11 - .../get_filtered_metrics_names_parameters.go | 2 - .../get_filtered_metrics_names_responses.go | 23 - .../qan_service/get_histogram_parameters.go | 2 - .../qan_service/get_histogram_responses.go | 19 - .../qan_service/get_labels_parameters.go | 2 - .../qan_service/get_labels_responses.go | 15 - .../get_metrics_names_parameters.go | 2 - .../get_metrics_names_responses.go | 10 - .../qan_service/get_metrics_parameters.go | 2 - .../qan_service/get_metrics_responses.go | 29 -- .../get_query_example_parameters.go | 2 - .../get_query_example_responses.go | 19 - .../qan_service/get_query_plan_parameters.go | 2 - .../qan_service/get_query_plan_responses.go | 10 - .../qan_service/get_report_parameters.go | 2 - .../qan_service/get_report_responses.go | 29 -- .../qan_service/query_exists_parameters.go | 2 - .../qan_service/query_exists_responses.go | 11 - .../schema_by_query_id_parameters.go | 2 - .../schema_by_query_id_responses.go | 11 - api/qan/v1/object_details.pb.go | 74 ++-- api/qan/v1/profile.pb.go | 32 +- api/qan/v1/qan.pb.go | 22 +- api/qan/v1/service.pb.go | 60 +-- api/qan/v1/service.pb.gw.go | 60 +-- api/qan/v1/service_grpc.pb.go | 11 + api/server/v1/httperror.pb.go | 18 +- .../change_settings_parameters.go | 2 - .../change_settings_responses.go | 23 - .../check_updates_parameters.go | 4 - .../server_service/check_updates_responses.go | 14 - .../server_service/get_settings_parameters.go | 1 - .../server_service/get_settings_responses.go | 16 - .../leader_health_check_parameters.go | 1 - .../leader_health_check_responses.go | 9 - .../list_change_logs_parameters.go | 1 - .../list_change_logs_responses.go | 14 - .../client/server_service/logs_parameters.go | 3 - .../client/server_service/logs_responses.go | 4 - .../server_service/readiness_parameters.go | 1 - .../server_service/readiness_responses.go | 9 - .../server_service/start_update_parameters.go | 2 - .../server_service/start_update_responses.go | 11 - .../update_status_parameters.go | 2 - .../server_service/update_status_responses.go | 11 - .../server_service/version_parameters.go | 3 - .../server_service/version_responses.go | 14 - api/server/v1/server.pb.go | 73 +-- api/server/v1/server.pb.gw.go | 58 +-- api/server/v1/server.pb.validate.go | 2 - api/server/v1/server_grpc.pb.go | 9 + api/uievents/v1/server.pb.go | 28 +- api/uievents/v1/server.pb.gw.go | 28 +- api/uievents/v1/server_grpc.pb.go | 1 + .../user_service/get_user_parameters.go | 1 - .../client/user_service/get_user_responses.go | 10 - .../user_service/list_users_parameters.go | 1 - .../user_service/list_users_responses.go | 14 - .../user_service/update_user_parameters.go | 2 - .../user_service/update_user_responses.go | 11 - api/user/v1/user.pb.go | 28 +- api/user/v1/user.pb.gw.go | 28 +- api/user/v1/user_grpc.pb.go | 3 + managed/services/agents/encryption.key | 1 + .../alerting/mock_grafana_client_test.go | 108 +++++ .../backup/mock_agent_service_test.go | 47 ++ .../backup/mock_compatibility_service_test.go | 75 ++++ .../services/backup/mock_jobs_service_test.go | 121 +++++ .../backup/mock_pbm_pitr_service_test.go | 92 ++++ .../backup/mock_removal_service_test.go | 61 +++ managed/services/backup/mock_storage_test.go | 125 ++++++ .../services/backup/mock_versioner_test.go | 59 +++ .../checks/mock_agents_registry_test.go | 193 ++++++++ .../inventory/mock_agent_service_test.go | 66 +++ .../inventory/mock_agents_registry_test.go | 52 +++ .../mock_agents_state_updater_test.go | 34 ++ .../inventory/mock_connection_checker_test.go | 50 +++ .../inventory/mock_inventory_metrics_test.go | 119 +++++ .../inventory/mock_prometheus_service_test.go | 30 ++ .../mock_service_info_broker_test.go | 50 +++ .../inventory/mock_version_cache_test.go | 30 ++ .../management/backup/mock_aws_s3_test.go | 103 +++++ .../backup/mock_backup_service_test.go | 106 +++++ .../backup/mock_pbm_pitr_service_test.go | 62 +++ .../backup/mock_removal_service_test.go | 47 ++ .../backup/mock_schedule_service_test.go | 103 +++++ .../management/dump/mock_dump_service_test.go | 105 +++++ .../management/mock_agents_registry_test.go | 52 +++ .../mock_agents_state_updater_test.go | 34 ++ .../management/mock_checks_service_test.go | 224 ++++++++++ .../mock_connection_checker_test.go | 50 +++ .../management/mock_grafana_client_test.go | 121 +++++ .../management/mock_jobs_service_test.go | 43 ++ .../mock_prometheus_service_test.go | 30 ++ .../mock_service_info_broker_test.go | 50 +++ .../management/mock_version_cache_test.go | 30 ++ .../mock_victoria_metrics_client_test.go | 78 ++++ .../qan/mock_qan_collector_client_test.go | 69 +++ .../scheduler/mock_backup_service_test.go | 59 +++ .../server/mock_agents_state_updater_test.go | 47 ++ .../server/mock_checks_service_test.go | 63 +++ .../server/mock_grafana_client_test.go | 47 ++ .../server/mock_prometheus_service_test.go | 52 +++ .../server/mock_supervisord_service_test.go | 47 ++ .../server/mock_telemetry_service_test.go | 67 +++ .../server/mock_templates_service_test.go | 34 ++ .../mock_vm_alert_external_rules_test.go | 111 +++++ .../mock_data_source_locator_test.go | 55 +++ .../telemetry/mock_data_source_test.go | 114 +++++ .../mock_distribution_util_service_test.go | 65 +++ .../services/telemetry/mock_sender_test.go | 48 ++ .../versioncache/mock_versioner_test.go | 59 +++ 366 files changed, 5967 insertions(+), 4000 deletions(-) create mode 100644 admin/commands/pmm/server/docker/mock_functions_test.go create mode 100644 agent/agentlocal/mock_client_test.go create mode 100644 agent/agentlocal/mock_supervisor_test.go create mode 100644 agent/client/mock_connection_checker_test.go create mode 100644 agent/client/mock_service_info_broker_test.go create mode 100644 agent/client/mock_supervisor_test.go create mode 100644 agent/versioner/mock_exec_functions_test.go create mode 100644 managed/services/agents/encryption.key create mode 100644 managed/services/alerting/mock_grafana_client_test.go create mode 100644 managed/services/backup/mock_agent_service_test.go create mode 100644 managed/services/backup/mock_compatibility_service_test.go create mode 100644 managed/services/backup/mock_jobs_service_test.go create mode 100644 managed/services/backup/mock_pbm_pitr_service_test.go create mode 100644 managed/services/backup/mock_removal_service_test.go create mode 100644 managed/services/backup/mock_storage_test.go create mode 100644 managed/services/backup/mock_versioner_test.go create mode 100644 managed/services/checks/mock_agents_registry_test.go create mode 100644 managed/services/inventory/mock_agent_service_test.go create mode 100644 managed/services/inventory/mock_agents_registry_test.go create mode 100644 managed/services/inventory/mock_agents_state_updater_test.go create mode 100644 managed/services/inventory/mock_connection_checker_test.go create mode 100644 managed/services/inventory/mock_inventory_metrics_test.go create mode 100644 managed/services/inventory/mock_prometheus_service_test.go create mode 100644 managed/services/inventory/mock_service_info_broker_test.go create mode 100644 managed/services/inventory/mock_version_cache_test.go create mode 100644 managed/services/management/backup/mock_aws_s3_test.go create mode 100644 managed/services/management/backup/mock_backup_service_test.go create mode 100644 managed/services/management/backup/mock_pbm_pitr_service_test.go create mode 100644 managed/services/management/backup/mock_removal_service_test.go create mode 100644 managed/services/management/backup/mock_schedule_service_test.go create mode 100644 managed/services/management/dump/mock_dump_service_test.go create mode 100644 managed/services/management/mock_agents_registry_test.go create mode 100644 managed/services/management/mock_agents_state_updater_test.go create mode 100644 managed/services/management/mock_checks_service_test.go create mode 100644 managed/services/management/mock_connection_checker_test.go create mode 100644 managed/services/management/mock_grafana_client_test.go create mode 100644 managed/services/management/mock_jobs_service_test.go create mode 100644 managed/services/management/mock_prometheus_service_test.go create mode 100644 managed/services/management/mock_service_info_broker_test.go create mode 100644 managed/services/management/mock_version_cache_test.go create mode 100644 managed/services/management/mock_victoria_metrics_client_test.go create mode 100644 managed/services/qan/mock_qan_collector_client_test.go create mode 100644 managed/services/scheduler/mock_backup_service_test.go create mode 100644 managed/services/server/mock_agents_state_updater_test.go create mode 100644 managed/services/server/mock_checks_service_test.go create mode 100644 managed/services/server/mock_grafana_client_test.go create mode 100644 managed/services/server/mock_prometheus_service_test.go create mode 100644 managed/services/server/mock_supervisord_service_test.go create mode 100644 managed/services/server/mock_telemetry_service_test.go create mode 100644 managed/services/server/mock_templates_service_test.go create mode 100644 managed/services/server/mock_vm_alert_external_rules_test.go create mode 100644 managed/services/telemetry/mock_data_source_locator_test.go create mode 100644 managed/services/telemetry/mock_data_source_test.go create mode 100644 managed/services/telemetry/mock_distribution_util_service_test.go create mode 100644 managed/services/telemetry/mock_sender_test.go create mode 100644 managed/services/versioncache/mock_versioner_test.go diff --git a/admin/commands/pmm/server/docker/mock_functions_test.go b/admin/commands/pmm/server/docker/mock_functions_test.go new file mode 100644 index 0000000000..0e9b42168a --- /dev/null +++ b/admin/commands/pmm/server/docker/mock_functions_test.go @@ -0,0 +1,416 @@ +// Code generated by mockery. DO NOT EDIT. + +package docker + +import ( + context "context" + io "io" + + tea "github.com/charmbracelet/bubbletea" + types "github.com/docker/docker/api/types" + container "github.com/docker/docker/api/types/container" + image "github.com/docker/docker/api/types/image" + volume "github.com/docker/docker/api/types/volume" + client "github.com/docker/docker/client" + mock "github.com/stretchr/testify/mock" + + pkgdocker "github.com/percona/pmm/admin/pkg/docker" +) + +// MockFunctions is an autogenerated mock type for the Functions type +type MockFunctions struct { + mock.Mock +} + +// ChangeServerPassword provides a mock function with given fields: ctx, containerID, newPassword +func (_m *MockFunctions) ChangeServerPassword(ctx context.Context, containerID string, newPassword string) error { + ret := _m.Called(ctx, containerID, newPassword) + + if len(ret) == 0 { + panic("no return value specified for ChangeServerPassword") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string) error); ok { + r0 = rf(ctx, containerID, newPassword) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ContainerInspect provides a mock function with given fields: ctx, containerID +func (_m *MockFunctions) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) { + ret := _m.Called(ctx, containerID) + + if len(ret) == 0 { + panic("no return value specified for ContainerInspect") + } + + var r0 types.ContainerJSON + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (types.ContainerJSON, error)); ok { + return rf(ctx, containerID) + } + if rf, ok := ret.Get(0).(func(context.Context, string) types.ContainerJSON); ok { + r0 = rf(ctx, containerID) + } else { + r0 = ret.Get(0).(types.ContainerJSON) + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, containerID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ContainerStop provides a mock function with given fields: ctx, containerID, timeout +func (_m *MockFunctions) ContainerStop(ctx context.Context, containerID string, timeout *int) error { + ret := _m.Called(ctx, containerID, timeout) + + if len(ret) == 0 { + panic("no return value specified for ContainerStop") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, *int) error); ok { + r0 = rf(ctx, containerID, timeout) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ContainerUpdate provides a mock function with given fields: ctx, containerID, updateConfig +func (_m *MockFunctions) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error) { + ret := _m.Called(ctx, containerID, updateConfig) + + if len(ret) == 0 { + panic("no return value specified for ContainerUpdate") + } + + var r0 container.ContainerUpdateOKBody + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) (container.ContainerUpdateOKBody, error)); ok { + return rf(ctx, containerID, updateConfig) + } + if rf, ok := ret.Get(0).(func(context.Context, string, container.UpdateConfig) container.ContainerUpdateOKBody); ok { + r0 = rf(ctx, containerID, updateConfig) + } else { + r0 = ret.Get(0).(container.ContainerUpdateOKBody) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, container.UpdateConfig) error); ok { + r1 = rf(ctx, containerID, updateConfig) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ContainerWait provides a mock function with given fields: ctx, containerID, condition +func (_m *MockFunctions) ContainerWait(ctx context.Context, containerID string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error) { + ret := _m.Called(ctx, containerID, condition) + + if len(ret) == 0 { + panic("no return value specified for ContainerWait") + } + + var r0 <-chan container.WaitResponse + var r1 <-chan error + if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) (<-chan container.WaitResponse, <-chan error)); ok { + return rf(ctx, containerID, condition) + } + if rf, ok := ret.Get(0).(func(context.Context, string, container.WaitCondition) <-chan container.WaitResponse); ok { + r0 = rf(ctx, containerID, condition) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan container.WaitResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, container.WaitCondition) <-chan error); ok { + r1 = rf(ctx, containerID, condition) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(<-chan error) + } + } + + return r0, r1 +} + +// CreateVolume provides a mock function with given fields: ctx, volumeName, labels +func (_m *MockFunctions) CreateVolume(ctx context.Context, volumeName string, labels map[string]string) (*volume.Volume, error) { + ret := _m.Called(ctx, volumeName, labels) + + if len(ret) == 0 { + panic("no return value specified for CreateVolume") + } + + var r0 *volume.Volume + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, map[string]string) (*volume.Volume, error)); ok { + return rf(ctx, volumeName, labels) + } + if rf, ok := ret.Get(0).(func(context.Context, string, map[string]string) *volume.Volume); ok { + r0 = rf(ctx, volumeName, labels) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*volume.Volume) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, map[string]string) error); ok { + r1 = rf(ctx, volumeName, labels) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// FindServerContainers provides a mock function with given fields: ctx +func (_m *MockFunctions) FindServerContainers(ctx context.Context) ([]types.Container, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for FindServerContainers") + } + + var r0 []types.Container + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]types.Container, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) []types.Container); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]types.Container) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetDockerClient provides a mock function with given fields: +func (_m *MockFunctions) GetDockerClient() *client.Client { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetDockerClient") + } + + var r0 *client.Client + if rf, ok := ret.Get(0).(func() *client.Client); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*client.Client) + } + } + + return r0 +} + +// HaveDockerAccess provides a mock function with given fields: ctx +func (_m *MockFunctions) HaveDockerAccess(ctx context.Context) bool { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for HaveDockerAccess") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(context.Context) bool); ok { + r0 = rf(ctx) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// InstallDocker provides a mock function with given fields: ctx +func (_m *MockFunctions) InstallDocker(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for InstallDocker") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// IsDockerInstalled provides a mock function with given fields: +func (_m *MockFunctions) IsDockerInstalled() (bool, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for IsDockerInstalled") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func() (bool, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ParsePullImageProgress provides a mock function with given fields: r, p +func (_m *MockFunctions) ParsePullImageProgress(r io.Reader, p *tea.Program) (<-chan struct{}, <-chan error) { + ret := _m.Called(r, p) + + if len(ret) == 0 { + panic("no return value specified for ParsePullImageProgress") + } + + var r0 <-chan struct{} + var r1 <-chan error + if rf, ok := ret.Get(0).(func(io.Reader, *tea.Program) (<-chan struct{}, <-chan error)); ok { + return rf(r, p) + } + if rf, ok := ret.Get(0).(func(io.Reader, *tea.Program) <-chan struct{}); ok { + r0 = rf(r, p) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan struct{}) + } + } + + if rf, ok := ret.Get(1).(func(io.Reader, *tea.Program) <-chan error); ok { + r1 = rf(r, p) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(<-chan error) + } + } + + return r0, r1 +} + +// PullImage provides a mock function with given fields: ctx, dockerImage, opts +func (_m *MockFunctions) PullImage(ctx context.Context, dockerImage string, opts image.PullOptions) (io.Reader, error) { + ret := _m.Called(ctx, dockerImage, opts) + + if len(ret) == 0 { + panic("no return value specified for PullImage") + } + + var r0 io.Reader + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, image.PullOptions) (io.Reader, error)); ok { + return rf(ctx, dockerImage, opts) + } + if rf, ok := ret.Get(0).(func(context.Context, string, image.PullOptions) io.Reader); ok { + r0 = rf(ctx, dockerImage, opts) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(io.Reader) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, image.PullOptions) error); ok { + r1 = rf(ctx, dockerImage, opts) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RunContainer provides a mock function with given fields: ctx, config, hostConfig, containerName +func (_m *MockFunctions) RunContainer(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, containerName string) (string, error) { + ret := _m.Called(ctx, config, hostConfig, containerName) + + if len(ret) == 0 { + panic("no return value specified for RunContainer") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, string) (string, error)); ok { + return rf(ctx, config, hostConfig, containerName) + } + if rf, ok := ret.Get(0).(func(context.Context, *container.Config, *container.HostConfig, string) string); ok { + r0 = rf(ctx, config, hostConfig, containerName) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, *container.Config, *container.HostConfig, string) error); ok { + r1 = rf(ctx, config, hostConfig, containerName) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// WaitForHealthyContainer provides a mock function with given fields: ctx, containerID +func (_m *MockFunctions) WaitForHealthyContainer(ctx context.Context, containerID string) <-chan pkgdocker.WaitHealthyResponse { + ret := _m.Called(ctx, containerID) + + if len(ret) == 0 { + panic("no return value specified for WaitForHealthyContainer") + } + + var r0 <-chan pkgdocker.WaitHealthyResponse + if rf, ok := ret.Get(0).(func(context.Context, string) <-chan pkgdocker.WaitHealthyResponse); ok { + r0 = rf(ctx, containerID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan pkgdocker.WaitHealthyResponse) + } + } + + return r0 +} + +// NewMockFunctions creates a new instance of MockFunctions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockFunctions(t interface { + mock.TestingT + Cleanup(func()) +}, +) *MockFunctions { + mock := &MockFunctions{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/agent/agentlocal/mock_client_test.go b/agent/agentlocal/mock_client_test.go new file mode 100644 index 0000000000..3214180af4 --- /dev/null +++ b/agent/agentlocal/mock_client_test.go @@ -0,0 +1,115 @@ +// Code generated by mockery. DO NOT EDIT. + +package agentlocal + +import ( + time "time" + + prometheus "github.com/prometheus/client_golang/prometheus" + mock "github.com/stretchr/testify/mock" + + agentv1 "github.com/percona/pmm/api/agent/v1" +) + +// mockClient is an autogenerated mock type for the client type +type mockClient struct { + mock.Mock +} + +// Collect provides a mock function with given fields: _a0 +func (_m *mockClient) Collect(_a0 chan<- prometheus.Metric) { + _m.Called(_a0) +} + +// Describe provides a mock function with given fields: _a0 +func (_m *mockClient) Describe(_a0 chan<- *prometheus.Desc) { + _m.Called(_a0) +} + +// GetConnectionUpTime provides a mock function with given fields: +func (_m *mockClient) GetConnectionUpTime() float32 { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetConnectionUpTime") + } + + var r0 float32 + if rf, ok := ret.Get(0).(func() float32); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(float32) + } + + return r0 +} + +// GetNetworkInformation provides a mock function with given fields: +func (_m *mockClient) GetNetworkInformation() (time.Duration, time.Duration, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetNetworkInformation") + } + + var r0 time.Duration + var r1 time.Duration + var r2 error + if rf, ok := ret.Get(0).(func() (time.Duration, time.Duration, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() time.Duration); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(time.Duration) + } + + if rf, ok := ret.Get(1).(func() time.Duration); ok { + r1 = rf() + } else { + r1 = ret.Get(1).(time.Duration) + } + + if rf, ok := ret.Get(2).(func() error); ok { + r2 = rf() + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// GetServerConnectMetadata provides a mock function with given fields: +func (_m *mockClient) GetServerConnectMetadata() *agentv1.ServerConnectMetadata { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetServerConnectMetadata") + } + + var r0 *agentv1.ServerConnectMetadata + if rf, ok := ret.Get(0).(func() *agentv1.ServerConnectMetadata); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*agentv1.ServerConnectMetadata) + } + } + + return r0 +} + +// newMockClient creates a new instance of mockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockClient(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockClient { + mock := &mockClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/agent/agentlocal/mock_supervisor_test.go b/agent/agentlocal/mock_supervisor_test.go new file mode 100644 index 0000000000..c587060ef7 --- /dev/null +++ b/agent/agentlocal/mock_supervisor_test.go @@ -0,0 +1,69 @@ +// Code generated by mockery. DO NOT EDIT. + +package agentlocal + +import ( + mock "github.com/stretchr/testify/mock" + + agentlocalv1 "github.com/percona/pmm/api/agentlocal/v1" +) + +// mockSupervisor is an autogenerated mock type for the supervisor type +type mockSupervisor struct { + mock.Mock +} + +// AgentsList provides a mock function with given fields: +func (_m *mockSupervisor) AgentsList() []*agentlocalv1.AgentInfo { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for AgentsList") + } + + var r0 []*agentlocalv1.AgentInfo + if rf, ok := ret.Get(0).(func() []*agentlocalv1.AgentInfo); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*agentlocalv1.AgentInfo) + } + } + + return r0 +} + +// AgentsLogs provides a mock function with given fields: +func (_m *mockSupervisor) AgentsLogs() map[string][]string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for AgentsLogs") + } + + var r0 map[string][]string + if rf, ok := ret.Get(0).(func() map[string][]string); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string][]string) + } + } + + return r0 +} + +// newMockSupervisor creates a new instance of mockSupervisor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockSupervisor(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockSupervisor { + mock := &mockSupervisor{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/agent/client/mock_connection_checker_test.go b/agent/client/mock_connection_checker_test.go new file mode 100644 index 0000000000..df8e1879d5 --- /dev/null +++ b/agent/client/mock_connection_checker_test.go @@ -0,0 +1,51 @@ +// Code generated by mockery. DO NOT EDIT. + +package client + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + agentv1 "github.com/percona/pmm/api/agent/v1" +) + +// mockConnectionChecker is an autogenerated mock type for the connectionChecker type +type mockConnectionChecker struct { + mock.Mock +} + +// Check provides a mock function with given fields: ctx, req, id +func (_m *mockConnectionChecker) Check(ctx context.Context, req *agentv1.CheckConnectionRequest, id uint32) *agentv1.CheckConnectionResponse { + ret := _m.Called(ctx, req, id) + + if len(ret) == 0 { + panic("no return value specified for Check") + } + + var r0 *agentv1.CheckConnectionResponse + if rf, ok := ret.Get(0).(func(context.Context, *agentv1.CheckConnectionRequest, uint32) *agentv1.CheckConnectionResponse); ok { + r0 = rf(ctx, req, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*agentv1.CheckConnectionResponse) + } + } + + return r0 +} + +// newMockConnectionChecker creates a new instance of mockConnectionChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockConnectionChecker(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockConnectionChecker { + mock := &mockConnectionChecker{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/agent/client/mock_service_info_broker_test.go b/agent/client/mock_service_info_broker_test.go new file mode 100644 index 0000000000..0421daa1d3 --- /dev/null +++ b/agent/client/mock_service_info_broker_test.go @@ -0,0 +1,51 @@ +// Code generated by mockery. DO NOT EDIT. + +package client + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + agentv1 "github.com/percona/pmm/api/agent/v1" +) + +// mockServiceInfoBroker is an autogenerated mock type for the serviceInfoBroker type +type mockServiceInfoBroker struct { + mock.Mock +} + +// GetInfoFromService provides a mock function with given fields: ctx, req, id +func (_m *mockServiceInfoBroker) GetInfoFromService(ctx context.Context, req *agentv1.ServiceInfoRequest, id uint32) *agentv1.ServiceInfoResponse { + ret := _m.Called(ctx, req, id) + + if len(ret) == 0 { + panic("no return value specified for GetInfoFromService") + } + + var r0 *agentv1.ServiceInfoResponse + if rf, ok := ret.Get(0).(func(context.Context, *agentv1.ServiceInfoRequest, uint32) *agentv1.ServiceInfoResponse); ok { + r0 = rf(ctx, req, id) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*agentv1.ServiceInfoResponse) + } + } + + return r0 +} + +// newMockServiceInfoBroker creates a new instance of mockServiceInfoBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockServiceInfoBroker(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockServiceInfoBroker { + mock := &mockServiceInfoBroker{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/agent/client/mock_supervisor_test.go b/agent/client/mock_supervisor_test.go new file mode 100644 index 0000000000..d1b0d1c079 --- /dev/null +++ b/agent/client/mock_supervisor_test.go @@ -0,0 +1,146 @@ +// Code generated by mockery. DO NOT EDIT. + +package client + +import ( + prometheus "github.com/prometheus/client_golang/prometheus" + mock "github.com/stretchr/testify/mock" + + agentv1 "github.com/percona/pmm/api/agent/v1" + agentlocalv1 "github.com/percona/pmm/api/agentlocal/v1" +) + +// mockSupervisor is an autogenerated mock type for the supervisor type +type mockSupervisor struct { + mock.Mock +} + +// AgentLogByID provides a mock function with given fields: _a0 +func (_m *mockSupervisor) AgentLogByID(_a0 string) ([]string, uint) { + ret := _m.Called(_a0) + + if len(ret) == 0 { + panic("no return value specified for AgentLogByID") + } + + var r0 []string + var r1 uint + if rf, ok := ret.Get(0).(func(string) ([]string, uint)); ok { + return rf(_a0) + } + if rf, ok := ret.Get(0).(func(string) []string); ok { + r0 = rf(_a0) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + if rf, ok := ret.Get(1).(func(string) uint); ok { + r1 = rf(_a0) + } else { + r1 = ret.Get(1).(uint) + } + + return r0, r1 +} + +// AgentsList provides a mock function with given fields: +func (_m *mockSupervisor) AgentsList() []*agentlocalv1.AgentInfo { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for AgentsList") + } + + var r0 []*agentlocalv1.AgentInfo + if rf, ok := ret.Get(0).(func() []*agentlocalv1.AgentInfo); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*agentlocalv1.AgentInfo) + } + } + + return r0 +} + +// Changes provides a mock function with given fields: +func (_m *mockSupervisor) Changes() <-chan *agentv1.StateChangedRequest { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Changes") + } + + var r0 <-chan *agentv1.StateChangedRequest + if rf, ok := ret.Get(0).(func() <-chan *agentv1.StateChangedRequest); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan *agentv1.StateChangedRequest) + } + } + + return r0 +} + +// ClearChangesChannel provides a mock function with given fields: +func (_m *mockSupervisor) ClearChangesChannel() { + _m.Called() +} + +// Collect provides a mock function with given fields: _a0 +func (_m *mockSupervisor) Collect(_a0 chan<- prometheus.Metric) { + _m.Called(_a0) +} + +// Describe provides a mock function with given fields: _a0 +func (_m *mockSupervisor) Describe(_a0 chan<- *prometheus.Desc) { + _m.Called(_a0) +} + +// QANRequests provides a mock function with given fields: +func (_m *mockSupervisor) QANRequests() <-chan *agentv1.QANCollectRequest { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for QANRequests") + } + + var r0 <-chan *agentv1.QANCollectRequest + if rf, ok := ret.Get(0).(func() <-chan *agentv1.QANCollectRequest); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(<-chan *agentv1.QANCollectRequest) + } + } + + return r0 +} + +// RestartAgents provides a mock function with given fields: +func (_m *mockSupervisor) RestartAgents() { + _m.Called() +} + +// SetState provides a mock function with given fields: _a0 +func (_m *mockSupervisor) SetState(_a0 *agentv1.SetStateRequest) { + _m.Called(_a0) +} + +// newMockSupervisor creates a new instance of mockSupervisor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockSupervisor(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockSupervisor { + mock := &mockSupervisor{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/agent/versioner/mock_exec_functions_test.go b/agent/versioner/mock_exec_functions_test.go new file mode 100644 index 0000000000..2a1fc08539 --- /dev/null +++ b/agent/versioner/mock_exec_functions_test.go @@ -0,0 +1,84 @@ +// Code generated by mockery. DO NOT EDIT. + +package versioner + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// MockExecFunctions is an autogenerated mock type for the ExecFunctions type +type MockExecFunctions struct { + mock.Mock +} + +// CommandContext provides a mock function with given fields: ctx, name, arg +func (_m *MockExecFunctions) CommandContext(ctx context.Context, name string, arg ...string) CombinedOutputer { + _va := make([]interface{}, len(arg)) + for _i := range arg { + _va[_i] = arg[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, name) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for CommandContext") + } + + var r0 CombinedOutputer + if rf, ok := ret.Get(0).(func(context.Context, string, ...string) CombinedOutputer); ok { + r0 = rf(ctx, name, arg...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(CombinedOutputer) + } + } + + return r0 +} + +// LookPath provides a mock function with given fields: file +func (_m *MockExecFunctions) LookPath(file string) (string, error) { + ret := _m.Called(file) + + if len(ret) == 0 { + panic("no return value specified for LookPath") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(string) (string, error)); ok { + return rf(file) + } + if rf, ok := ret.Get(0).(func(string) string); ok { + r0 = rf(file) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(file) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NewMockExecFunctions creates a new instance of MockExecFunctions. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockExecFunctions(t interface { + mock.TestingT + Cleanup(func()) +}, +) *MockExecFunctions { + mock := &MockExecFunctions{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.go b/api/accesscontrol/v1beta1/accesscontrol.pb.go index 9fbeb4fb4c..d7b9d135fa 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.go @@ -7,13 +7,14 @@ package accesscontrolv1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -954,24 +955,27 @@ func file_accesscontrol_v1beta1_accesscontrol_proto_rawDescGZIP() []byte { return file_accesscontrol_v1beta1_accesscontrol_proto_rawDescData } -var file_accesscontrol_v1beta1_accesscontrol_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_accesscontrol_v1beta1_accesscontrol_proto_goTypes = []any{ - (*CreateRoleRequest)(nil), // 0: accesscontrol.v1beta1.CreateRoleRequest - (*CreateRoleResponse)(nil), // 1: accesscontrol.v1beta1.CreateRoleResponse - (*UpdateRoleRequest)(nil), // 2: accesscontrol.v1beta1.UpdateRoleRequest - (*UpdateRoleResponse)(nil), // 3: accesscontrol.v1beta1.UpdateRoleResponse - (*DeleteRoleRequest)(nil), // 4: accesscontrol.v1beta1.DeleteRoleRequest - (*DeleteRoleResponse)(nil), // 5: accesscontrol.v1beta1.DeleteRoleResponse - (*GetRoleRequest)(nil), // 6: accesscontrol.v1beta1.GetRoleRequest - (*GetRoleResponse)(nil), // 7: accesscontrol.v1beta1.GetRoleResponse - (*SetDefaultRoleRequest)(nil), // 8: accesscontrol.v1beta1.SetDefaultRoleRequest - (*SetDefaultRoleResponse)(nil), // 9: accesscontrol.v1beta1.SetDefaultRoleResponse - (*AssignRolesRequest)(nil), // 10: accesscontrol.v1beta1.AssignRolesRequest - (*AssignRolesResponse)(nil), // 11: accesscontrol.v1beta1.AssignRolesResponse - (*ListRolesRequest)(nil), // 12: accesscontrol.v1beta1.ListRolesRequest - (*ListRolesResponse)(nil), // 13: accesscontrol.v1beta1.ListRolesResponse - (*ListRolesResponse_RoleData)(nil), // 14: accesscontrol.v1beta1.ListRolesResponse.RoleData -} +var ( + file_accesscontrol_v1beta1_accesscontrol_proto_msgTypes = make([]protoimpl.MessageInfo, 15) + file_accesscontrol_v1beta1_accesscontrol_proto_goTypes = []any{ + (*CreateRoleRequest)(nil), // 0: accesscontrol.v1beta1.CreateRoleRequest + (*CreateRoleResponse)(nil), // 1: accesscontrol.v1beta1.CreateRoleResponse + (*UpdateRoleRequest)(nil), // 2: accesscontrol.v1beta1.UpdateRoleRequest + (*UpdateRoleResponse)(nil), // 3: accesscontrol.v1beta1.UpdateRoleResponse + (*DeleteRoleRequest)(nil), // 4: accesscontrol.v1beta1.DeleteRoleRequest + (*DeleteRoleResponse)(nil), // 5: accesscontrol.v1beta1.DeleteRoleResponse + (*GetRoleRequest)(nil), // 6: accesscontrol.v1beta1.GetRoleRequest + (*GetRoleResponse)(nil), // 7: accesscontrol.v1beta1.GetRoleResponse + (*SetDefaultRoleRequest)(nil), // 8: accesscontrol.v1beta1.SetDefaultRoleRequest + (*SetDefaultRoleResponse)(nil), // 9: accesscontrol.v1beta1.SetDefaultRoleResponse + (*AssignRolesRequest)(nil), // 10: accesscontrol.v1beta1.AssignRolesRequest + (*AssignRolesResponse)(nil), // 11: accesscontrol.v1beta1.AssignRolesResponse + (*ListRolesRequest)(nil), // 12: accesscontrol.v1beta1.ListRolesRequest + (*ListRolesResponse)(nil), // 13: accesscontrol.v1beta1.ListRolesResponse + (*ListRolesResponse_RoleData)(nil), // 14: accesscontrol.v1beta1.ListRolesResponse.RoleData + } +) + var file_accesscontrol_v1beta1_accesscontrol_proto_depIdxs = []int32{ 14, // 0: accesscontrol.v1beta1.ListRolesResponse.roles:type_name -> accesscontrol.v1beta1.ListRolesResponse.RoleData 0, // 1: accesscontrol.v1beta1.AccessControlService.CreateRole:input_type -> accesscontrol.v1beta1.CreateRoleRequest diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go b/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go index 68e1aeb768..8f10784f9d 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AccessControlService_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateRoleRequest @@ -41,7 +43,6 @@ func request_AccessControlService_CreateRole_0(ctx context.Context, marshaler ru msg, err := client.CreateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AccessControlService_CreateRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -54,7 +55,6 @@ func local_request_AccessControlService_CreateRole_0(ctx context.Context, marsha msg, err := server.CreateRole(ctx, &protoReq) return msg, metadata, err - } func request_AccessControlService_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -84,7 +84,6 @@ func request_AccessControlService_UpdateRole_0(ctx context.Context, marshaler ru msg, err := client.UpdateRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AccessControlService_UpdateRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -114,12 +113,9 @@ func local_request_AccessControlService_UpdateRole_0(ctx context.Context, marsha msg, err := server.UpdateRole(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_AccessControlService_DeleteRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"role_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_AccessControlService_DeleteRole_0 = &utilities.DoubleArray{Encoding: map[string]int{"role_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_AccessControlService_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteRoleRequest @@ -151,7 +147,6 @@ func request_AccessControlService_DeleteRole_0(ctx context.Context, marshaler ru msg, err := client.DeleteRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AccessControlService_DeleteRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -184,7 +179,6 @@ func local_request_AccessControlService_DeleteRole_0(ctx context.Context, marsha msg, err := server.DeleteRole(ctx, &protoReq) return msg, metadata, err - } func request_AccessControlService_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -210,7 +204,6 @@ func request_AccessControlService_GetRole_0(ctx context.Context, marshaler runti msg, err := client.GetRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AccessControlService_GetRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -236,7 +229,6 @@ func local_request_AccessControlService_GetRole_0(ctx context.Context, marshaler msg, err := server.GetRole(ctx, &protoReq) return msg, metadata, err - } func request_AccessControlService_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -245,7 +237,6 @@ func request_AccessControlService_ListRoles_0(ctx context.Context, marshaler run msg, err := client.ListRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AccessControlService_ListRoles_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -254,7 +245,6 @@ func local_request_AccessControlService_ListRoles_0(ctx context.Context, marshal msg, err := server.ListRoles(ctx, &protoReq) return msg, metadata, err - } func request_AccessControlService_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -267,7 +257,6 @@ func request_AccessControlService_AssignRoles_0(ctx context.Context, marshaler r msg, err := client.AssignRoles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AccessControlService_AssignRoles_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -280,7 +269,6 @@ func local_request_AccessControlService_AssignRoles_0(ctx context.Context, marsh msg, err := server.AssignRoles(ctx, &protoReq) return msg, metadata, err - } func request_AccessControlService_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marshaler, client AccessControlServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -293,7 +281,6 @@ func request_AccessControlService_SetDefaultRole_0(ctx context.Context, marshale msg, err := client.SetDefaultRole(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AccessControlService_SetDefaultRole_0(ctx context.Context, marshaler runtime.Marshaler, server AccessControlServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -306,7 +293,6 @@ func local_request_AccessControlService_SetDefaultRole_0(ctx context.Context, ma msg, err := server.SetDefaultRole(ctx, &protoReq) return msg, metadata, err - } // RegisterAccessControlServiceHandlerServer registers the http handlers for service AccessControlService to "mux". @@ -315,7 +301,6 @@ func local_request_AccessControlService_SetDefaultRole_0(ctx context.Context, ma // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAccessControlServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AccessControlServiceServer) error { - mux.Handle("POST", pattern_AccessControlService_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -338,7 +323,6 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_CreateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_AccessControlService_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -363,7 +347,6 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_UpdateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_AccessControlService_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -388,7 +371,6 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_DeleteRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AccessControlService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -413,7 +395,6 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AccessControlService_ListRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -438,7 +419,6 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_ListRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AccessControlService_AssignRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -463,7 +443,6 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_AssignRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AccessControlService_SetDefaultRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -488,7 +467,6 @@ func RegisterAccessControlServiceHandlerServer(ctx context.Context, mux *runtime } forward_AccessControlService_SetDefaultRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -531,7 +509,6 @@ func RegisterAccessControlServiceHandler(ctx context.Context, mux *runtime.Serve // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AccessControlServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AccessControlServiceClient) error { - mux.Handle("POST", pattern_AccessControlService_CreateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -551,7 +528,6 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_CreateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_AccessControlService_UpdateRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -573,7 +549,6 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_UpdateRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_AccessControlService_DeleteRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -595,7 +570,6 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_DeleteRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AccessControlService_GetRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -617,7 +591,6 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_GetRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AccessControlService_ListRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -639,7 +612,6 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_ListRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AccessControlService_AssignRoles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -661,7 +633,6 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_AssignRoles_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AccessControlService_SetDefaultRole_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -683,7 +654,6 @@ func RegisterAccessControlServiceHandlerClient(ctx context.Context, mux *runtime } forward_AccessControlService_SetDefaultRole_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go b/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go index 100708f30e..583b94b1da 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go @@ -290,7 +290,6 @@ func (m *UpdateRoleRequest) validate(all bool) error { } if m.Title != nil { - if utf8.RuneCountInString(m.GetTitle()) < 1 { err := UpdateRoleRequestValidationError{ field: "Title", @@ -301,7 +300,6 @@ func (m *UpdateRoleRequest) validate(all bool) error { } errors = append(errors, err) } - } if m.Filter != nil { diff --git a/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go b/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go index 9ac384238c..d35749a17e 100644 --- a/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go +++ b/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go @@ -8,6 +8,7 @@ package accesscontrolv1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -161,21 +162,27 @@ type UnimplementedAccessControlServiceServer struct{} func (UnimplementedAccessControlServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRole not implemented") } + func (UnimplementedAccessControlServiceServer) UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateRole not implemented") } + func (UnimplementedAccessControlServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteRole not implemented") } + func (UnimplementedAccessControlServiceServer) GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRole not implemented") } + func (UnimplementedAccessControlServiceServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRoles not implemented") } + func (UnimplementedAccessControlServiceServer) AssignRoles(context.Context, *AssignRolesRequest) (*AssignRolesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AssignRoles not implemented") } + func (UnimplementedAccessControlServiceServer) SetDefaultRole(context.Context, *SetDefaultRoleRequest) (*SetDefaultRoleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetDefaultRole not implemented") } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go index cb993665cc..382f7922a2 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go @@ -60,7 +60,6 @@ AssignRolesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AssignRolesParams struct { - // Body. Body AssignRolesBody @@ -130,7 +129,6 @@ func (o *AssignRolesParams) SetBody(body AssignRolesBody) { // WriteToRequest writes these params to a swagger request func (o *AssignRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go index e1c030914e..5d749c01eb 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go @@ -103,7 +103,6 @@ func (o *AssignRolesOK) GetPayload() interface{} { } func (o *AssignRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *AssignRolesDefault) GetPayload() *AssignRolesDefaultBody { } func (o *AssignRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AssignRolesDefaultBody) // response payload @@ -191,7 +189,6 @@ AssignRolesBody assign roles body swagger:model AssignRolesBody */ type AssignRolesBody struct { - // role ids RoleIds []int64 `json:"role_ids"` @@ -232,7 +229,6 @@ AssignRolesDefaultBody assign roles default body swagger:model AssignRolesDefaultBody */ type AssignRolesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -298,9 +294,7 @@ func (o *AssignRolesDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,7 +310,6 @@ func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -345,7 +338,6 @@ AssignRolesDefaultBodyDetailsItems0 assign roles default body details items0 swagger:model AssignRolesDefaultBodyDetailsItems0 */ type AssignRolesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -357,7 +349,6 @@ type AssignRolesDefaultBodyDetailsItems0 struct { func (o *AssignRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -395,7 +386,6 @@ func (o *AssignRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AssignRolesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go index 1bb3460182..b938a07958 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go @@ -60,7 +60,6 @@ CreateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRoleParams struct { - // Body. Body CreateRoleBody @@ -130,7 +129,6 @@ func (o *CreateRoleParams) SetBody(body CreateRoleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go index b293e2541f..bd2bed681f 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go @@ -103,7 +103,6 @@ func (o *CreateRoleOK) GetPayload() *CreateRoleOKBody { } func (o *CreateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateRoleOKBody) // response payload @@ -177,7 +176,6 @@ func (o *CreateRoleDefault) GetPayload() *CreateRoleDefaultBody { } func (o *CreateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateRoleDefaultBody) // response payload @@ -193,7 +191,6 @@ CreateRoleBody create role body swagger:model CreateRoleBody */ type CreateRoleBody struct { - // title Title string `json:"title,omitempty"` @@ -237,7 +234,6 @@ CreateRoleDefaultBody create role default body swagger:model CreateRoleDefaultBody */ type CreateRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -303,9 +299,7 @@ func (o *CreateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -321,7 +315,6 @@ func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -350,7 +343,6 @@ CreateRoleDefaultBodyDetailsItems0 create role default body details items0 swagger:model CreateRoleDefaultBodyDetailsItems0 */ type CreateRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -362,7 +354,6 @@ type CreateRoleDefaultBodyDetailsItems0 struct { func (o *CreateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -400,7 +391,6 @@ func (o *CreateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -464,7 +454,6 @@ CreateRoleOKBody create role OK body swagger:model CreateRoleOKBody */ type CreateRoleOKBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go index 0b1b7b1af7..7e502e8dcd 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go @@ -61,7 +61,6 @@ DeleteRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteRoleParams struct { - /* ReplacementRoleID. Role ID to be used as a replacement for the role. Additional logic applies. @@ -152,7 +151,6 @@ func (o *DeleteRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -168,7 +166,6 @@ func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qReplacementRoleID := swag.FormatInt64(qrReplacementRoleID) if qReplacementRoleID != "" { - if err := r.SetQueryParam("replacement_role_id", qReplacementRoleID); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go index a934b67811..89f7242b79 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go @@ -103,7 +103,6 @@ func (o *DeleteRoleOK) GetPayload() interface{} { } func (o *DeleteRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *DeleteRoleDefault) GetPayload() *DeleteRoleDefaultBody { } func (o *DeleteRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteRoleDefaultBody) // response payload @@ -191,7 +189,6 @@ DeleteRoleDefaultBody delete role default body swagger:model DeleteRoleDefaultBody */ type DeleteRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *DeleteRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -304,7 +298,6 @@ DeleteRoleDefaultBodyDetailsItems0 delete role default body details items0 swagger:model DeleteRoleDefaultBodyDetailsItems0 */ type DeleteRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type DeleteRoleDefaultBodyDetailsItems0 struct { func (o *DeleteRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *DeleteRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go index 609e5c621e..31a018c004 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go @@ -61,7 +61,6 @@ GetRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetRoleParams struct { - // RoleID. // // Format: int64 @@ -133,7 +132,6 @@ func (o *GetRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *GetRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go index d8e70b22b6..5dbc75feaa 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go @@ -103,7 +103,6 @@ func (o *GetRoleOK) GetPayload() *GetRoleOKBody { } func (o *GetRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetRoleOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetRoleDefault) GetPayload() *GetRoleDefaultBody { } func (o *GetRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetRoleDefaultBody) // response payload @@ -193,7 +191,6 @@ GetRoleDefaultBody get role default body swagger:model GetRoleDefaultBody */ type GetRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetRoleDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -306,7 +300,6 @@ GetRoleDefaultBodyDetailsItems0 get role default body details items0 swagger:model GetRoleDefaultBodyDetailsItems0 */ type GetRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetRoleDefaultBodyDetailsItems0 struct { func (o *GetRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetRoleOKBody get role OK body swagger:model GetRoleOKBody */ type GetRoleOKBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go index 2d886057c5..0fb513e0af 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go @@ -115,7 +115,6 @@ func (o *ListRolesParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go index 0df2f353a8..114b44f570 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go @@ -103,7 +103,6 @@ func (o *ListRolesOK) GetPayload() *ListRolesOKBody { } func (o *ListRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListRolesOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ListRolesDefault) GetPayload() *ListRolesDefaultBody { } func (o *ListRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListRolesDefaultBody) // response payload @@ -193,7 +191,6 @@ ListRolesDefaultBody list roles default body swagger:model ListRolesDefaultBody */ type ListRolesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *ListRolesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -306,7 +300,6 @@ ListRolesDefaultBodyDetailsItems0 list roles default body details items0 swagger:model ListRolesDefaultBodyDetailsItems0 */ type ListRolesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type ListRolesDefaultBodyDetailsItems0 struct { func (o *ListRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *ListRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListRolesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ ListRolesOKBody list roles OK body swagger:model ListRolesOKBody */ type ListRolesOKBody struct { - // roles Roles []*ListRolesOKBodyRolesItems0 `json:"roles"` } @@ -480,9 +470,7 @@ func (o *ListRolesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Roles); i++ { - if o.Roles[i] != nil { if swag.IsZero(o.Roles[i]) { // not required @@ -498,7 +486,6 @@ func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strf return err } } - } return nil @@ -527,7 +514,6 @@ ListRolesOKBodyRolesItems0 list roles OK body roles items0 swagger:model ListRolesOKBodyRolesItems0 */ type ListRolesOKBodyRolesItems0 struct { - // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go index 858d855c7e..516a1543b1 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go @@ -60,7 +60,6 @@ SetDefaultRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SetDefaultRoleParams struct { - // Body. Body SetDefaultRoleBody @@ -130,7 +129,6 @@ func (o *SetDefaultRoleParams) SetBody(body SetDefaultRoleBody) { // WriteToRequest writes these params to a swagger request func (o *SetDefaultRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go index 3202b505f5..b22481f772 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go @@ -103,7 +103,6 @@ func (o *SetDefaultRoleOK) GetPayload() interface{} { } func (o *SetDefaultRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *SetDefaultRoleDefault) GetPayload() *SetDefaultRoleDefaultBody { } func (o *SetDefaultRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SetDefaultRoleDefaultBody) // response payload @@ -191,7 +189,6 @@ SetDefaultRoleBody set default role body swagger:model SetDefaultRoleBody */ type SetDefaultRoleBody struct { - // role id RoleID int64 `json:"role_id,omitempty"` } @@ -229,7 +226,6 @@ SetDefaultRoleDefaultBody set default role default body swagger:model SetDefaultRoleDefaultBody */ type SetDefaultRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -295,9 +291,7 @@ func (o *SetDefaultRoleDefaultBody) ContextValidate(ctx context.Context, formats } func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,7 +307,6 @@ func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -342,7 +335,6 @@ SetDefaultRoleDefaultBodyDetailsItems0 set default role default body details ite swagger:model SetDefaultRoleDefaultBodyDetailsItems0 */ type SetDefaultRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -354,7 +346,6 @@ type SetDefaultRoleDefaultBodyDetailsItems0 struct { func (o *SetDefaultRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -392,7 +383,6 @@ func (o *SetDefaultRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o SetDefaultRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go index 234a65456d..c5724145e1 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go @@ -61,7 +61,6 @@ UpdateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateRoleParams struct { - // Body. Body UpdateRoleBody @@ -147,7 +146,6 @@ func (o *UpdateRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *UpdateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go index 8140eb548f..3ef93cd3af 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go @@ -103,7 +103,6 @@ func (o *UpdateRoleOK) GetPayload() interface{} { } func (o *UpdateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *UpdateRoleDefault) GetPayload() *UpdateRoleDefaultBody { } func (o *UpdateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateRoleDefaultBody) // response payload @@ -191,7 +189,6 @@ UpdateRoleBody update role body swagger:model UpdateRoleBody */ type UpdateRoleBody struct { - // title Title *string `json:"title,omitempty"` @@ -235,7 +232,6 @@ UpdateRoleDefaultBody update role default body swagger:model UpdateRoleDefaultBody */ type UpdateRoleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -301,9 +297,7 @@ func (o *UpdateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -319,7 +313,6 @@ func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -348,7 +341,6 @@ UpdateRoleDefaultBodyDetailsItems0 update role default body details items0 swagger:model UpdateRoleDefaultBodyDetailsItems0 */ type UpdateRoleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -360,7 +352,6 @@ type UpdateRoleDefaultBodyDetailsItems0 struct { func (o *UpdateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -398,7 +389,6 @@ func (o *UpdateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/actions/v1/actions.pb.go b/api/actions/v1/actions.pb.go index 901ea2b681..74abcba4fb 100644 --- a/api/actions/v1/actions.pb.go +++ b/api/actions/v1/actions.pb.go @@ -7,13 +7,14 @@ package actionsv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -2860,43 +2861,46 @@ func file_actions_v1_actions_proto_rawDescGZIP() []byte { return file_actions_v1_actions_proto_rawDescData } -var file_actions_v1_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_actions_v1_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 32) -var file_actions_v1_actions_proto_goTypes = []any{ - (ActionType)(0), // 0: actions.v1.ActionType - (*GetActionRequest)(nil), // 1: actions.v1.GetActionRequest - (*GetActionResponse)(nil), // 2: actions.v1.GetActionResponse - (*StartMySQLExplainActionParams)(nil), // 3: actions.v1.StartMySQLExplainActionParams - (*StartMySQLExplainActionResult)(nil), // 4: actions.v1.StartMySQLExplainActionResult - (*StartMySQLExplainJSONActionParams)(nil), // 5: actions.v1.StartMySQLExplainJSONActionParams - (*StartMySQLExplainJSONActionResult)(nil), // 6: actions.v1.StartMySQLExplainJSONActionResult - (*StartMySQLExplainTraditionalJSONActionParams)(nil), // 7: actions.v1.StartMySQLExplainTraditionalJSONActionParams - (*StartMySQLExplainTraditionalJSONActionResult)(nil), // 8: actions.v1.StartMySQLExplainTraditionalJSONActionResult - (*StartMySQLShowCreateTableActionParams)(nil), // 9: actions.v1.StartMySQLShowCreateTableActionParams - (*StartMySQLShowCreateTableActionResult)(nil), // 10: actions.v1.StartMySQLShowCreateTableActionResult - (*StartMySQLShowTableStatusActionParams)(nil), // 11: actions.v1.StartMySQLShowTableStatusActionParams - (*StartMySQLShowTableStatusActionResult)(nil), // 12: actions.v1.StartMySQLShowTableStatusActionResult - (*StartMySQLShowIndexActionParams)(nil), // 13: actions.v1.StartMySQLShowIndexActionParams - (*StartMySQLShowIndexActionResult)(nil), // 14: actions.v1.StartMySQLShowIndexActionResult - (*StartPostgreSQLShowCreateTableActionParams)(nil), // 15: actions.v1.StartPostgreSQLShowCreateTableActionParams - (*StartPostgreSQLShowCreateTableActionResult)(nil), // 16: actions.v1.StartPostgreSQLShowCreateTableActionResult - (*StartPostgreSQLShowIndexActionParams)(nil), // 17: actions.v1.StartPostgreSQLShowIndexActionParams - (*StartPostgreSQLShowIndexActionResult)(nil), // 18: actions.v1.StartPostgreSQLShowIndexActionResult - (*StartMongoDBExplainActionParams)(nil), // 19: actions.v1.StartMongoDBExplainActionParams - (*StartMongoDBExplainActionResult)(nil), // 20: actions.v1.StartMongoDBExplainActionResult - (*StartPTPgSummaryActionParams)(nil), // 21: actions.v1.StartPTPgSummaryActionParams - (*StartPTPgSummaryActionResult)(nil), // 22: actions.v1.StartPTPgSummaryActionResult - (*StartPTMongoDBSummaryActionParams)(nil), // 23: actions.v1.StartPTMongoDBSummaryActionParams - (*StartPTMongoDBSummaryActionResult)(nil), // 24: actions.v1.StartPTMongoDBSummaryActionResult - (*StartPTMySQLSummaryActionParams)(nil), // 25: actions.v1.StartPTMySQLSummaryActionParams - (*StartPTMySQLSummaryActionResult)(nil), // 26: actions.v1.StartPTMySQLSummaryActionResult - (*StartPTSummaryActionRequest)(nil), // 27: actions.v1.StartPTSummaryActionRequest - (*StartPTSummaryActionResponse)(nil), // 28: actions.v1.StartPTSummaryActionResponse - (*CancelActionRequest)(nil), // 29: actions.v1.CancelActionRequest - (*CancelActionResponse)(nil), // 30: actions.v1.CancelActionResponse - (*StartServiceActionRequest)(nil), // 31: actions.v1.StartServiceActionRequest - (*StartServiceActionResponse)(nil), // 32: actions.v1.StartServiceActionResponse -} +var ( + file_actions_v1_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_actions_v1_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 32) + file_actions_v1_actions_proto_goTypes = []any{ + (ActionType)(0), // 0: actions.v1.ActionType + (*GetActionRequest)(nil), // 1: actions.v1.GetActionRequest + (*GetActionResponse)(nil), // 2: actions.v1.GetActionResponse + (*StartMySQLExplainActionParams)(nil), // 3: actions.v1.StartMySQLExplainActionParams + (*StartMySQLExplainActionResult)(nil), // 4: actions.v1.StartMySQLExplainActionResult + (*StartMySQLExplainJSONActionParams)(nil), // 5: actions.v1.StartMySQLExplainJSONActionParams + (*StartMySQLExplainJSONActionResult)(nil), // 6: actions.v1.StartMySQLExplainJSONActionResult + (*StartMySQLExplainTraditionalJSONActionParams)(nil), // 7: actions.v1.StartMySQLExplainTraditionalJSONActionParams + (*StartMySQLExplainTraditionalJSONActionResult)(nil), // 8: actions.v1.StartMySQLExplainTraditionalJSONActionResult + (*StartMySQLShowCreateTableActionParams)(nil), // 9: actions.v1.StartMySQLShowCreateTableActionParams + (*StartMySQLShowCreateTableActionResult)(nil), // 10: actions.v1.StartMySQLShowCreateTableActionResult + (*StartMySQLShowTableStatusActionParams)(nil), // 11: actions.v1.StartMySQLShowTableStatusActionParams + (*StartMySQLShowTableStatusActionResult)(nil), // 12: actions.v1.StartMySQLShowTableStatusActionResult + (*StartMySQLShowIndexActionParams)(nil), // 13: actions.v1.StartMySQLShowIndexActionParams + (*StartMySQLShowIndexActionResult)(nil), // 14: actions.v1.StartMySQLShowIndexActionResult + (*StartPostgreSQLShowCreateTableActionParams)(nil), // 15: actions.v1.StartPostgreSQLShowCreateTableActionParams + (*StartPostgreSQLShowCreateTableActionResult)(nil), // 16: actions.v1.StartPostgreSQLShowCreateTableActionResult + (*StartPostgreSQLShowIndexActionParams)(nil), // 17: actions.v1.StartPostgreSQLShowIndexActionParams + (*StartPostgreSQLShowIndexActionResult)(nil), // 18: actions.v1.StartPostgreSQLShowIndexActionResult + (*StartMongoDBExplainActionParams)(nil), // 19: actions.v1.StartMongoDBExplainActionParams + (*StartMongoDBExplainActionResult)(nil), // 20: actions.v1.StartMongoDBExplainActionResult + (*StartPTPgSummaryActionParams)(nil), // 21: actions.v1.StartPTPgSummaryActionParams + (*StartPTPgSummaryActionResult)(nil), // 22: actions.v1.StartPTPgSummaryActionResult + (*StartPTMongoDBSummaryActionParams)(nil), // 23: actions.v1.StartPTMongoDBSummaryActionParams + (*StartPTMongoDBSummaryActionResult)(nil), // 24: actions.v1.StartPTMongoDBSummaryActionResult + (*StartPTMySQLSummaryActionParams)(nil), // 25: actions.v1.StartPTMySQLSummaryActionParams + (*StartPTMySQLSummaryActionResult)(nil), // 26: actions.v1.StartPTMySQLSummaryActionResult + (*StartPTSummaryActionRequest)(nil), // 27: actions.v1.StartPTSummaryActionRequest + (*StartPTSummaryActionResponse)(nil), // 28: actions.v1.StartPTSummaryActionResponse + (*CancelActionRequest)(nil), // 29: actions.v1.CancelActionRequest + (*CancelActionResponse)(nil), // 30: actions.v1.CancelActionResponse + (*StartServiceActionRequest)(nil), // 31: actions.v1.StartServiceActionRequest + (*StartServiceActionResponse)(nil), // 32: actions.v1.StartServiceActionResponse + } +) + var file_actions_v1_actions_proto_depIdxs = []int32{ 3, // 0: actions.v1.StartServiceActionRequest.mysql_explain:type_name -> actions.v1.StartMySQLExplainActionParams 5, // 1: actions.v1.StartServiceActionRequest.mysql_explain_json:type_name -> actions.v1.StartMySQLExplainJSONActionParams diff --git a/api/actions/v1/actions.pb.gw.go b/api/actions/v1/actions.pb.gw.go index 4651dc6ff1..c84fd58bf9 100644 --- a/api/actions/v1/actions.pb.gw.go +++ b/api/actions/v1/actions.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_ActionsService_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetActionRequest @@ -54,7 +56,6 @@ func request_ActionsService_GetAction_0(ctx context.Context, marshaler runtime.M msg, err := client.GetAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ActionsService_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -80,7 +81,6 @@ func local_request_ActionsService_GetAction_0(ctx context.Context, marshaler run msg, err := server.GetAction(ctx, &protoReq) return msg, metadata, err - } func request_ActionsService_StartServiceAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -93,7 +93,6 @@ func request_ActionsService_StartServiceAction_0(ctx context.Context, marshaler msg, err := client.StartServiceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ActionsService_StartServiceAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -106,7 +105,6 @@ func local_request_ActionsService_StartServiceAction_0(ctx context.Context, mars msg, err := server.StartServiceAction(ctx, &protoReq) return msg, metadata, err - } func request_ActionsService_StartPTSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -119,7 +117,6 @@ func request_ActionsService_StartPTSummaryAction_0(ctx context.Context, marshale msg, err := client.StartPTSummaryAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ActionsService_StartPTSummaryAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -132,7 +129,6 @@ func local_request_ActionsService_StartPTSummaryAction_0(ctx context.Context, ma msg, err := server.StartPTSummaryAction(ctx, &protoReq) return msg, metadata, err - } func request_ActionsService_CancelAction_0(ctx context.Context, marshaler runtime.Marshaler, client ActionsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -145,7 +141,6 @@ func request_ActionsService_CancelAction_0(ctx context.Context, marshaler runtim msg, err := client.CancelAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ActionsService_CancelAction_0(ctx context.Context, marshaler runtime.Marshaler, server ActionsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -158,7 +153,6 @@ func local_request_ActionsService_CancelAction_0(ctx context.Context, marshaler msg, err := server.CancelAction(ctx, &protoReq) return msg, metadata, err - } // RegisterActionsServiceHandlerServer registers the http handlers for service ActionsService to "mux". @@ -167,7 +161,6 @@ func local_request_ActionsService_CancelAction_0(ctx context.Context, marshaler // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterActionsServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ActionsServiceServer) error { - mux.Handle("GET", pattern_ActionsService_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -190,7 +183,6 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_ActionsService_GetAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ActionsService_StartServiceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -215,7 +207,6 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_ActionsService_StartServiceAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ActionsService_StartPTSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -240,7 +231,6 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_ActionsService_StartPTSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ActionsService_CancelAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -265,7 +255,6 @@ func RegisterActionsServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_ActionsService_CancelAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -308,7 +297,6 @@ func RegisterActionsServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ActionsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ActionsServiceClient) error { - mux.Handle("GET", pattern_ActionsService_GetAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -328,7 +316,6 @@ func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_ActionsService_GetAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ActionsService_StartServiceAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -350,7 +337,6 @@ func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_ActionsService_StartServiceAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ActionsService_StartPTSummaryAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -372,7 +358,6 @@ func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_ActionsService_StartPTSummaryAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ActionsService_CancelAction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -394,7 +379,6 @@ func RegisterActionsServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_ActionsService_CancelAction_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/actions/v1/actions_grpc.pb.go b/api/actions/v1/actions_grpc.pb.go index 980d161a39..e540a425a3 100644 --- a/api/actions/v1/actions_grpc.pb.go +++ b/api/actions/v1/actions_grpc.pb.go @@ -8,6 +8,7 @@ package actionsv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -116,12 +117,15 @@ type UnimplementedActionsServiceServer struct{} func (UnimplementedActionsServiceServer) GetAction(context.Context, *GetActionRequest) (*GetActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAction not implemented") } + func (UnimplementedActionsServiceServer) StartServiceAction(context.Context, *StartServiceActionRequest) (*StartServiceActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartServiceAction not implemented") } + func (UnimplementedActionsServiceServer) StartPTSummaryAction(context.Context, *StartPTSummaryActionRequest) (*StartPTSummaryActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartPTSummaryAction not implemented") } + func (UnimplementedActionsServiceServer) CancelAction(context.Context, *CancelActionRequest) (*CancelActionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelAction not implemented") } diff --git a/api/actions/v1/json/client/actions_service/cancel_action_parameters.go b/api/actions/v1/json/client/actions_service/cancel_action_parameters.go index 212f1d60d2..6348e7d94e 100644 --- a/api/actions/v1/json/client/actions_service/cancel_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/cancel_action_parameters.go @@ -60,7 +60,6 @@ CancelActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CancelActionParams struct { - // Body. Body CancelActionBody @@ -130,7 +129,6 @@ func (o *CancelActionParams) SetBody(body CancelActionBody) { // WriteToRequest writes these params to a swagger request func (o *CancelActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/cancel_action_responses.go b/api/actions/v1/json/client/actions_service/cancel_action_responses.go index 93a520101d..0ab037b9b1 100644 --- a/api/actions/v1/json/client/actions_service/cancel_action_responses.go +++ b/api/actions/v1/json/client/actions_service/cancel_action_responses.go @@ -103,7 +103,6 @@ func (o *CancelActionOK) GetPayload() interface{} { } func (o *CancelActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *CancelActionDefault) GetPayload() *CancelActionDefaultBody { } func (o *CancelActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CancelActionDefaultBody) // response payload @@ -191,7 +189,6 @@ CancelActionBody cancel action body swagger:model CancelActionBody */ type CancelActionBody struct { - // Unique Action ID. Required. ActionID string `json:"action_id,omitempty"` } @@ -229,7 +226,6 @@ CancelActionDefaultBody cancel action default body swagger:model CancelActionDefaultBody */ type CancelActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -295,9 +291,7 @@ func (o *CancelActionDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,7 +307,6 @@ func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -342,7 +335,6 @@ CancelActionDefaultBodyDetailsItems0 cancel action default body details items0 swagger:model CancelActionDefaultBodyDetailsItems0 */ type CancelActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -354,7 +346,6 @@ type CancelActionDefaultBodyDetailsItems0 struct { func (o *CancelActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -392,7 +383,6 @@ func (o *CancelActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o CancelActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/actions/v1/json/client/actions_service/get_action_parameters.go b/api/actions/v1/json/client/actions_service/get_action_parameters.go index 6b0d82f9ee..260fc6822b 100644 --- a/api/actions/v1/json/client/actions_service/get_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/get_action_parameters.go @@ -60,7 +60,6 @@ GetActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetActionParams struct { - /* ActionID. Unique Action ID. @@ -133,7 +132,6 @@ func (o *GetActionParams) SetActionID(actionID string) { // WriteToRequest writes these params to a swagger request func (o *GetActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/get_action_responses.go b/api/actions/v1/json/client/actions_service/get_action_responses.go index abccf2b5ef..d6f93f8c90 100644 --- a/api/actions/v1/json/client/actions_service/get_action_responses.go +++ b/api/actions/v1/json/client/actions_service/get_action_responses.go @@ -103,7 +103,6 @@ func (o *GetActionOK) GetPayload() *GetActionOKBody { } func (o *GetActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetActionOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetActionDefault) GetPayload() *GetActionDefaultBody { } func (o *GetActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetActionDefaultBody) // response payload @@ -193,7 +191,6 @@ GetActionDefaultBody get action default body swagger:model GetActionDefaultBody */ type GetActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetActionDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -306,7 +300,6 @@ GetActionDefaultBodyDetailsItems0 get action default body details items0 swagger:model GetActionDefaultBodyDetailsItems0 */ type GetActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetActionDefaultBodyDetailsItems0 struct { func (o *GetActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetActionOKBody get action OK body swagger:model GetActionOKBody */ type GetActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go b/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go index 5b8ccd3118..968ef894f1 100644 --- a/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go @@ -60,7 +60,6 @@ StartPTSummaryActionParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type StartPTSummaryActionParams struct { - // Body. Body StartPTSummaryActionBody @@ -130,7 +129,6 @@ func (o *StartPTSummaryActionParams) SetBody(body StartPTSummaryActionBody) { // WriteToRequest writes these params to a swagger request func (o *StartPTSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go b/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go index d37b4d299d..654358c52b 100644 --- a/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go +++ b/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go @@ -103,7 +103,6 @@ func (o *StartPTSummaryActionOK) GetPayload() *StartPTSummaryActionOKBody { } func (o *StartPTSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTSummaryActionOKBody) // response payload @@ -177,7 +176,6 @@ func (o *StartPTSummaryActionDefault) GetPayload() *StartPTSummaryActionDefaultB } func (o *StartPTSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartPTSummaryActionDefaultBody) // response payload @@ -193,7 +191,6 @@ StartPTSummaryActionBody start PT summary action body swagger:model StartPTSummaryActionBody */ type StartPTSummaryActionBody struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -234,7 +231,6 @@ StartPTSummaryActionDefaultBody start PT summary action default body swagger:model StartPTSummaryActionDefaultBody */ type StartPTSummaryActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -300,9 +296,7 @@ func (o *StartPTSummaryActionDefaultBody) ContextValidate(ctx context.Context, f } func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -318,7 +312,6 @@ func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Con return err } } - } return nil @@ -347,7 +340,6 @@ StartPTSummaryActionDefaultBodyDetailsItems0 start PT summary action default bod swagger:model StartPTSummaryActionDefaultBodyDetailsItems0 */ type StartPTSummaryActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -359,7 +351,6 @@ type StartPTSummaryActionDefaultBodyDetailsItems0 struct { func (o *StartPTSummaryActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -397,7 +388,6 @@ func (o *StartPTSummaryActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte // MarshalJSON marshals this object with additional properties into a JSON object func (o StartPTSummaryActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -461,7 +451,6 @@ StartPTSummaryActionOKBody start PT summary action OK body swagger:model StartPTSummaryActionOKBody */ type StartPTSummaryActionOKBody struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/actions/v1/json/client/actions_service/start_service_action_parameters.go b/api/actions/v1/json/client/actions_service/start_service_action_parameters.go index 9aa53446c0..efc1acb5eb 100644 --- a/api/actions/v1/json/client/actions_service/start_service_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/start_service_action_parameters.go @@ -60,7 +60,6 @@ StartServiceActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartServiceActionParams struct { - // Body. Body StartServiceActionBody @@ -130,7 +129,6 @@ func (o *StartServiceActionParams) SetBody(body StartServiceActionBody) { // WriteToRequest writes these params to a swagger request func (o *StartServiceActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/start_service_action_responses.go b/api/actions/v1/json/client/actions_service/start_service_action_responses.go index c9760fa49d..812ae79151 100644 --- a/api/actions/v1/json/client/actions_service/start_service_action_responses.go +++ b/api/actions/v1/json/client/actions_service/start_service_action_responses.go @@ -103,7 +103,6 @@ func (o *StartServiceActionOK) GetPayload() *StartServiceActionOKBody { } func (o *StartServiceActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartServiceActionOKBody) // response payload @@ -177,7 +176,6 @@ func (o *StartServiceActionDefault) GetPayload() *StartServiceActionDefaultBody } func (o *StartServiceActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartServiceActionDefaultBody) // response payload @@ -193,7 +191,6 @@ StartServiceActionBody start service action body swagger:model StartServiceActionBody */ type StartServiceActionBody struct { - // mongodb explain MongodbExplain *StartServiceActionParamsBodyMongodbExplain `json:"mongodb_explain,omitempty"` @@ -576,7 +573,6 @@ func (o *StartServiceActionBody) ContextValidate(ctx context.Context, formats st } func (o *StartServiceActionBody) contextValidateMongodbExplain(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExplain != nil { if swag.IsZero(o.MongodbExplain) { // not required @@ -597,7 +593,6 @@ func (o *StartServiceActionBody) contextValidateMongodbExplain(ctx context.Conte } func (o *StartServiceActionBody) contextValidateMysqlExplain(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlExplain != nil { if swag.IsZero(o.MysqlExplain) { // not required @@ -618,7 +613,6 @@ func (o *StartServiceActionBody) contextValidateMysqlExplain(ctx context.Context } func (o *StartServiceActionBody) contextValidateMysqlExplainJSON(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlExplainJSON != nil { if swag.IsZero(o.MysqlExplainJSON) { // not required @@ -639,7 +633,6 @@ func (o *StartServiceActionBody) contextValidateMysqlExplainJSON(ctx context.Con } func (o *StartServiceActionBody) contextValidateMysqlExplainTraditionalJSON(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlExplainTraditionalJSON != nil { if swag.IsZero(o.MysqlExplainTraditionalJSON) { // not required @@ -660,7 +653,6 @@ func (o *StartServiceActionBody) contextValidateMysqlExplainTraditionalJSON(ctx } func (o *StartServiceActionBody) contextValidateMysqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlShowCreateTable != nil { if swag.IsZero(o.MysqlShowCreateTable) { // not required @@ -681,7 +673,6 @@ func (o *StartServiceActionBody) contextValidateMysqlShowCreateTable(ctx context } func (o *StartServiceActionBody) contextValidateMysqlShowIndex(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlShowIndex != nil { if swag.IsZero(o.MysqlShowIndex) { // not required @@ -702,7 +693,6 @@ func (o *StartServiceActionBody) contextValidateMysqlShowIndex(ctx context.Conte } func (o *StartServiceActionBody) contextValidateMysqlShowTableStatus(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlShowTableStatus != nil { if swag.IsZero(o.MysqlShowTableStatus) { // not required @@ -723,7 +713,6 @@ func (o *StartServiceActionBody) contextValidateMysqlShowTableStatus(ctx context } func (o *StartServiceActionBody) contextValidatePostgresShowCreateTable(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresShowCreateTable != nil { if swag.IsZero(o.PostgresShowCreateTable) { // not required @@ -744,7 +733,6 @@ func (o *StartServiceActionBody) contextValidatePostgresShowCreateTable(ctx cont } func (o *StartServiceActionBody) contextValidatePostgresShowIndex(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresShowIndex != nil { if swag.IsZero(o.PostgresShowIndex) { // not required @@ -765,7 +753,6 @@ func (o *StartServiceActionBody) contextValidatePostgresShowIndex(ctx context.Co } func (o *StartServiceActionBody) contextValidatePTMongodbSummary(ctx context.Context, formats strfmt.Registry) error { - if o.PTMongodbSummary != nil { if swag.IsZero(o.PTMongodbSummary) { // not required @@ -786,7 +773,6 @@ func (o *StartServiceActionBody) contextValidatePTMongodbSummary(ctx context.Con } func (o *StartServiceActionBody) contextValidatePTMysqlSummary(ctx context.Context, formats strfmt.Registry) error { - if o.PTMysqlSummary != nil { if swag.IsZero(o.PTMysqlSummary) { // not required @@ -807,7 +793,6 @@ func (o *StartServiceActionBody) contextValidatePTMysqlSummary(ctx context.Conte } func (o *StartServiceActionBody) contextValidatePTPostgresSummary(ctx context.Context, formats strfmt.Registry) error { - if o.PTPostgresSummary != nil { if swag.IsZero(o.PTPostgresSummary) { // not required @@ -850,7 +835,6 @@ StartServiceActionDefaultBody start service action default body swagger:model StartServiceActionDefaultBody */ type StartServiceActionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -916,9 +900,7 @@ func (o *StartServiceActionDefaultBody) ContextValidate(ctx context.Context, for } func (o *StartServiceActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -934,7 +916,6 @@ func (o *StartServiceActionDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -963,7 +944,6 @@ StartServiceActionDefaultBodyDetailsItems0 start service action default body det swagger:model StartServiceActionDefaultBodyDetailsItems0 */ type StartServiceActionDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -975,7 +955,6 @@ type StartServiceActionDefaultBodyDetailsItems0 struct { func (o *StartServiceActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -1013,7 +992,6 @@ func (o *StartServiceActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o StartServiceActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -1077,7 +1055,6 @@ StartServiceActionOKBody start service action OK body swagger:model StartServiceActionOKBody */ type StartServiceActionOKBody struct { - // mongodb explain MongodbExplain *StartServiceActionOKBodyMongodbExplain `json:"mongodb_explain,omitempty"` @@ -1460,7 +1437,6 @@ func (o *StartServiceActionOKBody) ContextValidate(ctx context.Context, formats } func (o *StartServiceActionOKBody) contextValidateMongodbExplain(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExplain != nil { if swag.IsZero(o.MongodbExplain) { // not required @@ -1481,7 +1457,6 @@ func (o *StartServiceActionOKBody) contextValidateMongodbExplain(ctx context.Con } func (o *StartServiceActionOKBody) contextValidateMysqlExplain(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlExplain != nil { if swag.IsZero(o.MysqlExplain) { // not required @@ -1502,7 +1477,6 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplain(ctx context.Conte } func (o *StartServiceActionOKBody) contextValidateMysqlExplainJSON(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlExplainJSON != nil { if swag.IsZero(o.MysqlExplainJSON) { // not required @@ -1523,7 +1497,6 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplainJSON(ctx context.C } func (o *StartServiceActionOKBody) contextValidateMysqlExplainTraditionalJSON(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlExplainTraditionalJSON != nil { if swag.IsZero(o.MysqlExplainTraditionalJSON) { // not required @@ -1544,7 +1517,6 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplainTraditionalJSON(ct } func (o *StartServiceActionOKBody) contextValidateMysqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlShowCreateTable != nil { if swag.IsZero(o.MysqlShowCreateTable) { // not required @@ -1565,7 +1537,6 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowCreateTable(ctx conte } func (o *StartServiceActionOKBody) contextValidateMysqlShowIndex(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlShowIndex != nil { if swag.IsZero(o.MysqlShowIndex) { // not required @@ -1586,7 +1557,6 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowIndex(ctx context.Con } func (o *StartServiceActionOKBody) contextValidateMysqlShowTableStatus(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlShowTableStatus != nil { if swag.IsZero(o.MysqlShowTableStatus) { // not required @@ -1607,7 +1577,6 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowTableStatus(ctx conte } func (o *StartServiceActionOKBody) contextValidatePostgresqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresqlShowCreateTable != nil { if swag.IsZero(o.PostgresqlShowCreateTable) { // not required @@ -1628,7 +1597,6 @@ func (o *StartServiceActionOKBody) contextValidatePostgresqlShowCreateTable(ctx } func (o *StartServiceActionOKBody) contextValidatePostgresqlShowIndex(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresqlShowIndex != nil { if swag.IsZero(o.PostgresqlShowIndex) { // not required @@ -1649,7 +1617,6 @@ func (o *StartServiceActionOKBody) contextValidatePostgresqlShowIndex(ctx contex } func (o *StartServiceActionOKBody) contextValidatePTMongodbSummary(ctx context.Context, formats strfmt.Registry) error { - if o.PTMongodbSummary != nil { if swag.IsZero(o.PTMongodbSummary) { // not required @@ -1670,7 +1637,6 @@ func (o *StartServiceActionOKBody) contextValidatePTMongodbSummary(ctx context.C } func (o *StartServiceActionOKBody) contextValidatePTMysqlSummary(ctx context.Context, formats strfmt.Registry) error { - if o.PTMysqlSummary != nil { if swag.IsZero(o.PTMysqlSummary) { // not required @@ -1691,7 +1657,6 @@ func (o *StartServiceActionOKBody) contextValidatePTMysqlSummary(ctx context.Con } func (o *StartServiceActionOKBody) contextValidatePTPostgresSummary(ctx context.Context, formats strfmt.Registry) error { - if o.PTPostgresSummary != nil { if swag.IsZero(o.PTPostgresSummary) { // not required @@ -1734,7 +1699,6 @@ StartServiceActionOKBodyMongodbExplain start service action OK body mongodb expl swagger:model StartServiceActionOKBodyMongodbExplain */ type StartServiceActionOKBodyMongodbExplain struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1775,7 +1739,6 @@ StartServiceActionOKBodyMysqlExplain start service action OK body mysql explain swagger:model StartServiceActionOKBodyMysqlExplain */ type StartServiceActionOKBodyMysqlExplain struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1816,7 +1779,6 @@ StartServiceActionOKBodyMysqlExplainJSON start service action OK body mysql expl swagger:model StartServiceActionOKBodyMysqlExplainJSON */ type StartServiceActionOKBodyMysqlExplainJSON struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1857,7 +1819,6 @@ StartServiceActionOKBodyMysqlExplainTraditionalJSON start service action OK body swagger:model StartServiceActionOKBodyMysqlExplainTraditionalJSON */ type StartServiceActionOKBodyMysqlExplainTraditionalJSON struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1898,7 +1859,6 @@ StartServiceActionOKBodyMysqlShowCreateTable start service action OK body mysql swagger:model StartServiceActionOKBodyMysqlShowCreateTable */ type StartServiceActionOKBodyMysqlShowCreateTable struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1939,7 +1899,6 @@ StartServiceActionOKBodyMysqlShowIndex start service action OK body mysql show i swagger:model StartServiceActionOKBodyMysqlShowIndex */ type StartServiceActionOKBodyMysqlShowIndex struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1980,7 +1939,6 @@ StartServiceActionOKBodyMysqlShowTableStatus start service action OK body mysql swagger:model StartServiceActionOKBodyMysqlShowTableStatus */ type StartServiceActionOKBodyMysqlShowTableStatus struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2021,7 +1979,6 @@ StartServiceActionOKBodyPTMongodbSummary Message to retrieve the prepared pt-mon swagger:model StartServiceActionOKBodyPTMongodbSummary */ type StartServiceActionOKBodyPTMongodbSummary struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2062,7 +2019,6 @@ StartServiceActionOKBodyPTMysqlSummary Message to retrieve the prepared pt-mysql swagger:model StartServiceActionOKBodyPTMysqlSummary */ type StartServiceActionOKBodyPTMysqlSummary struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2103,7 +2059,6 @@ StartServiceActionOKBodyPTPostgresSummary Message to retrieve the prepared pt-pg swagger:model StartServiceActionOKBodyPTPostgresSummary */ type StartServiceActionOKBodyPTPostgresSummary struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2144,7 +2099,6 @@ StartServiceActionOKBodyPostgresqlShowCreateTable start service action OK body p swagger:model StartServiceActionOKBodyPostgresqlShowCreateTable */ type StartServiceActionOKBodyPostgresqlShowCreateTable struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2185,7 +2139,6 @@ StartServiceActionOKBodyPostgresqlShowIndex start service action OK body postgre swagger:model StartServiceActionOKBodyPostgresqlShowIndex */ type StartServiceActionOKBodyPostgresqlShowIndex struct { - // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2226,7 +2179,6 @@ StartServiceActionParamsBodyMongodbExplain start service action params body mong swagger:model StartServiceActionParamsBodyMongodbExplain */ type StartServiceActionParamsBodyMongodbExplain struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2270,7 +2222,6 @@ StartServiceActionParamsBodyMysqlExplain start service action params body mysql swagger:model StartServiceActionParamsBodyMysqlExplain */ type StartServiceActionParamsBodyMysqlExplain struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2320,7 +2271,6 @@ StartServiceActionParamsBodyMysqlExplainJSON start service action params body my swagger:model StartServiceActionParamsBodyMysqlExplainJSON */ type StartServiceActionParamsBodyMysqlExplainJSON struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2370,7 +2320,6 @@ StartServiceActionParamsBodyMysqlExplainTraditionalJSON start service action par swagger:model StartServiceActionParamsBodyMysqlExplainTraditionalJSON */ type StartServiceActionParamsBodyMysqlExplainTraditionalJSON struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2420,7 +2369,6 @@ StartServiceActionParamsBodyMysqlShowCreateTable start service action params bod swagger:model StartServiceActionParamsBodyMysqlShowCreateTable */ type StartServiceActionParamsBodyMysqlShowCreateTable struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2467,7 +2415,6 @@ StartServiceActionParamsBodyMysqlShowIndex start service action params body mysq swagger:model StartServiceActionParamsBodyMysqlShowIndex */ type StartServiceActionParamsBodyMysqlShowIndex struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2514,7 +2461,6 @@ StartServiceActionParamsBodyMysqlShowTableStatus start service action params bod swagger:model StartServiceActionParamsBodyMysqlShowTableStatus */ type StartServiceActionParamsBodyMysqlShowTableStatus struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2561,7 +2507,6 @@ StartServiceActionParamsBodyPTMongodbSummary Message to prepare pt-mongodb-summa swagger:model StartServiceActionParamsBodyPTMongodbSummary */ type StartServiceActionParamsBodyPTMongodbSummary struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2602,7 +2547,6 @@ StartServiceActionParamsBodyPTMysqlSummary Message to prepare pt-mysql-summary d swagger:model StartServiceActionParamsBodyPTMysqlSummary */ type StartServiceActionParamsBodyPTMysqlSummary struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2643,7 +2587,6 @@ StartServiceActionParamsBodyPTPostgresSummary Message to prepare pt-pg-summary d swagger:model StartServiceActionParamsBodyPTPostgresSummary */ type StartServiceActionParamsBodyPTPostgresSummary struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2684,7 +2627,6 @@ StartServiceActionParamsBodyPostgresShowCreateTable start service action params swagger:model StartServiceActionParamsBodyPostgresShowCreateTable */ type StartServiceActionParamsBodyPostgresShowCreateTable struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2731,7 +2673,6 @@ StartServiceActionParamsBodyPostgresShowIndex start service action params body p swagger:model StartServiceActionParamsBodyPostgresShowIndex */ type StartServiceActionParamsBodyPostgresShowIndex struct { - // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` diff --git a/api/advisors/v1/advisors.pb.go b/api/advisors/v1/advisors.pb.go index 6ae7f6996b..51703e2cbe 100644 --- a/api/advisors/v1/advisors.pb.go +++ b/api/advisors/v1/advisors.pb.go @@ -7,14 +7,16 @@ package advisorsv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - v1 "github.com/percona/pmm/api/management/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/management/v1" ) const ( @@ -1546,33 +1548,36 @@ func file_advisors_v1_advisors_proto_rawDescGZIP() []byte { return file_advisors_v1_advisors_proto_rawDescData } -var file_advisors_v1_advisors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_advisors_v1_advisors_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_advisors_v1_advisors_proto_goTypes = []any{ - (AdvisorCheckInterval)(0), // 0: advisors.v1.AdvisorCheckInterval - (AdvisorCheckFamily)(0), // 1: advisors.v1.AdvisorCheckFamily - (*AdvisorCheckResult)(nil), // 2: advisors.v1.AdvisorCheckResult - (*CheckResultSummary)(nil), // 3: advisors.v1.CheckResultSummary - (*CheckResult)(nil), // 4: advisors.v1.CheckResult - (*AdvisorCheck)(nil), // 5: advisors.v1.AdvisorCheck - (*Advisor)(nil), // 6: advisors.v1.Advisor - (*ChangeAdvisorCheckParams)(nil), // 7: advisors.v1.ChangeAdvisorCheckParams - (*StartAdvisorChecksRequest)(nil), // 8: advisors.v1.StartAdvisorChecksRequest - (*StartAdvisorChecksResponse)(nil), // 9: advisors.v1.StartAdvisorChecksResponse - (*ListAdvisorChecksRequest)(nil), // 10: advisors.v1.ListAdvisorChecksRequest - (*ListAdvisorChecksResponse)(nil), // 11: advisors.v1.ListAdvisorChecksResponse - (*ListAdvisorsRequest)(nil), // 12: advisors.v1.ListAdvisorsRequest - (*ListAdvisorsResponse)(nil), // 13: advisors.v1.ListAdvisorsResponse - (*ChangeAdvisorChecksRequest)(nil), // 14: advisors.v1.ChangeAdvisorChecksRequest - (*ChangeAdvisorChecksResponse)(nil), // 15: advisors.v1.ChangeAdvisorChecksResponse - (*ListFailedServicesRequest)(nil), // 16: advisors.v1.ListFailedServicesRequest - (*ListFailedServicesResponse)(nil), // 17: advisors.v1.ListFailedServicesResponse - (*GetFailedChecksRequest)(nil), // 18: advisors.v1.GetFailedChecksRequest - (*GetFailedChecksResponse)(nil), // 19: advisors.v1.GetFailedChecksResponse - nil, // 20: advisors.v1.AdvisorCheckResult.LabelsEntry - nil, // 21: advisors.v1.CheckResult.LabelsEntry - (v1.Severity)(0), // 22: management.v1.Severity -} +var ( + file_advisors_v1_advisors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_advisors_v1_advisors_proto_msgTypes = make([]protoimpl.MessageInfo, 20) + file_advisors_v1_advisors_proto_goTypes = []any{ + (AdvisorCheckInterval)(0), // 0: advisors.v1.AdvisorCheckInterval + (AdvisorCheckFamily)(0), // 1: advisors.v1.AdvisorCheckFamily + (*AdvisorCheckResult)(nil), // 2: advisors.v1.AdvisorCheckResult + (*CheckResultSummary)(nil), // 3: advisors.v1.CheckResultSummary + (*CheckResult)(nil), // 4: advisors.v1.CheckResult + (*AdvisorCheck)(nil), // 5: advisors.v1.AdvisorCheck + (*Advisor)(nil), // 6: advisors.v1.Advisor + (*ChangeAdvisorCheckParams)(nil), // 7: advisors.v1.ChangeAdvisorCheckParams + (*StartAdvisorChecksRequest)(nil), // 8: advisors.v1.StartAdvisorChecksRequest + (*StartAdvisorChecksResponse)(nil), // 9: advisors.v1.StartAdvisorChecksResponse + (*ListAdvisorChecksRequest)(nil), // 10: advisors.v1.ListAdvisorChecksRequest + (*ListAdvisorChecksResponse)(nil), // 11: advisors.v1.ListAdvisorChecksResponse + (*ListAdvisorsRequest)(nil), // 12: advisors.v1.ListAdvisorsRequest + (*ListAdvisorsResponse)(nil), // 13: advisors.v1.ListAdvisorsResponse + (*ChangeAdvisorChecksRequest)(nil), // 14: advisors.v1.ChangeAdvisorChecksRequest + (*ChangeAdvisorChecksResponse)(nil), // 15: advisors.v1.ChangeAdvisorChecksResponse + (*ListFailedServicesRequest)(nil), // 16: advisors.v1.ListFailedServicesRequest + (*ListFailedServicesResponse)(nil), // 17: advisors.v1.ListFailedServicesResponse + (*GetFailedChecksRequest)(nil), // 18: advisors.v1.GetFailedChecksRequest + (*GetFailedChecksResponse)(nil), // 19: advisors.v1.GetFailedChecksResponse + nil, // 20: advisors.v1.AdvisorCheckResult.LabelsEntry + nil, // 21: advisors.v1.CheckResult.LabelsEntry + (v1.Severity)(0), // 22: management.v1.Severity + } +) + var file_advisors_v1_advisors_proto_depIdxs = []int32{ 22, // 0: advisors.v1.AdvisorCheckResult.severity:type_name -> management.v1.Severity 20, // 1: advisors.v1.AdvisorCheckResult.labels:type_name -> advisors.v1.AdvisorCheckResult.LabelsEntry diff --git a/api/advisors/v1/advisors.pb.gw.go b/api/advisors/v1/advisors.pb.gw.go index f61871ab1f..bff3437706 100644 --- a/api/advisors/v1/advisors.pb.gw.go +++ b/api/advisors/v1/advisors.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AdvisorService_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListFailedServicesRequest @@ -37,7 +39,6 @@ func request_AdvisorService_ListFailedServices_0(ctx context.Context, marshaler msg, err := client.ListFailedServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AdvisorService_ListFailedServices_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -46,12 +47,9 @@ func local_request_AdvisorService_ListFailedServices_0(ctx context.Context, mars msg, err := server.ListFailedServices(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_AdvisorService_GetFailedChecks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_AdvisorService_GetFailedChecks_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetFailedChecksRequest @@ -66,7 +64,6 @@ func request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshaler run msg, err := client.GetFailedChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -82,7 +79,6 @@ func local_request_AdvisorService_GetFailedChecks_0(ctx context.Context, marshal msg, err := server.GetFailedChecks(ctx, &protoReq) return msg, metadata, err - } func request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -95,7 +91,6 @@ func request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, marshaler msg, err := client.StartAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -108,7 +103,6 @@ func local_request_AdvisorService_StartAdvisorChecks_0(ctx context.Context, mars msg, err := server.StartAdvisorChecks(ctx, &protoReq) return msg, metadata, err - } func request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -117,7 +111,6 @@ func request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marshaler r msg, err := client.ListAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -126,7 +119,6 @@ func local_request_AdvisorService_ListAdvisorChecks_0(ctx context.Context, marsh msg, err := server.ListAdvisorChecks(ctx, &protoReq) return msg, metadata, err - } func request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -135,7 +127,6 @@ func request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler runtim msg, err := client.ListAdvisors(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -144,7 +135,6 @@ func local_request_AdvisorService_ListAdvisors_0(ctx context.Context, marshaler msg, err := server.ListAdvisors(ctx, &protoReq) return msg, metadata, err - } func request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, client AdvisorServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -157,7 +147,6 @@ func request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, marshaler msg, err := client.ChangeAdvisorChecks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, marshaler runtime.Marshaler, server AdvisorServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -170,7 +159,6 @@ func local_request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, mar msg, err := server.ChangeAdvisorChecks(ctx, &protoReq) return msg, metadata, err - } // RegisterAdvisorServiceHandlerServer registers the http handlers for service AdvisorService to "mux". @@ -179,7 +167,6 @@ func local_request_AdvisorService_ChangeAdvisorChecks_0(ctx context.Context, mar // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAdvisorServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AdvisorServiceServer) error { - mux.Handle("GET", pattern_AdvisorService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -202,7 +189,6 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AdvisorService_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -227,7 +213,6 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AdvisorService_StartAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -252,7 +237,6 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_StartAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AdvisorService_ListAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -277,7 +261,6 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AdvisorService_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -302,7 +285,6 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AdvisorService_ChangeAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -327,7 +309,6 @@ func RegisterAdvisorServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ChangeAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -370,7 +351,6 @@ func RegisterAdvisorServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AdvisorServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AdvisorServiceClient) error { - mux.Handle("GET", pattern_AdvisorService_ListFailedServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -390,7 +370,6 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListFailedServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AdvisorService_GetFailedChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -412,7 +391,6 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_GetFailedChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AdvisorService_StartAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -434,7 +412,6 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_StartAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AdvisorService_ListAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -456,7 +433,6 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AdvisorService_ListAdvisors_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -478,7 +454,6 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ListAdvisors_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AdvisorService_ChangeAdvisorChecks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -500,7 +475,6 @@ func RegisterAdvisorServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_AdvisorService_ChangeAdvisorChecks_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/advisors/v1/advisors.pb.validate.go b/api/advisors/v1/advisors.pb.validate.go index 75a00437b6..9c9bdff982 100644 --- a/api/advisors/v1/advisors.pb.validate.go +++ b/api/advisors/v1/advisors.pb.validate.go @@ -1937,7 +1937,6 @@ func (m *GetFailedChecksRequest) validate(all bool) error { // no validation rules for ServiceId if m.PageSize != nil { - if m.GetPageSize() < 1 { err := GetFailedChecksRequestValidationError{ field: "PageSize", @@ -1948,11 +1947,9 @@ func (m *GetFailedChecksRequest) validate(all bool) error { } errors = append(errors, err) } - } if m.PageIndex != nil { - if m.GetPageIndex() < 0 { err := GetFailedChecksRequestValidationError{ field: "PageIndex", @@ -1963,7 +1960,6 @@ func (m *GetFailedChecksRequest) validate(all bool) error { } errors = append(errors, err) } - } if len(errors) > 0 { diff --git a/api/advisors/v1/advisors_grpc.pb.go b/api/advisors/v1/advisors_grpc.pb.go index b2852af313..ad91ee616f 100644 --- a/api/advisors/v1/advisors_grpc.pb.go +++ b/api/advisors/v1/advisors_grpc.pb.go @@ -8,6 +8,7 @@ package advisorsv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -146,18 +147,23 @@ type UnimplementedAdvisorServiceServer struct{} func (UnimplementedAdvisorServiceServer) ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFailedServices not implemented") } + func (UnimplementedAdvisorServiceServer) GetFailedChecks(context.Context, *GetFailedChecksRequest) (*GetFailedChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFailedChecks not implemented") } + func (UnimplementedAdvisorServiceServer) StartAdvisorChecks(context.Context, *StartAdvisorChecksRequest) (*StartAdvisorChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartAdvisorChecks not implemented") } + func (UnimplementedAdvisorServiceServer) ListAdvisorChecks(context.Context, *ListAdvisorChecksRequest) (*ListAdvisorChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAdvisorChecks not implemented") } + func (UnimplementedAdvisorServiceServer) ListAdvisors(context.Context, *ListAdvisorsRequest) (*ListAdvisorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAdvisors not implemented") } + func (UnimplementedAdvisorServiceServer) ChangeAdvisorChecks(context.Context, *ChangeAdvisorChecksRequest) (*ChangeAdvisorChecksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeAdvisorChecks not implemented") } diff --git a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go index a6f9670f4d..9f9ee29908 100644 --- a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go @@ -60,7 +60,6 @@ ChangeAdvisorChecksParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type ChangeAdvisorChecksParams struct { - // Body. Body ChangeAdvisorChecksBody @@ -130,7 +129,6 @@ func (o *ChangeAdvisorChecksParams) SetBody(body ChangeAdvisorChecksBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go index 781c1860ef..5da5b5cced 100644 --- a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go @@ -104,7 +104,6 @@ func (o *ChangeAdvisorChecksOK) GetPayload() interface{} { } func (o *ChangeAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -176,7 +175,6 @@ func (o *ChangeAdvisorChecksDefault) GetPayload() *ChangeAdvisorChecksDefaultBod } func (o *ChangeAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeAdvisorChecksDefaultBody) // response payload @@ -192,7 +190,6 @@ ChangeAdvisorChecksBody change advisor checks body swagger:model ChangeAdvisorChecksBody */ type ChangeAdvisorChecksBody struct { - // params Params []*ChangeAdvisorChecksParamsBodyParamsItems0 `json:"params"` } @@ -252,9 +249,7 @@ func (o *ChangeAdvisorChecksBody) ContextValidate(ctx context.Context, formats s } func (o *ChangeAdvisorChecksBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -270,7 +265,6 @@ func (o *ChangeAdvisorChecksBody) contextValidateParams(ctx context.Context, for return err } } - } return nil @@ -299,7 +293,6 @@ ChangeAdvisorChecksDefaultBody change advisor checks default body swagger:model ChangeAdvisorChecksDefaultBody */ type ChangeAdvisorChecksDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -365,9 +358,7 @@ func (o *ChangeAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, fo } func (o *ChangeAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -383,7 +374,6 @@ func (o *ChangeAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Cont return err } } - } return nil @@ -412,7 +402,6 @@ ChangeAdvisorChecksDefaultBodyDetailsItems0 change advisor checks default body d swagger:model ChangeAdvisorChecksDefaultBodyDetailsItems0 */ type ChangeAdvisorChecksDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -424,7 +413,6 @@ type ChangeAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -462,7 +450,6 @@ func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -526,7 +513,6 @@ ChangeAdvisorChecksParamsBodyParamsItems0 ChangeAdvisorCheckParams specifies a s swagger:model ChangeAdvisorChecksParamsBodyParamsItems0 */ type ChangeAdvisorChecksParamsBodyParamsItems0 struct { - // The name of the check to change. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go index 87eedd930e..0248b1355a 100644 --- a/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go @@ -61,7 +61,6 @@ GetFailedChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetFailedChecksParams struct { - /* PageIndex. Index of the requested page, starts from 0. @@ -172,7 +171,6 @@ func (o *GetFailedChecksParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -188,7 +186,6 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qPageIndex := swag.FormatInt32(qrPageIndex) if qPageIndex != "" { - if err := r.SetQueryParam("page_index", qPageIndex); err != nil { return err } @@ -205,7 +202,6 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { - if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } @@ -222,7 +218,6 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qServiceID := qrServiceID if qServiceID != "" { - if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go b/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go index c4752a4c96..1d6b0bda83 100644 --- a/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go @@ -104,7 +104,6 @@ func (o *GetFailedChecksOK) GetPayload() *GetFailedChecksOKBody { } func (o *GetFailedChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetFailedChecksOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetFailedChecksDefault) GetPayload() *GetFailedChecksDefaultBody { } func (o *GetFailedChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetFailedChecksDefaultBody) // response payload @@ -194,7 +192,6 @@ GetFailedChecksDefaultBody get failed checks default body swagger:model GetFailedChecksDefaultBody */ type GetFailedChecksDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *GetFailedChecksDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -307,7 +301,6 @@ GetFailedChecksDefaultBodyDetailsItems0 get failed checks default body details i swagger:model GetFailedChecksDefaultBodyDetailsItems0 */ type GetFailedChecksDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type GetFailedChecksDefaultBodyDetailsItems0 struct { func (o *GetFailedChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *GetFailedChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetFailedChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ GetFailedChecksOKBody get failed checks OK body swagger:model GetFailedChecksOKBody */ type GetFailedChecksOKBody struct { - // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -487,9 +477,7 @@ func (o *GetFailedChecksOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Results); i++ { - if o.Results[i] != nil { if swag.IsZero(o.Results[i]) { // not required @@ -505,7 +493,6 @@ func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, form return err } } - } return nil @@ -534,7 +521,6 @@ GetFailedChecksOKBodyResultsItems0 CheckResult represents the check results for swagger:model GetFailedChecksOKBodyResultsItems0 */ type GetFailedChecksOKBodyResultsItems0 struct { - // summary Summary string `json:"summary,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go index 4718c378e1..23e2a16e65 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go @@ -115,7 +115,6 @@ func (o *ListAdvisorChecksParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go index 85a853c748..ca4d6614bf 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go @@ -104,7 +104,6 @@ func (o *ListAdvisorChecksOK) GetPayload() *ListAdvisorChecksOKBody { } func (o *ListAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAdvisorChecksOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListAdvisorChecksDefault) GetPayload() *ListAdvisorChecksDefaultBody { } func (o *ListAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAdvisorChecksDefaultBody) // response payload @@ -194,7 +192,6 @@ ListAdvisorChecksDefaultBody list advisor checks default body swagger:model ListAdvisorChecksDefaultBody */ type ListAdvisorChecksDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, form } func (o *ListAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Contex return err } } - } return nil @@ -307,7 +301,6 @@ ListAdvisorChecksDefaultBodyDetailsItems0 list advisor checks default body detai swagger:model ListAdvisorChecksDefaultBodyDetailsItems0 */ type ListAdvisorChecksDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *ListAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListAdvisorChecksOKBody list advisor checks OK body swagger:model ListAdvisorChecksOKBody */ type ListAdvisorChecksOKBody struct { - // checks Checks []*ListAdvisorChecksOKBodyChecksItems0 `json:"checks"` } @@ -481,9 +471,7 @@ func (o *ListAdvisorChecksOKBody) ContextValidate(ctx context.Context, formats s } func (o *ListAdvisorChecksOKBody) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Checks); i++ { - if o.Checks[i] != nil { if swag.IsZero(o.Checks[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListAdvisorChecksOKBody) contextValidateChecks(ctx context.Context, for return err } } - } return nil @@ -528,7 +515,6 @@ ListAdvisorChecksOKBodyChecksItems0 AdvisorCheck contains check name and status. swagger:model ListAdvisorChecksOKBodyChecksItems0 */ type ListAdvisorChecksOKBodyChecksItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go b/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go index 375bb68b89..214b86b095 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go @@ -115,7 +115,6 @@ func (o *ListAdvisorsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAdvisorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go b/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go index 6b886cfc14..1e5f50e351 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go @@ -104,7 +104,6 @@ func (o *ListAdvisorsOK) GetPayload() *ListAdvisorsOKBody { } func (o *ListAdvisorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAdvisorsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListAdvisorsDefault) GetPayload() *ListAdvisorsDefaultBody { } func (o *ListAdvisorsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAdvisorsDefaultBody) // response payload @@ -194,7 +192,6 @@ ListAdvisorsDefaultBody list advisors default body swagger:model ListAdvisorsDefaultBody */ type ListAdvisorsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListAdvisorsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -307,7 +301,6 @@ ListAdvisorsDefaultBodyDetailsItems0 list advisors default body details items0 swagger:model ListAdvisorsDefaultBodyDetailsItems0 */ type ListAdvisorsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListAdvisorsDefaultBodyDetailsItems0 struct { func (o *ListAdvisorsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListAdvisorsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAdvisorsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListAdvisorsOKBody list advisors OK body swagger:model ListAdvisorsOKBody */ type ListAdvisorsOKBody struct { - // advisors Advisors []*ListAdvisorsOKBodyAdvisorsItems0 `json:"advisors"` } @@ -481,9 +471,7 @@ func (o *ListAdvisorsOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Advisors); i++ { - if o.Advisors[i] != nil { if swag.IsZero(o.Advisors[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, format return err } } - } return nil @@ -528,7 +515,6 @@ ListAdvisorsOKBodyAdvisorsItems0 list advisors OK body advisors items0 swagger:model ListAdvisorsOKBodyAdvisorsItems0 */ type ListAdvisorsOKBodyAdvisorsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -603,9 +589,7 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) ContextValidate(ctx context.Context, } func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Checks); i++ { - if o.Checks[i] != nil { if swag.IsZero(o.Checks[i]) { // not required @@ -621,7 +605,6 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Con return err } } - } return nil @@ -650,7 +633,6 @@ ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 AdvisorCheck contains check name an swagger:model ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 */ type ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go b/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go index 579c66ebda..7b386ac01a 100644 --- a/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go @@ -115,7 +115,6 @@ func (o *ListFailedServicesParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListFailedServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go b/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go index 688c87c27f..b14fd06338 100644 --- a/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go @@ -103,7 +103,6 @@ func (o *ListFailedServicesOK) GetPayload() *ListFailedServicesOKBody { } func (o *ListFailedServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListFailedServicesOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ListFailedServicesDefault) GetPayload() *ListFailedServicesDefaultBody } func (o *ListFailedServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListFailedServicesDefaultBody) // response payload @@ -193,7 +191,6 @@ ListFailedServicesDefaultBody list failed services default body swagger:model ListFailedServicesDefaultBody */ type ListFailedServicesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *ListFailedServicesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -306,7 +300,6 @@ ListFailedServicesDefaultBodyDetailsItems0 list failed services default body det swagger:model ListFailedServicesDefaultBodyDetailsItems0 */ type ListFailedServicesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type ListFailedServicesDefaultBodyDetailsItems0 struct { func (o *ListFailedServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *ListFailedServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ListFailedServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ ListFailedServicesOKBody list failed services OK body swagger:model ListFailedServicesOKBody */ type ListFailedServicesOKBody struct { - // result Result []*ListFailedServicesOKBodyResultItems0 `json:"result"` } @@ -480,9 +470,7 @@ func (o *ListFailedServicesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Result); i++ { - if o.Result[i] != nil { if swag.IsZero(o.Result[i]) { // not required @@ -498,7 +486,6 @@ func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, fo return err } } - } return nil @@ -527,7 +514,6 @@ ListFailedServicesOKBodyResultItems0 CheckResultSummary is a summary of check re swagger:model ListFailedServicesOKBodyResultItems0 */ type ListFailedServicesOKBodyResultItems0 struct { - // service name ServiceName string `json:"service_name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go index 9a9d66c843..879f8418f6 100644 --- a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go @@ -60,7 +60,6 @@ StartAdvisorChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartAdvisorChecksParams struct { - // Body. Body StartAdvisorChecksBody @@ -130,7 +129,6 @@ func (o *StartAdvisorChecksParams) SetBody(body StartAdvisorChecksBody) { // WriteToRequest writes these params to a swagger request func (o *StartAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go index 4b1802b166..4454786167 100644 --- a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go @@ -103,7 +103,6 @@ func (o *StartAdvisorChecksOK) GetPayload() interface{} { } func (o *StartAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *StartAdvisorChecksDefault) GetPayload() *StartAdvisorChecksDefaultBody } func (o *StartAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartAdvisorChecksDefaultBody) // response payload @@ -191,7 +189,6 @@ StartAdvisorChecksBody start advisor checks body swagger:model StartAdvisorChecksBody */ type StartAdvisorChecksBody struct { - // Names of the checks that should be started. Names []string `json:"names"` } @@ -229,7 +226,6 @@ StartAdvisorChecksDefaultBody start advisor checks default body swagger:model StartAdvisorChecksDefaultBody */ type StartAdvisorChecksDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -295,9 +291,7 @@ func (o *StartAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, for } func (o *StartAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,7 +307,6 @@ func (o *StartAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -342,7 +335,6 @@ StartAdvisorChecksDefaultBodyDetailsItems0 start advisor checks default body det swagger:model StartAdvisorChecksDefaultBodyDetailsItems0 */ type StartAdvisorChecksDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -354,7 +346,6 @@ type StartAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *StartAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -392,7 +383,6 @@ func (o *StartAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o StartAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/agent/pb/agent.pb.go b/api/agent/pb/agent.pb.go index b211a6bfcb..cafc2136d8 100644 --- a/api/agent/pb/agent.pb.go +++ b/api/agent/pb/agent.pb.go @@ -7,10 +7,12 @@ package pb import ( - v1 "github.com/percona/pmm/api/agent/v1" + reflect "reflect" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" + + v1 "github.com/percona/pmm/api/agent/v1" ) const ( @@ -45,6 +47,7 @@ var file_agent_pb_agent_proto_goTypes = []any{ (*v1.AgentMessage)(nil), // 0: agent.v1.AgentMessage (*v1.ServerMessage)(nil), // 1: agent.v1.ServerMessage } + var file_agent_pb_agent_proto_depIdxs = []int32{ 0, // 0: agent.Agent.Connect:input_type -> agent.v1.AgentMessage 1, // 1: agent.Agent.Connect:output_type -> agent.v1.ServerMessage diff --git a/api/agent/pb/agent_grpc.pb.go b/api/agent/pb/agent_grpc.pb.go index 3b8f6d840a..e976dce0f5 100644 --- a/api/agent/pb/agent_grpc.pb.go +++ b/api/agent/pb/agent_grpc.pb.go @@ -8,10 +8,12 @@ package pb import ( context "context" - v1 "github.com/percona/pmm/api/agent/v1" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + + v1 "github.com/percona/pmm/api/agent/v1" ) // This is a compile-time assertion to ensure that this generated file diff --git a/api/agent/v1/agent.pb.go b/api/agent/v1/agent.pb.go index 8df40b04ae..dbfad1aec7 100644 --- a/api/agent/v1/agent.pb.go +++ b/api/agent/v1/agent.pb.go @@ -7,15 +7,17 @@ package agentv1 import ( - v11 "github.com/percona/pmm/api/backup/v1" - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + v11 "github.com/percona/pmm/api/backup/v1" + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -7511,113 +7513,116 @@ func file_agent_v1_agent_proto_rawDescGZIP() []byte { return file_agent_v1_agent_proto_rawDescData } -var file_agent_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 91) -var file_agent_v1_agent_proto_goTypes = []any{ - (MysqlExplainOutputFormat)(0), // 0: agent.v1.MysqlExplainOutputFormat - (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService - (*TextFiles)(nil), // 2: agent.v1.TextFiles - (*Ping)(nil), // 3: agent.v1.Ping - (*Pong)(nil), // 4: agent.v1.Pong - (*QANCollectRequest)(nil), // 5: agent.v1.QANCollectRequest - (*QANCollectResponse)(nil), // 6: agent.v1.QANCollectResponse - (*StateChangedRequest)(nil), // 7: agent.v1.StateChangedRequest - (*StateChangedResponse)(nil), // 8: agent.v1.StateChangedResponse - (*SetStateRequest)(nil), // 9: agent.v1.SetStateRequest - (*SetStateResponse)(nil), // 10: agent.v1.SetStateResponse - (*QueryActionValue)(nil), // 11: agent.v1.QueryActionValue - (*QueryActionSlice)(nil), // 12: agent.v1.QueryActionSlice - (*QueryActionMap)(nil), // 13: agent.v1.QueryActionMap - (*QueryActionBinary)(nil), // 14: agent.v1.QueryActionBinary - (*QueryActionResult)(nil), // 15: agent.v1.QueryActionResult - (*StartActionRequest)(nil), // 16: agent.v1.StartActionRequest - (*StartActionResponse)(nil), // 17: agent.v1.StartActionResponse - (*StopActionRequest)(nil), // 18: agent.v1.StopActionRequest - (*StopActionResponse)(nil), // 19: agent.v1.StopActionResponse - (*ActionResultRequest)(nil), // 20: agent.v1.ActionResultRequest - (*ActionResultResponse)(nil), // 21: agent.v1.ActionResultResponse - (*PBMSwitchPITRRequest)(nil), // 22: agent.v1.PBMSwitchPITRRequest - (*PBMSwitchPITRResponse)(nil), // 23: agent.v1.PBMSwitchPITRResponse - (*AgentLogsRequest)(nil), // 24: agent.v1.AgentLogsRequest - (*AgentLogsResponse)(nil), // 25: agent.v1.AgentLogsResponse - (*CheckConnectionRequest)(nil), // 26: agent.v1.CheckConnectionRequest - (*CheckConnectionResponse)(nil), // 27: agent.v1.CheckConnectionResponse - (*ServiceInfoRequest)(nil), // 28: agent.v1.ServiceInfoRequest - (*ServiceInfoResponse)(nil), // 29: agent.v1.ServiceInfoResponse - (*JobStatusRequest)(nil), // 30: agent.v1.JobStatusRequest - (*JobStatusResponse)(nil), // 31: agent.v1.JobStatusResponse - (*S3LocationConfig)(nil), // 32: agent.v1.S3LocationConfig - (*FilesystemLocationConfig)(nil), // 33: agent.v1.FilesystemLocationConfig - (*StartJobRequest)(nil), // 34: agent.v1.StartJobRequest - (*StartJobResponse)(nil), // 35: agent.v1.StartJobResponse - (*StopJobRequest)(nil), // 36: agent.v1.StopJobRequest - (*StopJobResponse)(nil), // 37: agent.v1.StopJobResponse - (*JobResult)(nil), // 38: agent.v1.JobResult - (*JobProgress)(nil), // 39: agent.v1.JobProgress - (*GetVersionsRequest)(nil), // 40: agent.v1.GetVersionsRequest - (*GetVersionsResponse)(nil), // 41: agent.v1.GetVersionsResponse - (*AgentMessage)(nil), // 42: agent.v1.AgentMessage - (*ServerMessage)(nil), // 43: agent.v1.ServerMessage - nil, // 44: agent.v1.TextFiles.FilesEntry - (*SetStateRequest_AgentProcess)(nil), // 45: agent.v1.SetStateRequest.AgentProcess - nil, // 46: agent.v1.SetStateRequest.AgentProcessesEntry - (*SetStateRequest_BuiltinAgent)(nil), // 47: agent.v1.SetStateRequest.BuiltinAgent - nil, // 48: agent.v1.SetStateRequest.BuiltinAgentsEntry - nil, // 49: agent.v1.SetStateRequest.AgentProcess.TextFilesEntry - nil, // 50: agent.v1.QueryActionMap.MapEntry - (*StartActionRequest_MySQLExplainParams)(nil), // 51: agent.v1.StartActionRequest.MySQLExplainParams - (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 52: agent.v1.StartActionRequest.MySQLShowCreateTableParams - (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 53: agent.v1.StartActionRequest.MySQLShowTableStatusParams - (*StartActionRequest_MySQLShowIndexParams)(nil), // 54: agent.v1.StartActionRequest.MySQLShowIndexParams - (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 55: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams - (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 56: agent.v1.StartActionRequest.PostgreSQLShowIndexParams - (*StartActionRequest_MongoDBExplainParams)(nil), // 57: agent.v1.StartActionRequest.MongoDBExplainParams - (*StartActionRequest_PTSummaryParams)(nil), // 58: agent.v1.StartActionRequest.PTSummaryParams - (*StartActionRequest_PTPgSummaryParams)(nil), // 59: agent.v1.StartActionRequest.PTPgSummaryParams - (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 60: agent.v1.StartActionRequest.PTMongoDBSummaryParams - (*StartActionRequest_PTMySQLSummaryParams)(nil), // 61: agent.v1.StartActionRequest.PTMySQLSummaryParams - (*StartActionRequest_MySQLQueryShowParams)(nil), // 62: agent.v1.StartActionRequest.MySQLQueryShowParams - (*StartActionRequest_MySQLQuerySelectParams)(nil), // 63: agent.v1.StartActionRequest.MySQLQuerySelectParams - (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 64: agent.v1.StartActionRequest.PostgreSQLQueryShowParams - (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 65: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams - (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 66: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams - (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 67: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams - (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 68: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 69: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams - (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 70: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams - (*StartActionRequest_RestartSystemServiceParams)(nil), // 71: agent.v1.StartActionRequest.RestartSystemServiceParams - (*CheckConnectionResponse_Stats)(nil), // 72: agent.v1.CheckConnectionResponse.Stats - (*StartJobRequest_MySQLBackup)(nil), // 73: agent.v1.StartJobRequest.MySQLBackup - (*StartJobRequest_MySQLRestoreBackup)(nil), // 74: agent.v1.StartJobRequest.MySQLRestoreBackup - (*StartJobRequest_MongoDBBackup)(nil), // 75: agent.v1.StartJobRequest.MongoDBBackup - (*StartJobRequest_MongoDBRestoreBackup)(nil), // 76: agent.v1.StartJobRequest.MongoDBRestoreBackup - (*JobResult_Error)(nil), // 77: agent.v1.JobResult.Error - (*JobResult_MongoDBBackup)(nil), // 78: agent.v1.JobResult.MongoDBBackup - (*JobResult_MySQLBackup)(nil), // 79: agent.v1.JobResult.MySQLBackup - (*JobResult_MySQLRestoreBackup)(nil), // 80: agent.v1.JobResult.MySQLRestoreBackup - (*JobResult_MongoDBRestoreBackup)(nil), // 81: agent.v1.JobResult.MongoDBRestoreBackup - (*JobProgress_MySQLBackup)(nil), // 82: agent.v1.JobProgress.MySQLBackup - (*JobProgress_MySQLRestoreBackup)(nil), // 83: agent.v1.JobProgress.MySQLRestoreBackup - (*JobProgress_Logs)(nil), // 84: agent.v1.JobProgress.Logs - (*GetVersionsRequest_MySQLd)(nil), // 85: agent.v1.GetVersionsRequest.MySQLd - (*GetVersionsRequest_Xtrabackup)(nil), // 86: agent.v1.GetVersionsRequest.Xtrabackup - (*GetVersionsRequest_Xbcloud)(nil), // 87: agent.v1.GetVersionsRequest.Xbcloud - (*GetVersionsRequest_Qpress)(nil), // 88: agent.v1.GetVersionsRequest.Qpress - (*GetVersionsRequest_MongoDB)(nil), // 89: agent.v1.GetVersionsRequest.MongoDB - (*GetVersionsRequest_PBM)(nil), // 90: agent.v1.GetVersionsRequest.PBM - (*GetVersionsRequest_Software)(nil), // 91: agent.v1.GetVersionsRequest.Software - (*GetVersionsResponse_Version)(nil), // 92: agent.v1.GetVersionsResponse.Version - (*timestamppb.Timestamp)(nil), // 93: google.protobuf.Timestamp - (*MetricsBucket)(nil), // 94: agent.v1.MetricsBucket - (v1.AgentStatus)(0), // 95: inventory.v1.AgentStatus - (*durationpb.Duration)(nil), // 96: google.protobuf.Duration - (v1.ServiceType)(0), // 97: inventory.v1.ServiceType - (*status.Status)(nil), // 98: google.rpc.Status - (v1.AgentType)(0), // 99: inventory.v1.AgentType - (v11.DataModel)(0), // 100: backup.v1.DataModel - (*v11.PbmMetadata)(nil), // 101: backup.v1.PbmMetadata - (*v11.Metadata)(nil), // 102: backup.v1.Metadata -} +var ( + file_agent_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 91) + file_agent_v1_agent_proto_goTypes = []any{ + (MysqlExplainOutputFormat)(0), // 0: agent.v1.MysqlExplainOutputFormat + (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService + (*TextFiles)(nil), // 2: agent.v1.TextFiles + (*Ping)(nil), // 3: agent.v1.Ping + (*Pong)(nil), // 4: agent.v1.Pong + (*QANCollectRequest)(nil), // 5: agent.v1.QANCollectRequest + (*QANCollectResponse)(nil), // 6: agent.v1.QANCollectResponse + (*StateChangedRequest)(nil), // 7: agent.v1.StateChangedRequest + (*StateChangedResponse)(nil), // 8: agent.v1.StateChangedResponse + (*SetStateRequest)(nil), // 9: agent.v1.SetStateRequest + (*SetStateResponse)(nil), // 10: agent.v1.SetStateResponse + (*QueryActionValue)(nil), // 11: agent.v1.QueryActionValue + (*QueryActionSlice)(nil), // 12: agent.v1.QueryActionSlice + (*QueryActionMap)(nil), // 13: agent.v1.QueryActionMap + (*QueryActionBinary)(nil), // 14: agent.v1.QueryActionBinary + (*QueryActionResult)(nil), // 15: agent.v1.QueryActionResult + (*StartActionRequest)(nil), // 16: agent.v1.StartActionRequest + (*StartActionResponse)(nil), // 17: agent.v1.StartActionResponse + (*StopActionRequest)(nil), // 18: agent.v1.StopActionRequest + (*StopActionResponse)(nil), // 19: agent.v1.StopActionResponse + (*ActionResultRequest)(nil), // 20: agent.v1.ActionResultRequest + (*ActionResultResponse)(nil), // 21: agent.v1.ActionResultResponse + (*PBMSwitchPITRRequest)(nil), // 22: agent.v1.PBMSwitchPITRRequest + (*PBMSwitchPITRResponse)(nil), // 23: agent.v1.PBMSwitchPITRResponse + (*AgentLogsRequest)(nil), // 24: agent.v1.AgentLogsRequest + (*AgentLogsResponse)(nil), // 25: agent.v1.AgentLogsResponse + (*CheckConnectionRequest)(nil), // 26: agent.v1.CheckConnectionRequest + (*CheckConnectionResponse)(nil), // 27: agent.v1.CheckConnectionResponse + (*ServiceInfoRequest)(nil), // 28: agent.v1.ServiceInfoRequest + (*ServiceInfoResponse)(nil), // 29: agent.v1.ServiceInfoResponse + (*JobStatusRequest)(nil), // 30: agent.v1.JobStatusRequest + (*JobStatusResponse)(nil), // 31: agent.v1.JobStatusResponse + (*S3LocationConfig)(nil), // 32: agent.v1.S3LocationConfig + (*FilesystemLocationConfig)(nil), // 33: agent.v1.FilesystemLocationConfig + (*StartJobRequest)(nil), // 34: agent.v1.StartJobRequest + (*StartJobResponse)(nil), // 35: agent.v1.StartJobResponse + (*StopJobRequest)(nil), // 36: agent.v1.StopJobRequest + (*StopJobResponse)(nil), // 37: agent.v1.StopJobResponse + (*JobResult)(nil), // 38: agent.v1.JobResult + (*JobProgress)(nil), // 39: agent.v1.JobProgress + (*GetVersionsRequest)(nil), // 40: agent.v1.GetVersionsRequest + (*GetVersionsResponse)(nil), // 41: agent.v1.GetVersionsResponse + (*AgentMessage)(nil), // 42: agent.v1.AgentMessage + (*ServerMessage)(nil), // 43: agent.v1.ServerMessage + nil, // 44: agent.v1.TextFiles.FilesEntry + (*SetStateRequest_AgentProcess)(nil), // 45: agent.v1.SetStateRequest.AgentProcess + nil, // 46: agent.v1.SetStateRequest.AgentProcessesEntry + (*SetStateRequest_BuiltinAgent)(nil), // 47: agent.v1.SetStateRequest.BuiltinAgent + nil, // 48: agent.v1.SetStateRequest.BuiltinAgentsEntry + nil, // 49: agent.v1.SetStateRequest.AgentProcess.TextFilesEntry + nil, // 50: agent.v1.QueryActionMap.MapEntry + (*StartActionRequest_MySQLExplainParams)(nil), // 51: agent.v1.StartActionRequest.MySQLExplainParams + (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 52: agent.v1.StartActionRequest.MySQLShowCreateTableParams + (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 53: agent.v1.StartActionRequest.MySQLShowTableStatusParams + (*StartActionRequest_MySQLShowIndexParams)(nil), // 54: agent.v1.StartActionRequest.MySQLShowIndexParams + (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 55: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams + (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 56: agent.v1.StartActionRequest.PostgreSQLShowIndexParams + (*StartActionRequest_MongoDBExplainParams)(nil), // 57: agent.v1.StartActionRequest.MongoDBExplainParams + (*StartActionRequest_PTSummaryParams)(nil), // 58: agent.v1.StartActionRequest.PTSummaryParams + (*StartActionRequest_PTPgSummaryParams)(nil), // 59: agent.v1.StartActionRequest.PTPgSummaryParams + (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 60: agent.v1.StartActionRequest.PTMongoDBSummaryParams + (*StartActionRequest_PTMySQLSummaryParams)(nil), // 61: agent.v1.StartActionRequest.PTMySQLSummaryParams + (*StartActionRequest_MySQLQueryShowParams)(nil), // 62: agent.v1.StartActionRequest.MySQLQueryShowParams + (*StartActionRequest_MySQLQuerySelectParams)(nil), // 63: agent.v1.StartActionRequest.MySQLQuerySelectParams + (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 64: agent.v1.StartActionRequest.PostgreSQLQueryShowParams + (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 65: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams + (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 66: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams + (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 67: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams + (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 68: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 69: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams + (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 70: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams + (*StartActionRequest_RestartSystemServiceParams)(nil), // 71: agent.v1.StartActionRequest.RestartSystemServiceParams + (*CheckConnectionResponse_Stats)(nil), // 72: agent.v1.CheckConnectionResponse.Stats + (*StartJobRequest_MySQLBackup)(nil), // 73: agent.v1.StartJobRequest.MySQLBackup + (*StartJobRequest_MySQLRestoreBackup)(nil), // 74: agent.v1.StartJobRequest.MySQLRestoreBackup + (*StartJobRequest_MongoDBBackup)(nil), // 75: agent.v1.StartJobRequest.MongoDBBackup + (*StartJobRequest_MongoDBRestoreBackup)(nil), // 76: agent.v1.StartJobRequest.MongoDBRestoreBackup + (*JobResult_Error)(nil), // 77: agent.v1.JobResult.Error + (*JobResult_MongoDBBackup)(nil), // 78: agent.v1.JobResult.MongoDBBackup + (*JobResult_MySQLBackup)(nil), // 79: agent.v1.JobResult.MySQLBackup + (*JobResult_MySQLRestoreBackup)(nil), // 80: agent.v1.JobResult.MySQLRestoreBackup + (*JobResult_MongoDBRestoreBackup)(nil), // 81: agent.v1.JobResult.MongoDBRestoreBackup + (*JobProgress_MySQLBackup)(nil), // 82: agent.v1.JobProgress.MySQLBackup + (*JobProgress_MySQLRestoreBackup)(nil), // 83: agent.v1.JobProgress.MySQLRestoreBackup + (*JobProgress_Logs)(nil), // 84: agent.v1.JobProgress.Logs + (*GetVersionsRequest_MySQLd)(nil), // 85: agent.v1.GetVersionsRequest.MySQLd + (*GetVersionsRequest_Xtrabackup)(nil), // 86: agent.v1.GetVersionsRequest.Xtrabackup + (*GetVersionsRequest_Xbcloud)(nil), // 87: agent.v1.GetVersionsRequest.Xbcloud + (*GetVersionsRequest_Qpress)(nil), // 88: agent.v1.GetVersionsRequest.Qpress + (*GetVersionsRequest_MongoDB)(nil), // 89: agent.v1.GetVersionsRequest.MongoDB + (*GetVersionsRequest_PBM)(nil), // 90: agent.v1.GetVersionsRequest.PBM + (*GetVersionsRequest_Software)(nil), // 91: agent.v1.GetVersionsRequest.Software + (*GetVersionsResponse_Version)(nil), // 92: agent.v1.GetVersionsResponse.Version + (*timestamppb.Timestamp)(nil), // 93: google.protobuf.Timestamp + (*MetricsBucket)(nil), // 94: agent.v1.MetricsBucket + (v1.AgentStatus)(0), // 95: inventory.v1.AgentStatus + (*durationpb.Duration)(nil), // 96: google.protobuf.Duration + (v1.ServiceType)(0), // 97: inventory.v1.ServiceType + (*status.Status)(nil), // 98: google.rpc.Status + (v1.AgentType)(0), // 99: inventory.v1.AgentType + (v11.DataModel)(0), // 100: backup.v1.DataModel + (*v11.PbmMetadata)(nil), // 101: backup.v1.PbmMetadata + (*v11.Metadata)(nil), // 102: backup.v1.Metadata + } +) + var file_agent_v1_agent_proto_depIdxs = []int32{ 44, // 0: agent.v1.TextFiles.files:type_name -> agent.v1.TextFiles.FilesEntry 93, // 1: agent.v1.Pong.current_time:type_name -> google.protobuf.Timestamp diff --git a/api/agent/v1/agent.pb.validate.go b/api/agent/v1/agent.pb.validate.go index e54b957d64..a6fb4bda41 100644 --- a/api/agent/v1/agent.pb.validate.go +++ b/api/agent/v1/agent.pb.validate.go @@ -19,7 +19,6 @@ import ( "google.golang.org/protobuf/types/known/anypb" backupv1 "github.com/percona/pmm/api/backup/v1" - inventoryv1 "github.com/percona/pmm/api/inventory/v1" ) diff --git a/api/agent/v1/agent_grpc.pb.go b/api/agent/v1/agent_grpc.pb.go index b0b67a591b..7b0cdc51b8 100644 --- a/api/agent/v1/agent_grpc.pb.go +++ b/api/agent/v1/agent_grpc.pb.go @@ -8,6 +8,7 @@ package agentv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/agent/v1/collector.pb.go b/api/agent/v1/collector.pb.go index 41a7cb1ea3..48b83564be 100644 --- a/api/agent/v1/collector.pb.go +++ b/api/agent/v1/collector.pb.go @@ -7,11 +7,13 @@ package agentv1 import ( - v1 "github.com/percona/pmm/api/inventory/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -2803,20 +2805,23 @@ func file_agent_v1_collector_proto_rawDescGZIP() []byte { return file_agent_v1_collector_proto_rawDescData } -var file_agent_v1_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_agent_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_agent_v1_collector_proto_goTypes = []any{ - (ExampleType)(0), // 0: agent.v1.ExampleType - (*MetricsBucket)(nil), // 1: agent.v1.MetricsBucket - (*HistogramItem)(nil), // 2: agent.v1.HistogramItem - (*MetricsBucket_Common)(nil), // 3: agent.v1.MetricsBucket.Common - (*MetricsBucket_MySQL)(nil), // 4: agent.v1.MetricsBucket.MySQL - (*MetricsBucket_MongoDB)(nil), // 5: agent.v1.MetricsBucket.MongoDB - (*MetricsBucket_PostgreSQL)(nil), // 6: agent.v1.MetricsBucket.PostgreSQL - nil, // 7: agent.v1.MetricsBucket.Common.CommentsEntry - nil, // 8: agent.v1.MetricsBucket.Common.ErrorsEntry - (v1.AgentType)(0), // 9: inventory.v1.AgentType -} +var ( + file_agent_v1_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_agent_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) + file_agent_v1_collector_proto_goTypes = []any{ + (ExampleType)(0), // 0: agent.v1.ExampleType + (*MetricsBucket)(nil), // 1: agent.v1.MetricsBucket + (*HistogramItem)(nil), // 2: agent.v1.HistogramItem + (*MetricsBucket_Common)(nil), // 3: agent.v1.MetricsBucket.Common + (*MetricsBucket_MySQL)(nil), // 4: agent.v1.MetricsBucket.MySQL + (*MetricsBucket_MongoDB)(nil), // 5: agent.v1.MetricsBucket.MongoDB + (*MetricsBucket_PostgreSQL)(nil), // 6: agent.v1.MetricsBucket.PostgreSQL + nil, // 7: agent.v1.MetricsBucket.Common.CommentsEntry + nil, // 8: agent.v1.MetricsBucket.Common.ErrorsEntry + (v1.AgentType)(0), // 9: inventory.v1.AgentType + } +) + var file_agent_v1_collector_proto_depIdxs = []int32{ 3, // 0: agent.v1.MetricsBucket.common:type_name -> agent.v1.MetricsBucket.Common 4, // 1: agent.v1.MetricsBucket.mysql:type_name -> agent.v1.MetricsBucket.MySQL diff --git a/api/agentlocal/v1/agentlocal.pb.go b/api/agentlocal/v1/agentlocal.pb.go index a2a1bc0ef9..c8bc022a48 100644 --- a/api/agentlocal/v1/agentlocal.pb.go +++ b/api/agentlocal/v1/agentlocal.pb.go @@ -7,13 +7,15 @@ package agentlocalv1 import ( - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -247,7 +249,7 @@ type StatusResponse struct { unknownFields protoimpl.UnknownFields AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` - RunsOnNodeId string `protobuf:"bytes,2,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` //TODO: rename to node_id + RunsOnNodeId string `protobuf:"bytes,2,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` // TODO: rename to node_id NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` ServerInfo *ServerInfo `protobuf:"bytes,4,opt,name=server_info,json=serverInfo,proto3" json:"server_info,omitempty"` AgentsInfo []*AgentInfo `protobuf:"bytes,5,rep,name=agents_info,json=agentsInfo,proto3" json:"agents_info,omitempty"` @@ -529,18 +531,21 @@ func file_agentlocal_v1_agentlocal_proto_rawDescGZIP() []byte { return file_agentlocal_v1_agentlocal_proto_rawDescData } -var file_agentlocal_v1_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_agentlocal_v1_agentlocal_proto_goTypes = []any{ - (*ServerInfo)(nil), // 0: agentlocal.v1.ServerInfo - (*AgentInfo)(nil), // 1: agentlocal.v1.AgentInfo - (*StatusRequest)(nil), // 2: agentlocal.v1.StatusRequest - (*StatusResponse)(nil), // 3: agentlocal.v1.StatusResponse - (*ReloadRequest)(nil), // 4: agentlocal.v1.ReloadRequest - (*ReloadResponse)(nil), // 5: agentlocal.v1.ReloadResponse - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration - (v1.AgentType)(0), // 7: inventory.v1.AgentType - (v1.AgentStatus)(0), // 8: inventory.v1.AgentStatus -} +var ( + file_agentlocal_v1_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_agentlocal_v1_agentlocal_proto_goTypes = []any{ + (*ServerInfo)(nil), // 0: agentlocal.v1.ServerInfo + (*AgentInfo)(nil), // 1: agentlocal.v1.AgentInfo + (*StatusRequest)(nil), // 2: agentlocal.v1.StatusRequest + (*StatusResponse)(nil), // 3: agentlocal.v1.StatusResponse + (*ReloadRequest)(nil), // 4: agentlocal.v1.ReloadRequest + (*ReloadResponse)(nil), // 5: agentlocal.v1.ReloadResponse + (*durationpb.Duration)(nil), // 6: google.protobuf.Duration + (v1.AgentType)(0), // 7: inventory.v1.AgentType + (v1.AgentStatus)(0), // 8: inventory.v1.AgentStatus + } +) + var file_agentlocal_v1_agentlocal_proto_depIdxs = []int32{ 6, // 0: agentlocal.v1.ServerInfo.latency:type_name -> google.protobuf.Duration 6, // 1: agentlocal.v1.ServerInfo.clock_drift:type_name -> google.protobuf.Duration diff --git a/api/agentlocal/v1/agentlocal.pb.gw.go b/api/agentlocal/v1/agentlocal.pb.gw.go index 3fba88ed36..f8795a8ff4 100644 --- a/api/agentlocal/v1/agentlocal.pb.gw.go +++ b/api/agentlocal/v1/agentlocal.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_AgentLocalService_Status_0(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StatusRequest @@ -41,7 +43,6 @@ func request_AgentLocalService_Status_0(ctx context.Context, marshaler runtime.M msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentLocalService_Status_0(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -54,12 +55,9 @@ func local_request_AgentLocalService_Status_0(ctx context.Context, marshaler run msg, err := server.Status(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_AgentLocalService_Status_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_AgentLocalService_Status_1 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_AgentLocalService_Status_1(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StatusRequest @@ -74,7 +72,6 @@ func request_AgentLocalService_Status_1(ctx context.Context, marshaler runtime.M msg, err := client.Status(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentLocalService_Status_1(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -90,7 +87,6 @@ func local_request_AgentLocalService_Status_1(ctx context.Context, marshaler run msg, err := server.Status(ctx, &protoReq) return msg, metadata, err - } func request_AgentLocalService_Reload_0(ctx context.Context, marshaler runtime.Marshaler, client AgentLocalServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -103,7 +99,6 @@ func request_AgentLocalService_Reload_0(ctx context.Context, marshaler runtime.M msg, err := client.Reload(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentLocalService_Reload_0(ctx context.Context, marshaler runtime.Marshaler, server AgentLocalServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,7 +111,6 @@ func local_request_AgentLocalService_Reload_0(ctx context.Context, marshaler run msg, err := server.Reload(ctx, &protoReq) return msg, metadata, err - } // RegisterAgentLocalServiceHandlerServer registers the http handlers for service AgentLocalService to "mux". @@ -125,7 +119,6 @@ func local_request_AgentLocalService_Reload_0(ctx context.Context, marshaler run // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentLocalServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentLocalServiceServer) error { - mux.Handle("POST", pattern_AgentLocalService_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -148,7 +141,6 @@ func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AgentLocalService_Status_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -173,7 +165,6 @@ func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Status_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AgentLocalService_Reload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -198,7 +189,6 @@ func RegisterAgentLocalServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Reload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -241,7 +231,6 @@ func RegisterAgentLocalServiceHandler(ctx context.Context, mux *runtime.ServeMux // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentLocalServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentLocalServiceClient) error { - mux.Handle("POST", pattern_AgentLocalService_Status_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -261,7 +250,6 @@ func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Status_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AgentLocalService_Status_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -283,7 +271,6 @@ func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Status_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AgentLocalService_Reload_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -305,7 +292,6 @@ func RegisterAgentLocalServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_AgentLocalService_Reload_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/agentlocal/v1/agentlocal_grpc.pb.go b/api/agentlocal/v1/agentlocal_grpc.pb.go index 9f965320fe..caaffdd9ea 100644 --- a/api/agentlocal/v1/agentlocal_grpc.pb.go +++ b/api/agentlocal/v1/agentlocal_grpc.pb.go @@ -8,6 +8,7 @@ package agentlocalv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -86,6 +87,7 @@ type UnimplementedAgentLocalServiceServer struct{} func (UnimplementedAgentLocalServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") } + func (UnimplementedAgentLocalServiceServer) Reload(context.Context, *ReloadRequest) (*ReloadResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Reload not implemented") } diff --git a/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go index 86815ac806..5869239735 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go @@ -60,7 +60,6 @@ ReloadParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ReloadParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ReloadParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ReloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go b/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go index 129dd918aa..50b09a75b1 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go @@ -103,7 +103,6 @@ func (o *ReloadOK) GetPayload() interface{} { } func (o *ReloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *ReloadDefault) GetPayload() *ReloadDefaultBody { } func (o *ReloadDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ReloadDefaultBody) // response payload @@ -191,7 +189,6 @@ ReloadDefaultBody reload default body swagger:model ReloadDefaultBody */ type ReloadDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *ReloadDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -304,7 +298,6 @@ ReloadDefaultBodyDetailsItems0 reload default body details items0 swagger:model ReloadDefaultBodyDetailsItems0 */ type ReloadDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type ReloadDefaultBodyDetailsItems0 struct { func (o *ReloadDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *ReloadDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ReloadDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go index e1a0f18fb7..220d4c5bba 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go @@ -61,7 +61,6 @@ Status2Params contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type Status2Params struct { - /* GetNetworkInfo. Returns network info (latency and clock_drift) if true. @@ -134,7 +133,6 @@ func (o *Status2Params) SetGetNetworkInfo(getNetworkInfo *bool) { // WriteToRequest writes these params to a swagger request func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -150,7 +148,6 @@ func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qGetNetworkInfo := swag.FormatBool(qrGetNetworkInfo) if qGetNetworkInfo != "" { - if err := r.SetQueryParam("get_network_info", qGetNetworkInfo); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go b/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go index 4ca25a86a3..fe7d34ef26 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go @@ -104,7 +104,6 @@ func (o *Status2OK) GetPayload() *Status2OKBody { } func (o *Status2OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(Status2OKBody) // response payload @@ -178,7 +177,6 @@ func (o *Status2Default) GetPayload() *Status2DefaultBody { } func (o *Status2Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(Status2DefaultBody) // response payload @@ -194,7 +192,6 @@ Status2DefaultBody status2 default body swagger:model Status2DefaultBody */ type Status2DefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *Status2DefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -307,7 +301,6 @@ Status2DefaultBodyDetailsItems0 status2 default body details items0 swagger:model Status2DefaultBodyDetailsItems0 */ type Status2DefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type Status2DefaultBodyDetailsItems0 struct { func (o *Status2DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *Status2DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o Status2DefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ Status2OKBody status2 OK body swagger:model Status2OKBody */ type Status2OKBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -529,9 +519,7 @@ func (o *Status2OKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AgentsInfo); i++ { - if o.AgentsInfo[i] != nil { if swag.IsZero(o.AgentsInfo[i]) { // not required @@ -547,14 +535,12 @@ func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats s return err } } - } return nil } func (o *Status2OKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { - if o.ServerInfo != nil { if swag.IsZero(o.ServerInfo) { // not required @@ -597,7 +583,6 @@ Status2OKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model Status2OKBodyAgentsInfoItems0 */ type Status2OKBodyAgentsInfoItems0 struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -818,7 +803,6 @@ Status2OKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model Status2OKBodyServerInfo */ type Status2OKBodyServerInfo struct { - // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go index 56301866cc..f522c46829 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go @@ -60,7 +60,6 @@ StatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StatusParams struct { - // Body. Body StatusBody @@ -130,7 +129,6 @@ func (o *StatusParams) SetBody(body StatusBody) { // WriteToRequest writes these params to a swagger request func (o *StatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status_responses.go b/api/agentlocal/v1/json/client/agent_local_service/status_responses.go index 3629f9e9bc..aa335f6d48 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status_responses.go @@ -104,7 +104,6 @@ func (o *StatusOK) GetPayload() *StatusOKBody { } func (o *StatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StatusOKBody) // response payload @@ -178,7 +177,6 @@ func (o *StatusDefault) GetPayload() *StatusDefaultBody { } func (o *StatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StatusDefaultBody) // response payload @@ -194,7 +192,6 @@ StatusBody status body swagger:model StatusBody */ type StatusBody struct { - // Returns network info (latency and clock_drift) if true. GetNetworkInfo bool `json:"get_network_info,omitempty"` } @@ -232,7 +229,6 @@ StatusDefaultBody status default body swagger:model StatusDefaultBody */ type StatusDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -298,9 +294,7 @@ func (o *StatusDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,7 +310,6 @@ func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -345,7 +338,6 @@ StatusDefaultBodyDetailsItems0 status default body details items0 swagger:model StatusDefaultBodyDetailsItems0 */ type StatusDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -357,7 +349,6 @@ type StatusDefaultBodyDetailsItems0 struct { func (o *StatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -395,7 +386,6 @@ func (o *StatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -459,7 +449,6 @@ StatusOKBody status OK body swagger:model StatusOKBody */ type StatusOKBody struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -567,9 +556,7 @@ func (o *StatusOKBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AgentsInfo); i++ { - if o.AgentsInfo[i] != nil { if swag.IsZero(o.AgentsInfo[i]) { // not required @@ -585,14 +572,12 @@ func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats st return err } } - } return nil } func (o *StatusOKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { - if o.ServerInfo != nil { if swag.IsZero(o.ServerInfo) { // not required @@ -635,7 +620,6 @@ StatusOKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model StatusOKBodyAgentsInfoItems0 */ type StatusOKBodyAgentsInfoItems0 struct { - // agent id AgentID string `json:"agent_id,omitempty"` @@ -856,7 +840,6 @@ StatusOKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model StatusOKBodyServerInfo */ type StatusOKBodyServerInfo struct { - // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/alerting/v1/alerting.pb.go b/api/alerting/v1/alerting.pb.go index ff9e34ce4f..5d599a55c2 100644 --- a/api/alerting/v1/alerting.pb.go +++ b/api/alerting/v1/alerting.pb.go @@ -7,15 +7,17 @@ package alertingv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/management/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/management/v1" ) const ( @@ -1552,37 +1554,40 @@ func file_alerting_v1_alerting_proto_rawDescGZIP() []byte { return file_alerting_v1_alerting_proto_rawDescData } -var file_alerting_v1_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_alerting_v1_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) -var file_alerting_v1_alerting_proto_goTypes = []any{ - (TemplateSource)(0), // 0: alerting.v1.TemplateSource - (FilterType)(0), // 1: alerting.v1.FilterType - (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition - (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition - (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition - (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition - (*Template)(nil), // 6: alerting.v1.Template - (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest - (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse - (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest - (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse - (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest - (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse - (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest - (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse - (*Filter)(nil), // 15: alerting.v1.Filter - (*ParamValue)(nil), // 16: alerting.v1.ParamValue - (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest - (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse - nil, // 19: alerting.v1.Template.LabelsEntry - nil, // 20: alerting.v1.Template.AnnotationsEntry - nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry - (ParamUnit)(0), // 22: alerting.v1.ParamUnit - (ParamType)(0), // 23: alerting.v1.ParamType - (*durationpb.Duration)(nil), // 24: google.protobuf.Duration - (v1.Severity)(0), // 25: management.v1.Severity - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp -} +var ( + file_alerting_v1_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_alerting_v1_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) + file_alerting_v1_alerting_proto_goTypes = []any{ + (TemplateSource)(0), // 0: alerting.v1.TemplateSource + (FilterType)(0), // 1: alerting.v1.FilterType + (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition + (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition + (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition + (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition + (*Template)(nil), // 6: alerting.v1.Template + (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest + (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse + (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest + (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse + (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest + (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse + (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest + (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse + (*Filter)(nil), // 15: alerting.v1.Filter + (*ParamValue)(nil), // 16: alerting.v1.ParamValue + (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest + (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse + nil, // 19: alerting.v1.Template.LabelsEntry + nil, // 20: alerting.v1.Template.AnnotationsEntry + nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry + (ParamUnit)(0), // 22: alerting.v1.ParamUnit + (ParamType)(0), // 23: alerting.v1.ParamType + (*durationpb.Duration)(nil), // 24: google.protobuf.Duration + (v1.Severity)(0), // 25: management.v1.Severity + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp + } +) + var file_alerting_v1_alerting_proto_depIdxs = []int32{ 22, // 0: alerting.v1.ParamDefinition.unit:type_name -> alerting.v1.ParamUnit 23, // 1: alerting.v1.ParamDefinition.type:type_name -> alerting.v1.ParamType diff --git a/api/alerting/v1/alerting.pb.gw.go b/api/alerting/v1/alerting.pb.gw.go index c139cb91a0..8edb3ca048 100644 --- a/api/alerting/v1/alerting.pb.gw.go +++ b/api/alerting/v1/alerting.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_AlertingService_ListTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) +var filter_AlertingService_ListTemplates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + func request_AlertingService_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListTemplatesRequest var metadata runtime.ServerMetadata @@ -48,7 +48,6 @@ func request_AlertingService_ListTemplates_0(ctx context.Context, marshaler runt msg, err := client.ListTemplates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AlertingService_ListTemplates_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -64,7 +63,6 @@ func local_request_AlertingService_ListTemplates_0(ctx context.Context, marshale msg, err := server.ListTemplates(ctx, &protoReq) return msg, metadata, err - } func request_AlertingService_CreateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -77,7 +75,6 @@ func request_AlertingService_CreateTemplate_0(ctx context.Context, marshaler run msg, err := client.CreateTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AlertingService_CreateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -90,7 +87,6 @@ func local_request_AlertingService_CreateTemplate_0(ctx context.Context, marshal msg, err := server.CreateTemplate(ctx, &protoReq) return msg, metadata, err - } func request_AlertingService_UpdateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -120,7 +116,6 @@ func request_AlertingService_UpdateTemplate_0(ctx context.Context, marshaler run msg, err := client.UpdateTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AlertingService_UpdateTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -150,7 +145,6 @@ func local_request_AlertingService_UpdateTemplate_0(ctx context.Context, marshal msg, err := server.UpdateTemplate(ctx, &protoReq) return msg, metadata, err - } func request_AlertingService_DeleteTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -176,7 +170,6 @@ func request_AlertingService_DeleteTemplate_0(ctx context.Context, marshaler run msg, err := client.DeleteTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AlertingService_DeleteTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -202,7 +195,6 @@ func local_request_AlertingService_DeleteTemplate_0(ctx context.Context, marshal msg, err := server.DeleteTemplate(ctx, &protoReq) return msg, metadata, err - } func request_AlertingService_CreateRule_0(ctx context.Context, marshaler runtime.Marshaler, client AlertingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_AlertingService_CreateRule_0(ctx context.Context, marshaler runtime msg, err := client.CreateRule(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AlertingService_CreateRule_0(ctx context.Context, marshaler runtime.Marshaler, server AlertingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -228,7 +219,6 @@ func local_request_AlertingService_CreateRule_0(ctx context.Context, marshaler r msg, err := server.CreateRule(ctx, &protoReq) return msg, metadata, err - } // RegisterAlertingServiceHandlerServer registers the http handlers for service AlertingService to "mux". @@ -237,7 +227,6 @@ func local_request_AlertingService_CreateRule_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAlertingServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertingServiceServer) error { - mux.Handle("GET", pattern_AlertingService_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -260,7 +249,6 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AlertingService_CreateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -285,7 +273,6 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_CreateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_AlertingService_UpdateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -310,7 +297,6 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_UpdateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_AlertingService_DeleteTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -335,7 +321,6 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_DeleteTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AlertingService_CreateRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -360,7 +345,6 @@ func RegisterAlertingServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_AlertingService_CreateRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -403,7 +387,6 @@ func RegisterAlertingServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AlertingServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertingServiceClient) error { - mux.Handle("GET", pattern_AlertingService_ListTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -423,7 +406,6 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_ListTemplates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AlertingService_CreateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -445,7 +427,6 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_CreateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_AlertingService_UpdateTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -467,7 +448,6 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_UpdateTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_AlertingService_DeleteTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -489,7 +469,6 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_DeleteTemplate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AlertingService_CreateRule_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -511,7 +490,6 @@ func RegisterAlertingServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_AlertingService_CreateRule_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/alerting/v1/alerting.pb.validate.go b/api/alerting/v1/alerting.pb.validate.go index 36cc3811bf..8c49e99a95 100644 --- a/api/alerting/v1/alerting.pb.validate.go +++ b/api/alerting/v1/alerting.pb.validate.go @@ -851,7 +851,6 @@ func (m *ListTemplatesRequest) validate(all bool) error { // no validation rules for Reload if m.PageSize != nil { - if m.GetPageSize() < 1 { err := ListTemplatesRequestValidationError{ field: "PageSize", @@ -862,11 +861,9 @@ func (m *ListTemplatesRequest) validate(all bool) error { } errors = append(errors, err) } - } if m.PageIndex != nil { - if m.GetPageIndex() < 0 { err := ListTemplatesRequestValidationError{ field: "PageIndex", @@ -877,7 +874,6 @@ func (m *ListTemplatesRequest) validate(all bool) error { } errors = append(errors, err) } - } if len(errors) > 0 { diff --git a/api/alerting/v1/alerting_grpc.pb.go b/api/alerting/v1/alerting_grpc.pb.go index cff5e646ff..94c17b63db 100644 --- a/api/alerting/v1/alerting_grpc.pb.go +++ b/api/alerting/v1/alerting_grpc.pb.go @@ -8,6 +8,7 @@ package alertingv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -131,15 +132,19 @@ type UnimplementedAlertingServiceServer struct{} func (UnimplementedAlertingServiceServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTemplates not implemented") } + func (UnimplementedAlertingServiceServer) CreateTemplate(context.Context, *CreateTemplateRequest) (*CreateTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTemplate not implemented") } + func (UnimplementedAlertingServiceServer) UpdateTemplate(context.Context, *UpdateTemplateRequest) (*UpdateTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateTemplate not implemented") } + func (UnimplementedAlertingServiceServer) DeleteTemplate(context.Context, *DeleteTemplateRequest) (*DeleteTemplateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTemplate not implemented") } + func (UnimplementedAlertingServiceServer) CreateRule(context.Context, *CreateRuleRequest) (*CreateRuleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateRule not implemented") } diff --git a/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go b/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go index dc970ceafc..d99404fc94 100644 --- a/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go @@ -60,7 +60,6 @@ CreateRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRuleParams struct { - // Body. Body CreateRuleBody @@ -130,7 +129,6 @@ func (o *CreateRuleParams) SetBody(body CreateRuleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/create_rule_responses.go b/api/alerting/v1/json/client/alerting_service/create_rule_responses.go index 550001ba20..e5f44dd29a 100644 --- a/api/alerting/v1/json/client/alerting_service/create_rule_responses.go +++ b/api/alerting/v1/json/client/alerting_service/create_rule_responses.go @@ -104,7 +104,6 @@ func (o *CreateRuleOK) GetPayload() interface{} { } func (o *CreateRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -176,7 +175,6 @@ func (o *CreateRuleDefault) GetPayload() *CreateRuleDefaultBody { } func (o *CreateRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateRuleDefaultBody) // response payload @@ -192,7 +190,6 @@ CreateRuleBody create rule body swagger:model CreateRuleBody */ type CreateRuleBody struct { - // Template name. TemplateName string `json:"template_name,omitempty"` @@ -381,9 +378,7 @@ func (o *CreateRuleBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -399,16 +394,13 @@ func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strf return err } } - } return nil } func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Filters); i++ { - if o.Filters[i] != nil { if swag.IsZero(o.Filters[i]) { // not required @@ -424,7 +416,6 @@ func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats str return err } } - } return nil @@ -453,7 +444,6 @@ CreateRuleDefaultBody create rule default body swagger:model CreateRuleDefaultBody */ type CreateRuleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -519,9 +509,7 @@ func (o *CreateRuleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -537,7 +525,6 @@ func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -566,7 +553,6 @@ CreateRuleDefaultBodyDetailsItems0 create rule default body details items0 swagger:model CreateRuleDefaultBodyDetailsItems0 */ type CreateRuleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -578,7 +564,6 @@ type CreateRuleDefaultBodyDetailsItems0 struct { func (o *CreateRuleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -616,7 +601,6 @@ func (o *CreateRuleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateRuleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -680,7 +664,6 @@ CreateRuleParamsBodyFiltersItems0 Filter represents a single filter condition. swagger:model CreateRuleParamsBodyFiltersItems0 */ type CreateRuleParamsBodyFiltersItems0 struct { - // FilterType represents filter matching type. // Enum: ["FILTER_TYPE_UNSPECIFIED","FILTER_TYPE_MATCH","FILTER_TYPE_MISMATCH"] Type *string `json:"type,omitempty"` @@ -779,7 +762,6 @@ CreateRuleParamsBodyParamsItems0 ParamValue represents a single rule parameter v swagger:model CreateRuleParamsBodyParamsItems0 */ type CreateRuleParamsBodyParamsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/alerting/v1/json/client/alerting_service/create_template_parameters.go b/api/alerting/v1/json/client/alerting_service/create_template_parameters.go index 266ab9b7c4..7af56c3584 100644 --- a/api/alerting/v1/json/client/alerting_service/create_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/create_template_parameters.go @@ -60,7 +60,6 @@ CreateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateTemplateParams struct { - // Body. Body CreateTemplateBody @@ -130,7 +129,6 @@ func (o *CreateTemplateParams) SetBody(body CreateTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *CreateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/create_template_responses.go b/api/alerting/v1/json/client/alerting_service/create_template_responses.go index 43f4a1fa3d..1c6b1a57ff 100644 --- a/api/alerting/v1/json/client/alerting_service/create_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/create_template_responses.go @@ -103,7 +103,6 @@ func (o *CreateTemplateOK) GetPayload() interface{} { } func (o *CreateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *CreateTemplateDefault) GetPayload() *CreateTemplateDefaultBody { } func (o *CreateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CreateTemplateDefaultBody) // response payload @@ -191,7 +189,6 @@ CreateTemplateBody create template body swagger:model CreateTemplateBody */ type CreateTemplateBody struct { - // YAML template file content. Yaml string `json:"yaml,omitempty"` } @@ -229,7 +226,6 @@ CreateTemplateDefaultBody create template default body swagger:model CreateTemplateDefaultBody */ type CreateTemplateDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -295,9 +291,7 @@ func (o *CreateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,7 +307,6 @@ func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -342,7 +335,6 @@ CreateTemplateDefaultBodyDetailsItems0 create template default body details item swagger:model CreateTemplateDefaultBodyDetailsItems0 */ type CreateTemplateDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -354,7 +346,6 @@ type CreateTemplateDefaultBodyDetailsItems0 struct { func (o *CreateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -392,7 +383,6 @@ func (o *CreateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go b/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go index 08d19304dc..12c5e9f70f 100644 --- a/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go @@ -60,7 +60,6 @@ DeleteTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteTemplateParams struct { - // Name. Name string @@ -130,7 +129,6 @@ func (o *DeleteTemplateParams) SetName(name string) { // WriteToRequest writes these params to a swagger request func (o *DeleteTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/delete_template_responses.go b/api/alerting/v1/json/client/alerting_service/delete_template_responses.go index ee1fc470a1..6dd0166a32 100644 --- a/api/alerting/v1/json/client/alerting_service/delete_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/delete_template_responses.go @@ -103,7 +103,6 @@ func (o *DeleteTemplateOK) GetPayload() interface{} { } func (o *DeleteTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *DeleteTemplateDefault) GetPayload() *DeleteTemplateDefaultBody { } func (o *DeleteTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteTemplateDefaultBody) // response payload @@ -191,7 +189,6 @@ DeleteTemplateDefaultBody delete template default body swagger:model DeleteTemplateDefaultBody */ type DeleteTemplateDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *DeleteTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -304,7 +298,6 @@ DeleteTemplateDefaultBodyDetailsItems0 delete template default body details item swagger:model DeleteTemplateDefaultBodyDetailsItems0 */ type DeleteTemplateDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type DeleteTemplateDefaultBodyDetailsItems0 struct { func (o *DeleteTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *DeleteTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go b/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go index a13fd2e40a..54f826721d 100644 --- a/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go @@ -61,7 +61,6 @@ ListTemplatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListTemplatesParams struct { - /* PageIndex. Index of the requested page, starts from 0. @@ -172,7 +171,6 @@ func (o *ListTemplatesParams) SetReload(reload *bool) { // WriteToRequest writes these params to a swagger request func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -188,7 +186,6 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qPageIndex := swag.FormatInt32(qrPageIndex) if qPageIndex != "" { - if err := r.SetQueryParam("page_index", qPageIndex); err != nil { return err } @@ -205,7 +202,6 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { - if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } @@ -222,7 +218,6 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qReload := swag.FormatBool(qrReload) if qReload != "" { - if err := r.SetQueryParam("reload", qReload); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/list_templates_responses.go b/api/alerting/v1/json/client/alerting_service/list_templates_responses.go index ad823f1a6f..3e74113148 100644 --- a/api/alerting/v1/json/client/alerting_service/list_templates_responses.go +++ b/api/alerting/v1/json/client/alerting_service/list_templates_responses.go @@ -104,7 +104,6 @@ func (o *ListTemplatesOK) GetPayload() *ListTemplatesOKBody { } func (o *ListTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListTemplatesOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListTemplatesDefault) GetPayload() *ListTemplatesDefaultBody { } func (o *ListTemplatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListTemplatesDefaultBody) // response payload @@ -194,7 +192,6 @@ ListTemplatesDefaultBody list templates default body swagger:model ListTemplatesDefaultBody */ type ListTemplatesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListTemplatesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -307,7 +301,6 @@ ListTemplatesDefaultBodyDetailsItems0 list templates default body details items0 swagger:model ListTemplatesDefaultBodyDetailsItems0 */ type ListTemplatesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListTemplatesDefaultBodyDetailsItems0 struct { func (o *ListTemplatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListTemplatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListTemplatesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListTemplatesOKBody list templates OK body swagger:model ListTemplatesOKBody */ type ListTemplatesOKBody struct { - // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -487,9 +477,7 @@ func (o *ListTemplatesOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Templates); i++ { - if o.Templates[i] != nil { if swag.IsZero(o.Templates[i]) { // not required @@ -505,7 +493,6 @@ func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, form return err } } - } return nil @@ -534,7 +521,6 @@ ListTemplatesOKBodyTemplatesItems0 Template represents Alert Template that is us swagger:model ListTemplatesOKBodyTemplatesItems0 */ type ListTemplatesOKBodyTemplatesItems0 struct { - // Machine-readable name (ID). Name string `json:"name,omitempty"` @@ -770,9 +756,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0) ContextValidate(ctx context.Context } func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Params); i++ { - if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -788,7 +772,6 @@ func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.C return err } } - } return nil @@ -817,7 +800,6 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0 ParamDefinition represents a sing swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0 */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0 struct { - // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -1049,7 +1031,6 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) ContextValidate(ctx con } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { - if o.Bool != nil { if swag.IsZero(o.Bool) { // not required @@ -1070,7 +1051,6 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { - if o.Float != nil { if swag.IsZero(o.Float) { // not required @@ -1091,7 +1071,6 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ct } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { - if o.String != nil { if swag.IsZero(o.String) { // not required @@ -1134,7 +1113,6 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool BoolParamDefinition represent swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool struct { - // default Default *bool `json:"default,omitempty"` } @@ -1172,7 +1150,6 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Float FloatParamDefinition represe swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Float */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Float struct { - // Default value. Default *float64 `json:"default,omitempty"` @@ -1216,7 +1193,6 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0String StringParamDefinition repre swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0String */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0String struct { - // Default value. Default *string `json:"default,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/update_template_parameters.go b/api/alerting/v1/json/client/alerting_service/update_template_parameters.go index 8d019495ca..531cd4e36b 100644 --- a/api/alerting/v1/json/client/alerting_service/update_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/update_template_parameters.go @@ -60,7 +60,6 @@ UpdateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateTemplateParams struct { - // Body. Body UpdateTemplateBody @@ -147,7 +146,6 @@ func (o *UpdateTemplateParams) SetName(name string) { // WriteToRequest writes these params to a swagger request func (o *UpdateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/update_template_responses.go b/api/alerting/v1/json/client/alerting_service/update_template_responses.go index df26f7b843..8bf605f957 100644 --- a/api/alerting/v1/json/client/alerting_service/update_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/update_template_responses.go @@ -103,7 +103,6 @@ func (o *UpdateTemplateOK) GetPayload() interface{} { } func (o *UpdateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *UpdateTemplateDefault) GetPayload() *UpdateTemplateDefaultBody { } func (o *UpdateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateTemplateDefaultBody) // response payload @@ -191,7 +189,6 @@ UpdateTemplateBody update template body swagger:model UpdateTemplateBody */ type UpdateTemplateBody struct { - // YAML template file content. Yaml string `json:"yaml,omitempty"` } @@ -229,7 +226,6 @@ UpdateTemplateDefaultBody update template default body swagger:model UpdateTemplateDefaultBody */ type UpdateTemplateDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -295,9 +291,7 @@ func (o *UpdateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,7 +307,6 @@ func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -342,7 +335,6 @@ UpdateTemplateDefaultBodyDetailsItems0 update template default body details item swagger:model UpdateTemplateDefaultBodyDetailsItems0 */ type UpdateTemplateDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -354,7 +346,6 @@ type UpdateTemplateDefaultBodyDetailsItems0 struct { func (o *UpdateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -392,7 +383,6 @@ func (o *UpdateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/params.pb.go b/api/alerting/v1/params.pb.go index 9b63baccfe..80c9f6c43d 100644 --- a/api/alerting/v1/params.pb.go +++ b/api/alerting/v1/params.pb.go @@ -7,10 +7,11 @@ package alertingv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -169,11 +170,14 @@ func file_alerting_v1_params_proto_rawDescGZIP() []byte { return file_alerting_v1_params_proto_rawDescData } -var file_alerting_v1_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_alerting_v1_params_proto_goTypes = []any{ - (ParamUnit)(0), // 0: alerting.v1.ParamUnit - (ParamType)(0), // 1: alerting.v1.ParamType -} +var ( + file_alerting_v1_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_alerting_v1_params_proto_goTypes = []any{ + (ParamUnit)(0), // 0: alerting.v1.ParamUnit + (ParamType)(0), // 1: alerting.v1.ParamType + } +) + var file_alerting_v1_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/backup/v1/artifacts.pb.go b/api/backup/v1/artifacts.pb.go index 5cc4187f30..0d5056a189 100644 --- a/api/backup/v1/artifacts.pb.go +++ b/api/backup/v1/artifacts.pb.go @@ -7,12 +7,13 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -693,23 +694,26 @@ func file_backup_v1_artifacts_proto_rawDescGZIP() []byte { return file_backup_v1_artifacts_proto_rawDescData } -var file_backup_v1_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_backup_v1_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_backup_v1_artifacts_proto_goTypes = []any{ - (BackupStatus)(0), // 0: backup.v1.BackupStatus - (*Artifact)(nil), // 1: backup.v1.Artifact - (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest - (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse - (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest - (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse - (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange - (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest - (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse - (DataModel)(0), // 9: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp - (BackupMode)(0), // 11: backup.v1.BackupMode - (*Metadata)(nil), // 12: backup.v1.Metadata -} +var ( + file_backup_v1_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_backup_v1_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) + file_backup_v1_artifacts_proto_goTypes = []any{ + (BackupStatus)(0), // 0: backup.v1.BackupStatus + (*Artifact)(nil), // 1: backup.v1.Artifact + (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest + (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse + (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest + (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse + (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange + (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest + (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse + (DataModel)(0), // 9: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (BackupMode)(0), // 11: backup.v1.BackupMode + (*Metadata)(nil), // 12: backup.v1.Metadata + } +) + var file_backup_v1_artifacts_proto_depIdxs = []int32{ 9, // 0: backup.v1.Artifact.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.Artifact.status:type_name -> backup.v1.BackupStatus diff --git a/api/backup/v1/backup.pb.go b/api/backup/v1/backup.pb.go index 9e4aecfdac..ffe4df804c 100644 --- a/api/backup/v1/backup.pb.go +++ b/api/backup/v1/backup.pb.go @@ -7,16 +7,18 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -1495,37 +1497,40 @@ func file_backup_v1_backup_proto_rawDescGZIP() []byte { return file_backup_v1_backup_proto_rawDescData } -var file_backup_v1_backup_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_backup_v1_backup_proto_goTypes = []any{ - (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest - (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse - (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest - (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse - (*ScheduledBackup)(nil), // 4: backup.v1.ScheduledBackup - (*ScheduleBackupRequest)(nil), // 5: backup.v1.ScheduleBackupRequest - (*ScheduleBackupResponse)(nil), // 6: backup.v1.ScheduleBackupResponse - (*ListScheduledBackupsRequest)(nil), // 7: backup.v1.ListScheduledBackupsRequest - (*ListScheduledBackupsResponse)(nil), // 8: backup.v1.ListScheduledBackupsResponse - (*ChangeScheduledBackupRequest)(nil), // 9: backup.v1.ChangeScheduledBackupRequest - (*ChangeScheduledBackupResponse)(nil), // 10: backup.v1.ChangeScheduledBackupResponse - (*RemoveScheduledBackupRequest)(nil), // 11: backup.v1.RemoveScheduledBackupRequest - (*RemoveScheduledBackupResponse)(nil), // 12: backup.v1.RemoveScheduledBackupResponse - (*GetLogsRequest)(nil), // 13: backup.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 14: backup.v1.GetLogsResponse - (*durationpb.Duration)(nil), // 15: google.protobuf.Duration - (DataModel)(0), // 16: backup.v1.DataModel - (*v1.MySQLService)(nil), // 17: inventory.v1.MySQLService - (*v1.MongoDBService)(nil), // 18: inventory.v1.MongoDBService - (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp - (BackupMode)(0), // 20: backup.v1.BackupMode - (*LogChunk)(nil), // 21: backup.v1.LogChunk - (*ListArtifactsRequest)(nil), // 22: backup.v1.ListArtifactsRequest - (*DeleteArtifactRequest)(nil), // 23: backup.v1.DeleteArtifactRequest - (*ListPitrTimerangesRequest)(nil), // 24: backup.v1.ListPitrTimerangesRequest - (*ListArtifactsResponse)(nil), // 25: backup.v1.ListArtifactsResponse - (*DeleteArtifactResponse)(nil), // 26: backup.v1.DeleteArtifactResponse - (*ListPitrTimerangesResponse)(nil), // 27: backup.v1.ListPitrTimerangesResponse -} +var ( + file_backup_v1_backup_proto_msgTypes = make([]protoimpl.MessageInfo, 15) + file_backup_v1_backup_proto_goTypes = []any{ + (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest + (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse + (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest + (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse + (*ScheduledBackup)(nil), // 4: backup.v1.ScheduledBackup + (*ScheduleBackupRequest)(nil), // 5: backup.v1.ScheduleBackupRequest + (*ScheduleBackupResponse)(nil), // 6: backup.v1.ScheduleBackupResponse + (*ListScheduledBackupsRequest)(nil), // 7: backup.v1.ListScheduledBackupsRequest + (*ListScheduledBackupsResponse)(nil), // 8: backup.v1.ListScheduledBackupsResponse + (*ChangeScheduledBackupRequest)(nil), // 9: backup.v1.ChangeScheduledBackupRequest + (*ChangeScheduledBackupResponse)(nil), // 10: backup.v1.ChangeScheduledBackupResponse + (*RemoveScheduledBackupRequest)(nil), // 11: backup.v1.RemoveScheduledBackupRequest + (*RemoveScheduledBackupResponse)(nil), // 12: backup.v1.RemoveScheduledBackupResponse + (*GetLogsRequest)(nil), // 13: backup.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 14: backup.v1.GetLogsResponse + (*durationpb.Duration)(nil), // 15: google.protobuf.Duration + (DataModel)(0), // 16: backup.v1.DataModel + (*v1.MySQLService)(nil), // 17: inventory.v1.MySQLService + (*v1.MongoDBService)(nil), // 18: inventory.v1.MongoDBService + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (BackupMode)(0), // 20: backup.v1.BackupMode + (*LogChunk)(nil), // 21: backup.v1.LogChunk + (*ListArtifactsRequest)(nil), // 22: backup.v1.ListArtifactsRequest + (*DeleteArtifactRequest)(nil), // 23: backup.v1.DeleteArtifactRequest + (*ListPitrTimerangesRequest)(nil), // 24: backup.v1.ListPitrTimerangesRequest + (*ListArtifactsResponse)(nil), // 25: backup.v1.ListArtifactsResponse + (*DeleteArtifactResponse)(nil), // 26: backup.v1.DeleteArtifactResponse + (*ListPitrTimerangesResponse)(nil), // 27: backup.v1.ListPitrTimerangesResponse + } +) + var file_backup_v1_backup_proto_depIdxs = []int32{ 15, // 0: backup.v1.StartBackupRequest.retry_interval:type_name -> google.protobuf.Duration 16, // 1: backup.v1.StartBackupRequest.data_model:type_name -> backup.v1.DataModel diff --git a/api/backup/v1/backup.pb.gw.go b/api/backup/v1/backup.pb.gw.go index 7583991fb5..65d84b9c88 100644 --- a/api/backup/v1/backup.pb.gw.go +++ b/api/backup/v1/backup.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_BackupService_StartBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartBackupRequest @@ -41,7 +43,6 @@ func request_BackupService_StartBackup_0(ctx context.Context, marshaler runtime. msg, err := client.StartBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_StartBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -54,7 +55,6 @@ func local_request_BackupService_StartBackup_0(ctx context.Context, marshaler ru msg, err := server.StartBackup(ctx, &protoReq) return msg, metadata, err - } func request_BackupService_ListArtifactCompatibleServices_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -80,7 +80,6 @@ func request_BackupService_ListArtifactCompatibleServices_0(ctx context.Context, msg, err := client.ListArtifactCompatibleServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_ListArtifactCompatibleServices_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -106,7 +105,6 @@ func local_request_BackupService_ListArtifactCompatibleServices_0(ctx context.Co msg, err := server.ListArtifactCompatibleServices(ctx, &protoReq) return msg, metadata, err - } func request_BackupService_ScheduleBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -119,7 +117,6 @@ func request_BackupService_ScheduleBackup_0(ctx context.Context, marshaler runti msg, err := client.ScheduleBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_ScheduleBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -132,7 +129,6 @@ func local_request_BackupService_ScheduleBackup_0(ctx context.Context, marshaler msg, err := server.ScheduleBackup(ctx, &protoReq) return msg, metadata, err - } func request_BackupService_ListScheduledBackups_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -141,7 +137,6 @@ func request_BackupService_ListScheduledBackups_0(ctx context.Context, marshaler msg, err := client.ListScheduledBackups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_ListScheduledBackups_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -150,7 +145,6 @@ func local_request_BackupService_ListScheduledBackups_0(ctx context.Context, mar msg, err := server.ListScheduledBackups(ctx, &protoReq) return msg, metadata, err - } func request_BackupService_ChangeScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -163,7 +157,6 @@ func request_BackupService_ChangeScheduledBackup_0(ctx context.Context, marshale msg, err := client.ChangeScheduledBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_ChangeScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -176,7 +169,6 @@ func local_request_BackupService_ChangeScheduledBackup_0(ctx context.Context, ma msg, err := server.ChangeScheduledBackup(ctx, &protoReq) return msg, metadata, err - } func request_BackupService_RemoveScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -202,7 +194,6 @@ func request_BackupService_RemoveScheduledBackup_0(ctx context.Context, marshale msg, err := client.RemoveScheduledBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_RemoveScheduledBackup_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -228,12 +219,9 @@ func local_request_BackupService_RemoveScheduledBackup_0(ctx context.Context, ma msg, err := server.RemoveScheduledBackup(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_BackupService_GetLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"artifact_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_BackupService_GetLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"artifact_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_BackupService_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetLogsRequest @@ -265,7 +253,6 @@ func request_BackupService_GetLogs_0(ctx context.Context, marshaler runtime.Mars msg, err := client.GetLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -298,7 +285,6 @@ func local_request_BackupService_GetLogs_0(ctx context.Context, marshaler runtim msg, err := server.GetLogs(ctx, &protoReq) return msg, metadata, err - } func request_BackupService_ListArtifacts_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -307,7 +293,6 @@ func request_BackupService_ListArtifacts_0(ctx context.Context, marshaler runtim msg, err := client.ListArtifacts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_ListArtifacts_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -316,12 +301,9 @@ func local_request_BackupService_ListArtifacts_0(ctx context.Context, marshaler msg, err := server.ListArtifacts(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_BackupService_DeleteArtifact_0 = &utilities.DoubleArray{Encoding: map[string]int{"artifact_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_BackupService_DeleteArtifact_0 = &utilities.DoubleArray{Encoding: map[string]int{"artifact_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_BackupService_DeleteArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteArtifactRequest @@ -353,7 +335,6 @@ func request_BackupService_DeleteArtifact_0(ctx context.Context, marshaler runti msg, err := client.DeleteArtifact(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_DeleteArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -386,7 +367,6 @@ func local_request_BackupService_DeleteArtifact_0(ctx context.Context, marshaler msg, err := server.DeleteArtifact(ctx, &protoReq) return msg, metadata, err - } func request_BackupService_ListPitrTimeranges_0(ctx context.Context, marshaler runtime.Marshaler, client BackupServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -412,7 +392,6 @@ func request_BackupService_ListPitrTimeranges_0(ctx context.Context, marshaler r msg, err := client.ListPitrTimeranges(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_BackupService_ListPitrTimeranges_0(ctx context.Context, marshaler runtime.Marshaler, server BackupServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -438,7 +417,6 @@ func local_request_BackupService_ListPitrTimeranges_0(ctx context.Context, marsh msg, err := server.ListPitrTimeranges(ctx, &protoReq) return msg, metadata, err - } // RegisterBackupServiceHandlerServer registers the http handlers for service BackupService to "mux". @@ -447,7 +425,6 @@ func local_request_BackupService_ListPitrTimeranges_0(ctx context.Context, marsh // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBackupServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BackupServiceServer) error { - mux.Handle("POST", pattern_BackupService_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -470,7 +447,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_StartBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_ListArtifactCompatibleServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -495,7 +471,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListArtifactCompatibleServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_BackupService_ScheduleBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -520,7 +495,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ScheduleBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_ListScheduledBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -545,7 +519,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListScheduledBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_BackupService_ChangeScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -570,7 +543,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ChangeScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_BackupService_RemoveScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -595,7 +567,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_RemoveScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -620,7 +591,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_ListArtifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -645,7 +615,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListArtifacts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_BackupService_DeleteArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -670,7 +639,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_DeleteArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_ListPitrTimeranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -695,7 +663,6 @@ func RegisterBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListPitrTimeranges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -738,7 +705,6 @@ func RegisterBackupServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "BackupServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BackupServiceClient) error { - mux.Handle("POST", pattern_BackupService_StartBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -758,7 +724,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_StartBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_ListArtifactCompatibleServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -780,7 +745,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListArtifactCompatibleServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_BackupService_ScheduleBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -802,7 +766,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ScheduleBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_ListScheduledBackups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -824,7 +787,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListScheduledBackups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_BackupService_ChangeScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -846,7 +808,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ChangeScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_BackupService_RemoveScheduledBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -868,7 +829,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_RemoveScheduledBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -890,7 +850,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_ListArtifacts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -912,7 +871,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListArtifacts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_BackupService_DeleteArtifact_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -934,7 +892,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_DeleteArtifact_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_BackupService_ListPitrTimeranges_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -956,7 +913,6 @@ func RegisterBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_BackupService_ListPitrTimeranges_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/backup/v1/backup_grpc.pb.go b/api/backup/v1/backup_grpc.pb.go index 110c37b9c1..42c2f58561 100644 --- a/api/backup/v1/backup_grpc.pb.go +++ b/api/backup/v1/backup_grpc.pb.go @@ -8,6 +8,7 @@ package backupv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -206,30 +207,39 @@ type UnimplementedBackupServiceServer struct{} func (UnimplementedBackupServiceServer) StartBackup(context.Context, *StartBackupRequest) (*StartBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartBackup not implemented") } + func (UnimplementedBackupServiceServer) ListArtifactCompatibleServices(context.Context, *ListArtifactCompatibleServicesRequest) (*ListArtifactCompatibleServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListArtifactCompatibleServices not implemented") } + func (UnimplementedBackupServiceServer) ScheduleBackup(context.Context, *ScheduleBackupRequest) (*ScheduleBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ScheduleBackup not implemented") } + func (UnimplementedBackupServiceServer) ListScheduledBackups(context.Context, *ListScheduledBackupsRequest) (*ListScheduledBackupsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListScheduledBackups not implemented") } + func (UnimplementedBackupServiceServer) ChangeScheduledBackup(context.Context, *ChangeScheduledBackupRequest) (*ChangeScheduledBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeScheduledBackup not implemented") } + func (UnimplementedBackupServiceServer) RemoveScheduledBackup(context.Context, *RemoveScheduledBackupRequest) (*RemoveScheduledBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveScheduledBackup not implemented") } + func (UnimplementedBackupServiceServer) GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented") } + func (UnimplementedBackupServiceServer) ListArtifacts(context.Context, *ListArtifactsRequest) (*ListArtifactsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListArtifacts not implemented") } + func (UnimplementedBackupServiceServer) DeleteArtifact(context.Context, *DeleteArtifactRequest) (*DeleteArtifactResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteArtifact not implemented") } + func (UnimplementedBackupServiceServer) ListPitrTimeranges(context.Context, *ListPitrTimerangesRequest) (*ListPitrTimerangesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListPitrTimeranges not implemented") } diff --git a/api/backup/v1/common.pb.go b/api/backup/v1/common.pb.go index 4e440ed6b8..4e0990d687 100644 --- a/api/backup/v1/common.pb.go +++ b/api/backup/v1/common.pb.go @@ -7,12 +7,13 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -435,17 +436,20 @@ func file_backup_v1_common_proto_rawDescGZIP() []byte { return file_backup_v1_common_proto_rawDescData } -var file_backup_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_backup_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_backup_v1_common_proto_goTypes = []any{ - (DataModel)(0), // 0: backup.v1.DataModel - (BackupMode)(0), // 1: backup.v1.BackupMode - (*File)(nil), // 2: backup.v1.File - (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata - (*Metadata)(nil), // 4: backup.v1.Metadata - (*LogChunk)(nil), // 5: backup.v1.LogChunk - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp -} +var ( + file_backup_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) + file_backup_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) + file_backup_v1_common_proto_goTypes = []any{ + (DataModel)(0), // 0: backup.v1.DataModel + (BackupMode)(0), // 1: backup.v1.BackupMode + (*File)(nil), // 2: backup.v1.File + (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata + (*Metadata)(nil), // 4: backup.v1.Metadata + (*LogChunk)(nil), // 5: backup.v1.LogChunk + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + } +) + var file_backup_v1_common_proto_depIdxs = []int32{ 2, // 0: backup.v1.Metadata.file_list:type_name -> backup.v1.File 6, // 1: backup.v1.Metadata.restore_to:type_name -> google.protobuf.Timestamp diff --git a/api/backup/v1/errors.pb.go b/api/backup/v1/errors.pb.go index 81bb03c92d..d2ba5a9692 100644 --- a/api/backup/v1/errors.pb.go +++ b/api/backup/v1/errors.pb.go @@ -7,10 +7,11 @@ package backupv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -179,12 +180,15 @@ func file_backup_v1_errors_proto_rawDescGZIP() []byte { return file_backup_v1_errors_proto_rawDescData } -var file_backup_v1_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_backup_v1_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_backup_v1_errors_proto_goTypes = []any{ - (ErrorCode)(0), // 0: backup.v1.ErrorCode - (*Error)(nil), // 1: backup.v1.Error -} +var ( + file_backup_v1_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_backup_v1_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) + file_backup_v1_errors_proto_goTypes = []any{ + (ErrorCode)(0), // 0: backup.v1.ErrorCode + (*Error)(nil), // 1: backup.v1.Error + } +) + var file_backup_v1_errors_proto_depIdxs = []int32{ 0, // 0: backup.v1.Error.code:type_name -> backup.v1.ErrorCode 1, // [1:1] is the sub-list for method output_type diff --git a/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go b/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go index e1e4cbea65..484dc341fb 100644 --- a/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go @@ -60,7 +60,6 @@ ChangeScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type ChangeScheduledBackupParams struct { - // Body. Body ChangeScheduledBackupBody @@ -130,7 +129,6 @@ func (o *ChangeScheduledBackupParams) SetBody(body ChangeScheduledBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go b/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go index ce02dfdc44..0591324fd6 100644 --- a/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go @@ -104,7 +104,6 @@ func (o *ChangeScheduledBackupOK) GetPayload() interface{} { } func (o *ChangeScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -176,7 +175,6 @@ func (o *ChangeScheduledBackupDefault) GetPayload() *ChangeScheduledBackupDefaul } func (o *ChangeScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeScheduledBackupDefaultBody) // response payload @@ -192,7 +190,6 @@ ChangeScheduledBackupBody change scheduled backup body swagger:model ChangeScheduledBackupBody */ type ChangeScheduledBackupBody struct { - // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` @@ -276,7 +273,6 @@ ChangeScheduledBackupDefaultBody change scheduled backup default body swagger:model ChangeScheduledBackupDefaultBody */ type ChangeScheduledBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -342,9 +338,7 @@ func (o *ChangeScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -360,7 +354,6 @@ func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -389,7 +382,6 @@ ChangeScheduledBackupDefaultBodyDetailsItems0 change scheduled backup default bo swagger:model ChangeScheduledBackupDefaultBodyDetailsItems0 */ type ChangeScheduledBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -401,7 +393,6 @@ type ChangeScheduledBackupDefaultBodyDetailsItems0 struct { func (o *ChangeScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -439,7 +430,6 @@ func (o *ChangeScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeScheduledBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go b/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go index 0ab18abe2e..865c2d1937 100644 --- a/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go +++ b/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go @@ -61,7 +61,6 @@ DeleteArtifactParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteArtifactParams struct { - /* ArtifactID. Machine-readable artifact ID. @@ -151,7 +150,6 @@ func (o *DeleteArtifactParams) SetRemoveFiles(removeFiles *bool) { // WriteToRequest writes these params to a swagger request func (o *DeleteArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -172,7 +170,6 @@ func (o *DeleteArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qRemoveFiles := swag.FormatBool(qrRemoveFiles) if qRemoveFiles != "" { - if err := r.SetQueryParam("remove_files", qRemoveFiles); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/delete_artifact_responses.go b/api/backup/v1/json/client/backup_service/delete_artifact_responses.go index a8cad04bb5..24dd69fbab 100644 --- a/api/backup/v1/json/client/backup_service/delete_artifact_responses.go +++ b/api/backup/v1/json/client/backup_service/delete_artifact_responses.go @@ -103,7 +103,6 @@ func (o *DeleteArtifactOK) GetPayload() interface{} { } func (o *DeleteArtifactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *DeleteArtifactDefault) GetPayload() *DeleteArtifactDefaultBody { } func (o *DeleteArtifactDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteArtifactDefaultBody) // response payload @@ -191,7 +189,6 @@ DeleteArtifactDefaultBody delete artifact default body swagger:model DeleteArtifactDefaultBody */ type DeleteArtifactDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *DeleteArtifactDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -304,7 +298,6 @@ DeleteArtifactDefaultBodyDetailsItems0 delete artifact default body details item swagger:model DeleteArtifactDefaultBodyDetailsItems0 */ type DeleteArtifactDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type DeleteArtifactDefaultBodyDetailsItems0 struct { func (o *DeleteArtifactDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *DeleteArtifactDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteArtifactDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/get_logs_parameters.go b/api/backup/v1/json/client/backup_service/get_logs_parameters.go index bf377166c3..d65124e93d 100644 --- a/api/backup/v1/json/client/backup_service/get_logs_parameters.go +++ b/api/backup/v1/json/client/backup_service/get_logs_parameters.go @@ -61,7 +61,6 @@ GetLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLogsParams struct { - // ArtifactID. ArtifactID string @@ -163,7 +162,6 @@ func (o *GetLogsParams) SetOffset(offset *int64) { // WriteToRequest writes these params to a swagger request func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -184,7 +182,6 @@ func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { - if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -201,7 +198,6 @@ func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { - if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/get_logs_responses.go b/api/backup/v1/json/client/backup_service/get_logs_responses.go index e71957aa00..49d409841e 100644 --- a/api/backup/v1/json/client/backup_service/get_logs_responses.go +++ b/api/backup/v1/json/client/backup_service/get_logs_responses.go @@ -103,7 +103,6 @@ func (o *GetLogsOK) GetPayload() *GetLogsOKBody { } func (o *GetLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLogsOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetLogsDefault) GetPayload() *GetLogsDefaultBody { } func (o *GetLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLogsDefaultBody) // response payload @@ -193,7 +191,6 @@ GetLogsDefaultBody get logs default body swagger:model GetLogsDefaultBody */ type GetLogsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetLogsDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -306,7 +300,6 @@ GetLogsDefaultBodyDetailsItems0 get logs default body details items0 swagger:model GetLogsDefaultBodyDetailsItems0 */ type GetLogsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetLogsDefaultBodyDetailsItems0 struct { func (o *GetLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetLogsOKBody get logs OK body swagger:model GetLogsOKBody */ type GetLogsOKBody struct { - // logs Logs []*GetLogsOKBodyLogsItems0 `json:"logs"` @@ -483,9 +473,7 @@ func (o *GetLogsOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Logs); i++ { - if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -501,7 +489,6 @@ func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt. return err } } - } return nil @@ -530,7 +517,6 @@ GetLogsOKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetLogsOKBodyLogsItems0 */ type GetLogsOKBodyLogsItems0 struct { - // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go index aa2fb06549..77f127caee 100644 --- a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go @@ -60,7 +60,6 @@ ListArtifactCompatibleServicesParams contains all the parameters to send to the Typically these are written to a http.Request. */ type ListArtifactCompatibleServicesParams struct { - /* ArtifactID. Artifact id used to determine restore compatibility. @@ -133,7 +132,6 @@ func (o *ListArtifactCompatibleServicesParams) SetArtifactID(artifactID string) // WriteToRequest writes these params to a swagger request func (o *ListArtifactCompatibleServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go index 0ab19b541f..5be1d1ce6f 100644 --- a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go +++ b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go @@ -103,7 +103,6 @@ func (o *ListArtifactCompatibleServicesOK) GetPayload() *ListArtifactCompatibleS } func (o *ListArtifactCompatibleServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListArtifactCompatibleServicesOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ListArtifactCompatibleServicesDefault) GetPayload() *ListArtifactCompat } func (o *ListArtifactCompatibleServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListArtifactCompatibleServicesDefaultBody) // response payload @@ -193,7 +191,6 @@ ListArtifactCompatibleServicesDefaultBody list artifact compatible services defa swagger:model ListArtifactCompatibleServicesDefaultBody */ type ListArtifactCompatibleServicesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *ListArtifactCompatibleServicesDefaultBody) ContextValidate(ctx context. } func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx c return err } } - } return nil @@ -306,7 +300,6 @@ ListArtifactCompatibleServicesDefaultBodyDetailsItems0 list artifact compatible swagger:model ListArtifactCompatibleServicesDefaultBodyDetailsItems0 */ type ListArtifactCompatibleServicesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type ListArtifactCompatibleServicesDefaultBodyDetailsItems0 struct { func (o *ListArtifactCompatibleServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *ListArtifactCompatibleServicesDefaultBodyDetailsItems0) UnmarshalJSON(d // MarshalJSON marshals this object with additional properties into a JSON object func (o ListArtifactCompatibleServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ ListArtifactCompatibleServicesOKBody list artifact compatible services OK body swagger:model ListArtifactCompatibleServicesOKBody */ type ListArtifactCompatibleServicesOKBody struct { - // mysql Mysql []*ListArtifactCompatibleServicesOKBodyMysqlItems0 `json:"mysql"` @@ -517,9 +507,7 @@ func (o *ListArtifactCompatibleServicesOKBody) ContextValidate(ctx context.Conte } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Mysql); i++ { - if o.Mysql[i] != nil { if swag.IsZero(o.Mysql[i]) { // not required @@ -535,16 +523,13 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context. return err } } - } return nil } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Mongodb); i++ { - if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -560,7 +545,6 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx contex return err } } - } return nil @@ -589,7 +573,6 @@ ListArtifactCompatibleServicesOKBodyMongodbItems0 MongoDBService represents a ge swagger:model ListArtifactCompatibleServicesOKBodyMongodbItems0 */ type ListArtifactCompatibleServicesOKBodyMongodbItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -660,7 +643,6 @@ ListArtifactCompatibleServicesOKBodyMysqlItems0 MySQLService represents a generi swagger:model ListArtifactCompatibleServicesOKBodyMysqlItems0 */ type ListArtifactCompatibleServicesOKBodyMysqlItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go b/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go index 158ab869be..c22d126478 100644 --- a/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go @@ -115,7 +115,6 @@ func (o *ListArtifactsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListArtifactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_artifacts_responses.go b/api/backup/v1/json/client/backup_service/list_artifacts_responses.go index 395dcdd3ee..2e7224fc25 100644 --- a/api/backup/v1/json/client/backup_service/list_artifacts_responses.go +++ b/api/backup/v1/json/client/backup_service/list_artifacts_responses.go @@ -104,7 +104,6 @@ func (o *ListArtifactsOK) GetPayload() *ListArtifactsOKBody { } func (o *ListArtifactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListArtifactsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListArtifactsDefault) GetPayload() *ListArtifactsDefaultBody { } func (o *ListArtifactsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListArtifactsDefaultBody) // response payload @@ -194,7 +192,6 @@ ListArtifactsDefaultBody list artifacts default body swagger:model ListArtifactsDefaultBody */ type ListArtifactsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListArtifactsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -307,7 +301,6 @@ ListArtifactsDefaultBodyDetailsItems0 list artifacts default body details items0 swagger:model ListArtifactsDefaultBodyDetailsItems0 */ type ListArtifactsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListArtifactsDefaultBodyDetailsItems0 struct { func (o *ListArtifactsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListArtifactsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListArtifactsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListArtifactsOKBody list artifacts OK body swagger:model ListArtifactsOKBody */ type ListArtifactsOKBody struct { - // artifacts Artifacts []*ListArtifactsOKBodyArtifactsItems0 `json:"artifacts"` } @@ -481,9 +471,7 @@ func (o *ListArtifactsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Artifacts); i++ { - if o.Artifacts[i] != nil { if swag.IsZero(o.Artifacts[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, form return err } } - } return nil @@ -528,7 +515,6 @@ ListArtifactsOKBodyArtifactsItems0 Artifact represents single backup artifact. swagger:model ListArtifactsOKBodyArtifactsItems0 */ type ListArtifactsOKBodyArtifactsItems0 struct { - // Machine-readable artifact ID. ArtifactID string `json:"artifact_id,omitempty"` @@ -815,9 +801,7 @@ func (o *ListArtifactsOKBodyArtifactsItems0) ContextValidate(ctx context.Context } func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.MetadataList); i++ { - if o.MetadataList[i] != nil { if swag.IsZero(o.MetadataList[i]) { // not required @@ -833,7 +817,6 @@ func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx con return err } } - } return nil @@ -862,7 +845,6 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0 Metadata contains extra art swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0 struct { - // List of files backup consists of. FileList []*ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 `json:"file_list"` @@ -972,9 +954,7 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) ContextValidate(c } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFileList(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.FileList); i++ { - if o.FileList[i] != nil { if swag.IsZero(o.FileList[i]) { // not required @@ -990,14 +970,12 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFi return err } } - } return nil } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidatePbmMetadata(ctx context.Context, formats strfmt.Registry) error { - if o.PbmMetadata != nil { if swag.IsZero(o.PbmMetadata) { // not required @@ -1040,7 +1018,6 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 File represen swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 struct { - // name Name string `json:"name,omitempty"` @@ -1081,7 +1058,6 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata PbmMetadata cont swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata struct { - // Name of backup in backup tool representation. Name string `json:"name,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go index 9e5c905765..069308b463 100644 --- a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go @@ -60,7 +60,6 @@ ListPitrTimerangesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListPitrTimerangesParams struct { - /* ArtifactID. Artifact ID represents artifact whose location has PITR timeranges to be retrieved. @@ -133,7 +132,6 @@ func (o *ListPitrTimerangesParams) SetArtifactID(artifactID string) { // WriteToRequest writes these params to a swagger request func (o *ListPitrTimerangesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go index 5f1d16bd92..1c54232029 100644 --- a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go +++ b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go @@ -104,7 +104,6 @@ func (o *ListPitrTimerangesOK) GetPayload() *ListPitrTimerangesOKBody { } func (o *ListPitrTimerangesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListPitrTimerangesOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListPitrTimerangesDefault) GetPayload() *ListPitrTimerangesDefaultBody } func (o *ListPitrTimerangesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListPitrTimerangesDefaultBody) // response payload @@ -194,7 +192,6 @@ ListPitrTimerangesDefaultBody list pitr timeranges default body swagger:model ListPitrTimerangesDefaultBody */ type ListPitrTimerangesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListPitrTimerangesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -307,7 +301,6 @@ ListPitrTimerangesDefaultBodyDetailsItems0 list pitr timeranges default body det swagger:model ListPitrTimerangesDefaultBodyDetailsItems0 */ type ListPitrTimerangesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListPitrTimerangesDefaultBodyDetailsItems0 struct { func (o *ListPitrTimerangesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListPitrTimerangesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ListPitrTimerangesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListPitrTimerangesOKBody list pitr timeranges OK body swagger:model ListPitrTimerangesOKBody */ type ListPitrTimerangesOKBody struct { - // timeranges Timeranges []*ListPitrTimerangesOKBodyTimerangesItems0 `json:"timeranges"` } @@ -481,9 +471,7 @@ func (o *ListPitrTimerangesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Timeranges); i++ { - if o.Timeranges[i] != nil { if swag.IsZero(o.Timeranges[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context return err } } - } return nil @@ -528,7 +515,6 @@ ListPitrTimerangesOKBodyTimerangesItems0 list pitr timeranges OK body timeranges swagger:model ListPitrTimerangesOKBodyTimerangesItems0 */ type ListPitrTimerangesOKBodyTimerangesItems0 struct { - // start_timestamp is the time of the first event in the PITR chunk. // Format: date-time StartTimestamp strfmt.DateTime `json:"start_timestamp,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go b/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go index 43c3c9b0fc..e87207a6d8 100644 --- a/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go @@ -115,7 +115,6 @@ func (o *ListScheduledBackupsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListScheduledBackupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go b/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go index 475fe34c0a..f54d49aaed 100644 --- a/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go +++ b/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go @@ -104,7 +104,6 @@ func (o *ListScheduledBackupsOK) GetPayload() *ListScheduledBackupsOKBody { } func (o *ListScheduledBackupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListScheduledBackupsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListScheduledBackupsDefault) GetPayload() *ListScheduledBackupsDefaultB } func (o *ListScheduledBackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListScheduledBackupsDefaultBody) // response payload @@ -194,7 +192,6 @@ ListScheduledBackupsDefaultBody list scheduled backups default body swagger:model ListScheduledBackupsDefaultBody */ type ListScheduledBackupsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListScheduledBackupsDefaultBody) ContextValidate(ctx context.Context, f } func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Con return err } } - } return nil @@ -307,7 +301,6 @@ ListScheduledBackupsDefaultBodyDetailsItems0 list scheduled backups default body swagger:model ListScheduledBackupsDefaultBodyDetailsItems0 */ type ListScheduledBackupsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListScheduledBackupsDefaultBodyDetailsItems0 struct { func (o *ListScheduledBackupsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListScheduledBackupsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte // MarshalJSON marshals this object with additional properties into a JSON object func (o ListScheduledBackupsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListScheduledBackupsOKBody list scheduled backups OK body swagger:model ListScheduledBackupsOKBody */ type ListScheduledBackupsOKBody struct { - // scheduled backups ScheduledBackups []*ListScheduledBackupsOKBodyScheduledBackupsItems0 `json:"scheduled_backups"` } @@ -481,9 +471,7 @@ func (o *ListScheduledBackupsOKBody) ContextValidate(ctx context.Context, format } func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ScheduledBackups); i++ { - if o.ScheduledBackups[i] != nil { if swag.IsZero(o.ScheduledBackups[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context return err } } - } return nil @@ -528,7 +515,6 @@ ListScheduledBackupsOKBodyScheduledBackupsItems0 ScheduledBackup represents sche swagger:model ListScheduledBackupsOKBodyScheduledBackupsItems0 */ type ListScheduledBackupsOKBodyScheduledBackupsItems0 struct { - // Machine-readable ID. ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go index 5e16fc7570..d184849501 100644 --- a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go @@ -60,7 +60,6 @@ RemoveScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type RemoveScheduledBackupParams struct { - // ScheduledBackupID. ScheduledBackupID string @@ -130,7 +129,6 @@ func (o *RemoveScheduledBackupParams) SetScheduledBackupID(scheduledBackupID str // WriteToRequest writes these params to a swagger request func (o *RemoveScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go index ac74d91471..30625c0735 100644 --- a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go @@ -103,7 +103,6 @@ func (o *RemoveScheduledBackupOK) GetPayload() interface{} { } func (o *RemoveScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *RemoveScheduledBackupDefault) GetPayload() *RemoveScheduledBackupDefaul } func (o *RemoveScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveScheduledBackupDefaultBody) // response payload @@ -191,7 +189,6 @@ RemoveScheduledBackupDefaultBody remove scheduled backup default body swagger:model RemoveScheduledBackupDefaultBody */ type RemoveScheduledBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *RemoveScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -304,7 +298,6 @@ RemoveScheduledBackupDefaultBodyDetailsItems0 remove scheduled backup default bo swagger:model RemoveScheduledBackupDefaultBodyDetailsItems0 */ type RemoveScheduledBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type RemoveScheduledBackupDefaultBodyDetailsItems0 struct { func (o *RemoveScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *RemoveScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveScheduledBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go b/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go index 3a9140d346..843f97f8cd 100644 --- a/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go @@ -60,7 +60,6 @@ ScheduleBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ScheduleBackupParams struct { - // Body. Body ScheduleBackupBody @@ -130,7 +129,6 @@ func (o *ScheduleBackupParams) SetBody(body ScheduleBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ScheduleBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/schedule_backup_responses.go b/api/backup/v1/json/client/backup_service/schedule_backup_responses.go index 7efec04984..a0189c8e4e 100644 --- a/api/backup/v1/json/client/backup_service/schedule_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/schedule_backup_responses.go @@ -104,7 +104,6 @@ func (o *ScheduleBackupOK) GetPayload() *ScheduleBackupOKBody { } func (o *ScheduleBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ScheduleBackupOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ScheduleBackupDefault) GetPayload() *ScheduleBackupDefaultBody { } func (o *ScheduleBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ScheduleBackupDefaultBody) // response payload @@ -194,7 +192,6 @@ ScheduleBackupBody schedule backup body swagger:model ScheduleBackupBody */ type ScheduleBackupBody struct { - // Service identifier where backup should be performed. ServiceID string `json:"service_id,omitempty"` @@ -394,7 +391,6 @@ ScheduleBackupDefaultBody schedule backup default body swagger:model ScheduleBackupDefaultBody */ type ScheduleBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -460,9 +456,7 @@ func (o *ScheduleBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -478,7 +472,6 @@ func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -507,7 +500,6 @@ ScheduleBackupDefaultBodyDetailsItems0 schedule backup default body details item swagger:model ScheduleBackupDefaultBodyDetailsItems0 */ type ScheduleBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -519,7 +511,6 @@ type ScheduleBackupDefaultBodyDetailsItems0 struct { func (o *ScheduleBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -557,7 +548,6 @@ func (o *ScheduleBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ScheduleBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -621,7 +611,6 @@ ScheduleBackupOKBody schedule backup OK body swagger:model ScheduleBackupOKBody */ type ScheduleBackupOKBody struct { - // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/start_backup_parameters.go b/api/backup/v1/json/client/backup_service/start_backup_parameters.go index f6b1b4020e..c886e6520d 100644 --- a/api/backup/v1/json/client/backup_service/start_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/start_backup_parameters.go @@ -60,7 +60,6 @@ StartBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartBackupParams struct { - // Body. Body StartBackupBody @@ -130,7 +129,6 @@ func (o *StartBackupParams) SetBody(body StartBackupBody) { // WriteToRequest writes these params to a swagger request func (o *StartBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/start_backup_responses.go b/api/backup/v1/json/client/backup_service/start_backup_responses.go index 7780763174..0e924268bb 100644 --- a/api/backup/v1/json/client/backup_service/start_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/start_backup_responses.go @@ -104,7 +104,6 @@ func (o *StartBackupOK) GetPayload() *StartBackupOKBody { } func (o *StartBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartBackupOKBody) // response payload @@ -178,7 +177,6 @@ func (o *StartBackupDefault) GetPayload() *StartBackupDefaultBody { } func (o *StartBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartBackupDefaultBody) // response payload @@ -194,7 +192,6 @@ StartBackupBody start backup body swagger:model StartBackupBody */ type StartBackupBody struct { - // Service identifier. ServiceID string `json:"service_id,omitempty"` @@ -308,7 +305,6 @@ StartBackupDefaultBody start backup default body swagger:model StartBackupDefaultBody */ type StartBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -374,9 +370,7 @@ func (o *StartBackupDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -392,7 +386,6 @@ func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -421,7 +414,6 @@ StartBackupDefaultBodyDetailsItems0 start backup default body details items0 swagger:model StartBackupDefaultBodyDetailsItems0 */ type StartBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -433,7 +425,6 @@ type StartBackupDefaultBodyDetailsItems0 struct { func (o *StartBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -471,7 +462,6 @@ func (o *StartBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -535,7 +525,6 @@ StartBackupOKBody start backup OK body swagger:model StartBackupOKBody */ type StartBackupOKBody struct { - // Unique identifier. ArtifactID string `json:"artifact_id,omitempty"` } diff --git a/api/backup/v1/json/client/locations_service/add_location_parameters.go b/api/backup/v1/json/client/locations_service/add_location_parameters.go index f79768e1d2..a6fe1c1237 100644 --- a/api/backup/v1/json/client/locations_service/add_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/add_location_parameters.go @@ -60,7 +60,6 @@ AddLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddLocationParams struct { - // Body. Body AddLocationBody @@ -130,7 +129,6 @@ func (o *AddLocationParams) SetBody(body AddLocationBody) { // WriteToRequest writes these params to a swagger request func (o *AddLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/add_location_responses.go b/api/backup/v1/json/client/locations_service/add_location_responses.go index 47685f6e20..4e47f8f422 100644 --- a/api/backup/v1/json/client/locations_service/add_location_responses.go +++ b/api/backup/v1/json/client/locations_service/add_location_responses.go @@ -103,7 +103,6 @@ func (o *AddLocationOK) GetPayload() *AddLocationOKBody { } func (o *AddLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddLocationOKBody) // response payload @@ -177,7 +176,6 @@ func (o *AddLocationDefault) GetPayload() *AddLocationDefaultBody { } func (o *AddLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddLocationDefaultBody) // response payload @@ -193,7 +191,6 @@ AddLocationBody add location body swagger:model AddLocationBody */ type AddLocationBody struct { - // Location name Name string `json:"name,omitempty"` @@ -282,7 +279,6 @@ func (o *AddLocationBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { - if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -303,7 +299,6 @@ func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, f } func (o *AddLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -346,7 +341,6 @@ AddLocationDefaultBody add location default body swagger:model AddLocationDefaultBody */ type AddLocationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -412,9 +406,7 @@ func (o *AddLocationDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -430,7 +422,6 @@ func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -459,7 +450,6 @@ AddLocationDefaultBodyDetailsItems0 add location default body details items0 swagger:model AddLocationDefaultBodyDetailsItems0 */ type AddLocationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -471,7 +461,6 @@ type AddLocationDefaultBodyDetailsItems0 struct { func (o *AddLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -509,7 +498,6 @@ func (o *AddLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -573,7 +561,6 @@ AddLocationOKBody add location OK body swagger:model AddLocationOKBody */ type AddLocationOKBody struct { - // Machine-readable ID. LocationID string `json:"location_id,omitempty"` } @@ -611,7 +598,6 @@ AddLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents file s swagger:model AddLocationParamsBodyFilesystemConfig */ type AddLocationParamsBodyFilesystemConfig struct { - // path Path string `json:"path,omitempty"` } @@ -649,7 +635,6 @@ AddLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configuratio swagger:model AddLocationParamsBodyS3Config */ type AddLocationParamsBodyS3Config struct { - // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/change_location_parameters.go b/api/backup/v1/json/client/locations_service/change_location_parameters.go index 7c817aec1b..1b0e5bef6b 100644 --- a/api/backup/v1/json/client/locations_service/change_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/change_location_parameters.go @@ -60,7 +60,6 @@ ChangeLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeLocationParams struct { - // Body. Body ChangeLocationBody @@ -147,7 +146,6 @@ func (o *ChangeLocationParams) SetLocationID(locationID string) { // WriteToRequest writes these params to a swagger request func (o *ChangeLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/change_location_responses.go b/api/backup/v1/json/client/locations_service/change_location_responses.go index 9e4c345832..1eb361c97d 100644 --- a/api/backup/v1/json/client/locations_service/change_location_responses.go +++ b/api/backup/v1/json/client/locations_service/change_location_responses.go @@ -103,7 +103,6 @@ func (o *ChangeLocationOK) GetPayload() interface{} { } func (o *ChangeLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *ChangeLocationDefault) GetPayload() *ChangeLocationDefaultBody { } func (o *ChangeLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeLocationDefaultBody) // response payload @@ -191,7 +189,6 @@ ChangeLocationBody change location body swagger:model ChangeLocationBody */ type ChangeLocationBody struct { - // Location name Name string `json:"name,omitempty"` @@ -280,7 +277,6 @@ func (o *ChangeLocationBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { - if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -301,7 +297,6 @@ func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context } func (o *ChangeLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -344,7 +339,6 @@ ChangeLocationDefaultBody change location default body swagger:model ChangeLocationDefaultBody */ type ChangeLocationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -410,9 +404,7 @@ func (o *ChangeLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -428,7 +420,6 @@ func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -457,7 +448,6 @@ ChangeLocationDefaultBodyDetailsItems0 change location default body details item swagger:model ChangeLocationDefaultBodyDetailsItems0 */ type ChangeLocationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -469,7 +459,6 @@ type ChangeLocationDefaultBodyDetailsItems0 struct { func (o *ChangeLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -507,7 +496,6 @@ func (o *ChangeLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -571,7 +559,6 @@ ChangeLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents fil swagger:model ChangeLocationParamsBodyFilesystemConfig */ type ChangeLocationParamsBodyFilesystemConfig struct { - // path Path string `json:"path,omitempty"` } @@ -609,7 +596,6 @@ ChangeLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configura swagger:model ChangeLocationParamsBodyS3Config */ type ChangeLocationParamsBodyS3Config struct { - // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/list_locations_parameters.go b/api/backup/v1/json/client/locations_service/list_locations_parameters.go index eb22d06cbc..263117d982 100644 --- a/api/backup/v1/json/client/locations_service/list_locations_parameters.go +++ b/api/backup/v1/json/client/locations_service/list_locations_parameters.go @@ -115,7 +115,6 @@ func (o *ListLocationsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListLocationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/list_locations_responses.go b/api/backup/v1/json/client/locations_service/list_locations_responses.go index 281254a397..3ea95f7a24 100644 --- a/api/backup/v1/json/client/locations_service/list_locations_responses.go +++ b/api/backup/v1/json/client/locations_service/list_locations_responses.go @@ -103,7 +103,6 @@ func (o *ListLocationsOK) GetPayload() *ListLocationsOKBody { } func (o *ListLocationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListLocationsOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ListLocationsDefault) GetPayload() *ListLocationsDefaultBody { } func (o *ListLocationsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListLocationsDefaultBody) // response payload @@ -193,7 +191,6 @@ ListLocationsDefaultBody list locations default body swagger:model ListLocationsDefaultBody */ type ListLocationsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *ListLocationsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -306,7 +300,6 @@ ListLocationsDefaultBodyDetailsItems0 list locations default body details items0 swagger:model ListLocationsDefaultBodyDetailsItems0 */ type ListLocationsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type ListLocationsDefaultBodyDetailsItems0 struct { func (o *ListLocationsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *ListLocationsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListLocationsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ ListLocationsOKBody list locations OK body swagger:model ListLocationsOKBody */ type ListLocationsOKBody struct { - // locations Locations []*ListLocationsOKBodyLocationsItems0 `json:"locations"` } @@ -480,9 +470,7 @@ func (o *ListLocationsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Locations); i++ { - if o.Locations[i] != nil { if swag.IsZero(o.Locations[i]) { // not required @@ -498,7 +486,6 @@ func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, form return err } } - } return nil @@ -527,7 +514,6 @@ ListLocationsOKBodyLocationsItems0 Location represents single Backup Location. swagger:model ListLocationsOKBodyLocationsItems0 */ type ListLocationsOKBodyLocationsItems0 struct { - // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -619,7 +605,6 @@ func (o *ListLocationsOKBodyLocationsItems0) ContextValidate(ctx context.Context } func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { - if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -640,7 +625,6 @@ func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx } func (o *ListLocationsOKBodyLocationsItems0) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -683,7 +667,6 @@ ListLocationsOKBodyLocationsItems0FilesystemConfig FilesystemLocationConfig repr swagger:model ListLocationsOKBodyLocationsItems0FilesystemConfig */ type ListLocationsOKBodyLocationsItems0FilesystemConfig struct { - // path Path string `json:"path,omitempty"` } @@ -721,7 +704,6 @@ ListLocationsOKBodyLocationsItems0S3Config S3LocationConfig represents S3 bucket swagger:model ListLocationsOKBodyLocationsItems0S3Config */ type ListLocationsOKBodyLocationsItems0S3Config struct { - // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/remove_location_parameters.go b/api/backup/v1/json/client/locations_service/remove_location_parameters.go index f806c18bdc..3a4a644edd 100644 --- a/api/backup/v1/json/client/locations_service/remove_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/remove_location_parameters.go @@ -61,7 +61,6 @@ RemoveLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveLocationParams struct { - /* Force. Force mode @@ -151,7 +150,6 @@ func (o *RemoveLocationParams) SetLocationID(locationID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -167,7 +165,6 @@ func (o *RemoveLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qForce := swag.FormatBool(qrForce) if qForce != "" { - if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/remove_location_responses.go b/api/backup/v1/json/client/locations_service/remove_location_responses.go index b43522d032..b71626d1c4 100644 --- a/api/backup/v1/json/client/locations_service/remove_location_responses.go +++ b/api/backup/v1/json/client/locations_service/remove_location_responses.go @@ -103,7 +103,6 @@ func (o *RemoveLocationOK) GetPayload() interface{} { } func (o *RemoveLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *RemoveLocationDefault) GetPayload() *RemoveLocationDefaultBody { } func (o *RemoveLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveLocationDefaultBody) // response payload @@ -191,7 +189,6 @@ RemoveLocationDefaultBody remove location default body swagger:model RemoveLocationDefaultBody */ type RemoveLocationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *RemoveLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -304,7 +298,6 @@ RemoveLocationDefaultBodyDetailsItems0 remove location default body details item swagger:model RemoveLocationDefaultBodyDetailsItems0 */ type RemoveLocationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type RemoveLocationDefaultBodyDetailsItems0 struct { func (o *RemoveLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *RemoveLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/locations_service/test_location_config_parameters.go b/api/backup/v1/json/client/locations_service/test_location_config_parameters.go index c930393f8c..1856fe0f36 100644 --- a/api/backup/v1/json/client/locations_service/test_location_config_parameters.go +++ b/api/backup/v1/json/client/locations_service/test_location_config_parameters.go @@ -60,7 +60,6 @@ TestLocationConfigParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type TestLocationConfigParams struct { - // Body. Body TestLocationConfigBody @@ -130,7 +129,6 @@ func (o *TestLocationConfigParams) SetBody(body TestLocationConfigBody) { // WriteToRequest writes these params to a swagger request func (o *TestLocationConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/test_location_config_responses.go b/api/backup/v1/json/client/locations_service/test_location_config_responses.go index 9ac68f4ee0..c926f0db5a 100644 --- a/api/backup/v1/json/client/locations_service/test_location_config_responses.go +++ b/api/backup/v1/json/client/locations_service/test_location_config_responses.go @@ -103,7 +103,6 @@ func (o *TestLocationConfigOK) GetPayload() interface{} { } func (o *TestLocationConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *TestLocationConfigDefault) GetPayload() *TestLocationConfigDefaultBody } func (o *TestLocationConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(TestLocationConfigDefaultBody) // response payload @@ -191,7 +189,6 @@ TestLocationConfigBody test location config body swagger:model TestLocationConfigBody */ type TestLocationConfigBody struct { - // filesystem config FilesystemConfig *TestLocationConfigParamsBodyFilesystemConfig `json:"filesystem_config,omitempty"` @@ -274,7 +271,6 @@ func (o *TestLocationConfigBody) ContextValidate(ctx context.Context, formats st } func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { - if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -295,7 +291,6 @@ func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Con } func (o *TestLocationConfigBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { - if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -338,7 +333,6 @@ TestLocationConfigDefaultBody test location config default body swagger:model TestLocationConfigDefaultBody */ type TestLocationConfigDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -404,9 +398,7 @@ func (o *TestLocationConfigDefaultBody) ContextValidate(ctx context.Context, for } func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -422,7 +414,6 @@ func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Conte return err } } - } return nil @@ -451,7 +442,6 @@ TestLocationConfigDefaultBodyDetailsItems0 test location config default body det swagger:model TestLocationConfigDefaultBodyDetailsItems0 */ type TestLocationConfigDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -463,7 +453,6 @@ type TestLocationConfigDefaultBodyDetailsItems0 struct { func (o *TestLocationConfigDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -501,7 +490,6 @@ func (o *TestLocationConfigDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o TestLocationConfigDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -565,7 +553,6 @@ TestLocationConfigParamsBodyFilesystemConfig FilesystemLocationConfig represents swagger:model TestLocationConfigParamsBodyFilesystemConfig */ type TestLocationConfigParamsBodyFilesystemConfig struct { - // path Path string `json:"path,omitempty"` } @@ -603,7 +590,6 @@ TestLocationConfigParamsBodyS3Config S3LocationConfig represents S3 bucket confi swagger:model TestLocationConfigParamsBodyS3Config */ type TestLocationConfigParamsBodyS3Config struct { - // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go b/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go index 0e417604cc..b621fbb680 100644 --- a/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go +++ b/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go @@ -61,7 +61,6 @@ GetLogsMixin5Params contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLogsMixin5Params struct { - // Limit. // // Format: int64 @@ -163,7 +162,6 @@ func (o *GetLogsMixin5Params) SetRestoreID(restoreID string) { // WriteToRequest writes these params to a swagger request func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -179,7 +177,6 @@ func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { - if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -196,7 +193,6 @@ func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { - if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go b/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go index 0a5482f6ba..a09ede8dde 100644 --- a/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go +++ b/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go @@ -103,7 +103,6 @@ func (o *GetLogsMixin5OK) GetPayload() *GetLogsMixin5OKBody { } func (o *GetLogsMixin5OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLogsMixin5OKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetLogsMixin5Default) GetPayload() *GetLogsMixin5DefaultBody { } func (o *GetLogsMixin5Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLogsMixin5DefaultBody) // response payload @@ -193,7 +191,6 @@ GetLogsMixin5DefaultBody get logs mixin5 default body swagger:model GetLogsMixin5DefaultBody */ type GetLogsMixin5DefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetLogsMixin5DefaultBody) ContextValidate(ctx context.Context, formats } func (o *GetLogsMixin5DefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetLogsMixin5DefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -306,7 +300,6 @@ GetLogsMixin5DefaultBodyDetailsItems0 get logs mixin5 default body details items swagger:model GetLogsMixin5DefaultBodyDetailsItems0 */ type GetLogsMixin5DefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetLogsMixin5DefaultBodyDetailsItems0 struct { func (o *GetLogsMixin5DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetLogsMixin5DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLogsMixin5DefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetLogsMixin5OKBody get logs mixin5 OK body swagger:model GetLogsMixin5OKBody */ type GetLogsMixin5OKBody struct { - // logs Logs []*GetLogsMixin5OKBodyLogsItems0 `json:"logs"` @@ -483,9 +473,7 @@ func (o *GetLogsMixin5OKBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetLogsMixin5OKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Logs); i++ { - if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -501,7 +489,6 @@ func (o *GetLogsMixin5OKBody) contextValidateLogs(ctx context.Context, formats s return err } } - } return nil @@ -530,7 +517,6 @@ GetLogsMixin5OKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetLogsMixin5OKBodyLogsItems0 */ type GetLogsMixin5OKBodyLogsItems0 struct { - // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/list_restores_parameters.go b/api/backup/v1/json/client/restore_service/list_restores_parameters.go index fd958787b8..d46fd70f9e 100644 --- a/api/backup/v1/json/client/restore_service/list_restores_parameters.go +++ b/api/backup/v1/json/client/restore_service/list_restores_parameters.go @@ -115,7 +115,6 @@ func (o *ListRestoresParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListRestoresParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/list_restores_responses.go b/api/backup/v1/json/client/restore_service/list_restores_responses.go index 4ac3e7fec9..d9d2741189 100644 --- a/api/backup/v1/json/client/restore_service/list_restores_responses.go +++ b/api/backup/v1/json/client/restore_service/list_restores_responses.go @@ -104,7 +104,6 @@ func (o *ListRestoresOK) GetPayload() *ListRestoresOKBody { } func (o *ListRestoresOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListRestoresOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListRestoresDefault) GetPayload() *ListRestoresDefaultBody { } func (o *ListRestoresDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListRestoresDefaultBody) // response payload @@ -194,7 +192,6 @@ ListRestoresDefaultBody list restores default body swagger:model ListRestoresDefaultBody */ type ListRestoresDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListRestoresDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListRestoresDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListRestoresDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -307,7 +301,6 @@ ListRestoresDefaultBodyDetailsItems0 list restores default body details items0 swagger:model ListRestoresDefaultBodyDetailsItems0 */ type ListRestoresDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListRestoresDefaultBodyDetailsItems0 struct { func (o *ListRestoresDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListRestoresDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListRestoresDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListRestoresOKBody list restores OK body swagger:model ListRestoresOKBody */ type ListRestoresOKBody struct { - // items Items []*ListRestoresOKBodyItemsItems0 `json:"items"` } @@ -481,9 +471,7 @@ func (o *ListRestoresOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListRestoresOKBody) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Items); i++ { - if o.Items[i] != nil { if swag.IsZero(o.Items[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListRestoresOKBody) contextValidateItems(ctx context.Context, formats s return err } } - } return nil @@ -528,7 +515,6 @@ ListRestoresOKBodyItemsItems0 RestoreHistoryItem represents single backup restor swagger:model ListRestoresOKBodyItemsItems0 */ type ListRestoresOKBodyItemsItems0 struct { - // Machine-readable restore id. RestoreID string `json:"restore_id,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/restore_backup_parameters.go b/api/backup/v1/json/client/restore_service/restore_backup_parameters.go index 343407b601..4d6b7d7f95 100644 --- a/api/backup/v1/json/client/restore_service/restore_backup_parameters.go +++ b/api/backup/v1/json/client/restore_service/restore_backup_parameters.go @@ -60,7 +60,6 @@ RestoreBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RestoreBackupParams struct { - // Body. Body RestoreBackupBody @@ -130,7 +129,6 @@ func (o *RestoreBackupParams) SetBody(body RestoreBackupBody) { // WriteToRequest writes these params to a swagger request func (o *RestoreBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/restore_backup_responses.go b/api/backup/v1/json/client/restore_service/restore_backup_responses.go index 3c27eb73a2..ed2d534da1 100644 --- a/api/backup/v1/json/client/restore_service/restore_backup_responses.go +++ b/api/backup/v1/json/client/restore_service/restore_backup_responses.go @@ -104,7 +104,6 @@ func (o *RestoreBackupOK) GetPayload() *RestoreBackupOKBody { } func (o *RestoreBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RestoreBackupOKBody) // response payload @@ -178,7 +177,6 @@ func (o *RestoreBackupDefault) GetPayload() *RestoreBackupDefaultBody { } func (o *RestoreBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RestoreBackupDefaultBody) // response payload @@ -194,7 +192,6 @@ RestoreBackupBody restore backup body swagger:model RestoreBackupBody */ type RestoreBackupBody struct { - // Service identifier where backup should be restored. ServiceID string `json:"service_id,omitempty"` @@ -260,7 +257,6 @@ RestoreBackupDefaultBody restore backup default body swagger:model RestoreBackupDefaultBody */ type RestoreBackupDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -326,9 +322,7 @@ func (o *RestoreBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -344,7 +338,6 @@ func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -373,7 +366,6 @@ RestoreBackupDefaultBodyDetailsItems0 restore backup default body details items0 swagger:model RestoreBackupDefaultBodyDetailsItems0 */ type RestoreBackupDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -385,7 +377,6 @@ type RestoreBackupDefaultBodyDetailsItems0 struct { func (o *RestoreBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -423,7 +414,6 @@ func (o *RestoreBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RestoreBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -487,7 +477,6 @@ RestoreBackupOKBody restore backup OK body swagger:model RestoreBackupOKBody */ type RestoreBackupOKBody struct { - // Unique restore identifier. RestoreID string `json:"restore_id,omitempty"` } diff --git a/api/backup/v1/locations.pb.go b/api/backup/v1/locations.pb.go index 8f3ab24671..66230b030e 100644 --- a/api/backup/v1/locations.pb.go +++ b/api/backup/v1/locations.pb.go @@ -7,13 +7,14 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -932,22 +933,25 @@ func file_backup_v1_locations_proto_rawDescGZIP() []byte { return file_backup_v1_locations_proto_rawDescData } -var file_backup_v1_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_backup_v1_locations_proto_goTypes = []any{ - (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig - (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig - (*Location)(nil), // 2: backup.v1.Location - (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest - (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse - (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest - (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse - (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest - (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse - (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest - (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse - (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest - (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse -} +var ( + file_backup_v1_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) + file_backup_v1_locations_proto_goTypes = []any{ + (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig + (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig + (*Location)(nil), // 2: backup.v1.Location + (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest + (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse + (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest + (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse + (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest + (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse + (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest + (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse + (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest + (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse + } +) + var file_backup_v1_locations_proto_depIdxs = []int32{ 0, // 0: backup.v1.Location.filesystem_config:type_name -> backup.v1.FilesystemLocationConfig 1, // 1: backup.v1.Location.s3_config:type_name -> backup.v1.S3LocationConfig diff --git a/api/backup/v1/locations.pb.gw.go b/api/backup/v1/locations.pb.gw.go index b07444fa4c..63fe8d8483 100644 --- a/api/backup/v1/locations.pb.gw.go +++ b/api/backup/v1/locations.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_LocationsService_ListLocations_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListLocationsRequest @@ -37,7 +39,6 @@ func request_LocationsService_ListLocations_0(ctx context.Context, marshaler run msg, err := client.ListLocations(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_LocationsService_ListLocations_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -46,7 +47,6 @@ func local_request_LocationsService_ListLocations_0(ctx context.Context, marshal msg, err := server.ListLocations(ctx, &protoReq) return msg, metadata, err - } func request_LocationsService_AddLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -59,7 +59,6 @@ func request_LocationsService_AddLocation_0(ctx context.Context, marshaler runti msg, err := client.AddLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_LocationsService_AddLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -72,7 +71,6 @@ func local_request_LocationsService_AddLocation_0(ctx context.Context, marshaler msg, err := server.AddLocation(ctx, &protoReq) return msg, metadata, err - } func request_LocationsService_ChangeLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -102,7 +100,6 @@ func request_LocationsService_ChangeLocation_0(ctx context.Context, marshaler ru msg, err := client.ChangeLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_LocationsService_ChangeLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -132,12 +129,9 @@ func local_request_LocationsService_ChangeLocation_0(ctx context.Context, marsha msg, err := server.ChangeLocation(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_LocationsService_RemoveLocation_0 = &utilities.DoubleArray{Encoding: map[string]int{"location_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_LocationsService_RemoveLocation_0 = &utilities.DoubleArray{Encoding: map[string]int{"location_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_LocationsService_RemoveLocation_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveLocationRequest @@ -169,7 +163,6 @@ func request_LocationsService_RemoveLocation_0(ctx context.Context, marshaler ru msg, err := client.RemoveLocation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_LocationsService_RemoveLocation_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -202,7 +195,6 @@ func local_request_LocationsService_RemoveLocation_0(ctx context.Context, marsha msg, err := server.RemoveLocation(ctx, &protoReq) return msg, metadata, err - } func request_LocationsService_TestLocationConfig_0(ctx context.Context, marshaler runtime.Marshaler, client LocationsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +207,6 @@ func request_LocationsService_TestLocationConfig_0(ctx context.Context, marshale msg, err := client.TestLocationConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_LocationsService_TestLocationConfig_0(ctx context.Context, marshaler runtime.Marshaler, server LocationsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -228,7 +219,6 @@ func local_request_LocationsService_TestLocationConfig_0(ctx context.Context, ma msg, err := server.TestLocationConfig(ctx, &protoReq) return msg, metadata, err - } // RegisterLocationsServiceHandlerServer registers the http handlers for service LocationsService to "mux". @@ -237,7 +227,6 @@ func local_request_LocationsService_TestLocationConfig_0(ctx context.Context, ma // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLocationsServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LocationsServiceServer) error { - mux.Handle("GET", pattern_LocationsService_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -260,7 +249,6 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_ListLocations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_LocationsService_AddLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -285,7 +273,6 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_AddLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_LocationsService_ChangeLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -310,7 +297,6 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_ChangeLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_LocationsService_RemoveLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -335,7 +321,6 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_RemoveLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_LocationsService_TestLocationConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -360,7 +345,6 @@ func RegisterLocationsServiceHandlerServer(ctx context.Context, mux *runtime.Ser } forward_LocationsService_TestLocationConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -403,7 +387,6 @@ func RegisterLocationsServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "LocationsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LocationsServiceClient) error { - mux.Handle("GET", pattern_LocationsService_ListLocations_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -423,7 +406,6 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_ListLocations_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_LocationsService_AddLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -445,7 +427,6 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_AddLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_LocationsService_ChangeLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -467,7 +448,6 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_ChangeLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_LocationsService_RemoveLocation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -489,7 +469,6 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_RemoveLocation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_LocationsService_TestLocationConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -511,7 +490,6 @@ func RegisterLocationsServiceHandlerClient(ctx context.Context, mux *runtime.Ser } forward_LocationsService_TestLocationConfig_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/backup/v1/locations_grpc.pb.go b/api/backup/v1/locations_grpc.pb.go index cbcc055eae..748f7a20ad 100644 --- a/api/backup/v1/locations_grpc.pb.go +++ b/api/backup/v1/locations_grpc.pb.go @@ -8,6 +8,7 @@ package backupv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -131,15 +132,19 @@ type UnimplementedLocationsServiceServer struct{} func (UnimplementedLocationsServiceServer) ListLocations(context.Context, *ListLocationsRequest) (*ListLocationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListLocations not implemented") } + func (UnimplementedLocationsServiceServer) AddLocation(context.Context, *AddLocationRequest) (*AddLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddLocation not implemented") } + func (UnimplementedLocationsServiceServer) ChangeLocation(context.Context, *ChangeLocationRequest) (*ChangeLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeLocation not implemented") } + func (UnimplementedLocationsServiceServer) RemoveLocation(context.Context, *RemoveLocationRequest) (*RemoveLocationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveLocation not implemented") } + func (UnimplementedLocationsServiceServer) TestLocationConfig(context.Context, *TestLocationConfigRequest) (*TestLocationConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TestLocationConfig not implemented") } diff --git a/api/backup/v1/restores.pb.go b/api/backup/v1/restores.pb.go index 133e31c833..245ef2061d 100644 --- a/api/backup/v1/restores.pb.go +++ b/api/backup/v1/restores.pb.go @@ -7,14 +7,15 @@ package backupv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -719,21 +720,24 @@ func file_backup_v1_restores_proto_rawDescGZIP() []byte { return file_backup_v1_restores_proto_rawDescData } -var file_backup_v1_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_backup_v1_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_backup_v1_restores_proto_goTypes = []any{ - (RestoreStatus)(0), // 0: backup.v1.RestoreStatus - (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem - (*ListRestoresRequest)(nil), // 2: backup.v1.ListRestoresRequest - (*ListRestoresResponse)(nil), // 3: backup.v1.ListRestoresResponse - (*RestoreServiceGetLogsRequest)(nil), // 4: backup.v1.RestoreServiceGetLogsRequest - (*RestoreServiceGetLogsResponse)(nil), // 5: backup.v1.RestoreServiceGetLogsResponse - (*RestoreBackupRequest)(nil), // 6: backup.v1.RestoreBackupRequest - (*RestoreBackupResponse)(nil), // 7: backup.v1.RestoreBackupResponse - (DataModel)(0), // 8: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp - (*LogChunk)(nil), // 10: backup.v1.LogChunk -} +var ( + file_backup_v1_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_backup_v1_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 7) + file_backup_v1_restores_proto_goTypes = []any{ + (RestoreStatus)(0), // 0: backup.v1.RestoreStatus + (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem + (*ListRestoresRequest)(nil), // 2: backup.v1.ListRestoresRequest + (*ListRestoresResponse)(nil), // 3: backup.v1.ListRestoresResponse + (*RestoreServiceGetLogsRequest)(nil), // 4: backup.v1.RestoreServiceGetLogsRequest + (*RestoreServiceGetLogsResponse)(nil), // 5: backup.v1.RestoreServiceGetLogsResponse + (*RestoreBackupRequest)(nil), // 6: backup.v1.RestoreBackupRequest + (*RestoreBackupResponse)(nil), // 7: backup.v1.RestoreBackupResponse + (DataModel)(0), // 8: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*LogChunk)(nil), // 10: backup.v1.LogChunk + } +) + var file_backup_v1_restores_proto_depIdxs = []int32{ 8, // 0: backup.v1.RestoreHistoryItem.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.RestoreHistoryItem.status:type_name -> backup.v1.RestoreStatus diff --git a/api/backup/v1/restores.pb.gw.go b/api/backup/v1/restores.pb.gw.go index eff72d5612..a23df5f9d3 100644 --- a/api/backup/v1/restores.pb.gw.go +++ b/api/backup/v1/restores.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_RestoreService_ListRestores_0(ctx context.Context, marshaler runtime.Marshaler, client RestoreServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListRestoresRequest @@ -37,7 +39,6 @@ func request_RestoreService_ListRestores_0(ctx context.Context, marshaler runtim msg, err := client.ListRestores(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RestoreService_ListRestores_0(ctx context.Context, marshaler runtime.Marshaler, server RestoreServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -46,12 +47,9 @@ func local_request_RestoreService_ListRestores_0(ctx context.Context, marshaler msg, err := server.ListRestores(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_RestoreService_GetLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"restore_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_RestoreService_GetLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"restore_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_RestoreService_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, client RestoreServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RestoreServiceGetLogsRequest @@ -83,7 +81,6 @@ func request_RestoreService_GetLogs_0(ctx context.Context, marshaler runtime.Mar msg, err := client.GetLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RestoreService_GetLogs_0(ctx context.Context, marshaler runtime.Marshaler, server RestoreServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,7 +113,6 @@ func local_request_RestoreService_GetLogs_0(ctx context.Context, marshaler runti msg, err := server.GetLogs(ctx, &protoReq) return msg, metadata, err - } func request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler runtime.Marshaler, client RestoreServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -129,7 +125,6 @@ func request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler runti msg, err := client.RestoreBackup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler runtime.Marshaler, server RestoreServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -142,7 +137,6 @@ func local_request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler msg, err := server.RestoreBackup(ctx, &protoReq) return msg, metadata, err - } // RegisterRestoreServiceHandlerServer registers the http handlers for service RestoreService to "mux". @@ -151,7 +145,6 @@ func local_request_RestoreService_RestoreBackup_0(ctx context.Context, marshaler // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterRestoreServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RestoreServiceServer) error { - mux.Handle("GET", pattern_RestoreService_ListRestores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -174,7 +167,6 @@ func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_RestoreService_ListRestores_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_RestoreService_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -199,7 +191,6 @@ func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_RestoreService_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_RestoreService_RestoreBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -224,7 +215,6 @@ func RegisterRestoreServiceHandlerServer(ctx context.Context, mux *runtime.Serve } forward_RestoreService_RestoreBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -267,7 +257,6 @@ func RegisterRestoreServiceHandler(ctx context.Context, mux *runtime.ServeMux, c // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "RestoreServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RestoreServiceClient) error { - mux.Handle("GET", pattern_RestoreService_ListRestores_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -287,7 +276,6 @@ func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_RestoreService_ListRestores_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_RestoreService_GetLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -309,7 +297,6 @@ func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_RestoreService_GetLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_RestoreService_RestoreBackup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -331,7 +318,6 @@ func RegisterRestoreServiceHandlerClient(ctx context.Context, mux *runtime.Serve } forward_RestoreService_RestoreBackup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/backup/v1/restores_grpc.pb.go b/api/backup/v1/restores_grpc.pb.go index afefd76b99..e1371c479f 100644 --- a/api/backup/v1/restores_grpc.pb.go +++ b/api/backup/v1/restores_grpc.pb.go @@ -8,6 +8,7 @@ package backupv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -101,9 +102,11 @@ type UnimplementedRestoreServiceServer struct{} func (UnimplementedRestoreServiceServer) ListRestores(context.Context, *ListRestoresRequest) (*ListRestoresResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListRestores not implemented") } + func (UnimplementedRestoreServiceServer) GetLogs(context.Context, *RestoreServiceGetLogsRequest) (*RestoreServiceGetLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLogs not implemented") } + func (UnimplementedRestoreServiceServer) RestoreBackup(context.Context, *RestoreBackupRequest) (*RestoreBackupResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RestoreBackup not implemented") } diff --git a/api/common/common.pb.go b/api/common/common.pb.go index c69ee7bced..e40e872fef 100644 --- a/api/common/common.pb.go +++ b/api/common/common.pb.go @@ -7,10 +7,11 @@ package common import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -150,12 +151,15 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_common_common_proto_goTypes = []any{ - (*StringArray)(nil), // 0: common.StringArray - (*StringMap)(nil), // 1: common.StringMap - nil, // 2: common.StringMap.ValuesEntry -} +var ( + file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_common_common_proto_goTypes = []any{ + (*StringArray)(nil), // 0: common.StringArray + (*StringMap)(nil), // 1: common.StringMap + nil, // 2: common.StringMap.ValuesEntry + } +) + var file_common_common_proto_depIdxs = []int32{ 2, // 0: common.StringMap.values:type_name -> common.StringMap.ValuesEntry 1, // [1:1] is the sub-list for method output_type diff --git a/api/common/metrics_resolutions.pb.go b/api/common/metrics_resolutions.pb.go index 26dc389526..b2f0e094c4 100644 --- a/api/common/metrics_resolutions.pb.go +++ b/api/common/metrics_resolutions.pb.go @@ -7,11 +7,12 @@ package common import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" - reflect "reflect" - sync "sync" ) const ( @@ -126,11 +127,14 @@ func file_common_metrics_resolutions_proto_rawDescGZIP() []byte { return file_common_metrics_resolutions_proto_rawDescData } -var file_common_metrics_resolutions_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_common_metrics_resolutions_proto_goTypes = []any{ - (*MetricsResolutions)(nil), // 0: common.MetricsResolutions - (*durationpb.Duration)(nil), // 1: google.protobuf.Duration -} +var ( + file_common_metrics_resolutions_proto_msgTypes = make([]protoimpl.MessageInfo, 1) + file_common_metrics_resolutions_proto_goTypes = []any{ + (*MetricsResolutions)(nil), // 0: common.MetricsResolutions + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration + } +) + var file_common_metrics_resolutions_proto_depIdxs = []int32{ 1, // 0: common.MetricsResolutions.hr:type_name -> google.protobuf.Duration 1, // 1: common.MetricsResolutions.mr:type_name -> google.protobuf.Duration diff --git a/api/dump/v1beta1/dump.pb.go b/api/dump/v1beta1/dump.pb.go index 17cee438ba..36fe115123 100644 --- a/api/dump/v1beta1/dump.pb.go +++ b/api/dump/v1beta1/dump.pb.go @@ -7,14 +7,15 @@ package dumpv1beta1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -950,25 +951,28 @@ func file_dump_v1beta1_dump_proto_rawDescGZIP() []byte { return file_dump_v1beta1_dump_proto_rawDescData } -var file_dump_v1beta1_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_dump_v1beta1_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_dump_v1beta1_dump_proto_goTypes = []any{ - (DumpStatus)(0), // 0: dump.v1beta1.DumpStatus - (*Dump)(nil), // 1: dump.v1beta1.Dump - (*StartDumpRequest)(nil), // 2: dump.v1beta1.StartDumpRequest - (*StartDumpResponse)(nil), // 3: dump.v1beta1.StartDumpResponse - (*ListDumpsRequest)(nil), // 4: dump.v1beta1.ListDumpsRequest - (*ListDumpsResponse)(nil), // 5: dump.v1beta1.ListDumpsResponse - (*DeleteDumpRequest)(nil), // 6: dump.v1beta1.DeleteDumpRequest - (*DeleteDumpResponse)(nil), // 7: dump.v1beta1.DeleteDumpResponse - (*GetDumpLogsRequest)(nil), // 8: dump.v1beta1.GetDumpLogsRequest - (*GetDumpLogsResponse)(nil), // 9: dump.v1beta1.GetDumpLogsResponse - (*LogChunk)(nil), // 10: dump.v1beta1.LogChunk - (*SFTPParameters)(nil), // 11: dump.v1beta1.SFTPParameters - (*UploadDumpRequest)(nil), // 12: dump.v1beta1.UploadDumpRequest - (*UploadDumpResponse)(nil), // 13: dump.v1beta1.UploadDumpResponse - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp -} +var ( + file_dump_v1beta1_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_dump_v1beta1_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 13) + file_dump_v1beta1_dump_proto_goTypes = []any{ + (DumpStatus)(0), // 0: dump.v1beta1.DumpStatus + (*Dump)(nil), // 1: dump.v1beta1.Dump + (*StartDumpRequest)(nil), // 2: dump.v1beta1.StartDumpRequest + (*StartDumpResponse)(nil), // 3: dump.v1beta1.StartDumpResponse + (*ListDumpsRequest)(nil), // 4: dump.v1beta1.ListDumpsRequest + (*ListDumpsResponse)(nil), // 5: dump.v1beta1.ListDumpsResponse + (*DeleteDumpRequest)(nil), // 6: dump.v1beta1.DeleteDumpRequest + (*DeleteDumpResponse)(nil), // 7: dump.v1beta1.DeleteDumpResponse + (*GetDumpLogsRequest)(nil), // 8: dump.v1beta1.GetDumpLogsRequest + (*GetDumpLogsResponse)(nil), // 9: dump.v1beta1.GetDumpLogsResponse + (*LogChunk)(nil), // 10: dump.v1beta1.LogChunk + (*SFTPParameters)(nil), // 11: dump.v1beta1.SFTPParameters + (*UploadDumpRequest)(nil), // 12: dump.v1beta1.UploadDumpRequest + (*UploadDumpResponse)(nil), // 13: dump.v1beta1.UploadDumpResponse + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + } +) + var file_dump_v1beta1_dump_proto_depIdxs = []int32{ 0, // 0: dump.v1beta1.Dump.status:type_name -> dump.v1beta1.DumpStatus 14, // 1: dump.v1beta1.Dump.start_time:type_name -> google.protobuf.Timestamp diff --git a/api/dump/v1beta1/dump.pb.gw.go b/api/dump/v1beta1/dump.pb.gw.go index cd26e91f14..3ffa7d594e 100644 --- a/api/dump/v1beta1/dump.pb.gw.go +++ b/api/dump/v1beta1/dump.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_DumpService_StartDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StartDumpRequest @@ -41,7 +43,6 @@ func request_DumpService_StartDump_0(ctx context.Context, marshaler runtime.Mars msg, err := client.StartDump(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_DumpService_StartDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -54,7 +55,6 @@ func local_request_DumpService_StartDump_0(ctx context.Context, marshaler runtim msg, err := server.StartDump(ctx, &protoReq) return msg, metadata, err - } func request_DumpService_ListDumps_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -63,7 +63,6 @@ func request_DumpService_ListDumps_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ListDumps(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_DumpService_ListDumps_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -72,7 +71,6 @@ func local_request_DumpService_ListDumps_0(ctx context.Context, marshaler runtim msg, err := server.ListDumps(ctx, &protoReq) return msg, metadata, err - } func request_DumpService_DeleteDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -85,7 +83,6 @@ func request_DumpService_DeleteDump_0(ctx context.Context, marshaler runtime.Mar msg, err := client.DeleteDump(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_DumpService_DeleteDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -98,12 +95,9 @@ func local_request_DumpService_DeleteDump_0(ctx context.Context, marshaler runti msg, err := server.DeleteDump(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_DumpService_GetDumpLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"dump_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_DumpService_GetDumpLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"dump_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetDumpLogsRequest @@ -135,7 +129,6 @@ func request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Ma msg, err := client.GetDumpLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -168,7 +161,6 @@ func local_request_DumpService_GetDumpLogs_0(ctx context.Context, marshaler runt msg, err := server.GetDumpLogs(ctx, &protoReq) return msg, metadata, err - } func request_DumpService_UploadDump_0(ctx context.Context, marshaler runtime.Marshaler, client DumpServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -181,7 +173,6 @@ func request_DumpService_UploadDump_0(ctx context.Context, marshaler runtime.Mar msg, err := client.UploadDump(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_DumpService_UploadDump_0(ctx context.Context, marshaler runtime.Marshaler, server DumpServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -194,7 +185,6 @@ func local_request_DumpService_UploadDump_0(ctx context.Context, marshaler runti msg, err := server.UploadDump(ctx, &protoReq) return msg, metadata, err - } // RegisterDumpServiceHandlerServer registers the http handlers for service DumpService to "mux". @@ -203,7 +193,6 @@ func local_request_DumpService_UploadDump_0(ctx context.Context, marshaler runti // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDumpServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DumpServiceServer) error { - mux.Handle("POST", pattern_DumpService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -226,7 +215,6 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_StartDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_DumpService_ListDumps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -251,7 +239,6 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_ListDumps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_DumpService_DeleteDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -276,7 +263,6 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_DeleteDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_DumpService_GetDumpLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -301,7 +287,6 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_GetDumpLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_DumpService_UploadDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -326,7 +311,6 @@ func RegisterDumpServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_UploadDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -369,7 +353,6 @@ func RegisterDumpServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "DumpServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DumpServiceClient) error { - mux.Handle("POST", pattern_DumpService_StartDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -389,7 +372,6 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_StartDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_DumpService_ListDumps_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -411,7 +393,6 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_ListDumps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_DumpService_DeleteDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -433,7 +414,6 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_DeleteDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_DumpService_GetDumpLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -455,7 +435,6 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_GetDumpLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_DumpService_UploadDump_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -477,7 +456,6 @@ func RegisterDumpServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_DumpService_UploadDump_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/dump/v1beta1/dump_grpc.pb.go b/api/dump/v1beta1/dump_grpc.pb.go index 9297a903f3..5b859aafc6 100644 --- a/api/dump/v1beta1/dump_grpc.pb.go +++ b/api/dump/v1beta1/dump_grpc.pb.go @@ -8,6 +8,7 @@ package dumpv1beta1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -127,15 +128,19 @@ type UnimplementedDumpServiceServer struct{} func (UnimplementedDumpServiceServer) StartDump(context.Context, *StartDumpRequest) (*StartDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartDump not implemented") } + func (UnimplementedDumpServiceServer) ListDumps(context.Context, *ListDumpsRequest) (*ListDumpsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDumps not implemented") } + func (UnimplementedDumpServiceServer) DeleteDump(context.Context, *DeleteDumpRequest) (*DeleteDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteDump not implemented") } + func (UnimplementedDumpServiceServer) GetDumpLogs(context.Context, *GetDumpLogsRequest) (*GetDumpLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDumpLogs not implemented") } + func (UnimplementedDumpServiceServer) UploadDump(context.Context, *UploadDumpRequest) (*UploadDumpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadDump not implemented") } diff --git a/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go index 733240643c..0c83d67b57 100644 --- a/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go @@ -60,7 +60,6 @@ DeleteDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteDumpParams struct { - // Body. Body DeleteDumpBody @@ -130,7 +129,6 @@ func (o *DeleteDumpParams) SetBody(body DeleteDumpBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go index 957158dd62..5d220bc48b 100644 --- a/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go @@ -103,7 +103,6 @@ func (o *DeleteDumpOK) GetPayload() interface{} { } func (o *DeleteDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *DeleteDumpDefault) GetPayload() *DeleteDumpDefaultBody { } func (o *DeleteDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DeleteDumpDefaultBody) // response payload @@ -191,7 +189,6 @@ DeleteDumpBody delete dump body swagger:model DeleteDumpBody */ type DeleteDumpBody struct { - // dump ids DumpIds []string `json:"dump_ids"` } @@ -229,7 +226,6 @@ DeleteDumpDefaultBody delete dump default body swagger:model DeleteDumpDefaultBody */ type DeleteDumpDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -295,9 +291,7 @@ func (o *DeleteDumpDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DeleteDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,7 +307,6 @@ func (o *DeleteDumpDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -342,7 +335,6 @@ DeleteDumpDefaultBodyDetailsItems0 delete dump default body details items0 swagger:model DeleteDumpDefaultBodyDetailsItems0 */ type DeleteDumpDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -354,7 +346,6 @@ type DeleteDumpDefaultBodyDetailsItems0 struct { func (o *DeleteDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -392,7 +383,6 @@ func (o *DeleteDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go index 4be2f03898..82ed2997d2 100644 --- a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go @@ -61,7 +61,6 @@ GetDumpLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetDumpLogsParams struct { - // DumpID. DumpID string @@ -163,7 +162,6 @@ func (o *GetDumpLogsParams) SetOffset(offset *int64) { // WriteToRequest writes these params to a swagger request func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -184,7 +182,6 @@ func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { - if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -201,7 +198,6 @@ func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { - if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go index 1d658bd46c..0d9fa17804 100644 --- a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go @@ -103,7 +103,6 @@ func (o *GetDumpLogsOK) GetPayload() *GetDumpLogsOKBody { } func (o *GetDumpLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetDumpLogsOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetDumpLogsDefault) GetPayload() *GetDumpLogsDefaultBody { } func (o *GetDumpLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetDumpLogsDefaultBody) // response payload @@ -193,7 +191,6 @@ GetDumpLogsDefaultBody get dump logs default body swagger:model GetDumpLogsDefaultBody */ type GetDumpLogsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetDumpLogsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *GetDumpLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetDumpLogsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -306,7 +300,6 @@ GetDumpLogsDefaultBodyDetailsItems0 get dump logs default body details items0 swagger:model GetDumpLogsDefaultBodyDetailsItems0 */ type GetDumpLogsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetDumpLogsDefaultBodyDetailsItems0 struct { func (o *GetDumpLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetDumpLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetDumpLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetDumpLogsOKBody get dump logs OK body swagger:model GetDumpLogsOKBody */ type GetDumpLogsOKBody struct { - // logs Logs []*GetDumpLogsOKBodyLogsItems0 `json:"logs"` @@ -483,9 +473,7 @@ func (o *GetDumpLogsOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetDumpLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Logs); i++ { - if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -501,7 +489,6 @@ func (o *GetDumpLogsOKBody) contextValidateLogs(ctx context.Context, formats str return err } } - } return nil @@ -530,7 +517,6 @@ GetDumpLogsOKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetDumpLogsOKBodyLogsItems0 */ type GetDumpLogsOKBodyLogsItems0 struct { - // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go b/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go index 3ca0caf159..dc28a36ad4 100644 --- a/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go @@ -115,7 +115,6 @@ func (o *ListDumpsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListDumpsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go b/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go index 4f53ff6de5..994f89d8d0 100644 --- a/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go @@ -104,7 +104,6 @@ func (o *ListDumpsOK) GetPayload() *ListDumpsOKBody { } func (o *ListDumpsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListDumpsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListDumpsDefault) GetPayload() *ListDumpsDefaultBody { } func (o *ListDumpsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListDumpsDefaultBody) // response payload @@ -194,7 +192,6 @@ ListDumpsDefaultBody list dumps default body swagger:model ListDumpsDefaultBody */ type ListDumpsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListDumpsDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListDumpsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListDumpsDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -307,7 +301,6 @@ ListDumpsDefaultBodyDetailsItems0 list dumps default body details items0 swagger:model ListDumpsDefaultBodyDetailsItems0 */ type ListDumpsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListDumpsDefaultBodyDetailsItems0 struct { func (o *ListDumpsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListDumpsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListDumpsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListDumpsOKBody list dumps OK body swagger:model ListDumpsOKBody */ type ListDumpsOKBody struct { - // dumps Dumps []*ListDumpsOKBodyDumpsItems0 `json:"dumps"` } @@ -481,9 +471,7 @@ func (o *ListDumpsOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListDumpsOKBody) contextValidateDumps(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Dumps); i++ { - if o.Dumps[i] != nil { if swag.IsZero(o.Dumps[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListDumpsOKBody) contextValidateDumps(ctx context.Context, formats strf return err } } - } return nil @@ -528,7 +515,6 @@ ListDumpsOKBodyDumpsItems0 list dumps OK body dumps items0 swagger:model ListDumpsOKBodyDumpsItems0 */ type ListDumpsOKBodyDumpsItems0 struct { - // dump id DumpID string `json:"dump_id,omitempty"` diff --git a/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go index c456e5f494..ac9f2ba90e 100644 --- a/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go @@ -60,7 +60,6 @@ StartDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartDumpParams struct { - // Body. Body StartDumpBody @@ -130,7 +129,6 @@ func (o *StartDumpParams) SetBody(body StartDumpBody) { // WriteToRequest writes these params to a swagger request func (o *StartDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go index 600f3c2d7f..2833719e04 100644 --- a/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go @@ -104,7 +104,6 @@ func (o *StartDumpOK) GetPayload() *StartDumpOKBody { } func (o *StartDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartDumpOKBody) // response payload @@ -178,7 +177,6 @@ func (o *StartDumpDefault) GetPayload() *StartDumpDefaultBody { } func (o *StartDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartDumpDefaultBody) // response payload @@ -194,7 +192,6 @@ StartDumpBody start dump body swagger:model StartDumpBody */ type StartDumpBody struct { - // service names ServiceNames []string `json:"service_names"` @@ -283,7 +280,6 @@ StartDumpDefaultBody start dump default body swagger:model StartDumpDefaultBody */ type StartDumpDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -349,9 +345,7 @@ func (o *StartDumpDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *StartDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -367,7 +361,6 @@ func (o *StartDumpDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -396,7 +389,6 @@ StartDumpDefaultBodyDetailsItems0 start dump default body details items0 swagger:model StartDumpDefaultBodyDetailsItems0 */ type StartDumpDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -408,7 +400,6 @@ type StartDumpDefaultBodyDetailsItems0 struct { func (o *StartDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -446,7 +437,6 @@ func (o *StartDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -510,7 +500,6 @@ StartDumpOKBody start dump OK body swagger:model StartDumpOKBody */ type StartDumpOKBody struct { - // dump id DumpID string `json:"dump_id,omitempty"` } diff --git a/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go index 0073c54dd7..0be24f481a 100644 --- a/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go @@ -60,7 +60,6 @@ UploadDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UploadDumpParams struct { - // Body. Body UploadDumpBody @@ -130,7 +129,6 @@ func (o *UploadDumpParams) SetBody(body UploadDumpBody) { // WriteToRequest writes these params to a swagger request func (o *UploadDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go index a42c830d76..d1db708bc7 100644 --- a/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go @@ -103,7 +103,6 @@ func (o *UploadDumpOK) GetPayload() interface{} { } func (o *UploadDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *UploadDumpDefault) GetPayload() *UploadDumpDefaultBody { } func (o *UploadDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UploadDumpDefaultBody) // response payload @@ -191,7 +189,6 @@ UploadDumpBody upload dump body swagger:model UploadDumpBody */ type UploadDumpBody struct { - // dump ids DumpIds []string `json:"dump_ids"` @@ -247,7 +244,6 @@ func (o *UploadDumpBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *UploadDumpBody) contextValidateSftpParameters(ctx context.Context, formats strfmt.Registry) error { - if o.SftpParameters != nil { if swag.IsZero(o.SftpParameters) { // not required @@ -290,7 +286,6 @@ UploadDumpDefaultBody upload dump default body swagger:model UploadDumpDefaultBody */ type UploadDumpDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -356,9 +351,7 @@ func (o *UploadDumpDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UploadDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -374,7 +367,6 @@ func (o *UploadDumpDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -403,7 +395,6 @@ UploadDumpDefaultBodyDetailsItems0 upload dump default body details items0 swagger:model UploadDumpDefaultBodyDetailsItems0 */ type UploadDumpDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -415,7 +406,6 @@ type UploadDumpDefaultBodyDetailsItems0 struct { func (o *UploadDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -453,7 +443,6 @@ func (o *UploadDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UploadDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -517,7 +506,6 @@ UploadDumpParamsBodySftpParameters upload dump params body sftp parameters swagger:model UploadDumpParamsBodySftpParameters */ type UploadDumpParamsBodySftpParameters struct { - // address Address string `json:"address,omitempty"` diff --git a/api/inventory/v1/agent_status.pb.go b/api/inventory/v1/agent_status.pb.go index 8b65e584bd..b9c28ee4be 100644 --- a/api/inventory/v1/agent_status.pb.go +++ b/api/inventory/v1/agent_status.pb.go @@ -7,10 +7,11 @@ package inventoryv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -139,10 +140,13 @@ func file_inventory_v1_agent_status_proto_rawDescGZIP() []byte { return file_inventory_v1_agent_status_proto_rawDescData } -var file_inventory_v1_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventory_v1_agent_status_proto_goTypes = []any{ - (AgentStatus)(0), // 0: inventory.v1.AgentStatus -} +var ( + file_inventory_v1_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventory_v1_agent_status_proto_goTypes = []any{ + (AgentStatus)(0), // 0: inventory.v1.AgentStatus + } +) + var file_inventory_v1_agent_status_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventory/v1/agents.pb.go b/api/inventory/v1/agents.pb.go index 0d617d36cd..b7ec1a509a 100644 --- a/api/inventory/v1/agents.pb.go +++ b/api/inventory/v1/agents.pb.go @@ -7,14 +7,16 @@ package inventoryv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + common "github.com/percona/pmm/api/common" ) const ( @@ -9671,98 +9673,101 @@ func file_inventory_v1_agents_proto_rawDescGZIP() []byte { return file_inventory_v1_agents_proto_rawDescData } -var file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 83) -var file_inventory_v1_agents_proto_goTypes = []any{ - (AgentType)(0), // 0: inventory.v1.AgentType - (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent - (*VMAgent)(nil), // 2: inventory.v1.VMAgent - (*NodeExporter)(nil), // 3: inventory.v1.NodeExporter - (*MySQLdExporter)(nil), // 4: inventory.v1.MySQLdExporter - (*MongoDBExporter)(nil), // 5: inventory.v1.MongoDBExporter - (*PostgresExporter)(nil), // 6: inventory.v1.PostgresExporter - (*ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter - (*QANMySQLPerfSchemaAgent)(nil), // 8: inventory.v1.QANMySQLPerfSchemaAgent - (*QANMySQLSlowlogAgent)(nil), // 9: inventory.v1.QANMySQLSlowlogAgent - (*QANMongoDBProfilerAgent)(nil), // 10: inventory.v1.QANMongoDBProfilerAgent - (*QANPostgreSQLPgStatementsAgent)(nil), // 11: inventory.v1.QANPostgreSQLPgStatementsAgent - (*QANPostgreSQLPgStatMonitorAgent)(nil), // 12: inventory.v1.QANPostgreSQLPgStatMonitorAgent - (*RDSExporter)(nil), // 13: inventory.v1.RDSExporter - (*ExternalExporter)(nil), // 14: inventory.v1.ExternalExporter - (*AzureDatabaseExporter)(nil), // 15: inventory.v1.AzureDatabaseExporter - (*ChangeCommonAgentParams)(nil), // 16: inventory.v1.ChangeCommonAgentParams - (*ListAgentsRequest)(nil), // 17: inventory.v1.ListAgentsRequest - (*ListAgentsResponse)(nil), // 18: inventory.v1.ListAgentsResponse - (*GetAgentRequest)(nil), // 19: inventory.v1.GetAgentRequest - (*GetAgentResponse)(nil), // 20: inventory.v1.GetAgentResponse - (*GetAgentLogsRequest)(nil), // 21: inventory.v1.GetAgentLogsRequest - (*GetAgentLogsResponse)(nil), // 22: inventory.v1.GetAgentLogsResponse - (*AddAgentRequest)(nil), // 23: inventory.v1.AddAgentRequest - (*AddAgentResponse)(nil), // 24: inventory.v1.AddAgentResponse - (*ChangeAgentRequest)(nil), // 25: inventory.v1.ChangeAgentRequest - (*ChangeAgentResponse)(nil), // 26: inventory.v1.ChangeAgentResponse - (*AddPMMAgentParams)(nil), // 27: inventory.v1.AddPMMAgentParams - (*AddNodeExporterParams)(nil), // 28: inventory.v1.AddNodeExporterParams - (*ChangeNodeExporterParams)(nil), // 29: inventory.v1.ChangeNodeExporterParams - (*AddMySQLdExporterParams)(nil), // 30: inventory.v1.AddMySQLdExporterParams - (*ChangeMySQLdExporterParams)(nil), // 31: inventory.v1.ChangeMySQLdExporterParams - (*AddMongoDBExporterParams)(nil), // 32: inventory.v1.AddMongoDBExporterParams - (*ChangeMongoDBExporterParams)(nil), // 33: inventory.v1.ChangeMongoDBExporterParams - (*AddPostgresExporterParams)(nil), // 34: inventory.v1.AddPostgresExporterParams - (*ChangePostgresExporterParams)(nil), // 35: inventory.v1.ChangePostgresExporterParams - (*AddProxySQLExporterParams)(nil), // 36: inventory.v1.AddProxySQLExporterParams - (*ChangeProxySQLExporterParams)(nil), // 37: inventory.v1.ChangeProxySQLExporterParams - (*AddQANMySQLPerfSchemaAgentParams)(nil), // 38: inventory.v1.AddQANMySQLPerfSchemaAgentParams - (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 39: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams - (*AddQANMySQLSlowlogAgentParams)(nil), // 40: inventory.v1.AddQANMySQLSlowlogAgentParams - (*ChangeQANMySQLSlowlogAgentParams)(nil), // 41: inventory.v1.ChangeQANMySQLSlowlogAgentParams - (*AddQANMongoDBProfilerAgentParams)(nil), // 42: inventory.v1.AddQANMongoDBProfilerAgentParams - (*ChangeQANMongoDBProfilerAgentParams)(nil), // 43: inventory.v1.ChangeQANMongoDBProfilerAgentParams - (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 44: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams - (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 45: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams - (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 46: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams - (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 47: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams - (*AddRDSExporterParams)(nil), // 48: inventory.v1.AddRDSExporterParams - (*ChangeRDSExporterParams)(nil), // 49: inventory.v1.ChangeRDSExporterParams - (*AddExternalExporterParams)(nil), // 50: inventory.v1.AddExternalExporterParams - (*ChangeExternalExporterParams)(nil), // 51: inventory.v1.ChangeExternalExporterParams - (*AddAzureDatabaseExporterParams)(nil), // 52: inventory.v1.AddAzureDatabaseExporterParams - (*ChangeAzureDatabaseExporterParams)(nil), // 53: inventory.v1.ChangeAzureDatabaseExporterParams - (*RemoveAgentRequest)(nil), // 54: inventory.v1.RemoveAgentRequest - (*RemoveAgentResponse)(nil), // 55: inventory.v1.RemoveAgentResponse - nil, // 56: inventory.v1.PMMAgent.CustomLabelsEntry - nil, // 57: inventory.v1.NodeExporter.CustomLabelsEntry - nil, // 58: inventory.v1.MySQLdExporter.CustomLabelsEntry - nil, // 59: inventory.v1.MongoDBExporter.CustomLabelsEntry - nil, // 60: inventory.v1.PostgresExporter.CustomLabelsEntry - nil, // 61: inventory.v1.ProxySQLExporter.CustomLabelsEntry - nil, // 62: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry - nil, // 63: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry - nil, // 64: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry - nil, // 65: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - nil, // 66: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - nil, // 67: inventory.v1.RDSExporter.CustomLabelsEntry - nil, // 68: inventory.v1.ExternalExporter.CustomLabelsEntry - nil, // 69: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry - nil, // 70: inventory.v1.AddPMMAgentParams.CustomLabelsEntry - nil, // 71: inventory.v1.AddNodeExporterParams.CustomLabelsEntry - nil, // 72: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry - nil, // 73: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry - nil, // 74: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry - nil, // 75: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry - nil, // 76: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry - nil, // 77: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry - nil, // 78: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry - nil, // 79: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry - nil, // 80: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry - nil, // 81: inventory.v1.AddRDSExporterParams.CustomLabelsEntry - nil, // 82: inventory.v1.AddExternalExporterParams.CustomLabelsEntry - nil, // 83: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry - (AgentStatus)(0), // 84: inventory.v1.AgentStatus - (LogLevel)(0), // 85: inventory.v1.LogLevel - (*common.MetricsResolutions)(nil), // 86: common.MetricsResolutions - (*common.StringMap)(nil), // 87: common.StringMap -} +var ( + file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 83) + file_inventory_v1_agents_proto_goTypes = []any{ + (AgentType)(0), // 0: inventory.v1.AgentType + (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent + (*VMAgent)(nil), // 2: inventory.v1.VMAgent + (*NodeExporter)(nil), // 3: inventory.v1.NodeExporter + (*MySQLdExporter)(nil), // 4: inventory.v1.MySQLdExporter + (*MongoDBExporter)(nil), // 5: inventory.v1.MongoDBExporter + (*PostgresExporter)(nil), // 6: inventory.v1.PostgresExporter + (*ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter + (*QANMySQLPerfSchemaAgent)(nil), // 8: inventory.v1.QANMySQLPerfSchemaAgent + (*QANMySQLSlowlogAgent)(nil), // 9: inventory.v1.QANMySQLSlowlogAgent + (*QANMongoDBProfilerAgent)(nil), // 10: inventory.v1.QANMongoDBProfilerAgent + (*QANPostgreSQLPgStatementsAgent)(nil), // 11: inventory.v1.QANPostgreSQLPgStatementsAgent + (*QANPostgreSQLPgStatMonitorAgent)(nil), // 12: inventory.v1.QANPostgreSQLPgStatMonitorAgent + (*RDSExporter)(nil), // 13: inventory.v1.RDSExporter + (*ExternalExporter)(nil), // 14: inventory.v1.ExternalExporter + (*AzureDatabaseExporter)(nil), // 15: inventory.v1.AzureDatabaseExporter + (*ChangeCommonAgentParams)(nil), // 16: inventory.v1.ChangeCommonAgentParams + (*ListAgentsRequest)(nil), // 17: inventory.v1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 18: inventory.v1.ListAgentsResponse + (*GetAgentRequest)(nil), // 19: inventory.v1.GetAgentRequest + (*GetAgentResponse)(nil), // 20: inventory.v1.GetAgentResponse + (*GetAgentLogsRequest)(nil), // 21: inventory.v1.GetAgentLogsRequest + (*GetAgentLogsResponse)(nil), // 22: inventory.v1.GetAgentLogsResponse + (*AddAgentRequest)(nil), // 23: inventory.v1.AddAgentRequest + (*AddAgentResponse)(nil), // 24: inventory.v1.AddAgentResponse + (*ChangeAgentRequest)(nil), // 25: inventory.v1.ChangeAgentRequest + (*ChangeAgentResponse)(nil), // 26: inventory.v1.ChangeAgentResponse + (*AddPMMAgentParams)(nil), // 27: inventory.v1.AddPMMAgentParams + (*AddNodeExporterParams)(nil), // 28: inventory.v1.AddNodeExporterParams + (*ChangeNodeExporterParams)(nil), // 29: inventory.v1.ChangeNodeExporterParams + (*AddMySQLdExporterParams)(nil), // 30: inventory.v1.AddMySQLdExporterParams + (*ChangeMySQLdExporterParams)(nil), // 31: inventory.v1.ChangeMySQLdExporterParams + (*AddMongoDBExporterParams)(nil), // 32: inventory.v1.AddMongoDBExporterParams + (*ChangeMongoDBExporterParams)(nil), // 33: inventory.v1.ChangeMongoDBExporterParams + (*AddPostgresExporterParams)(nil), // 34: inventory.v1.AddPostgresExporterParams + (*ChangePostgresExporterParams)(nil), // 35: inventory.v1.ChangePostgresExporterParams + (*AddProxySQLExporterParams)(nil), // 36: inventory.v1.AddProxySQLExporterParams + (*ChangeProxySQLExporterParams)(nil), // 37: inventory.v1.ChangeProxySQLExporterParams + (*AddQANMySQLPerfSchemaAgentParams)(nil), // 38: inventory.v1.AddQANMySQLPerfSchemaAgentParams + (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 39: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams + (*AddQANMySQLSlowlogAgentParams)(nil), // 40: inventory.v1.AddQANMySQLSlowlogAgentParams + (*ChangeQANMySQLSlowlogAgentParams)(nil), // 41: inventory.v1.ChangeQANMySQLSlowlogAgentParams + (*AddQANMongoDBProfilerAgentParams)(nil), // 42: inventory.v1.AddQANMongoDBProfilerAgentParams + (*ChangeQANMongoDBProfilerAgentParams)(nil), // 43: inventory.v1.ChangeQANMongoDBProfilerAgentParams + (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 44: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams + (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 45: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams + (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 46: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams + (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 47: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams + (*AddRDSExporterParams)(nil), // 48: inventory.v1.AddRDSExporterParams + (*ChangeRDSExporterParams)(nil), // 49: inventory.v1.ChangeRDSExporterParams + (*AddExternalExporterParams)(nil), // 50: inventory.v1.AddExternalExporterParams + (*ChangeExternalExporterParams)(nil), // 51: inventory.v1.ChangeExternalExporterParams + (*AddAzureDatabaseExporterParams)(nil), // 52: inventory.v1.AddAzureDatabaseExporterParams + (*ChangeAzureDatabaseExporterParams)(nil), // 53: inventory.v1.ChangeAzureDatabaseExporterParams + (*RemoveAgentRequest)(nil), // 54: inventory.v1.RemoveAgentRequest + (*RemoveAgentResponse)(nil), // 55: inventory.v1.RemoveAgentResponse + nil, // 56: inventory.v1.PMMAgent.CustomLabelsEntry + nil, // 57: inventory.v1.NodeExporter.CustomLabelsEntry + nil, // 58: inventory.v1.MySQLdExporter.CustomLabelsEntry + nil, // 59: inventory.v1.MongoDBExporter.CustomLabelsEntry + nil, // 60: inventory.v1.PostgresExporter.CustomLabelsEntry + nil, // 61: inventory.v1.ProxySQLExporter.CustomLabelsEntry + nil, // 62: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry + nil, // 63: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry + nil, // 64: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry + nil, // 65: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + nil, // 66: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + nil, // 67: inventory.v1.RDSExporter.CustomLabelsEntry + nil, // 68: inventory.v1.ExternalExporter.CustomLabelsEntry + nil, // 69: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry + nil, // 70: inventory.v1.AddPMMAgentParams.CustomLabelsEntry + nil, // 71: inventory.v1.AddNodeExporterParams.CustomLabelsEntry + nil, // 72: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry + nil, // 73: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry + nil, // 74: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry + nil, // 75: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry + nil, // 76: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry + nil, // 77: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry + nil, // 78: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry + nil, // 79: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry + nil, // 80: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry + nil, // 81: inventory.v1.AddRDSExporterParams.CustomLabelsEntry + nil, // 82: inventory.v1.AddExternalExporterParams.CustomLabelsEntry + nil, // 83: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry + (AgentStatus)(0), // 84: inventory.v1.AgentStatus + (LogLevel)(0), // 85: inventory.v1.LogLevel + (*common.MetricsResolutions)(nil), // 86: common.MetricsResolutions + (*common.StringMap)(nil), // 87: common.StringMap + } +) + var file_inventory_v1_agents_proto_depIdxs = []int32{ 56, // 0: inventory.v1.PMMAgent.custom_labels:type_name -> inventory.v1.PMMAgent.CustomLabelsEntry 84, // 1: inventory.v1.VMAgent.status:type_name -> inventory.v1.AgentStatus diff --git a/api/inventory/v1/agents.pb.gw.go b/api/inventory/v1/agents.pb.gw.go index fa6ffb9150..ea823e5f0f 100644 --- a/api/inventory/v1/agents.pb.gw.go +++ b/api/inventory/v1/agents.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_AgentsService_ListAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) +var filter_AgentsService_ListAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + func request_AgentsService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAgentsRequest var metadata runtime.ServerMetadata @@ -48,7 +48,6 @@ func request_AgentsService_ListAgents_0(ctx context.Context, marshaler runtime.M msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentsService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -64,7 +63,6 @@ func local_request_AgentsService_ListAgents_0(ctx context.Context, marshaler run msg, err := server.ListAgents(ctx, &protoReq) return msg, metadata, err - } func request_AgentsService_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -90,7 +88,6 @@ func request_AgentsService_GetAgent_0(ctx context.Context, marshaler runtime.Mar msg, err := client.GetAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentsService_GetAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,12 +113,9 @@ func local_request_AgentsService_GetAgent_0(ctx context.Context, marshaler runti msg, err := server.GetAgent(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_AgentsService_GetAgentLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"agent_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_AgentsService_GetAgentLogs_0 = &utilities.DoubleArray{Encoding: map[string]int{"agent_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_AgentsService_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetAgentLogsRequest @@ -153,7 +147,6 @@ func request_AgentsService_GetAgentLogs_0(ctx context.Context, marshaler runtime msg, err := client.GetAgentLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentsService_GetAgentLogs_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -186,7 +179,6 @@ func local_request_AgentsService_GetAgentLogs_0(ctx context.Context, marshaler r msg, err := server.GetAgentLogs(ctx, &protoReq) return msg, metadata, err - } func request_AgentsService_AddAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -199,7 +191,6 @@ func request_AgentsService_AddAgent_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AddAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentsService_AddAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -212,7 +203,6 @@ func local_request_AgentsService_AddAgent_0(ctx context.Context, marshaler runti msg, err := server.AddAgent(ctx, &protoReq) return msg, metadata, err - } func request_AgentsService_ChangeAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -242,7 +232,6 @@ func request_AgentsService_ChangeAgent_0(ctx context.Context, marshaler runtime. msg, err := client.ChangeAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentsService_ChangeAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -272,12 +261,9 @@ func local_request_AgentsService_ChangeAgent_0(ctx context.Context, marshaler ru msg, err := server.ChangeAgent(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_AgentsService_RemoveAgent_0 = &utilities.DoubleArray{Encoding: map[string]int{"agent_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_AgentsService_RemoveAgent_0 = &utilities.DoubleArray{Encoding: map[string]int{"agent_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshaler, client AgentsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveAgentRequest @@ -309,7 +295,6 @@ func request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler runtime. msg, err := client.RemoveAgent(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler runtime.Marshaler, server AgentsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -342,7 +327,6 @@ func local_request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler ru msg, err := server.RemoveAgent(ctx, &protoReq) return msg, metadata, err - } // RegisterAgentsServiceHandlerServer registers the http handlers for service AgentsService to "mux". @@ -351,7 +335,6 @@ func local_request_AgentsService_RemoveAgent_0(ctx context.Context, marshaler ru // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentsServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentsServiceServer) error { - mux.Handle("GET", pattern_AgentsService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -374,7 +357,6 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AgentsService_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -399,7 +381,6 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_GetAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AgentsService_GetAgentLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -424,7 +405,6 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_GetAgentLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AgentsService_AddAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -449,7 +429,6 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_AddAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_AgentsService_ChangeAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -474,7 +453,6 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_ChangeAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_AgentsService_RemoveAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -499,7 +477,6 @@ func RegisterAgentsServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_RemoveAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -542,7 +519,6 @@ func RegisterAgentsServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "AgentsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentsServiceClient) error { - mux.Handle("GET", pattern_AgentsService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -562,7 +538,6 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AgentsService_GetAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -584,7 +559,6 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_GetAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_AgentsService_GetAgentLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -606,7 +580,6 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_GetAgentLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_AgentsService_AddAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -628,7 +601,6 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_AddAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_AgentsService_ChangeAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -650,7 +622,6 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_ChangeAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_AgentsService_RemoveAgent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -672,7 +643,6 @@ func RegisterAgentsServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_AgentsService_RemoveAgent_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/inventory/v1/agents.pb.validate.go b/api/inventory/v1/agents.pb.validate.go index 59f635daf0..e856653f05 100644 --- a/api/inventory/v1/agents.pb.validate.go +++ b/api/inventory/v1/agents.pb.validate.go @@ -2226,7 +2226,6 @@ func (m *ChangeCommonAgentParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -2255,7 +2254,6 @@ func (m *ChangeCommonAgentParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -7055,7 +7053,6 @@ func (m *ChangeNodeExporterParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -7084,7 +7081,6 @@ func (m *ChangeNodeExporterParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -7388,7 +7384,6 @@ func (m *ChangeMySQLdExporterParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -7417,7 +7412,6 @@ func (m *ChangeMySQLdExporterParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -7716,7 +7710,6 @@ func (m *ChangeMongoDBExporterParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -7745,7 +7738,6 @@ func (m *ChangeMongoDBExporterParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -8052,7 +8044,6 @@ func (m *ChangePostgresExporterParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8081,7 +8072,6 @@ func (m *ChangePostgresExporterParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -8378,7 +8368,6 @@ func (m *ChangeProxySQLExporterParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8407,7 +8396,6 @@ func (m *ChangeProxySQLExporterParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -8714,7 +8702,6 @@ func (m *ChangeQANMySQLPerfSchemaAgentParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8743,7 +8730,6 @@ func (m *ChangeQANMySQLPerfSchemaAgentParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -9051,7 +9037,6 @@ func (m *ChangeQANMySQLSlowlogAgentParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9080,7 +9065,6 @@ func (m *ChangeQANMySQLSlowlogAgentParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -9379,7 +9363,6 @@ func (m *ChangeQANMongoDBProfilerAgentParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9408,7 +9391,6 @@ func (m *ChangeQANMongoDBProfilerAgentParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -9716,7 +9698,6 @@ func (m *ChangeQANPostgreSQLPgStatementsAgentParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9745,7 +9726,6 @@ func (m *ChangeQANPostgreSQLPgStatementsAgentParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -10055,7 +10035,6 @@ func (m *ChangeQANPostgreSQLPgStatMonitorAgentParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10084,7 +10063,6 @@ func (m *ChangeQANPostgreSQLPgStatMonitorAgentParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -10369,7 +10347,6 @@ func (m *ChangeRDSExporterParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10398,7 +10375,6 @@ func (m *ChangeRDSExporterParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -10679,7 +10655,6 @@ func (m *ChangeExternalExporterParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10708,7 +10683,6 @@ func (m *ChangeExternalExporterParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { @@ -11007,7 +10981,6 @@ func (m *ChangeAzureDatabaseExporterParams) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -11036,7 +11009,6 @@ func (m *ChangeAzureDatabaseExporterParams) validate(all bool) error { } } } - } if m.EnablePushMetrics != nil { diff --git a/api/inventory/v1/agents_grpc.pb.go b/api/inventory/v1/agents_grpc.pb.go index 1e95bcf8c9..5b26504a01 100644 --- a/api/inventory/v1/agents_grpc.pb.go +++ b/api/inventory/v1/agents_grpc.pb.go @@ -8,6 +8,7 @@ package inventoryv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -146,18 +147,23 @@ type UnimplementedAgentsServiceServer struct{} func (UnimplementedAgentsServiceServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") } + func (UnimplementedAgentsServiceServer) GetAgent(context.Context, *GetAgentRequest) (*GetAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAgent not implemented") } + func (UnimplementedAgentsServiceServer) GetAgentLogs(context.Context, *GetAgentLogsRequest) (*GetAgentLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAgentLogs not implemented") } + func (UnimplementedAgentsServiceServer) AddAgent(context.Context, *AddAgentRequest) (*AddAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAgent not implemented") } + func (UnimplementedAgentsServiceServer) ChangeAgent(context.Context, *ChangeAgentRequest) (*ChangeAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeAgent not implemented") } + func (UnimplementedAgentsServiceServer) RemoveAgent(context.Context, *RemoveAgentRequest) (*RemoveAgentResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveAgent not implemented") } diff --git a/api/inventory/v1/json/client/agents_service/add_agent_parameters.go b/api/inventory/v1/json/client/agents_service/add_agent_parameters.go index cb8c62d2ad..eca4592652 100644 --- a/api/inventory/v1/json/client/agents_service/add_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/add_agent_parameters.go @@ -60,7 +60,6 @@ AddAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAgentParams struct { - // Body. Body AddAgentBody @@ -130,7 +129,6 @@ func (o *AddAgentParams) SetBody(body AddAgentBody) { // WriteToRequest writes these params to a swagger request func (o *AddAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/add_agent_responses.go b/api/inventory/v1/json/client/agents_service/add_agent_responses.go index 1db25ef5e0..8be01beb6a 100644 --- a/api/inventory/v1/json/client/agents_service/add_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/add_agent_responses.go @@ -104,7 +104,6 @@ func (o *AddAgentOK) GetPayload() *AddAgentOKBody { } func (o *AddAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddAgentOKBody) // response payload @@ -178,7 +177,6 @@ func (o *AddAgentDefault) GetPayload() *AddAgentDefaultBody { } func (o *AddAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddAgentDefaultBody) // response payload @@ -194,7 +192,6 @@ AddAgentBody add agent body swagger:model AddAgentBody */ type AddAgentBody struct { - // azure database exporter AzureDatabaseExporter *AddAgentParamsBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -637,7 +634,6 @@ func (o *AddAgentBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *AddAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -658,7 +654,6 @@ func (o *AddAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, } func (o *AddAgentBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -679,7 +674,6 @@ func (o *AddAgentBody) contextValidateExternalExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -700,7 +694,6 @@ func (o *AddAgentBody) contextValidateMongodbExporter(ctx context.Context, forma } func (o *AddAgentBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -721,7 +714,6 @@ func (o *AddAgentBody) contextValidateMysqldExporter(ctx context.Context, format } func (o *AddAgentBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -742,7 +734,6 @@ func (o *AddAgentBody) contextValidateNodeExporter(ctx context.Context, formats } func (o *AddAgentBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -763,7 +754,6 @@ func (o *AddAgentBody) contextValidatePMMAgent(ctx context.Context, formats strf } func (o *AddAgentBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -784,7 +774,6 @@ func (o *AddAgentBody) contextValidatePostgresExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -805,7 +794,6 @@ func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -826,7 +814,6 @@ func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -847,7 +834,6 @@ func (o *AddAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -868,7 +854,6 @@ func (o *AddAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, } func (o *AddAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -889,7 +874,6 @@ func (o *AddAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context } func (o *AddAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -910,7 +894,6 @@ func (o *AddAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx contex } func (o *AddAgentBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -953,7 +936,6 @@ AddAgentDefaultBody add agent default body swagger:model AddAgentDefaultBody */ type AddAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -1019,9 +1001,7 @@ func (o *AddAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -1037,7 +1017,6 @@ func (o *AddAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } - } return nil @@ -1066,7 +1045,6 @@ AddAgentDefaultBodyDetailsItems0 add agent default body details items0 swagger:model AddAgentDefaultBodyDetailsItems0 */ type AddAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -1078,7 +1056,6 @@ type AddAgentDefaultBodyDetailsItems0 struct { func (o *AddAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -1116,7 +1093,6 @@ func (o *AddAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -1180,7 +1156,6 @@ AddAgentOKBody add agent OK body swagger:model AddAgentOKBody */ type AddAgentOKBody struct { - // azure database exporter AzureDatabaseExporter *AddAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -1623,7 +1598,6 @@ func (o *AddAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -1644,7 +1618,6 @@ func (o *AddAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *AddAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1665,7 +1638,6 @@ func (o *AddAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -1686,7 +1658,6 @@ func (o *AddAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *AddAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -1707,7 +1678,6 @@ func (o *AddAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *AddAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -1728,7 +1698,6 @@ func (o *AddAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *AddAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -1749,7 +1718,6 @@ func (o *AddAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *AddAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -1770,7 +1738,6 @@ func (o *AddAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -1791,7 +1758,6 @@ func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1812,7 +1778,6 @@ func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1833,7 +1798,6 @@ func (o *AddAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1854,7 +1818,6 @@ func (o *AddAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1875,7 +1838,6 @@ func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1896,7 +1858,6 @@ func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *AddAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1939,7 +1900,6 @@ AddAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model AddAgentOKBodyAzureDatabaseExporter */ type AddAgentOKBodyAzureDatabaseExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2162,7 +2122,6 @@ func (o *AddAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Contex } func (o *AddAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2205,7 +2164,6 @@ AddAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represe swagger:model AddAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type AddAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2249,7 +2207,6 @@ AddAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model AddAgentOKBodyExternalExporter */ type AddAgentOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2335,7 +2292,6 @@ func (o *AddAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2378,7 +2334,6 @@ AddAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyExternalExporterMetricsResolutions */ type AddAgentOKBodyExternalExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2422,7 +2377,6 @@ AddAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model AddAgentOKBodyMongodbExporter */ type AddAgentOKBodyMongodbExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2664,7 +2618,6 @@ func (o *AddAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, for } func (o *AddAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2707,7 +2660,6 @@ AddAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents Pr swagger:model AddAgentOKBodyMongodbExporterMetricsResolutions */ type AddAgentOKBodyMongodbExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2751,7 +2703,6 @@ AddAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model AddAgentOKBodyMysqldExporter */ type AddAgentOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3003,7 +2954,6 @@ func (o *AddAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, form } func (o *AddAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3046,7 +2996,6 @@ AddAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents Pro swagger:model AddAgentOKBodyMysqldExporterMetricsResolutions */ type AddAgentOKBodyMysqldExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3090,7 +3039,6 @@ AddAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model AddAgentOKBodyNodeExporter */ type AddAgentOKBodyNodeExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3310,7 +3258,6 @@ func (o *AddAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, format } func (o *AddAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3353,7 +3300,6 @@ AddAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Prome swagger:model AddAgentOKBodyNodeExporterMetricsResolutions */ type AddAgentOKBodyNodeExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3397,7 +3343,6 @@ AddAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model AddAgentOKBodyPMMAgent */ type AddAgentOKBodyPMMAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3447,7 +3392,6 @@ AddAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model AddAgentOKBodyPostgresExporter */ type AddAgentOKBodyPostgresExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3685,7 +3629,6 @@ func (o *AddAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3728,7 +3671,6 @@ AddAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyPostgresExporterMetricsResolutions */ type AddAgentOKBodyPostgresExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3772,7 +3714,6 @@ AddAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model AddAgentOKBodyProxysqlExporter */ type AddAgentOKBodyProxysqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4004,7 +3945,6 @@ func (o *AddAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4047,7 +3987,6 @@ AddAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyProxysqlExporterMetricsResolutions */ type AddAgentOKBodyProxysqlExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4091,7 +4030,6 @@ AddAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMongodbProfilerAgent */ type AddAgentOKBodyQANMongodbProfilerAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4301,7 +4239,6 @@ AddAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMysqlPerfschemaAgent */ type AddAgentOKBodyQANMysqlPerfschemaAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4526,7 +4463,6 @@ AddAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model AddAgentOKBodyQANMysqlSlowlogAgent */ type AddAgentOKBodyQANMysqlSlowlogAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4754,7 +4690,6 @@ AddAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model AddAgentOKBodyQANPostgresqlPgstatementsAgent */ type AddAgentOKBodyQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4967,7 +4902,6 @@ AddAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model AddAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type AddAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5183,7 +5117,6 @@ AddAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model AddAgentOKBodyRDSExporter */ type AddAgentOKBodyRDSExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5412,7 +5345,6 @@ func (o *AddAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, formats } func (o *AddAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5455,7 +5387,6 @@ AddAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Promet swagger:model AddAgentOKBodyRDSExporterMetricsResolutions */ type AddAgentOKBodyRDSExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5499,7 +5430,6 @@ AddAgentParamsBodyAzureDatabaseExporter add agent params body azure database exp swagger:model AddAgentParamsBodyAzureDatabaseExporter */ type AddAgentParamsBodyAzureDatabaseExporter struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -5636,7 +5566,6 @@ AddAgentParamsBodyExternalExporter add agent params body external exporter swagger:model AddAgentParamsBodyExternalExporter */ type AddAgentParamsBodyExternalExporter struct { - // The node identifier where this instance is run. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -5698,7 +5627,6 @@ AddAgentParamsBodyMongodbExporter add agent params body mongodb exporter swagger:model AddAgentParamsBodyMongodbExporter */ type AddAgentParamsBodyMongodbExporter struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -5862,7 +5790,6 @@ AddAgentParamsBodyMysqldExporter add agent params body mysqld exporter swagger:model AddAgentParamsBodyMysqldExporter */ type AddAgentParamsBodyMysqldExporter struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6016,7 +5943,6 @@ AddAgentParamsBodyNodeExporter add agent params body node exporter swagger:model AddAgentParamsBodyNodeExporter */ type AddAgentParamsBodyNodeExporter struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6135,7 +6061,6 @@ AddAgentParamsBodyPMMAgent add agent params body PMM agent swagger:model AddAgentParamsBodyPMMAgent */ type AddAgentParamsBodyPMMAgent struct { - // Node identifier where this instance runs. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -6176,7 +6101,6 @@ AddAgentParamsBodyPostgresExporter add agent params body postgres exporter swagger:model AddAgentParamsBodyPostgresExporter */ type AddAgentParamsBodyPostgresExporter struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6331,7 +6255,6 @@ AddAgentParamsBodyProxysqlExporter add agent params body proxysql exporter swagger:model AddAgentParamsBodyProxysqlExporter */ type AddAgentParamsBodyProxysqlExporter struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6471,7 +6394,6 @@ AddAgentParamsBodyQANMongodbProfilerAgent add agent params body QAN mongodb prof swagger:model AddAgentParamsBodyQANMongodbProfilerAgent */ type AddAgentParamsBodyQANMongodbProfilerAgent struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6619,7 +6541,6 @@ AddAgentParamsBodyQANMysqlPerfschemaAgent add agent params body QAN mysql perfsc swagger:model AddAgentParamsBodyQANMysqlPerfschemaAgent */ type AddAgentParamsBodyQANMysqlPerfschemaAgent struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6765,7 +6686,6 @@ AddAgentParamsBodyQANMysqlSlowlogAgent add agent params body QAN mysql slowlog a swagger:model AddAgentParamsBodyQANMysqlSlowlogAgent */ type AddAgentParamsBodyQANMysqlSlowlogAgent struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -6915,7 +6835,6 @@ AddAgentParamsBodyQANPostgresqlPgstatementsAgent add agent params body QAN postg swagger:model AddAgentParamsBodyQANPostgresqlPgstatementsAgent */ type AddAgentParamsBodyQANPostgresqlPgstatementsAgent struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7058,7 +6977,6 @@ AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent add agent params body QAN post swagger:model AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent */ type AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7204,7 +7122,6 @@ AddAgentParamsBodyRDSExporter add agent params body RDS exporter swagger:model AddAgentParamsBodyRDSExporter */ type AddAgentParamsBodyRDSExporter struct { - // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/change_agent_parameters.go b/api/inventory/v1/json/client/agents_service/change_agent_parameters.go index 142e0f5448..c683f8aeb0 100644 --- a/api/inventory/v1/json/client/agents_service/change_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/change_agent_parameters.go @@ -60,7 +60,6 @@ ChangeAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeAgentParams struct { - // AgentID. AgentID string @@ -144,7 +143,6 @@ func (o *ChangeAgentParams) SetBody(body ChangeAgentBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/change_agent_responses.go b/api/inventory/v1/json/client/agents_service/change_agent_responses.go index 1d2979c561..b9fa681e38 100644 --- a/api/inventory/v1/json/client/agents_service/change_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/change_agent_responses.go @@ -104,7 +104,6 @@ func (o *ChangeAgentOK) GetPayload() *ChangeAgentOKBody { } func (o *ChangeAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeAgentOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ChangeAgentDefault) GetPayload() *ChangeAgentDefaultBody { } func (o *ChangeAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeAgentDefaultBody) // response payload @@ -194,7 +192,6 @@ ChangeAgentBody change agent body swagger:model ChangeAgentBody */ type ChangeAgentBody struct { - // azure database exporter AzureDatabaseExporter *ChangeAgentParamsBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -607,7 +604,6 @@ func (o *ChangeAgentBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ChangeAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -628,7 +624,6 @@ func (o *ChangeAgentBody) contextValidateAzureDatabaseExporter(ctx context.Conte } func (o *ChangeAgentBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -649,7 +644,6 @@ func (o *ChangeAgentBody) contextValidateExternalExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -670,7 +664,6 @@ func (o *ChangeAgentBody) contextValidateMongodbExporter(ctx context.Context, fo } func (o *ChangeAgentBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -691,7 +684,6 @@ func (o *ChangeAgentBody) contextValidateMysqldExporter(ctx context.Context, for } func (o *ChangeAgentBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -712,7 +704,6 @@ func (o *ChangeAgentBody) contextValidateNodeExporter(ctx context.Context, forma } func (o *ChangeAgentBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -733,7 +724,6 @@ func (o *ChangeAgentBody) contextValidatePostgresExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -754,7 +744,6 @@ func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -775,7 +764,6 @@ func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -796,7 +784,6 @@ func (o *ChangeAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -817,7 +804,6 @@ func (o *ChangeAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Contex } func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -838,7 +824,6 @@ func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx cont } func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -859,7 +844,6 @@ func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx con } func (o *ChangeAgentBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -902,7 +886,6 @@ ChangeAgentDefaultBody change agent default body swagger:model ChangeAgentDefaultBody */ type ChangeAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -968,9 +951,7 @@ func (o *ChangeAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *ChangeAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -986,7 +967,6 @@ func (o *ChangeAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -1015,7 +995,6 @@ ChangeAgentDefaultBodyDetailsItems0 change agent default body details items0 swagger:model ChangeAgentDefaultBodyDetailsItems0 */ type ChangeAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -1027,7 +1006,6 @@ type ChangeAgentDefaultBodyDetailsItems0 struct { func (o *ChangeAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -1065,7 +1043,6 @@ func (o *ChangeAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -1129,7 +1106,6 @@ ChangeAgentOKBody change agent OK body swagger:model ChangeAgentOKBody */ type ChangeAgentOKBody struct { - // azure database exporter AzureDatabaseExporter *ChangeAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -1542,7 +1518,6 @@ func (o *ChangeAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -1563,7 +1538,6 @@ func (o *ChangeAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Con } func (o *ChangeAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1584,7 +1558,6 @@ func (o *ChangeAgentOKBody) contextValidateExternalExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -1605,7 +1578,6 @@ func (o *ChangeAgentOKBody) contextValidateMongodbExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -1626,7 +1598,6 @@ func (o *ChangeAgentOKBody) contextValidateMysqldExporter(ctx context.Context, f } func (o *ChangeAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -1647,7 +1618,6 @@ func (o *ChangeAgentOKBody) contextValidateNodeExporter(ctx context.Context, for } func (o *ChangeAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -1668,7 +1638,6 @@ func (o *ChangeAgentOKBody) contextValidatePostgresExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -1689,7 +1658,6 @@ func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1710,7 +1678,6 @@ func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1731,7 +1698,6 @@ func (o *ChangeAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1752,7 +1718,6 @@ func (o *ChangeAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Cont } func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1773,7 +1738,6 @@ func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx co } func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1794,7 +1758,6 @@ func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx c } func (o *ChangeAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1837,7 +1800,6 @@ ChangeAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or swagger:model ChangeAgentOKBodyAzureDatabaseExporter */ type ChangeAgentOKBodyAzureDatabaseExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2060,7 +2022,6 @@ func (o *ChangeAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Con } func (o *ChangeAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2103,7 +2064,6 @@ ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions repr swagger:model ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2147,7 +2107,6 @@ ChangeAgentOKBodyExternalExporter ExternalExporter runs on any Node type, includ swagger:model ChangeAgentOKBodyExternalExporter */ type ChangeAgentOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2233,7 +2192,6 @@ func (o *ChangeAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2276,7 +2234,6 @@ ChangeAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyExternalExporterMetricsResolutions */ type ChangeAgentOKBodyExternalExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2320,7 +2277,6 @@ ChangeAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container No swagger:model ChangeAgentOKBodyMongodbExporter */ type ChangeAgentOKBodyMongodbExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2562,7 +2518,6 @@ func (o *ChangeAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2605,7 +2560,6 @@ ChangeAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyMongodbExporterMetricsResolutions */ type ChangeAgentOKBodyMongodbExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2649,7 +2603,6 @@ ChangeAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node swagger:model ChangeAgentOKBodyMysqldExporter */ type ChangeAgentOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2901,7 +2854,6 @@ func (o *ChangeAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, f } func (o *ChangeAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2944,7 +2896,6 @@ ChangeAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyMysqldExporterMetricsResolutions */ type ChangeAgentOKBodyMysqldExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2988,7 +2939,6 @@ ChangeAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and swagger:model ChangeAgentOKBodyNodeExporter */ type ChangeAgentOKBodyNodeExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3208,7 +3158,6 @@ func (o *ChangeAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, for } func (o *ChangeAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3251,7 +3200,6 @@ ChangeAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Pr swagger:model ChangeAgentOKBodyNodeExporterMetricsResolutions */ type ChangeAgentOKBodyNodeExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3295,7 +3243,6 @@ ChangeAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container swagger:model ChangeAgentOKBodyPostgresExporter */ type ChangeAgentOKBodyPostgresExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3533,7 +3480,6 @@ func (o *ChangeAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3576,7 +3522,6 @@ ChangeAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyPostgresExporterMetricsResolutions */ type ChangeAgentOKBodyPostgresExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3620,7 +3565,6 @@ ChangeAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container swagger:model ChangeAgentOKBodyProxysqlExporter */ type ChangeAgentOKBodyProxysqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3852,7 +3796,6 @@ func (o *ChangeAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3895,7 +3838,6 @@ ChangeAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyProxysqlExporterMetricsResolutions */ type ChangeAgentOKBodyProxysqlExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3939,7 +3881,6 @@ ChangeAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm swagger:model ChangeAgentOKBodyQANMongodbProfilerAgent */ type ChangeAgentOKBodyQANMongodbProfilerAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4149,7 +4090,6 @@ ChangeAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm swagger:model ChangeAgentOKBodyQANMysqlPerfschemaAgent */ type ChangeAgentOKBodyQANMysqlPerfschemaAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4374,7 +4314,6 @@ ChangeAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent swagger:model ChangeAgentOKBodyQANMysqlSlowlogAgent */ type ChangeAgentOKBodyQANMysqlSlowlogAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4602,7 +4541,6 @@ ChangeAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent r swagger:model ChangeAgentOKBodyQANPostgresqlPgstatementsAgent */ type ChangeAgentOKBodyQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4815,7 +4753,6 @@ ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent swagger:model ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5031,7 +4968,6 @@ ChangeAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and e swagger:model ChangeAgentOKBodyRDSExporter */ type ChangeAgentOKBodyRDSExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5260,7 +5196,6 @@ func (o *ChangeAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, form } func (o *ChangeAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5303,7 +5238,6 @@ ChangeAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeAgentOKBodyRDSExporterMetricsResolutions */ type ChangeAgentOKBodyRDSExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5347,7 +5281,6 @@ ChangeAgentParamsBodyAzureDatabaseExporter change agent params body azure databa swagger:model ChangeAgentParamsBodyAzureDatabaseExporter */ type ChangeAgentParamsBodyAzureDatabaseExporter struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -5436,7 +5369,6 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) ContextValidate(ctx context } func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -5457,7 +5389,6 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels } func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5500,7 +5431,6 @@ ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels A wrapper for map[string] swagger:model ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels */ type ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -5538,7 +5468,6 @@ ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions swagger:model ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions */ type ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5582,7 +5511,6 @@ ChangeAgentParamsBodyExternalExporter change agent params body external exporter swagger:model ChangeAgentParamsBodyExternalExporter */ type ChangeAgentParamsBodyExternalExporter struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -5671,7 +5599,6 @@ func (o *ChangeAgentParamsBodyExternalExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -5692,7 +5619,6 @@ func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5735,7 +5661,6 @@ ChangeAgentParamsBodyExternalExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyExternalExporterCustomLabels */ type ChangeAgentParamsBodyExternalExporterCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -5773,7 +5698,6 @@ ChangeAgentParamsBodyExternalExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyExternalExporterMetricsResolutions */ type ChangeAgentParamsBodyExternalExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5817,7 +5741,6 @@ ChangeAgentParamsBodyMongodbExporter change agent params body mongodb exporter swagger:model ChangeAgentParamsBodyMongodbExporter */ type ChangeAgentParamsBodyMongodbExporter struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -5906,7 +5829,6 @@ func (o *ChangeAgentParamsBodyMongodbExporter) ContextValidate(ctx context.Conte } func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -5927,7 +5849,6 @@ func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx c } func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5970,7 +5891,6 @@ ChangeAgentParamsBodyMongodbExporterCustomLabels A wrapper for map[string]string swagger:model ChangeAgentParamsBodyMongodbExporterCustomLabels */ type ChangeAgentParamsBodyMongodbExporterCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -6008,7 +5928,6 @@ ChangeAgentParamsBodyMongodbExporterMetricsResolutions MetricsResolutions repres swagger:model ChangeAgentParamsBodyMongodbExporterMetricsResolutions */ type ChangeAgentParamsBodyMongodbExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6052,7 +5971,6 @@ ChangeAgentParamsBodyMysqldExporter change agent params body mysqld exporter swagger:model ChangeAgentParamsBodyMysqldExporter */ type ChangeAgentParamsBodyMysqldExporter struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6141,7 +6059,6 @@ func (o *ChangeAgentParamsBodyMysqldExporter) ContextValidate(ctx context.Contex } func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6162,7 +6079,6 @@ func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx co } func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6205,7 +6121,6 @@ ChangeAgentParamsBodyMysqldExporterCustomLabels A wrapper for map[string]string. swagger:model ChangeAgentParamsBodyMysqldExporterCustomLabels */ type ChangeAgentParamsBodyMysqldExporterCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -6243,7 +6158,6 @@ ChangeAgentParamsBodyMysqldExporterMetricsResolutions MetricsResolutions represe swagger:model ChangeAgentParamsBodyMysqldExporterMetricsResolutions */ type ChangeAgentParamsBodyMysqldExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6287,7 +6201,6 @@ ChangeAgentParamsBodyNodeExporter change agent params body node exporter swagger:model ChangeAgentParamsBodyNodeExporter */ type ChangeAgentParamsBodyNodeExporter struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6376,7 +6289,6 @@ func (o *ChangeAgentParamsBodyNodeExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6397,7 +6309,6 @@ func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx cont } func (o *ChangeAgentParamsBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6440,7 +6351,6 @@ ChangeAgentParamsBodyNodeExporterCustomLabels A wrapper for map[string]string. T swagger:model ChangeAgentParamsBodyNodeExporterCustomLabels */ type ChangeAgentParamsBodyNodeExporterCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -6478,7 +6388,6 @@ ChangeAgentParamsBodyNodeExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentParamsBodyNodeExporterMetricsResolutions */ type ChangeAgentParamsBodyNodeExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6522,7 +6431,6 @@ ChangeAgentParamsBodyPostgresExporter change agent params body postgres exporter swagger:model ChangeAgentParamsBodyPostgresExporter */ type ChangeAgentParamsBodyPostgresExporter struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6611,7 +6519,6 @@ func (o *ChangeAgentParamsBodyPostgresExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6632,7 +6539,6 @@ func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6675,7 +6581,6 @@ ChangeAgentParamsBodyPostgresExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyPostgresExporterCustomLabels */ type ChangeAgentParamsBodyPostgresExporterCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -6713,7 +6618,6 @@ ChangeAgentParamsBodyPostgresExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyPostgresExporterMetricsResolutions */ type ChangeAgentParamsBodyPostgresExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6757,7 +6661,6 @@ ChangeAgentParamsBodyProxysqlExporter change agent params body proxysql exporter swagger:model ChangeAgentParamsBodyProxysqlExporter */ type ChangeAgentParamsBodyProxysqlExporter struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -6846,7 +6749,6 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -6867,7 +6769,6 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6910,7 +6811,6 @@ ChangeAgentParamsBodyProxysqlExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyProxysqlExporterCustomLabels */ type ChangeAgentParamsBodyProxysqlExporterCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -6948,7 +6848,6 @@ ChangeAgentParamsBodyProxysqlExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyProxysqlExporterMetricsResolutions */ type ChangeAgentParamsBodyProxysqlExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6992,7 +6891,6 @@ ChangeAgentParamsBodyQANMongodbProfilerAgent change agent params body QAN mongod swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgent */ type ChangeAgentParamsBodyQANMongodbProfilerAgent struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7081,7 +6979,6 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) ContextValidate(ctx conte } func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7102,7 +6999,6 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabe } func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7145,7 +7041,6 @@ ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels A wrapper for map[strin swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels */ type ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -7183,7 +7078,6 @@ ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions MetricsResolution swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7227,7 +7121,6 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgent change agent params body QAN mysql swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgent */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgent struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7316,7 +7209,6 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) ContextValidate(ctx conte } func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7337,7 +7229,6 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabe } func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7380,7 +7271,6 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels A wrapper for map[strin swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -7418,7 +7308,6 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions MetricsResolution swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7462,7 +7351,6 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgent change agent params body QAN mysql slo swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgent */ type ChangeAgentParamsBodyQANMysqlSlowlogAgent struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7551,7 +7439,6 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) ContextValidate(ctx context. } func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7572,7 +7459,6 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels( } func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7615,7 +7501,6 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels A wrapper for map[string]s swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels */ type ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -7653,7 +7538,6 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions MetricsResolutions r swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7697,7 +7581,6 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent change agent params body QAN swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7786,7 +7669,6 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) ContextValidate(ct } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7807,7 +7689,6 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCus } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7850,7 +7731,6 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels A wrapper for ma swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -7888,7 +7768,6 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions MetricsRes swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7932,7 +7811,6 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent change agent params body QA swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -8021,7 +7899,6 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) ContextValidate(c } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8042,7 +7919,6 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCu } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8085,7 +7961,6 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels A wrapper for m swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -8123,7 +7998,6 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions MetricsRe swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -8167,7 +8041,6 @@ ChangeAgentParamsBodyRDSExporter change agent params body RDS exporter swagger:model ChangeAgentParamsBodyRDSExporter */ type ChangeAgentParamsBodyRDSExporter struct { - // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -8256,7 +8129,6 @@ func (o *ChangeAgentParamsBodyRDSExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8277,7 +8149,6 @@ func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx conte } func (o *ChangeAgentParamsBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8320,7 +8191,6 @@ ChangeAgentParamsBodyRDSExporterCustomLabels A wrapper for map[string]string. Th swagger:model ChangeAgentParamsBodyRDSExporterCustomLabels */ type ChangeAgentParamsBodyRDSExporterCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } @@ -8358,7 +8228,6 @@ ChangeAgentParamsBodyRDSExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentParamsBodyRDSExporterMetricsResolutions */ type ChangeAgentParamsBodyRDSExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go b/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go index f62c8c3401..97651a5eab 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go @@ -61,7 +61,6 @@ GetAgentLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentLogsParams struct { - /* AgentID. Unique randomly generated instance identifier. @@ -153,7 +152,6 @@ func (o *GetAgentLogsParams) SetLimit(limit *int64) { // WriteToRequest writes these params to a swagger request func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -174,7 +172,6 @@ func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { - if err := r.SetQueryParam("limit", qLimit); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go b/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go index 3094d3ea5a..3a2fd7aeed 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go @@ -103,7 +103,6 @@ func (o *GetAgentLogsOK) GetPayload() *GetAgentLogsOKBody { } func (o *GetAgentLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetAgentLogsOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetAgentLogsDefault) GetPayload() *GetAgentLogsDefaultBody { } func (o *GetAgentLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetAgentLogsDefaultBody) // response payload @@ -193,7 +191,6 @@ GetAgentLogsDefaultBody get agent logs default body swagger:model GetAgentLogsDefaultBody */ type GetAgentLogsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetAgentLogsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -306,7 +300,6 @@ GetAgentLogsDefaultBodyDetailsItems0 get agent logs default body details items0 swagger:model GetAgentLogsDefaultBodyDetailsItems0 */ type GetAgentLogsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetAgentLogsDefaultBodyDetailsItems0 struct { func (o *GetAgentLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetAgentLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetAgentLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetAgentLogsOKBody get agent logs OK body swagger:model GetAgentLogsOKBody */ type GetAgentLogsOKBody struct { - // logs Logs []string `json:"logs"` diff --git a/api/inventory/v1/json/client/agents_service/get_agent_parameters.go b/api/inventory/v1/json/client/agents_service/get_agent_parameters.go index 8242239f60..05cb31a609 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_parameters.go @@ -60,7 +60,6 @@ GetAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentParams struct { - /* AgentID. Unique randomly generated instance identifier. @@ -133,7 +132,6 @@ func (o *GetAgentParams) SetAgentID(agentID string) { // WriteToRequest writes these params to a swagger request func (o *GetAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/get_agent_responses.go b/api/inventory/v1/json/client/agents_service/get_agent_responses.go index 4a771a8b04..0dd59aaadb 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_responses.go @@ -104,7 +104,6 @@ func (o *GetAgentOK) GetPayload() *GetAgentOKBody { } func (o *GetAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetAgentOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetAgentDefault) GetPayload() *GetAgentDefaultBody { } func (o *GetAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetAgentDefaultBody) // response payload @@ -194,7 +192,6 @@ GetAgentDefaultBody get agent default body swagger:model GetAgentDefaultBody */ type GetAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *GetAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } - } return nil @@ -307,7 +301,6 @@ GetAgentDefaultBodyDetailsItems0 get agent default body details items0 swagger:model GetAgentDefaultBodyDetailsItems0 */ type GetAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type GetAgentDefaultBodyDetailsItems0 struct { func (o *GetAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *GetAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ GetAgentOKBody get agent OK body swagger:model GetAgentOKBody */ type GetAgentOKBody struct { - // azure database exporter AzureDatabaseExporter *GetAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -894,7 +884,6 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -915,7 +904,6 @@ func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -936,7 +924,6 @@ func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -957,7 +944,6 @@ func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -978,7 +964,6 @@ func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -999,7 +984,6 @@ func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -1020,7 +1004,6 @@ func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -1041,7 +1024,6 @@ func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -1062,7 +1044,6 @@ func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1083,7 +1064,6 @@ func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1104,7 +1084,6 @@ func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1125,7 +1104,6 @@ func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1146,7 +1124,6 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1167,7 +1144,6 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1188,7 +1164,6 @@ func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats } func (o *GetAgentOKBody) contextValidateVmagent(ctx context.Context, formats strfmt.Registry) error { - if o.Vmagent != nil { if swag.IsZero(o.Vmagent) { // not required @@ -1231,7 +1206,6 @@ GetAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model GetAgentOKBodyAzureDatabaseExporter */ type GetAgentOKBodyAzureDatabaseExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1454,7 +1428,6 @@ func (o *GetAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Contex } func (o *GetAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1497,7 +1470,6 @@ GetAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represe swagger:model GetAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type GetAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1541,7 +1513,6 @@ GetAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model GetAgentOKBodyExternalExporter */ type GetAgentOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1627,7 +1598,6 @@ func (o *GetAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1670,7 +1640,6 @@ GetAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyExternalExporterMetricsResolutions */ type GetAgentOKBodyExternalExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1714,7 +1683,6 @@ GetAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model GetAgentOKBodyMongodbExporter */ type GetAgentOKBodyMongodbExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1956,7 +1924,6 @@ func (o *GetAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, for } func (o *GetAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1999,7 +1966,6 @@ GetAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents Pr swagger:model GetAgentOKBodyMongodbExporterMetricsResolutions */ type GetAgentOKBodyMongodbExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2043,7 +2009,6 @@ GetAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model GetAgentOKBodyMysqldExporter */ type GetAgentOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2295,7 +2260,6 @@ func (o *GetAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, form } func (o *GetAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2338,7 +2302,6 @@ GetAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents Pro swagger:model GetAgentOKBodyMysqldExporterMetricsResolutions */ type GetAgentOKBodyMysqldExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2382,7 +2345,6 @@ GetAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model GetAgentOKBodyNodeExporter */ type GetAgentOKBodyNodeExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2602,7 +2564,6 @@ func (o *GetAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, format } func (o *GetAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2645,7 +2606,6 @@ GetAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Prome swagger:model GetAgentOKBodyNodeExporterMetricsResolutions */ type GetAgentOKBodyNodeExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2689,7 +2649,6 @@ GetAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model GetAgentOKBodyPMMAgent */ type GetAgentOKBodyPMMAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2739,7 +2698,6 @@ GetAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyPostgresExporter */ type GetAgentOKBodyPostgresExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2977,7 +2935,6 @@ func (o *GetAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3020,7 +2977,6 @@ GetAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyPostgresExporterMetricsResolutions */ type GetAgentOKBodyPostgresExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3064,7 +3020,6 @@ GetAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyProxysqlExporter */ type GetAgentOKBodyProxysqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3296,7 +3251,6 @@ func (o *GetAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3339,7 +3293,6 @@ GetAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyProxysqlExporterMetricsResolutions */ type GetAgentOKBodyProxysqlExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3383,7 +3336,6 @@ GetAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMongodbProfilerAgent */ type GetAgentOKBodyQANMongodbProfilerAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3593,7 +3545,6 @@ GetAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMysqlPerfschemaAgent */ type GetAgentOKBodyQANMysqlPerfschemaAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3818,7 +3769,6 @@ GetAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model GetAgentOKBodyQANMysqlSlowlogAgent */ type GetAgentOKBodyQANMysqlSlowlogAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4046,7 +3996,6 @@ GetAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model GetAgentOKBodyQANPostgresqlPgstatementsAgent */ type GetAgentOKBodyQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4259,7 +4208,6 @@ GetAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model GetAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type GetAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4475,7 +4423,6 @@ GetAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model GetAgentOKBodyRDSExporter */ type GetAgentOKBodyRDSExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4704,7 +4651,6 @@ func (o *GetAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, formats } func (o *GetAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4747,7 +4693,6 @@ GetAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Promet swagger:model GetAgentOKBodyRDSExporterMetricsResolutions */ type GetAgentOKBodyRDSExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4793,7 +4738,6 @@ GetAgentOKBodyVmagent VMAgent runs on Generic or Container Node alongside pmm-ag swagger:model GetAgentOKBodyVmagent */ type GetAgentOKBodyVmagent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/list_agents_parameters.go b/api/inventory/v1/json/client/agents_service/list_agents_parameters.go index 1836e25a8c..371c8f77c3 100644 --- a/api/inventory/v1/json/client/agents_service/list_agents_parameters.go +++ b/api/inventory/v1/json/client/agents_service/list_agents_parameters.go @@ -60,7 +60,6 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { - /* AgentType. Return only agents of a particular type. @@ -107,9 +106,7 @@ func (o *ListAgentsParams) WithDefaults() *ListAgentsParams { // // All values with no default are reset to their zero value. func (o *ListAgentsParams) SetDefaults() { - var ( - agentTypeDefault = string("AGENT_TYPE_UNSPECIFIED") - ) + agentTypeDefault := string("AGENT_TYPE_UNSPECIFIED") val := ListAgentsParams{ AgentType: &agentTypeDefault, @@ -200,7 +197,6 @@ func (o *ListAgentsParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -216,7 +212,6 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qAgentType := qrAgentType if qAgentType != "" { - if err := r.SetQueryParam("agent_type", qAgentType); err != nil { return err } @@ -233,7 +228,6 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qNodeID := qrNodeID if qNodeID != "" { - if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -250,7 +244,6 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qPMMAgentID := qrPMMAgentID if qPMMAgentID != "" { - if err := r.SetQueryParam("pmm_agent_id", qPMMAgentID); err != nil { return err } @@ -267,7 +260,6 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qServiceID := qrServiceID if qServiceID != "" { - if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/list_agents_responses.go b/api/inventory/v1/json/client/agents_service/list_agents_responses.go index d6f5b2aa2f..99d43b0071 100644 --- a/api/inventory/v1/json/client/agents_service/list_agents_responses.go +++ b/api/inventory/v1/json/client/agents_service/list_agents_responses.go @@ -104,7 +104,6 @@ func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentsDefaultBody) // response payload @@ -194,7 +192,6 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -307,7 +301,6 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListAgentsDefaultBodyDetailsItems0 struct { func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { - // pmm agent PMMAgent []*ListAgentsOKBodyPMMAgentItems0 `json:"pmm_agent"` @@ -999,9 +989,7 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.PMMAgent); i++ { - if o.PMMAgent[i] != nil { if swag.IsZero(o.PMMAgent[i]) { // not required @@ -1017,16 +1005,13 @@ func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.VMAgent); i++ { - if o.VMAgent[i] != nil { if swag.IsZero(o.VMAgent[i]) { // not required @@ -1042,16 +1027,13 @@ func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats s return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.NodeExporter); i++ { - if o.NodeExporter[i] != nil { if swag.IsZero(o.NodeExporter[i]) { // not required @@ -1067,16 +1049,13 @@ func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, form return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.MysqldExporter); i++ { - if o.MysqldExporter[i] != nil { if swag.IsZero(o.MysqldExporter[i]) { // not required @@ -1092,16 +1071,13 @@ func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, fo return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.MongodbExporter); i++ { - if o.MongodbExporter[i] != nil { if swag.IsZero(o.MongodbExporter[i]) { // not required @@ -1117,16 +1093,13 @@ func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, f return err } } - } return nil } func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.PostgresExporter); i++ { - if o.PostgresExporter[i] != nil { if swag.IsZero(o.PostgresExporter[i]) { // not required @@ -1142,16 +1115,13 @@ func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ProxysqlExporter); i++ { - if o.ProxysqlExporter[i] != nil { if swag.IsZero(o.ProxysqlExporter[i]) { // not required @@ -1167,16 +1137,13 @@ func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANMysqlPerfschemaAgent); i++ { - if o.QANMysqlPerfschemaAgent[i] != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent[i]) { // not required @@ -1192,16 +1159,13 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Co return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANMysqlSlowlogAgent); i++ { - if o.QANMysqlSlowlogAgent[i] != nil { if swag.IsZero(o.QANMysqlSlowlogAgent[i]) { // not required @@ -1217,16 +1181,13 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Conte return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANMongodbProfilerAgent); i++ { - if o.QANMongodbProfilerAgent[i] != nil { if swag.IsZero(o.QANMongodbProfilerAgent[i]) { // not required @@ -1242,16 +1203,13 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Co return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANPostgresqlPgstatementsAgent); i++ { - if o.QANPostgresqlPgstatementsAgent[i] != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent[i]) { // not required @@ -1267,16 +1225,13 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx con return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QANPostgresqlPgstatmonitorAgent); i++ { - if o.QANPostgresqlPgstatmonitorAgent[i] != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent[i]) { // not required @@ -1292,16 +1247,13 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx co return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.ExternalExporter); i++ { - if o.ExternalExporter[i] != nil { if swag.IsZero(o.ExternalExporter[i]) { // not required @@ -1317,16 +1269,13 @@ func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.RDSExporter); i++ { - if o.RDSExporter[i] != nil { if swag.IsZero(o.RDSExporter[i]) { // not required @@ -1342,16 +1291,13 @@ func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, forma return err } } - } return nil } func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AzureDatabaseExporter); i++ { - if o.AzureDatabaseExporter[i] != nil { if swag.IsZero(o.AzureDatabaseExporter[i]) { // not required @@ -1367,7 +1313,6 @@ func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Cont return err } } - } return nil @@ -1396,7 +1341,6 @@ ListAgentsOKBodyAzureDatabaseExporterItems0 AzureDatabaseExporter runs on Generi swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0 */ type ListAgentsOKBodyAzureDatabaseExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1619,7 +1563,6 @@ func (o *ListAgentsOKBodyAzureDatabaseExporterItems0) ContextValidate(ctx contex } func (o *ListAgentsOKBodyAzureDatabaseExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1662,7 +1605,6 @@ ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions MetricsResolutions swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions */ type ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1706,7 +1648,6 @@ ListAgentsOKBodyExternalExporterItems0 ExternalExporter runs on any Node type, i swagger:model ListAgentsOKBodyExternalExporterItems0 */ type ListAgentsOKBodyExternalExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1792,7 +1733,6 @@ func (o *ListAgentsOKBodyExternalExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyExternalExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1835,7 +1775,6 @@ ListAgentsOKBodyExternalExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyExternalExporterItems0MetricsResolutions */ type ListAgentsOKBodyExternalExporterItems0MetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1879,7 +1818,6 @@ ListAgentsOKBodyMongodbExporterItems0 MongoDBExporter runs on Generic or Contain swagger:model ListAgentsOKBodyMongodbExporterItems0 */ type ListAgentsOKBodyMongodbExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2121,7 +2059,6 @@ func (o *ListAgentsOKBodyMongodbExporterItems0) ContextValidate(ctx context.Cont } func (o *ListAgentsOKBodyMongodbExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2164,7 +2101,6 @@ ListAgentsOKBodyMongodbExporterItems0MetricsResolutions MetricsResolutions repre swagger:model ListAgentsOKBodyMongodbExporterItems0MetricsResolutions */ type ListAgentsOKBodyMongodbExporterItems0MetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2208,7 +2144,6 @@ ListAgentsOKBodyMysqldExporterItems0 MySQLdExporter runs on Generic or Container swagger:model ListAgentsOKBodyMysqldExporterItems0 */ type ListAgentsOKBodyMysqldExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2460,7 +2395,6 @@ func (o *ListAgentsOKBodyMysqldExporterItems0) ContextValidate(ctx context.Conte } func (o *ListAgentsOKBodyMysqldExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2503,7 +2437,6 @@ ListAgentsOKBodyMysqldExporterItems0MetricsResolutions MetricsResolutions repres swagger:model ListAgentsOKBodyMysqldExporterItems0MetricsResolutions */ type ListAgentsOKBodyMysqldExporterItems0MetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2547,7 +2480,6 @@ ListAgentsOKBodyNodeExporterItems0 NodeExporter runs on Generic or Container Nod swagger:model ListAgentsOKBodyNodeExporterItems0 */ type ListAgentsOKBodyNodeExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2767,7 +2699,6 @@ func (o *ListAgentsOKBodyNodeExporterItems0) ContextValidate(ctx context.Context } func (o *ListAgentsOKBodyNodeExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2810,7 +2741,6 @@ ListAgentsOKBodyNodeExporterItems0MetricsResolutions MetricsResolutions represen swagger:model ListAgentsOKBodyNodeExporterItems0MetricsResolutions */ type ListAgentsOKBodyNodeExporterItems0MetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2854,7 +2784,6 @@ ListAgentsOKBodyPMMAgentItems0 PMMAgent runs on Generic or Container Node. swagger:model ListAgentsOKBodyPMMAgentItems0 */ type ListAgentsOKBodyPMMAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2904,7 +2833,6 @@ ListAgentsOKBodyPostgresExporterItems0 PostgresExporter runs on Generic or Conta swagger:model ListAgentsOKBodyPostgresExporterItems0 */ type ListAgentsOKBodyPostgresExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3142,7 +3070,6 @@ func (o *ListAgentsOKBodyPostgresExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyPostgresExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3185,7 +3112,6 @@ ListAgentsOKBodyPostgresExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyPostgresExporterItems0MetricsResolutions */ type ListAgentsOKBodyPostgresExporterItems0MetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3229,7 +3155,6 @@ ListAgentsOKBodyProxysqlExporterItems0 ProxySQLExporter runs on Generic or Conta swagger:model ListAgentsOKBodyProxysqlExporterItems0 */ type ListAgentsOKBodyProxysqlExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3461,7 +3386,6 @@ func (o *ListAgentsOKBodyProxysqlExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyProxysqlExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3504,7 +3428,6 @@ ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions */ type ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3548,7 +3471,6 @@ ListAgentsOKBodyQANMongodbProfilerAgentItems0 QANMongoDBProfilerAgent runs withi swagger:model ListAgentsOKBodyQANMongodbProfilerAgentItems0 */ type ListAgentsOKBodyQANMongodbProfilerAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3758,7 +3680,6 @@ ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 QANMySQLPerfSchemaAgent runs withi swagger:model ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 */ type ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3983,7 +3904,6 @@ ListAgentsOKBodyQANMysqlSlowlogAgentItems0 QANMySQLSlowlogAgent runs within pmm- swagger:model ListAgentsOKBodyQANMysqlSlowlogAgentItems0 */ type ListAgentsOKBodyQANMysqlSlowlogAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4211,7 +4131,6 @@ ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 QANPostgreSQLPgStatementsAg swagger:model ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4424,7 +4343,6 @@ ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 QANPostgreSQLPgStatMonitor swagger:model ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4640,7 +4558,6 @@ ListAgentsOKBodyRDSExporterItems0 RDSExporter runs on Generic or Container Node swagger:model ListAgentsOKBodyRDSExporterItems0 */ type ListAgentsOKBodyRDSExporterItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4869,7 +4786,6 @@ func (o *ListAgentsOKBodyRDSExporterItems0) ContextValidate(ctx context.Context, } func (o *ListAgentsOKBodyRDSExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4912,7 +4828,6 @@ ListAgentsOKBodyRDSExporterItems0MetricsResolutions MetricsResolutions represent swagger:model ListAgentsOKBodyRDSExporterItems0MetricsResolutions */ type ListAgentsOKBodyRDSExporterItems0MetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4958,7 +4873,6 @@ ListAgentsOKBodyVMAgentItems0 VMAgent runs on Generic or Container Node alongsid swagger:model ListAgentsOKBodyVMAgentItems0 */ type ListAgentsOKBodyVMAgentItems0 struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go b/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go index 946dbbe4ca..fd762f2972 100644 --- a/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go @@ -61,7 +61,6 @@ RemoveAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveAgentParams struct { - // AgentID. AgentID string @@ -148,7 +147,6 @@ func (o *RemoveAgentParams) SetForce(force *bool) { // WriteToRequest writes these params to a swagger request func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -169,7 +167,6 @@ func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qForce := swag.FormatBool(qrForce) if qForce != "" { - if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/remove_agent_responses.go b/api/inventory/v1/json/client/agents_service/remove_agent_responses.go index 60f7d9ef01..6861c9c705 100644 --- a/api/inventory/v1/json/client/agents_service/remove_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/remove_agent_responses.go @@ -103,7 +103,6 @@ func (o *RemoveAgentOK) GetPayload() interface{} { } func (o *RemoveAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *RemoveAgentDefault) GetPayload() *RemoveAgentDefaultBody { } func (o *RemoveAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveAgentDefaultBody) // response payload @@ -191,7 +189,6 @@ RemoveAgentDefaultBody remove agent default body swagger:model RemoveAgentDefaultBody */ type RemoveAgentDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *RemoveAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -304,7 +298,6 @@ RemoveAgentDefaultBodyDetailsItems0 remove agent default body details items0 swagger:model RemoveAgentDefaultBodyDetailsItems0 */ type RemoveAgentDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type RemoveAgentDefaultBodyDetailsItems0 struct { func (o *RemoveAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *RemoveAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/client/nodes_service/add_node_parameters.go b/api/inventory/v1/json/client/nodes_service/add_node_parameters.go index a1f49d176f..67702dfa37 100644 --- a/api/inventory/v1/json/client/nodes_service/add_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/add_node_parameters.go @@ -60,7 +60,6 @@ AddNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddNodeParams struct { - // Body. Body AddNodeBody @@ -130,7 +129,6 @@ func (o *AddNodeParams) SetBody(body AddNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/add_node_responses.go b/api/inventory/v1/json/client/nodes_service/add_node_responses.go index 01506e5b60..1170cb0781 100644 --- a/api/inventory/v1/json/client/nodes_service/add_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/add_node_responses.go @@ -103,7 +103,6 @@ func (o *AddNodeOK) GetPayload() *AddNodeOKBody { } func (o *AddNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddNodeOKBody) // response payload @@ -177,7 +176,6 @@ func (o *AddNodeDefault) GetPayload() *AddNodeDefaultBody { } func (o *AddNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddNodeDefaultBody) // response payload @@ -193,7 +191,6 @@ AddNodeBody add node body swagger:model AddNodeBody */ type AddNodeBody struct { - // container Container *AddNodeParamsBodyContainer `json:"container,omitempty"` @@ -366,7 +363,6 @@ func (o *AddNodeBody) ContextValidate(ctx context.Context, formats strfmt.Regist } func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { - if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -387,7 +383,6 @@ func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strf } func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { - if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -408,7 +403,6 @@ func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt } func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { - if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -429,7 +423,6 @@ func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt. } func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteAzure != nil { if swag.IsZero(o.RemoteAzure) { // not required @@ -450,7 +443,6 @@ func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats st } func (o *AddNodeBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -493,7 +485,6 @@ AddNodeDefaultBody add node default body swagger:model AddNodeDefaultBody */ type AddNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -559,9 +550,7 @@ func (o *AddNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -577,7 +566,6 @@ func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -606,7 +594,6 @@ AddNodeDefaultBodyDetailsItems0 add node default body details items0 swagger:model AddNodeDefaultBodyDetailsItems0 */ type AddNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -618,7 +605,6 @@ type AddNodeDefaultBodyDetailsItems0 struct { func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -656,7 +642,6 @@ func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -720,7 +705,6 @@ AddNodeOKBody add node OK body swagger:model AddNodeOKBody */ type AddNodeOKBody struct { - // container Container *AddNodeOKBodyContainer `json:"container,omitempty"` @@ -893,7 +877,6 @@ func (o *AddNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { - if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -914,7 +897,6 @@ func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { - if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -935,7 +917,6 @@ func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { - if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -956,7 +937,6 @@ func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteAzureDatabase != nil { if swag.IsZero(o.RemoteAzureDatabase) { // not required @@ -977,7 +957,6 @@ func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *AddNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -1020,7 +999,6 @@ AddNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model AddNodeOKBodyContainer */ type AddNodeOKBodyContainer struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1085,7 +1063,6 @@ AddNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model AddNodeOKBodyGeneric */ type AddNodeOKBodyGeneric struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1147,7 +1124,6 @@ AddNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model AddNodeOKBodyRemote */ type AddNodeOKBodyRemote struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1203,7 +1179,6 @@ AddNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model AddNodeOKBodyRemoteAzureDatabase */ type AddNodeOKBodyRemoteAzureDatabase struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1259,7 +1234,6 @@ AddNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model AddNodeOKBodyRemoteRDS */ type AddNodeOKBodyRemoteRDS struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1315,7 +1289,6 @@ AddNodeParamsBodyContainer add node params body container swagger:model AddNodeParamsBodyContainer */ type AddNodeParamsBodyContainer struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1377,7 +1350,6 @@ AddNodeParamsBodyGeneric add node params body generic swagger:model AddNodeParamsBodyGeneric */ type AddNodeParamsBodyGeneric struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1436,7 +1408,6 @@ AddNodeParamsBodyRemote add node params body remote swagger:model AddNodeParamsBodyRemote */ type AddNodeParamsBodyRemote struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1489,7 +1460,6 @@ AddNodeParamsBodyRemoteAzure add node params body remote azure swagger:model AddNodeParamsBodyRemoteAzure */ type AddNodeParamsBodyRemoteAzure struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1542,7 +1512,6 @@ AddNodeParamsBodyRemoteRDS add node params body remote RDS swagger:model AddNodeParamsBodyRemoteRDS */ type AddNodeParamsBodyRemoteRDS struct { - // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/get_node_parameters.go b/api/inventory/v1/json/client/nodes_service/get_node_parameters.go index 25b4a671bc..3498346e1f 100644 --- a/api/inventory/v1/json/client/nodes_service/get_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/get_node_parameters.go @@ -60,7 +60,6 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { - /* NodeID. Unique randomly generated instance identifier. @@ -133,7 +132,6 @@ func (o *GetNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/get_node_responses.go b/api/inventory/v1/json/client/nodes_service/get_node_responses.go index b1fb5b2fee..cae578625e 100644 --- a/api/inventory/v1/json/client/nodes_service/get_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/get_node_responses.go @@ -103,7 +103,6 @@ func (o *GetNodeOK) GetPayload() *GetNodeOKBody { } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetNodeOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetNodeDefaultBody) // response payload @@ -193,7 +191,6 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -306,7 +300,6 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetNodeDefaultBodyDetailsItems0 struct { func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { - // container Container *GetNodeOKBodyContainer `json:"container,omitempty"` @@ -593,7 +583,6 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { - if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -614,7 +603,6 @@ func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { - if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -635,7 +623,6 @@ func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { - if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -656,7 +643,6 @@ func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteAzureDatabase != nil { if swag.IsZero(o.RemoteAzureDatabase) { // not required @@ -677,7 +663,6 @@ func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *GetNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { - if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -720,7 +705,6 @@ GetNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model GetNodeOKBodyContainer */ type GetNodeOKBodyContainer struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -785,7 +769,6 @@ GetNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model GetNodeOKBodyGeneric */ type GetNodeOKBodyGeneric struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -847,7 +830,6 @@ GetNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model GetNodeOKBodyRemote */ type GetNodeOKBodyRemote struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -903,7 +885,6 @@ GetNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model GetNodeOKBodyRemoteAzureDatabase */ type GetNodeOKBodyRemoteAzureDatabase struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -959,7 +940,6 @@ GetNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model GetNodeOKBodyRemoteRDS */ type GetNodeOKBodyRemoteRDS struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go b/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go index 828de4c8f1..63128821ce 100644 --- a/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go @@ -60,7 +60,6 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { - /* NodeType. Return only Nodes with matching Node type. @@ -86,9 +85,7 @@ func (o *ListNodesParams) WithDefaults() *ListNodesParams { // // All values with no default are reset to their zero value. func (o *ListNodesParams) SetDefaults() { - var ( - nodeTypeDefault = string("NODE_TYPE_UNSPECIFIED") - ) + nodeTypeDefault := string("NODE_TYPE_UNSPECIFIED") val := ListNodesParams{ NodeType: &nodeTypeDefault, @@ -146,7 +143,6 @@ func (o *ListNodesParams) SetNodeType(nodeType *string) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -162,7 +158,6 @@ func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } qNodeType := qrNodeType if qNodeType != "" { - if err := r.SetQueryParam("node_type", qNodeType); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go b/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go index 75adb97452..7182f2aca7 100644 --- a/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go +++ b/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go @@ -103,7 +103,6 @@ func (o *ListNodesOK) GetPayload() *ListNodesOKBody { } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListNodesOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListNodesDefaultBody) // response payload @@ -193,7 +191,6 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -306,7 +300,6 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type ListNodesDefaultBodyDetailsItems0 struct { func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListNodesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { - // generic Generic []*ListNodesOKBodyGenericItems0 `json:"generic"` @@ -628,9 +618,7 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Generic); i++ { - if o.Generic[i] != nil { if swag.IsZero(o.Generic[i]) { // not required @@ -646,16 +634,13 @@ func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats st return err } } - } return nil } func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Container); i++ { - if o.Container[i] != nil { if swag.IsZero(o.Container[i]) { // not required @@ -671,16 +656,13 @@ func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats return err } } - } return nil } func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Remote); i++ { - if o.Remote[i] != nil { if swag.IsZero(o.Remote[i]) { // not required @@ -696,16 +678,13 @@ func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats str return err } } - } return nil } func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.RemoteRDS); i++ { - if o.RemoteRDS[i] != nil { if swag.IsZero(o.RemoteRDS[i]) { // not required @@ -721,16 +700,13 @@ func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats return err } } - } return nil } func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.RemoteAzureDatabase); i++ { - if o.RemoteAzureDatabase[i] != nil { if swag.IsZero(o.RemoteAzureDatabase[i]) { // not required @@ -746,7 +722,6 @@ func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context return err } } - } return nil @@ -775,7 +750,6 @@ ListNodesOKBodyContainerItems0 ContainerNode represents a Docker container. swagger:model ListNodesOKBodyContainerItems0 */ type ListNodesOKBodyContainerItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -840,7 +814,6 @@ ListNodesOKBodyGenericItems0 GenericNode represents a bare metal server or virtu swagger:model ListNodesOKBodyGenericItems0 */ type ListNodesOKBodyGenericItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -902,7 +875,6 @@ ListNodesOKBodyRemoteAzureDatabaseItems0 RemoteAzureDatabaseNode represents remo swagger:model ListNodesOKBodyRemoteAzureDatabaseItems0 */ type ListNodesOKBodyRemoteAzureDatabaseItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -958,7 +930,6 @@ ListNodesOKBodyRemoteItems0 RemoteNode represents generic remote Node. It's a no swagger:model ListNodesOKBodyRemoteItems0 */ type ListNodesOKBodyRemoteItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1014,7 +985,6 @@ ListNodesOKBodyRemoteRDSItems0 RemoteRDSNode represents remote RDS Node. Agents swagger:model ListNodesOKBodyRemoteRDSItems0 */ type ListNodesOKBodyRemoteRDSItems0 struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go b/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go index c2bfa764da..62194bd1a8 100644 --- a/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go @@ -61,7 +61,6 @@ RemoveNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveNodeParams struct { - /* Force. Remove node with all dependencies. @@ -151,7 +150,6 @@ func (o *RemoveNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -167,7 +165,6 @@ func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qForce := swag.FormatBool(qrForce) if qForce != "" { - if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/remove_node_responses.go b/api/inventory/v1/json/client/nodes_service/remove_node_responses.go index eeaddaac03..80f2e26ef2 100644 --- a/api/inventory/v1/json/client/nodes_service/remove_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/remove_node_responses.go @@ -103,7 +103,6 @@ func (o *RemoveNodeOK) GetPayload() interface{} { } func (o *RemoveNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *RemoveNodeDefault) GetPayload() *RemoveNodeDefaultBody { } func (o *RemoveNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveNodeDefaultBody) // response payload @@ -191,7 +189,6 @@ RemoveNodeDefaultBody remove node default body swagger:model RemoveNodeDefaultBody */ type RemoveNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *RemoveNodeDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -304,7 +298,6 @@ RemoveNodeDefaultBodyDetailsItems0 remove node default body details items0 swagger:model RemoveNodeDefaultBodyDetailsItems0 */ type RemoveNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type RemoveNodeDefaultBodyDetailsItems0 struct { func (o *RemoveNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *RemoveNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/client/services_service/add_service_parameters.go b/api/inventory/v1/json/client/services_service/add_service_parameters.go index db289d481c..ed2a7830ee 100644 --- a/api/inventory/v1/json/client/services_service/add_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/add_service_parameters.go @@ -60,7 +60,6 @@ AddServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddServiceParams struct { - // Body. Body AddServiceBody @@ -130,7 +129,6 @@ func (o *AddServiceParams) SetBody(body AddServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/add_service_responses.go b/api/inventory/v1/json/client/services_service/add_service_responses.go index bb65cd9dfa..87767c8a51 100644 --- a/api/inventory/v1/json/client/services_service/add_service_responses.go +++ b/api/inventory/v1/json/client/services_service/add_service_responses.go @@ -103,7 +103,6 @@ func (o *AddServiceOK) GetPayload() *AddServiceOKBody { } func (o *AddServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddServiceOKBody) // response payload @@ -177,7 +176,6 @@ func (o *AddServiceDefault) GetPayload() *AddServiceDefaultBody { } func (o *AddServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddServiceDefaultBody) // response payload @@ -193,7 +191,6 @@ AddServiceBody add service body swagger:model AddServiceBody */ type AddServiceBody struct { - // external External *AddServiceParamsBodyExternal `json:"external,omitempty"` @@ -396,7 +393,6 @@ func (o *AddServiceBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - if o.External != nil { if swag.IsZero(o.External) { // not required @@ -417,7 +413,6 @@ func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -438,7 +433,6 @@ func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -459,7 +453,6 @@ func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -480,7 +473,6 @@ func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfm } func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -501,7 +493,6 @@ func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats } func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -544,7 +535,6 @@ AddServiceDefaultBody add service default body swagger:model AddServiceDefaultBody */ type AddServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -610,9 +600,7 @@ func (o *AddServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -628,7 +616,6 @@ func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -657,7 +644,6 @@ AddServiceDefaultBodyDetailsItems0 add service default body details items0 swagger:model AddServiceDefaultBodyDetailsItems0 */ type AddServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -669,7 +655,6 @@ type AddServiceDefaultBodyDetailsItems0 struct { func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -707,7 +692,6 @@ func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -771,7 +755,6 @@ AddServiceOKBody add service OK body swagger:model AddServiceOKBody */ type AddServiceOKBody struct { - // external External *AddServiceOKBodyExternal `json:"external,omitempty"` @@ -974,7 +957,6 @@ func (o *AddServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - if o.External != nil { if swag.IsZero(o.External) { // not required @@ -995,7 +977,6 @@ func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -1016,7 +997,6 @@ func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -1037,7 +1017,6 @@ func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -1058,7 +1037,6 @@ func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -1079,7 +1057,6 @@ func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -1122,7 +1099,6 @@ AddServiceOKBodyExternal ExternalService represents a generic External service i swagger:model AddServiceOKBodyExternal */ type AddServiceOKBodyExternal struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1181,7 +1157,6 @@ AddServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model AddServiceOKBodyHaproxy */ type AddServiceOKBodyHaproxy struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1237,7 +1212,6 @@ AddServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model AddServiceOKBodyMongodb */ type AddServiceOKBodyMongodb struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1308,7 +1282,6 @@ AddServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyMysql */ type AddServiceOKBodyMysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1379,7 +1352,6 @@ AddServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model AddServiceOKBodyPostgresql */ type AddServiceOKBodyPostgresql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1456,7 +1428,6 @@ AddServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model AddServiceOKBodyProxysql */ type AddServiceOKBodyProxysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1527,7 +1498,6 @@ AddServiceParamsBodyExternal add service params body external swagger:model AddServiceParamsBodyExternal */ type AddServiceParamsBodyExternal struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1583,7 +1553,6 @@ AddServiceParamsBodyHaproxy add service params body haproxy swagger:model AddServiceParamsBodyHaproxy */ type AddServiceParamsBodyHaproxy struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1636,7 +1605,6 @@ AddServiceParamsBodyMongodb add service params body mongodb swagger:model AddServiceParamsBodyMongodb */ type AddServiceParamsBodyMongodb struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1701,7 +1669,6 @@ AddServiceParamsBodyMysql add service params body mysql swagger:model AddServiceParamsBodyMysql */ type AddServiceParamsBodyMysql struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1766,7 +1733,6 @@ AddServiceParamsBodyPostgresql add service params body postgresql swagger:model AddServiceParamsBodyPostgresql */ type AddServiceParamsBodyPostgresql struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1834,7 +1800,6 @@ AddServiceParamsBodyProxysql add service params body proxysql swagger:model AddServiceParamsBodyProxysql */ type AddServiceParamsBodyProxysql struct { - // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/change_service_parameters.go b/api/inventory/v1/json/client/services_service/change_service_parameters.go index d2ffc87b96..d718cb7f5b 100644 --- a/api/inventory/v1/json/client/services_service/change_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/change_service_parameters.go @@ -60,7 +60,6 @@ ChangeServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeServiceParams struct { - // Body. Body ChangeServiceBody @@ -144,7 +143,6 @@ func (o *ChangeServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *ChangeServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/change_service_responses.go b/api/inventory/v1/json/client/services_service/change_service_responses.go index a2be387f9f..c6f61609b7 100644 --- a/api/inventory/v1/json/client/services_service/change_service_responses.go +++ b/api/inventory/v1/json/client/services_service/change_service_responses.go @@ -103,7 +103,6 @@ func (o *ChangeServiceOK) GetPayload() *ChangeServiceOKBody { } func (o *ChangeServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeServiceOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ChangeServiceDefault) GetPayload() *ChangeServiceDefaultBody { } func (o *ChangeServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeServiceDefaultBody) // response payload @@ -193,7 +191,6 @@ ChangeServiceBody change service body swagger:model ChangeServiceBody */ type ChangeServiceBody struct { - // environment Environment *string `json:"environment,omitempty"` @@ -258,7 +255,6 @@ func (o *ChangeServiceBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeServiceBody) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { - if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -301,7 +297,6 @@ ChangeServiceDefaultBody change service default body swagger:model ChangeServiceDefaultBody */ type ChangeServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -367,9 +362,7 @@ func (o *ChangeServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -385,7 +378,6 @@ func (o *ChangeServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -414,7 +406,6 @@ ChangeServiceDefaultBodyDetailsItems0 change service default body details items0 swagger:model ChangeServiceDefaultBodyDetailsItems0 */ type ChangeServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -426,7 +417,6 @@ type ChangeServiceDefaultBodyDetailsItems0 struct { func (o *ChangeServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -464,7 +454,6 @@ func (o *ChangeServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -528,7 +517,6 @@ ChangeServiceOKBody change service OK body swagger:model ChangeServiceOKBody */ type ChangeServiceOKBody struct { - // external External *ChangeServiceOKBodyExternal `json:"external,omitempty"` @@ -731,7 +719,6 @@ func (o *ChangeServiceOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ChangeServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - if o.External != nil { if swag.IsZero(o.External) { // not required @@ -752,7 +739,6 @@ func (o *ChangeServiceOKBody) contextValidateExternal(ctx context.Context, forma } func (o *ChangeServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -773,7 +759,6 @@ func (o *ChangeServiceOKBody) contextValidateHaproxy(ctx context.Context, format } func (o *ChangeServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -794,7 +779,6 @@ func (o *ChangeServiceOKBody) contextValidateMongodb(ctx context.Context, format } func (o *ChangeServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -815,7 +799,6 @@ func (o *ChangeServiceOKBody) contextValidateMysql(ctx context.Context, formats } func (o *ChangeServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -836,7 +819,6 @@ func (o *ChangeServiceOKBody) contextValidatePostgresql(ctx context.Context, for } func (o *ChangeServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -879,7 +861,6 @@ ChangeServiceOKBodyExternal ExternalService represents a generic External servic swagger:model ChangeServiceOKBodyExternal */ type ChangeServiceOKBodyExternal struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -938,7 +919,6 @@ ChangeServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service i swagger:model ChangeServiceOKBodyHaproxy */ type ChangeServiceOKBodyHaproxy struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -994,7 +974,6 @@ ChangeServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model ChangeServiceOKBodyMongodb */ type ChangeServiceOKBodyMongodb struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1065,7 +1044,6 @@ ChangeServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model ChangeServiceOKBodyMysql */ type ChangeServiceOKBodyMysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1136,7 +1114,6 @@ ChangeServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL swagger:model ChangeServiceOKBodyPostgresql */ type ChangeServiceOKBodyPostgresql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1213,7 +1190,6 @@ ChangeServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instan swagger:model ChangeServiceOKBodyProxysql */ type ChangeServiceOKBodyProxysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1284,7 +1260,6 @@ ChangeServiceParamsBodyCustomLabels A wrapper for map[string]string. This type a swagger:model ChangeServiceParamsBodyCustomLabels */ type ChangeServiceParamsBodyCustomLabels struct { - // values Values map[string]string `json:"values,omitempty"` } diff --git a/api/inventory/v1/json/client/services_service/get_service_parameters.go b/api/inventory/v1/json/client/services_service/get_service_parameters.go index 12989ecf6a..8569bce763 100644 --- a/api/inventory/v1/json/client/services_service/get_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/get_service_parameters.go @@ -60,7 +60,6 @@ GetServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetServiceParams struct { - /* ServiceID. Unique randomly generated instance identifier. @@ -133,7 +132,6 @@ func (o *GetServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/get_service_responses.go b/api/inventory/v1/json/client/services_service/get_service_responses.go index f0c595afd2..ac73582902 100644 --- a/api/inventory/v1/json/client/services_service/get_service_responses.go +++ b/api/inventory/v1/json/client/services_service/get_service_responses.go @@ -103,7 +103,6 @@ func (o *GetServiceOK) GetPayload() *GetServiceOKBody { } func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetServiceOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetServiceDefault) GetPayload() *GetServiceDefaultBody { } func (o *GetServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetServiceDefaultBody) // response payload @@ -193,7 +191,6 @@ GetServiceDefaultBody get service default body swagger:model GetServiceDefaultBody */ type GetServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -306,7 +300,6 @@ GetServiceDefaultBodyDetailsItems0 get service default body details items0 swagger:model GetServiceDefaultBodyDetailsItems0 */ type GetServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetServiceDefaultBodyDetailsItems0 struct { func (o *GetServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetServiceOKBody get service OK body swagger:model GetServiceOKBody */ type GetServiceOKBody struct { - // external External *GetServiceOKBodyExternal `json:"external,omitempty"` @@ -623,7 +613,6 @@ func (o *GetServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - if o.External != nil { if swag.IsZero(o.External) { // not required @@ -644,7 +633,6 @@ func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -665,7 +653,6 @@ func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -686,7 +673,6 @@ func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -707,7 +693,6 @@ func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -728,7 +713,6 @@ func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *GetServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -771,7 +755,6 @@ GetServiceOKBodyExternal ExternalService represents a generic External service i swagger:model GetServiceOKBodyExternal */ type GetServiceOKBodyExternal struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -830,7 +813,6 @@ GetServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model GetServiceOKBodyHaproxy */ type GetServiceOKBodyHaproxy struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -886,7 +868,6 @@ GetServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model GetServiceOKBodyMongodb */ type GetServiceOKBodyMongodb struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -957,7 +938,6 @@ GetServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model GetServiceOKBodyMysql */ type GetServiceOKBodyMysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1028,7 +1008,6 @@ GetServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model GetServiceOKBodyPostgresql */ type GetServiceOKBodyPostgresql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1105,7 +1084,6 @@ GetServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model GetServiceOKBodyProxysql */ type GetServiceOKBodyProxysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go b/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go index b5ff5f3d62..87429c6341 100644 --- a/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go +++ b/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go @@ -60,7 +60,6 @@ ListActiveServiceTypesParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ListActiveServiceTypesParams struct { - // Body. Body interface{} @@ -130,7 +129,6 @@ func (o *ListActiveServiceTypesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *ListActiveServiceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go b/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go index fbf62aa31f..992e691c94 100644 --- a/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go +++ b/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go @@ -104,7 +104,6 @@ func (o *ListActiveServiceTypesOK) GetPayload() *ListActiveServiceTypesOKBody { } func (o *ListActiveServiceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListActiveServiceTypesOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListActiveServiceTypesDefault) GetPayload() *ListActiveServiceTypesDefa } func (o *ListActiveServiceTypesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListActiveServiceTypesDefaultBody) // response payload @@ -194,7 +192,6 @@ ListActiveServiceTypesDefaultBody list active service types default body swagger:model ListActiveServiceTypesDefaultBody */ type ListActiveServiceTypesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListActiveServiceTypesDefaultBody) ContextValidate(ctx context.Context, } func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.C return err } } - } return nil @@ -307,7 +301,6 @@ ListActiveServiceTypesDefaultBodyDetailsItems0 list active service types default swagger:model ListActiveServiceTypesDefaultBodyDetailsItems0 */ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { func (o *ListActiveServiceTypesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListActiveServiceTypesDefaultBodyDetailsItems0) UnmarshalJSON(data []by // MarshalJSON marshals this object with additional properties into a JSON object func (o ListActiveServiceTypesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListActiveServiceTypesOKBody list active service types OK body swagger:model ListActiveServiceTypesOKBody */ type ListActiveServiceTypesOKBody struct { - // service types ServiceTypes []*string `json:"service_types"` } diff --git a/api/inventory/v1/json/client/services_service/list_services_parameters.go b/api/inventory/v1/json/client/services_service/list_services_parameters.go index 9c03818782..2173e7e182 100644 --- a/api/inventory/v1/json/client/services_service/list_services_parameters.go +++ b/api/inventory/v1/json/client/services_service/list_services_parameters.go @@ -60,7 +60,6 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { - /* ExternalGroup. Return only services in this external group. @@ -98,9 +97,7 @@ func (o *ListServicesParams) WithDefaults() *ListServicesParams { // // All values with no default are reset to their zero value. func (o *ListServicesParams) SetDefaults() { - var ( - serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") - ) + serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") val := ListServicesParams{ ServiceType: &serviceTypeDefault, @@ -180,7 +177,6 @@ func (o *ListServicesParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -196,7 +192,6 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qExternalGroup := qrExternalGroup if qExternalGroup != "" { - if err := r.SetQueryParam("external_group", qExternalGroup); err != nil { return err } @@ -213,7 +208,6 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qNodeID := qrNodeID if qNodeID != "" { - if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -230,7 +224,6 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qServiceType := qrServiceType if qServiceType != "" { - if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/list_services_responses.go b/api/inventory/v1/json/client/services_service/list_services_responses.go index 7305d17d01..ceffebc60e 100644 --- a/api/inventory/v1/json/client/services_service/list_services_responses.go +++ b/api/inventory/v1/json/client/services_service/list_services_responses.go @@ -103,7 +103,6 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListServicesOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListServicesDefaultBody) // response payload @@ -193,7 +191,6 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -306,7 +300,6 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { - // mysql Mysql []*ListServicesOKBodyMysqlItems0 `json:"mysql"` @@ -665,9 +655,7 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Mysql); i++ { - if o.Mysql[i] != nil { if swag.IsZero(o.Mysql[i]) { // not required @@ -683,16 +671,13 @@ func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats s return err } } - } return nil } func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Mongodb); i++ { - if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -708,16 +693,13 @@ func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats return err } } - } return nil } func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Postgresql); i++ { - if o.Postgresql[i] != nil { if swag.IsZero(o.Postgresql[i]) { // not required @@ -733,16 +715,13 @@ func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, form return err } } - } return nil } func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Proxysql); i++ { - if o.Proxysql[i] != nil { if swag.IsZero(o.Proxysql[i]) { // not required @@ -758,16 +737,13 @@ func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, format return err } } - } return nil } func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Haproxy); i++ { - if o.Haproxy[i] != nil { if swag.IsZero(o.Haproxy[i]) { // not required @@ -783,16 +759,13 @@ func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats return err } } - } return nil } func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.External); i++ { - if o.External[i] != nil { if swag.IsZero(o.External[i]) { // not required @@ -808,7 +781,6 @@ func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, format return err } } - } return nil @@ -837,7 +809,6 @@ ListServicesOKBodyExternalItems0 ExternalService represents a generic External s swagger:model ListServicesOKBodyExternalItems0 */ type ListServicesOKBodyExternalItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -896,7 +867,6 @@ ListServicesOKBodyHaproxyItems0 HAProxyService represents a generic HAProxy serv swagger:model ListServicesOKBodyHaproxyItems0 */ type ListServicesOKBodyHaproxyItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -952,7 +922,6 @@ ListServicesOKBodyMongodbItems0 MongoDBService represents a generic MongoDB inst swagger:model ListServicesOKBodyMongodbItems0 */ type ListServicesOKBodyMongodbItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1023,7 +992,6 @@ ListServicesOKBodyMysqlItems0 MySQLService represents a generic MySQL instance. swagger:model ListServicesOKBodyMysqlItems0 */ type ListServicesOKBodyMysqlItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1094,7 +1062,6 @@ ListServicesOKBodyPostgresqlItems0 PostgreSQLService represents a generic Postgr swagger:model ListServicesOKBodyPostgresqlItems0 */ type ListServicesOKBodyPostgresqlItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1171,7 +1138,6 @@ ListServicesOKBodyProxysqlItems0 ProxySQLService represents a generic ProxySQL i swagger:model ListServicesOKBodyProxysqlItems0 */ type ListServicesOKBodyProxysqlItems0 struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/remove_service_parameters.go b/api/inventory/v1/json/client/services_service/remove_service_parameters.go index 09c33e6bcd..876f2945e9 100644 --- a/api/inventory/v1/json/client/services_service/remove_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/remove_service_parameters.go @@ -61,7 +61,6 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { - /* Force. Remove service with all dependencies. @@ -151,7 +150,6 @@ func (o *RemoveServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -167,7 +165,6 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qForce := swag.FormatBool(qrForce) if qForce != "" { - if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/remove_service_responses.go b/api/inventory/v1/json/client/services_service/remove_service_responses.go index 0abc326f41..554e2978f7 100644 --- a/api/inventory/v1/json/client/services_service/remove_service_responses.go +++ b/api/inventory/v1/json/client/services_service/remove_service_responses.go @@ -103,7 +103,6 @@ func (o *RemoveServiceOK) GetPayload() interface{} { } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -191,7 +189,6 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -304,7 +298,6 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type RemoveServiceDefaultBodyDetailsItems0 struct { func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/log_level.pb.go b/api/inventory/v1/log_level.pb.go index a81214b6d9..addb457bf8 100644 --- a/api/inventory/v1/log_level.pb.go +++ b/api/inventory/v1/log_level.pb.go @@ -7,10 +7,11 @@ package inventoryv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -120,10 +121,13 @@ func file_inventory_v1_log_level_proto_rawDescGZIP() []byte { return file_inventory_v1_log_level_proto_rawDescData } -var file_inventory_v1_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventory_v1_log_level_proto_goTypes = []any{ - (LogLevel)(0), // 0: inventory.v1.LogLevel -} +var ( + file_inventory_v1_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventory_v1_log_level_proto_goTypes = []any{ + (LogLevel)(0), // 0: inventory.v1.LogLevel + } +) + var file_inventory_v1_log_level_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventory/v1/nodes.pb.go b/api/inventory/v1/nodes.pb.go index fe0f2df44e..a2ffc9e83d 100644 --- a/api/inventory/v1/nodes.pb.go +++ b/api/inventory/v1/nodes.pb.go @@ -7,13 +7,14 @@ package inventoryv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -2169,39 +2170,42 @@ func file_inventory_v1_nodes_proto_rawDescGZIP() []byte { return file_inventory_v1_nodes_proto_rawDescData } -var file_inventory_v1_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventory_v1_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 28) -var file_inventory_v1_nodes_proto_goTypes = []any{ - (NodeType)(0), // 0: inventory.v1.NodeType - (*GenericNode)(nil), // 1: inventory.v1.GenericNode - (*ContainerNode)(nil), // 2: inventory.v1.ContainerNode - (*RemoteNode)(nil), // 3: inventory.v1.RemoteNode - (*RemoteRDSNode)(nil), // 4: inventory.v1.RemoteRDSNode - (*RemoteAzureDatabaseNode)(nil), // 5: inventory.v1.RemoteAzureDatabaseNode - (*ListNodesRequest)(nil), // 6: inventory.v1.ListNodesRequest - (*ListNodesResponse)(nil), // 7: inventory.v1.ListNodesResponse - (*GetNodeRequest)(nil), // 8: inventory.v1.GetNodeRequest - (*GetNodeResponse)(nil), // 9: inventory.v1.GetNodeResponse - (*AddNodeRequest)(nil), // 10: inventory.v1.AddNodeRequest - (*AddNodeResponse)(nil), // 11: inventory.v1.AddNodeResponse - (*AddGenericNodeParams)(nil), // 12: inventory.v1.AddGenericNodeParams - (*AddContainerNodeParams)(nil), // 13: inventory.v1.AddContainerNodeParams - (*AddRemoteNodeParams)(nil), // 14: inventory.v1.AddRemoteNodeParams - (*AddRemoteRDSNodeParams)(nil), // 15: inventory.v1.AddRemoteRDSNodeParams - (*AddRemoteAzureNodeParams)(nil), // 16: inventory.v1.AddRemoteAzureNodeParams - (*RemoveNodeRequest)(nil), // 17: inventory.v1.RemoveNodeRequest - (*RemoveNodeResponse)(nil), // 18: inventory.v1.RemoveNodeResponse - nil, // 19: inventory.v1.GenericNode.CustomLabelsEntry - nil, // 20: inventory.v1.ContainerNode.CustomLabelsEntry - nil, // 21: inventory.v1.RemoteNode.CustomLabelsEntry - nil, // 22: inventory.v1.RemoteRDSNode.CustomLabelsEntry - nil, // 23: inventory.v1.RemoteAzureDatabaseNode.CustomLabelsEntry - nil, // 24: inventory.v1.AddGenericNodeParams.CustomLabelsEntry - nil, // 25: inventory.v1.AddContainerNodeParams.CustomLabelsEntry - nil, // 26: inventory.v1.AddRemoteNodeParams.CustomLabelsEntry - nil, // 27: inventory.v1.AddRemoteRDSNodeParams.CustomLabelsEntry - nil, // 28: inventory.v1.AddRemoteAzureNodeParams.CustomLabelsEntry -} +var ( + file_inventory_v1_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventory_v1_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 28) + file_inventory_v1_nodes_proto_goTypes = []any{ + (NodeType)(0), // 0: inventory.v1.NodeType + (*GenericNode)(nil), // 1: inventory.v1.GenericNode + (*ContainerNode)(nil), // 2: inventory.v1.ContainerNode + (*RemoteNode)(nil), // 3: inventory.v1.RemoteNode + (*RemoteRDSNode)(nil), // 4: inventory.v1.RemoteRDSNode + (*RemoteAzureDatabaseNode)(nil), // 5: inventory.v1.RemoteAzureDatabaseNode + (*ListNodesRequest)(nil), // 6: inventory.v1.ListNodesRequest + (*ListNodesResponse)(nil), // 7: inventory.v1.ListNodesResponse + (*GetNodeRequest)(nil), // 8: inventory.v1.GetNodeRequest + (*GetNodeResponse)(nil), // 9: inventory.v1.GetNodeResponse + (*AddNodeRequest)(nil), // 10: inventory.v1.AddNodeRequest + (*AddNodeResponse)(nil), // 11: inventory.v1.AddNodeResponse + (*AddGenericNodeParams)(nil), // 12: inventory.v1.AddGenericNodeParams + (*AddContainerNodeParams)(nil), // 13: inventory.v1.AddContainerNodeParams + (*AddRemoteNodeParams)(nil), // 14: inventory.v1.AddRemoteNodeParams + (*AddRemoteRDSNodeParams)(nil), // 15: inventory.v1.AddRemoteRDSNodeParams + (*AddRemoteAzureNodeParams)(nil), // 16: inventory.v1.AddRemoteAzureNodeParams + (*RemoveNodeRequest)(nil), // 17: inventory.v1.RemoveNodeRequest + (*RemoveNodeResponse)(nil), // 18: inventory.v1.RemoveNodeResponse + nil, // 19: inventory.v1.GenericNode.CustomLabelsEntry + nil, // 20: inventory.v1.ContainerNode.CustomLabelsEntry + nil, // 21: inventory.v1.RemoteNode.CustomLabelsEntry + nil, // 22: inventory.v1.RemoteRDSNode.CustomLabelsEntry + nil, // 23: inventory.v1.RemoteAzureDatabaseNode.CustomLabelsEntry + nil, // 24: inventory.v1.AddGenericNodeParams.CustomLabelsEntry + nil, // 25: inventory.v1.AddContainerNodeParams.CustomLabelsEntry + nil, // 26: inventory.v1.AddRemoteNodeParams.CustomLabelsEntry + nil, // 27: inventory.v1.AddRemoteRDSNodeParams.CustomLabelsEntry + nil, // 28: inventory.v1.AddRemoteAzureNodeParams.CustomLabelsEntry + } +) + var file_inventory_v1_nodes_proto_depIdxs = []int32{ 19, // 0: inventory.v1.GenericNode.custom_labels:type_name -> inventory.v1.GenericNode.CustomLabelsEntry 20, // 1: inventory.v1.ContainerNode.custom_labels:type_name -> inventory.v1.ContainerNode.CustomLabelsEntry diff --git a/api/inventory/v1/nodes.pb.gw.go b/api/inventory/v1/nodes.pb.gw.go index d11d2d230b..b6ee5b6c38 100644 --- a/api/inventory/v1/nodes.pb.gw.go +++ b/api/inventory/v1/nodes.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_NodesService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) +var filter_NodesService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + func request_NodesService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodesRequest var metadata runtime.ServerMetadata @@ -48,7 +48,6 @@ func request_NodesService_ListNodes_0(ctx context.Context, marshaler runtime.Mar msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NodesService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -64,7 +63,6 @@ func local_request_NodesService_ListNodes_0(ctx context.Context, marshaler runti msg, err := server.ListNodes(ctx, &protoReq) return msg, metadata, err - } func request_NodesService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -90,7 +88,6 @@ func request_NodesService_GetNode_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NodesService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,7 +113,6 @@ func local_request_NodesService_GetNode_0(ctx context.Context, marshaler runtime msg, err := server.GetNode(ctx, &protoReq) return msg, metadata, err - } func request_NodesService_AddNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -129,7 +125,6 @@ func request_NodesService_AddNode_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.AddNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NodesService_AddNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -142,12 +137,9 @@ func local_request_NodesService_AddNode_0(ctx context.Context, marshaler runtime msg, err := server.AddNode(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_NodesService_RemoveNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_NodesService_RemoveNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_NodesService_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveNodeRequest @@ -179,7 +171,6 @@ func request_NodesService_RemoveNode_0(ctx context.Context, marshaler runtime.Ma msg, err := client.RemoveNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -212,7 +203,6 @@ func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runt msg, err := server.RemoveNode(ctx, &protoReq) return msg, metadata, err - } // RegisterNodesServiceHandlerServer registers the http handlers for service NodesService to "mux". @@ -221,7 +211,6 @@ func local_request_NodesService_RemoveNode_0(ctx context.Context, marshaler runt // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNodesServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodesServiceServer) error { - mux.Handle("GET", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -244,7 +233,6 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_NodesService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -269,7 +257,6 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_NodesService_AddNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -294,7 +281,6 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_AddNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_NodesService_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -319,7 +305,6 @@ func RegisterNodesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_RemoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -362,7 +347,6 @@ func RegisterNodesServiceHandler(ctx context.Context, mux *runtime.ServeMux, con // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "NodesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodesServiceClient) error { - mux.Handle("GET", pattern_NodesService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -382,7 +366,6 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_NodesService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -404,7 +387,6 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_NodesService_AddNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -426,7 +408,6 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_AddNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_NodesService_RemoveNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -448,7 +429,6 @@ func RegisterNodesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu } forward_NodesService_RemoveNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/inventory/v1/nodes_grpc.pb.go b/api/inventory/v1/nodes_grpc.pb.go index 0b7e0e5ec0..86f5ff2104 100644 --- a/api/inventory/v1/nodes_grpc.pb.go +++ b/api/inventory/v1/nodes_grpc.pb.go @@ -8,6 +8,7 @@ package inventoryv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -116,12 +117,15 @@ type UnimplementedNodesServiceServer struct{} func (UnimplementedNodesServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } + func (UnimplementedNodesServiceServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") } + func (UnimplementedNodesServiceServer) AddNode(context.Context, *AddNodeRequest) (*AddNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddNode not implemented") } + func (UnimplementedNodesServiceServer) RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveNode not implemented") } diff --git a/api/inventory/v1/services.pb.go b/api/inventory/v1/services.pb.go index 2811591c72..ee6842b032 100644 --- a/api/inventory/v1/services.pb.go +++ b/api/inventory/v1/services.pb.go @@ -7,14 +7,16 @@ package inventoryv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + common "github.com/percona/pmm/api/common" ) const ( @@ -3190,48 +3192,51 @@ func file_inventory_v1_services_proto_rawDescGZIP() []byte { return file_inventory_v1_services_proto_rawDescData } -var file_inventory_v1_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_inventory_v1_services_proto_msgTypes = make([]protoimpl.MessageInfo, 36) -var file_inventory_v1_services_proto_goTypes = []any{ - (ServiceType)(0), // 0: inventory.v1.ServiceType - (*MySQLService)(nil), // 1: inventory.v1.MySQLService - (*MongoDBService)(nil), // 2: inventory.v1.MongoDBService - (*PostgreSQLService)(nil), // 3: inventory.v1.PostgreSQLService - (*ProxySQLService)(nil), // 4: inventory.v1.ProxySQLService - (*HAProxyService)(nil), // 5: inventory.v1.HAProxyService - (*ExternalService)(nil), // 6: inventory.v1.ExternalService - (*ListServicesRequest)(nil), // 7: inventory.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 8: inventory.v1.ListServicesResponse - (*ListActiveServiceTypesRequest)(nil), // 9: inventory.v1.ListActiveServiceTypesRequest - (*ListActiveServiceTypesResponse)(nil), // 10: inventory.v1.ListActiveServiceTypesResponse - (*GetServiceRequest)(nil), // 11: inventory.v1.GetServiceRequest - (*GetServiceResponse)(nil), // 12: inventory.v1.GetServiceResponse - (*AddServiceRequest)(nil), // 13: inventory.v1.AddServiceRequest - (*AddServiceResponse)(nil), // 14: inventory.v1.AddServiceResponse - (*AddMySQLServiceParams)(nil), // 15: inventory.v1.AddMySQLServiceParams - (*AddMongoDBServiceParams)(nil), // 16: inventory.v1.AddMongoDBServiceParams - (*AddPostgreSQLServiceParams)(nil), // 17: inventory.v1.AddPostgreSQLServiceParams - (*AddProxySQLServiceParams)(nil), // 18: inventory.v1.AddProxySQLServiceParams - (*AddHAProxyServiceParams)(nil), // 19: inventory.v1.AddHAProxyServiceParams - (*AddExternalServiceParams)(nil), // 20: inventory.v1.AddExternalServiceParams - (*RemoveServiceRequest)(nil), // 21: inventory.v1.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 22: inventory.v1.RemoveServiceResponse - (*ChangeServiceRequest)(nil), // 23: inventory.v1.ChangeServiceRequest - (*ChangeServiceResponse)(nil), // 24: inventory.v1.ChangeServiceResponse - nil, // 25: inventory.v1.MySQLService.CustomLabelsEntry - nil, // 26: inventory.v1.MongoDBService.CustomLabelsEntry - nil, // 27: inventory.v1.PostgreSQLService.CustomLabelsEntry - nil, // 28: inventory.v1.ProxySQLService.CustomLabelsEntry - nil, // 29: inventory.v1.HAProxyService.CustomLabelsEntry - nil, // 30: inventory.v1.ExternalService.CustomLabelsEntry - nil, // 31: inventory.v1.AddMySQLServiceParams.CustomLabelsEntry - nil, // 32: inventory.v1.AddMongoDBServiceParams.CustomLabelsEntry - nil, // 33: inventory.v1.AddPostgreSQLServiceParams.CustomLabelsEntry - nil, // 34: inventory.v1.AddProxySQLServiceParams.CustomLabelsEntry - nil, // 35: inventory.v1.AddHAProxyServiceParams.CustomLabelsEntry - nil, // 36: inventory.v1.AddExternalServiceParams.CustomLabelsEntry - (*common.StringMap)(nil), // 37: common.StringMap -} +var ( + file_inventory_v1_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_inventory_v1_services_proto_msgTypes = make([]protoimpl.MessageInfo, 36) + file_inventory_v1_services_proto_goTypes = []any{ + (ServiceType)(0), // 0: inventory.v1.ServiceType + (*MySQLService)(nil), // 1: inventory.v1.MySQLService + (*MongoDBService)(nil), // 2: inventory.v1.MongoDBService + (*PostgreSQLService)(nil), // 3: inventory.v1.PostgreSQLService + (*ProxySQLService)(nil), // 4: inventory.v1.ProxySQLService + (*HAProxyService)(nil), // 5: inventory.v1.HAProxyService + (*ExternalService)(nil), // 6: inventory.v1.ExternalService + (*ListServicesRequest)(nil), // 7: inventory.v1.ListServicesRequest + (*ListServicesResponse)(nil), // 8: inventory.v1.ListServicesResponse + (*ListActiveServiceTypesRequest)(nil), // 9: inventory.v1.ListActiveServiceTypesRequest + (*ListActiveServiceTypesResponse)(nil), // 10: inventory.v1.ListActiveServiceTypesResponse + (*GetServiceRequest)(nil), // 11: inventory.v1.GetServiceRequest + (*GetServiceResponse)(nil), // 12: inventory.v1.GetServiceResponse + (*AddServiceRequest)(nil), // 13: inventory.v1.AddServiceRequest + (*AddServiceResponse)(nil), // 14: inventory.v1.AddServiceResponse + (*AddMySQLServiceParams)(nil), // 15: inventory.v1.AddMySQLServiceParams + (*AddMongoDBServiceParams)(nil), // 16: inventory.v1.AddMongoDBServiceParams + (*AddPostgreSQLServiceParams)(nil), // 17: inventory.v1.AddPostgreSQLServiceParams + (*AddProxySQLServiceParams)(nil), // 18: inventory.v1.AddProxySQLServiceParams + (*AddHAProxyServiceParams)(nil), // 19: inventory.v1.AddHAProxyServiceParams + (*AddExternalServiceParams)(nil), // 20: inventory.v1.AddExternalServiceParams + (*RemoveServiceRequest)(nil), // 21: inventory.v1.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 22: inventory.v1.RemoveServiceResponse + (*ChangeServiceRequest)(nil), // 23: inventory.v1.ChangeServiceRequest + (*ChangeServiceResponse)(nil), // 24: inventory.v1.ChangeServiceResponse + nil, // 25: inventory.v1.MySQLService.CustomLabelsEntry + nil, // 26: inventory.v1.MongoDBService.CustomLabelsEntry + nil, // 27: inventory.v1.PostgreSQLService.CustomLabelsEntry + nil, // 28: inventory.v1.ProxySQLService.CustomLabelsEntry + nil, // 29: inventory.v1.HAProxyService.CustomLabelsEntry + nil, // 30: inventory.v1.ExternalService.CustomLabelsEntry + nil, // 31: inventory.v1.AddMySQLServiceParams.CustomLabelsEntry + nil, // 32: inventory.v1.AddMongoDBServiceParams.CustomLabelsEntry + nil, // 33: inventory.v1.AddPostgreSQLServiceParams.CustomLabelsEntry + nil, // 34: inventory.v1.AddProxySQLServiceParams.CustomLabelsEntry + nil, // 35: inventory.v1.AddHAProxyServiceParams.CustomLabelsEntry + nil, // 36: inventory.v1.AddExternalServiceParams.CustomLabelsEntry + (*common.StringMap)(nil), // 37: common.StringMap + } +) + var file_inventory_v1_services_proto_depIdxs = []int32{ 25, // 0: inventory.v1.MySQLService.custom_labels:type_name -> inventory.v1.MySQLService.CustomLabelsEntry 26, // 1: inventory.v1.MongoDBService.custom_labels:type_name -> inventory.v1.MongoDBService.CustomLabelsEntry diff --git a/api/inventory/v1/services.pb.gw.go b/api/inventory/v1/services.pb.gw.go index 631bf391fe..77a826da39 100644 --- a/api/inventory/v1/services.pb.gw.go +++ b/api/inventory/v1/services.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_ServicesService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) +var filter_ServicesService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + func request_ServicesService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListServicesRequest var metadata runtime.ServerMetadata @@ -48,7 +48,6 @@ func request_ServicesService_ListServices_0(ctx context.Context, marshaler runti msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServicesService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -64,7 +63,6 @@ func local_request_ServicesService_ListServices_0(ctx context.Context, marshaler msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err - } func request_ServicesService_ListActiveServiceTypes_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -77,7 +75,6 @@ func request_ServicesService_ListActiveServiceTypes_0(ctx context.Context, marsh msg, err := client.ListActiveServiceTypes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServicesService_ListActiveServiceTypes_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -90,7 +87,6 @@ func local_request_ServicesService_ListActiveServiceTypes_0(ctx context.Context, msg, err := server.ListActiveServiceTypes(ctx, &protoReq) return msg, metadata, err - } func request_ServicesService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,7 +112,6 @@ func request_ServicesService_GetService_0(ctx context.Context, marshaler runtime msg, err := client.GetService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServicesService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -142,7 +137,6 @@ func local_request_ServicesService_GetService_0(ctx context.Context, marshaler r msg, err := server.GetService(ctx, &protoReq) return msg, metadata, err - } func request_ServicesService_AddService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -155,7 +149,6 @@ func request_ServicesService_AddService_0(ctx context.Context, marshaler runtime msg, err := client.AddService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServicesService_AddService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -168,12 +161,9 @@ func local_request_ServicesService_AddService_0(ctx context.Context, marshaler r msg, err := server.AddService(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ServicesService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_ServicesService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_ServicesService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveServiceRequest @@ -205,7 +195,6 @@ func request_ServicesService_RemoveService_0(ctx context.Context, marshaler runt msg, err := client.RemoveService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServicesService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -238,7 +227,6 @@ func local_request_ServicesService_RemoveService_0(ctx context.Context, marshale msg, err := server.RemoveService(ctx, &protoReq) return msg, metadata, err - } func request_ServicesService_ChangeService_0(ctx context.Context, marshaler runtime.Marshaler, client ServicesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -268,7 +256,6 @@ func request_ServicesService_ChangeService_0(ctx context.Context, marshaler runt msg, err := client.ChangeService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServicesService_ChangeService_0(ctx context.Context, marshaler runtime.Marshaler, server ServicesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -298,7 +285,6 @@ func local_request_ServicesService_ChangeService_0(ctx context.Context, marshale msg, err := server.ChangeService(ctx, &protoReq) return msg, metadata, err - } // RegisterServicesServiceHandlerServer registers the http handlers for service ServicesService to "mux". @@ -307,7 +293,6 @@ func local_request_ServicesService_ChangeService_0(ctx context.Context, marshale // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServicesServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServicesServiceServer) error { - mux.Handle("GET", pattern_ServicesService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -330,7 +315,6 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ServicesService_ListActiveServiceTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -355,7 +339,6 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ListActiveServiceTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServicesService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -380,7 +363,6 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_GetService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ServicesService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -405,7 +387,6 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_ServicesService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -430,7 +411,6 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_ServicesService_ChangeService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -455,7 +435,6 @@ func RegisterServicesServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ChangeService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -498,7 +477,6 @@ func RegisterServicesServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServicesServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServicesServiceClient) error { - mux.Handle("GET", pattern_ServicesService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -518,7 +496,6 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ServicesService_ListActiveServiceTypes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -540,7 +517,6 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ListActiveServiceTypes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServicesService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -562,7 +538,6 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_GetService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ServicesService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -584,7 +559,6 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_ServicesService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -606,7 +580,6 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_ServicesService_ChangeService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -628,7 +601,6 @@ func RegisterServicesServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_ServicesService_ChangeService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/inventory/v1/services.pb.validate.go b/api/inventory/v1/services.pb.validate.go index 9765f78898..1bca110f71 100644 --- a/api/inventory/v1/services.pb.validate.go +++ b/api/inventory/v1/services.pb.validate.go @@ -3637,7 +3637,6 @@ func (m *ChangeServiceRequest) validate(all bool) error { } if m.CustomLabels != nil { - if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -3666,7 +3665,6 @@ func (m *ChangeServiceRequest) validate(all bool) error { } } } - } if len(errors) > 0 { diff --git a/api/inventory/v1/services_grpc.pb.go b/api/inventory/v1/services_grpc.pb.go index bc541c2fc2..55a382a871 100644 --- a/api/inventory/v1/services_grpc.pb.go +++ b/api/inventory/v1/services_grpc.pb.go @@ -8,6 +8,7 @@ package inventoryv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -146,18 +147,23 @@ type UnimplementedServicesServiceServer struct{} func (UnimplementedServicesServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") } + func (UnimplementedServicesServiceServer) ListActiveServiceTypes(context.Context, *ListActiveServiceTypesRequest) (*ListActiveServiceTypesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListActiveServiceTypes not implemented") } + func (UnimplementedServicesServiceServer) GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented") } + func (UnimplementedServicesServiceServer) AddService(context.Context, *AddServiceRequest) (*AddServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented") } + func (UnimplementedServicesServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") } + func (UnimplementedServicesServiceServer) ChangeService(context.Context, *ChangeServiceRequest) (*ChangeServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeService not implemented") } diff --git a/api/management/v1/agent.pb.go b/api/management/v1/agent.pb.go index 37244a34de..97850fb8d0 100644 --- a/api/management/v1/agent.pb.go +++ b/api/management/v1/agent.pb.go @@ -7,12 +7,14 @@ package managementv1 import ( - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -1278,24 +1280,27 @@ func file_management_v1_agent_proto_rawDescGZIP() []byte { return file_management_v1_agent_proto_rawDescData } -var file_management_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_management_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_management_v1_agent_proto_goTypes = []any{ - (UpdateSeverity)(0), // 0: management.v1.UpdateSeverity - (*UniversalAgent)(nil), // 1: management.v1.UniversalAgent - (*ListAgentsRequest)(nil), // 2: management.v1.ListAgentsRequest - (*ListAgentsResponse)(nil), // 3: management.v1.ListAgentsResponse - (*AgentVersions)(nil), // 4: management.v1.AgentVersions - (*ListAgentVersionsRequest)(nil), // 5: management.v1.ListAgentVersionsRequest - (*ListAgentVersionsResponse)(nil), // 6: management.v1.ListAgentVersionsResponse - (*UniversalAgent_MySQLOptions)(nil), // 7: management.v1.UniversalAgent.MySQLOptions - (*UniversalAgent_AzureOptions)(nil), // 8: management.v1.UniversalAgent.AzureOptions - (*UniversalAgent_MongoDBOptions)(nil), // 9: management.v1.UniversalAgent.MongoDBOptions - (*UniversalAgent_PostgreSQLOptions)(nil), // 10: management.v1.UniversalAgent.PostgreSQLOptions - nil, // 11: management.v1.UniversalAgent.CustomLabelsEntry - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp - (v1.LogLevel)(0), // 13: inventory.v1.LogLevel -} +var ( + file_management_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_management_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 11) + file_management_v1_agent_proto_goTypes = []any{ + (UpdateSeverity)(0), // 0: management.v1.UpdateSeverity + (*UniversalAgent)(nil), // 1: management.v1.UniversalAgent + (*ListAgentsRequest)(nil), // 2: management.v1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 3: management.v1.ListAgentsResponse + (*AgentVersions)(nil), // 4: management.v1.AgentVersions + (*ListAgentVersionsRequest)(nil), // 5: management.v1.ListAgentVersionsRequest + (*ListAgentVersionsResponse)(nil), // 6: management.v1.ListAgentVersionsResponse + (*UniversalAgent_MySQLOptions)(nil), // 7: management.v1.UniversalAgent.MySQLOptions + (*UniversalAgent_AzureOptions)(nil), // 8: management.v1.UniversalAgent.AzureOptions + (*UniversalAgent_MongoDBOptions)(nil), // 9: management.v1.UniversalAgent.MongoDBOptions + (*UniversalAgent_PostgreSQLOptions)(nil), // 10: management.v1.UniversalAgent.PostgreSQLOptions + nil, // 11: management.v1.UniversalAgent.CustomLabelsEntry + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp + (v1.LogLevel)(0), // 13: inventory.v1.LogLevel + } +) + var file_management_v1_agent_proto_depIdxs = []int32{ 8, // 0: management.v1.UniversalAgent.azure_options:type_name -> management.v1.UniversalAgent.AzureOptions 12, // 1: management.v1.UniversalAgent.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/management/v1/annotation.pb.go b/api/management/v1/annotation.pb.go index 5a7e06ba13..2eecdfbebc 100644 --- a/api/management/v1/annotation.pb.go +++ b/api/management/v1/annotation.pb.go @@ -7,11 +7,12 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -175,11 +176,14 @@ func file_management_v1_annotation_proto_rawDescGZIP() []byte { return file_management_v1_annotation_proto_rawDescData } -var file_management_v1_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_management_v1_annotation_proto_goTypes = []any{ - (*AddAnnotationRequest)(nil), // 0: management.v1.AddAnnotationRequest - (*AddAnnotationResponse)(nil), // 1: management.v1.AddAnnotationResponse -} +var ( + file_management_v1_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) + file_management_v1_annotation_proto_goTypes = []any{ + (*AddAnnotationRequest)(nil), // 0: management.v1.AddAnnotationRequest + (*AddAnnotationResponse)(nil), // 1: management.v1.AddAnnotationResponse + } +) + var file_management_v1_annotation_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/management/v1/azure.pb.go b/api/management/v1/azure.pb.go index cab7587d3a..5df29f0eed 100644 --- a/api/management/v1/azure.pb.go +++ b/api/management/v1/azure.pb.go @@ -7,11 +7,12 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -789,17 +790,20 @@ func file_management_v1_azure_proto_rawDescGZIP() []byte { return file_management_v1_azure_proto_rawDescData } -var file_management_v1_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_management_v1_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_management_v1_azure_proto_goTypes = []any{ - (DiscoverAzureDatabaseType)(0), // 0: management.v1.DiscoverAzureDatabaseType - (*DiscoverAzureDatabaseRequest)(nil), // 1: management.v1.DiscoverAzureDatabaseRequest - (*DiscoverAzureDatabaseInstance)(nil), // 2: management.v1.DiscoverAzureDatabaseInstance - (*DiscoverAzureDatabaseResponse)(nil), // 3: management.v1.DiscoverAzureDatabaseResponse - (*AddAzureDatabaseRequest)(nil), // 4: management.v1.AddAzureDatabaseRequest - (*AddAzureDatabaseResponse)(nil), // 5: management.v1.AddAzureDatabaseResponse - nil, // 6: management.v1.AddAzureDatabaseRequest.CustomLabelsEntry -} +var ( + file_management_v1_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_management_v1_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_management_v1_azure_proto_goTypes = []any{ + (DiscoverAzureDatabaseType)(0), // 0: management.v1.DiscoverAzureDatabaseType + (*DiscoverAzureDatabaseRequest)(nil), // 1: management.v1.DiscoverAzureDatabaseRequest + (*DiscoverAzureDatabaseInstance)(nil), // 2: management.v1.DiscoverAzureDatabaseInstance + (*DiscoverAzureDatabaseResponse)(nil), // 3: management.v1.DiscoverAzureDatabaseResponse + (*AddAzureDatabaseRequest)(nil), // 4: management.v1.AddAzureDatabaseRequest + (*AddAzureDatabaseResponse)(nil), // 5: management.v1.AddAzureDatabaseResponse + nil, // 6: management.v1.AddAzureDatabaseRequest.CustomLabelsEntry + } +) + var file_management_v1_azure_proto_depIdxs = []int32{ 0, // 0: management.v1.DiscoverAzureDatabaseInstance.type:type_name -> management.v1.DiscoverAzureDatabaseType 2, // 1: management.v1.DiscoverAzureDatabaseResponse.azure_database_instance:type_name -> management.v1.DiscoverAzureDatabaseInstance diff --git a/api/management/v1/external.pb.go b/api/management/v1/external.pb.go index 8de3a47d42..21bf55c8ac 100644 --- a/api/management/v1/external.pb.go +++ b/api/management/v1/external.pb.go @@ -7,12 +7,14 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -386,16 +388,19 @@ func file_management_v1_external_proto_rawDescGZIP() []byte { return file_management_v1_external_proto_rawDescData } -var file_management_v1_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_management_v1_external_proto_goTypes = []any{ - (*AddExternalServiceParams)(nil), // 0: management.v1.AddExternalServiceParams - (*ExternalServiceResult)(nil), // 1: management.v1.ExternalServiceResult - nil, // 2: management.v1.AddExternalServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (*v1.ExternalService)(nil), // 5: inventory.v1.ExternalService - (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter -} +var ( + file_management_v1_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_management_v1_external_proto_goTypes = []any{ + (*AddExternalServiceParams)(nil), // 0: management.v1.AddExternalServiceParams + (*ExternalServiceResult)(nil), // 1: management.v1.ExternalServiceResult + nil, // 2: management.v1.AddExternalServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (*v1.ExternalService)(nil), // 5: inventory.v1.ExternalService + (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter + } +) + var file_management_v1_external_proto_depIdxs = []int32{ 3, // 0: management.v1.AddExternalServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddExternalServiceParams.custom_labels:type_name -> management.v1.AddExternalServiceParams.CustomLabelsEntry diff --git a/api/management/v1/haproxy.pb.go b/api/management/v1/haproxy.pb.go index 057a76eb94..e271046bc7 100644 --- a/api/management/v1/haproxy.pb.go +++ b/api/management/v1/haproxy.pb.go @@ -7,12 +7,14 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -362,16 +364,19 @@ func file_management_v1_haproxy_proto_rawDescGZIP() []byte { return file_management_v1_haproxy_proto_rawDescData } -var file_management_v1_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_management_v1_haproxy_proto_goTypes = []any{ - (*AddHAProxyServiceParams)(nil), // 0: management.v1.AddHAProxyServiceParams - (*HAProxyServiceResult)(nil), // 1: management.v1.HAProxyServiceResult - nil, // 2: management.v1.AddHAProxyServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (*v1.HAProxyService)(nil), // 5: inventory.v1.HAProxyService - (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter -} +var ( + file_management_v1_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_management_v1_haproxy_proto_goTypes = []any{ + (*AddHAProxyServiceParams)(nil), // 0: management.v1.AddHAProxyServiceParams + (*HAProxyServiceResult)(nil), // 1: management.v1.HAProxyServiceResult + nil, // 2: management.v1.AddHAProxyServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (*v1.HAProxyService)(nil), // 5: inventory.v1.HAProxyService + (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter + } +) + var file_management_v1_haproxy_proto_depIdxs = []int32{ 3, // 0: management.v1.AddHAProxyServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddHAProxyServiceParams.custom_labels:type_name -> management.v1.AddHAProxyServiceParams.CustomLabelsEntry diff --git a/api/management/v1/json/client/management_service/add_annotation_parameters.go b/api/management/v1/json/client/management_service/add_annotation_parameters.go index 68d4bd7653..0a6148e59a 100644 --- a/api/management/v1/json/client/management_service/add_annotation_parameters.go +++ b/api/management/v1/json/client/management_service/add_annotation_parameters.go @@ -60,7 +60,6 @@ AddAnnotationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAnnotationParams struct { - /* Body. AddAnnotationRequest is a params to add new annotation. @@ -133,7 +132,6 @@ func (o *AddAnnotationParams) SetBody(body AddAnnotationBody) { // WriteToRequest writes these params to a swagger request func (o *AddAnnotationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_annotation_responses.go b/api/management/v1/json/client/management_service/add_annotation_responses.go index ad0abf531d..87ec308d78 100644 --- a/api/management/v1/json/client/management_service/add_annotation_responses.go +++ b/api/management/v1/json/client/management_service/add_annotation_responses.go @@ -103,7 +103,6 @@ func (o *AddAnnotationOK) GetPayload() interface{} { } func (o *AddAnnotationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *AddAnnotationDefault) GetPayload() *AddAnnotationDefaultBody { } func (o *AddAnnotationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddAnnotationDefaultBody) // response payload @@ -191,7 +189,6 @@ AddAnnotationBody AddAnnotationRequest is a params to add new annotation. swagger:model AddAnnotationBody */ type AddAnnotationBody struct { - // An annotation description. Required. Text string `json:"text,omitempty"` @@ -238,7 +235,6 @@ AddAnnotationDefaultBody add annotation default body swagger:model AddAnnotationDefaultBody */ type AddAnnotationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -304,9 +300,7 @@ func (o *AddAnnotationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -322,7 +316,6 @@ func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -351,7 +344,6 @@ AddAnnotationDefaultBodyDetailsItems0 add annotation default body details items0 swagger:model AddAnnotationDefaultBodyDetailsItems0 */ type AddAnnotationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -363,7 +355,6 @@ type AddAnnotationDefaultBodyDetailsItems0 struct { func (o *AddAnnotationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -401,7 +392,6 @@ func (o *AddAnnotationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAnnotationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/add_azure_database_parameters.go b/api/management/v1/json/client/management_service/add_azure_database_parameters.go index 1fd8c87b5d..b9e1d96ff0 100644 --- a/api/management/v1/json/client/management_service/add_azure_database_parameters.go +++ b/api/management/v1/json/client/management_service/add_azure_database_parameters.go @@ -60,7 +60,6 @@ AddAzureDatabaseParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAzureDatabaseParams struct { - // Body. Body AddAzureDatabaseBody @@ -130,7 +129,6 @@ func (o *AddAzureDatabaseParams) SetBody(body AddAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *AddAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_azure_database_responses.go b/api/management/v1/json/client/management_service/add_azure_database_responses.go index 4f84669743..4d69fe8ff4 100644 --- a/api/management/v1/json/client/management_service/add_azure_database_responses.go +++ b/api/management/v1/json/client/management_service/add_azure_database_responses.go @@ -104,7 +104,6 @@ func (o *AddAzureDatabaseOK) GetPayload() interface{} { } func (o *AddAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -176,7 +175,6 @@ func (o *AddAzureDatabaseDefault) GetPayload() *AddAzureDatabaseDefaultBody { } func (o *AddAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddAzureDatabaseDefaultBody) // response payload @@ -192,7 +190,6 @@ AddAzureDatabaseBody add azure database body swagger:model AddAzureDatabaseBody */ type AddAzureDatabaseBody struct { - // Azure database location. Region string `json:"region,omitempty"` @@ -363,7 +360,6 @@ AddAzureDatabaseDefaultBody add azure database default body swagger:model AddAzureDatabaseDefaultBody */ type AddAzureDatabaseDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -429,9 +425,7 @@ func (o *AddAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -447,7 +441,6 @@ func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context return err } } - } return nil @@ -476,7 +469,6 @@ AddAzureDatabaseDefaultBodyDetailsItems0 add azure database default body details swagger:model AddAzureDatabaseDefaultBodyDetailsItems0 */ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -488,7 +480,6 @@ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { func (o *AddAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -526,7 +517,6 @@ func (o *AddAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) er // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAzureDatabaseDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/add_service_parameters.go b/api/management/v1/json/client/management_service/add_service_parameters.go index 8e80c2a608..64e2dd78b6 100644 --- a/api/management/v1/json/client/management_service/add_service_parameters.go +++ b/api/management/v1/json/client/management_service/add_service_parameters.go @@ -60,7 +60,6 @@ AddServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddServiceParams struct { - // Body. Body AddServiceBody @@ -130,7 +129,6 @@ func (o *AddServiceParams) SetBody(body AddServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_service_responses.go b/api/management/v1/json/client/management_service/add_service_responses.go index 437b9f2f32..b616578be9 100644 --- a/api/management/v1/json/client/management_service/add_service_responses.go +++ b/api/management/v1/json/client/management_service/add_service_responses.go @@ -104,7 +104,6 @@ func (o *AddServiceOK) GetPayload() *AddServiceOKBody { } func (o *AddServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddServiceOKBody) // response payload @@ -178,7 +177,6 @@ func (o *AddServiceDefault) GetPayload() *AddServiceDefaultBody { } func (o *AddServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddServiceDefaultBody) // response payload @@ -194,7 +192,6 @@ AddServiceBody add service body swagger:model AddServiceBody */ type AddServiceBody struct { - // external External *AddServiceParamsBodyExternal `json:"external,omitempty"` @@ -427,7 +424,6 @@ func (o *AddServiceBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - if o.External != nil { if swag.IsZero(o.External) { // not required @@ -448,7 +444,6 @@ func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -469,7 +464,6 @@ func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -490,7 +484,6 @@ func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -511,7 +504,6 @@ func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfm } func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -532,7 +524,6 @@ func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats } func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -553,7 +544,6 @@ func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateRDS(ctx context.Context, formats strfmt.Registry) error { - if o.RDS != nil { if swag.IsZero(o.RDS) { // not required @@ -596,7 +586,6 @@ AddServiceDefaultBody add service default body swagger:model AddServiceDefaultBody */ type AddServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -662,9 +651,7 @@ func (o *AddServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -680,7 +667,6 @@ func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -709,7 +695,6 @@ AddServiceDefaultBodyDetailsItems0 add service default body details items0 swagger:model AddServiceDefaultBodyDetailsItems0 */ type AddServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -721,7 +706,6 @@ type AddServiceDefaultBodyDetailsItems0 struct { func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -759,7 +743,6 @@ func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -823,7 +806,6 @@ AddServiceOKBody add service OK body swagger:model AddServiceOKBody */ type AddServiceOKBody struct { - // external External *AddServiceOKBodyExternal `json:"external,omitempty"` @@ -1056,7 +1038,6 @@ func (o *AddServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { - if o.External != nil { if swag.IsZero(o.External) { // not required @@ -1077,7 +1058,6 @@ func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { - if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -1098,7 +1078,6 @@ func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { - if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -1119,7 +1098,6 @@ func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -1140,7 +1118,6 @@ func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -1161,7 +1138,6 @@ func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { - if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -1182,7 +1158,6 @@ func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateRDS(ctx context.Context, formats strfmt.Registry) error { - if o.RDS != nil { if swag.IsZero(o.RDS) { // not required @@ -1225,7 +1200,6 @@ AddServiceOKBodyExternal add service OK body external swagger:model AddServiceOKBodyExternal */ type AddServiceOKBodyExternal struct { - // external exporter ExternalExporter *AddServiceOKBodyExternalExternalExporter `json:"external_exporter,omitempty"` @@ -1308,7 +1282,6 @@ func (o *AddServiceOKBodyExternal) ContextValidate(ctx context.Context, formats } func (o *AddServiceOKBodyExternal) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1329,7 +1302,6 @@ func (o *AddServiceOKBodyExternal) contextValidateExternalExporter(ctx context.C } func (o *AddServiceOKBodyExternal) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -1372,7 +1344,6 @@ AddServiceOKBodyExternalExternalExporter ExternalExporter runs on any Node type, swagger:model AddServiceOKBodyExternalExternalExporter */ type AddServiceOKBodyExternalExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1458,7 +1429,6 @@ func (o *AddServiceOKBodyExternalExternalExporter) ContextValidate(ctx context.C } func (o *AddServiceOKBodyExternalExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1501,7 +1471,6 @@ AddServiceOKBodyExternalExternalExporterMetricsResolutions MetricsResolutions re swagger:model AddServiceOKBodyExternalExternalExporterMetricsResolutions */ type AddServiceOKBodyExternalExternalExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1545,7 +1514,6 @@ AddServiceOKBodyExternalService ExternalService represents a generic External se swagger:model AddServiceOKBodyExternalService */ type AddServiceOKBodyExternalService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1604,7 +1572,6 @@ AddServiceOKBodyHaproxy add service OK body haproxy swagger:model AddServiceOKBodyHaproxy */ type AddServiceOKBodyHaproxy struct { - // external exporter ExternalExporter *AddServiceOKBodyHaproxyExternalExporter `json:"external_exporter,omitempty"` @@ -1687,7 +1654,6 @@ func (o *AddServiceOKBodyHaproxy) ContextValidate(ctx context.Context, formats s } func (o *AddServiceOKBodyHaproxy) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1708,7 +1674,6 @@ func (o *AddServiceOKBodyHaproxy) contextValidateExternalExporter(ctx context.Co } func (o *AddServiceOKBodyHaproxy) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -1751,7 +1716,6 @@ AddServiceOKBodyHaproxyExternalExporter ExternalExporter runs on any Node type, swagger:model AddServiceOKBodyHaproxyExternalExporter */ type AddServiceOKBodyHaproxyExternalExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1837,7 +1801,6 @@ func (o *AddServiceOKBodyHaproxyExternalExporter) ContextValidate(ctx context.Co } func (o *AddServiceOKBodyHaproxyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1880,7 +1843,6 @@ AddServiceOKBodyHaproxyExternalExporterMetricsResolutions MetricsResolutions rep swagger:model AddServiceOKBodyHaproxyExternalExporterMetricsResolutions */ type AddServiceOKBodyHaproxyExternalExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1924,7 +1886,6 @@ AddServiceOKBodyHaproxyService HAProxyService represents a generic HAProxy servi swagger:model AddServiceOKBodyHaproxyService */ type AddServiceOKBodyHaproxyService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1980,7 +1941,6 @@ AddServiceOKBodyMongodb add service OK body mongodb swagger:model AddServiceOKBodyMongodb */ type AddServiceOKBodyMongodb struct { - // mongodb exporter MongodbExporter *AddServiceOKBodyMongodbMongodbExporter `json:"mongodb_exporter,omitempty"` @@ -2093,7 +2053,6 @@ func (o *AddServiceOKBodyMongodb) ContextValidate(ctx context.Context, formats s } func (o *AddServiceOKBodyMongodb) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -2114,7 +2073,6 @@ func (o *AddServiceOKBodyMongodb) contextValidateMongodbExporter(ctx context.Con } func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbProfiler(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfiler != nil { if swag.IsZero(o.QANMongodbProfiler) { // not required @@ -2135,7 +2093,6 @@ func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbProfiler(ctx context. } func (o *AddServiceOKBodyMongodb) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -2178,7 +2135,6 @@ AddServiceOKBodyMongodbMongodbExporter MongoDBExporter runs on Generic or Contai swagger:model AddServiceOKBodyMongodbMongodbExporter */ type AddServiceOKBodyMongodbMongodbExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2420,7 +2376,6 @@ func (o *AddServiceOKBodyMongodbMongodbExporter) ContextValidate(ctx context.Con } func (o *AddServiceOKBodyMongodbMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2463,7 +2418,6 @@ AddServiceOKBodyMongodbMongodbExporterMetricsResolutions MetricsResolutions repr swagger:model AddServiceOKBodyMongodbMongodbExporterMetricsResolutions */ type AddServiceOKBodyMongodbMongodbExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2507,7 +2461,6 @@ AddServiceOKBodyMongodbQANMongodbProfiler QANMongoDBProfilerAgent runs within pm swagger:model AddServiceOKBodyMongodbQANMongodbProfiler */ type AddServiceOKBodyMongodbQANMongodbProfiler struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2717,7 +2670,6 @@ AddServiceOKBodyMongodbService MongoDBService represents a generic MongoDB insta swagger:model AddServiceOKBodyMongodbService */ type AddServiceOKBodyMongodbService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -2788,7 +2740,6 @@ AddServiceOKBodyMysql add service OK body mysql swagger:model AddServiceOKBodyMysql */ type AddServiceOKBodyMysql struct { - // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -2934,7 +2885,6 @@ func (o *AddServiceOKBodyMysql) ContextValidate(ctx context.Context, formats str } func (o *AddServiceOKBodyMysql) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -2955,7 +2905,6 @@ func (o *AddServiceOKBodyMysql) contextValidateMysqldExporter(ctx context.Contex } func (o *AddServiceOKBodyMysql) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschema != nil { if swag.IsZero(o.QANMysqlPerfschema) { // not required @@ -2976,7 +2925,6 @@ func (o *AddServiceOKBodyMysql) contextValidateQANMysqlPerfschema(ctx context.Co } func (o *AddServiceOKBodyMysql) contextValidateQANMysqlSlowlog(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlog != nil { if swag.IsZero(o.QANMysqlSlowlog) { // not required @@ -2997,7 +2945,6 @@ func (o *AddServiceOKBodyMysql) contextValidateQANMysqlSlowlog(ctx context.Conte } func (o *AddServiceOKBodyMysql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -3040,7 +2987,6 @@ AddServiceOKBodyMysqlMysqldExporter MySQLdExporter runs on Generic or Container swagger:model AddServiceOKBodyMysqlMysqldExporter */ type AddServiceOKBodyMysqlMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3292,7 +3238,6 @@ func (o *AddServiceOKBodyMysqlMysqldExporter) ContextValidate(ctx context.Contex } func (o *AddServiceOKBodyMysqlMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3335,7 +3280,6 @@ AddServiceOKBodyMysqlMysqldExporterMetricsResolutions MetricsResolutions represe swagger:model AddServiceOKBodyMysqlMysqldExporterMetricsResolutions */ type AddServiceOKBodyMysqlMysqldExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3379,7 +3323,6 @@ AddServiceOKBodyMysqlQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm- swagger:model AddServiceOKBodyMysqlQANMysqlPerfschema */ type AddServiceOKBodyMysqlQANMysqlPerfschema struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3604,7 +3547,6 @@ AddServiceOKBodyMysqlQANMysqlSlowlog QANMySQLSlowlogAgent runs within pmm-agent swagger:model AddServiceOKBodyMysqlQANMysqlSlowlog */ type AddServiceOKBodyMysqlQANMysqlSlowlog struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3832,7 +3774,6 @@ AddServiceOKBodyMysqlService MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyMysqlService */ type AddServiceOKBodyMysqlService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -3903,7 +3844,6 @@ AddServiceOKBodyPostgresql add service OK body postgresql swagger:model AddServiceOKBodyPostgresql */ type AddServiceOKBodyPostgresql struct { - // Warning message. Warning string `json:"warning,omitempty"` @@ -4049,7 +3989,6 @@ func (o *AddServiceOKBodyPostgresql) ContextValidate(ctx context.Context, format } func (o *AddServiceOKBodyPostgresql) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -4070,7 +4009,6 @@ func (o *AddServiceOKBodyPostgresql) contextValidatePostgresExporter(ctx context } func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -4091,7 +4029,6 @@ func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatementsAge } func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -4112,7 +4049,6 @@ func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatmonitorAg } func (o *AddServiceOKBodyPostgresql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -4155,7 +4091,6 @@ AddServiceOKBodyPostgresqlPostgresExporter PostgresExporter runs on Generic or C swagger:model AddServiceOKBodyPostgresqlPostgresExporter */ type AddServiceOKBodyPostgresqlPostgresExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4393,7 +4328,6 @@ func (o *AddServiceOKBodyPostgresqlPostgresExporter) ContextValidate(ctx context } func (o *AddServiceOKBodyPostgresqlPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4436,7 +4370,6 @@ AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions MetricsResolutions swagger:model AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions */ type AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4480,7 +4413,6 @@ AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatemen swagger:model AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent */ type AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4693,7 +4625,6 @@ AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMon swagger:model AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent */ type AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4909,7 +4840,6 @@ AddServiceOKBodyPostgresqlService PostgreSQLService represents a generic Postgre swagger:model AddServiceOKBodyPostgresqlService */ type AddServiceOKBodyPostgresqlService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -4986,7 +4916,6 @@ AddServiceOKBodyProxysql add service OK body proxysql swagger:model AddServiceOKBodyProxysql */ type AddServiceOKBodyProxysql struct { - // proxysql exporter ProxysqlExporter *AddServiceOKBodyProxysqlProxysqlExporter `json:"proxysql_exporter,omitempty"` @@ -5069,7 +4998,6 @@ func (o *AddServiceOKBodyProxysql) ContextValidate(ctx context.Context, formats } func (o *AddServiceOKBodyProxysql) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -5090,7 +5018,6 @@ func (o *AddServiceOKBodyProxysql) contextValidateProxysqlExporter(ctx context.C } func (o *AddServiceOKBodyProxysql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -5133,7 +5060,6 @@ AddServiceOKBodyProxysqlProxysqlExporter ProxySQLExporter runs on Generic or Con swagger:model AddServiceOKBodyProxysqlProxysqlExporter */ type AddServiceOKBodyProxysqlProxysqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5365,7 +5291,6 @@ func (o *AddServiceOKBodyProxysqlProxysqlExporter) ContextValidate(ctx context.C } func (o *AddServiceOKBodyProxysqlProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5408,7 +5333,6 @@ AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions MetricsResolutions re swagger:model AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions */ type AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5452,7 +5376,6 @@ AddServiceOKBodyProxysqlService ProxySQLService represents a generic ProxySQL in swagger:model AddServiceOKBodyProxysqlService */ type AddServiceOKBodyProxysqlService struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -5523,7 +5446,6 @@ AddServiceOKBodyRDS add service OK body RDS swagger:model AddServiceOKBodyRDS */ type AddServiceOKBodyRDS struct { - // mysql Mysql *AddServiceOKBodyRDSMysql `json:"mysql,omitempty"` @@ -5786,7 +5708,6 @@ func (o *AddServiceOKBodyRDS) ContextValidate(ctx context.Context, formats strfm } func (o *AddServiceOKBodyRDS) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { - if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -5807,7 +5728,6 @@ func (o *AddServiceOKBodyRDS) contextValidateMysql(ctx context.Context, formats } func (o *AddServiceOKBodyRDS) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -5828,7 +5748,6 @@ func (o *AddServiceOKBodyRDS) contextValidateMysqldExporter(ctx context.Context, } func (o *AddServiceOKBodyRDS) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { - if o.Node != nil { if swag.IsZero(o.Node) { // not required @@ -5849,7 +5768,6 @@ func (o *AddServiceOKBodyRDS) contextValidateNode(ctx context.Context, formats s } func (o *AddServiceOKBodyRDS) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { - if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -5870,7 +5788,6 @@ func (o *AddServiceOKBodyRDS) contextValidatePostgresql(ctx context.Context, for } func (o *AddServiceOKBodyRDS) contextValidatePostgresqlExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresqlExporter != nil { if swag.IsZero(o.PostgresqlExporter) { // not required @@ -5891,7 +5808,6 @@ func (o *AddServiceOKBodyRDS) contextValidatePostgresqlExporter(ctx context.Cont } func (o *AddServiceOKBodyRDS) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschema != nil { if swag.IsZero(o.QANMysqlPerfschema) { // not required @@ -5912,7 +5828,6 @@ func (o *AddServiceOKBodyRDS) contextValidateQANMysqlPerfschema(ctx context.Cont } func (o *AddServiceOKBodyRDS) contextValidateQANPostgresqlPgstatements(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatements != nil { if swag.IsZero(o.QANPostgresqlPgstatements) { // not required @@ -5933,7 +5848,6 @@ func (o *AddServiceOKBodyRDS) contextValidateQANPostgresqlPgstatements(ctx conte } func (o *AddServiceOKBodyRDS) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { - if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -5976,7 +5890,6 @@ AddServiceOKBodyRDSMysql MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyRDSMysql */ type AddServiceOKBodyRDSMysql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -6047,7 +5960,6 @@ AddServiceOKBodyRDSMysqldExporter MySQLdExporter runs on Generic or Container No swagger:model AddServiceOKBodyRDSMysqldExporter */ type AddServiceOKBodyRDSMysqldExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6299,7 +6211,6 @@ func (o *AddServiceOKBodyRDSMysqldExporter) ContextValidate(ctx context.Context, } func (o *AddServiceOKBodyRDSMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6342,7 +6253,6 @@ AddServiceOKBodyRDSMysqldExporterMetricsResolutions MetricsResolutions represent swagger:model AddServiceOKBodyRDSMysqldExporterMetricsResolutions */ type AddServiceOKBodyRDSMysqldExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6386,7 +6296,6 @@ AddServiceOKBodyRDSNode RemoteRDSNode represents remote RDS Node. Agents can't r swagger:model AddServiceOKBodyRDSNode */ type AddServiceOKBodyRDSNode struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -6442,7 +6351,6 @@ AddServiceOKBodyRDSPostgresql PostgreSQLService represents a generic PostgreSQL swagger:model AddServiceOKBodyRDSPostgresql */ type AddServiceOKBodyRDSPostgresql struct { - // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -6519,7 +6427,6 @@ AddServiceOKBodyRDSPostgresqlExporter PostgresExporter runs on Generic or Contai swagger:model AddServiceOKBodyRDSPostgresqlExporter */ type AddServiceOKBodyRDSPostgresqlExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6757,7 +6664,6 @@ func (o *AddServiceOKBodyRDSPostgresqlExporter) ContextValidate(ctx context.Cont } func (o *AddServiceOKBodyRDSPostgresqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6800,7 +6706,6 @@ AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions MetricsResolutions repre swagger:model AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions */ type AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6844,7 +6749,6 @@ AddServiceOKBodyRDSQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model AddServiceOKBodyRDSQANMysqlPerfschema */ type AddServiceOKBodyRDSQANMysqlPerfschema struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -7069,7 +6973,6 @@ AddServiceOKBodyRDSQANPostgresqlPgstatements QANPostgreSQLPgStatementsAgent runs swagger:model AddServiceOKBodyRDSQANPostgresqlPgstatements */ type AddServiceOKBodyRDSQANPostgresqlPgstatements struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -7282,7 +7185,6 @@ AddServiceOKBodyRDSRDSExporter RDSExporter runs on Generic or Container Node and swagger:model AddServiceOKBodyRDSRDSExporter */ type AddServiceOKBodyRDSRDSExporter struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -7511,7 +7413,6 @@ func (o *AddServiceOKBodyRDSRDSExporter) ContextValidate(ctx context.Context, fo } func (o *AddServiceOKBodyRDSRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7554,7 +7455,6 @@ AddServiceOKBodyRDSRDSExporterMetricsResolutions MetricsResolutions represents P swagger:model AddServiceOKBodyRDSRDSExporterMetricsResolutions */ type AddServiceOKBodyRDSRDSExporterMetricsResolutions struct { - // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7598,7 +7498,6 @@ AddServiceParamsBodyExternal add service params body external swagger:model AddServiceParamsBodyExternal */ type AddServiceParamsBodyExternal struct { - // Node identifier on which an external exporter is been running. // runs_on_node_id should always be passed with node_id. // Exactly one of these parameters should be present: node_id, node_name, add_node. @@ -7760,7 +7659,6 @@ func (o *AddServiceParamsBodyExternal) ContextValidate(ctx context.Context, form } func (o *AddServiceParamsBodyExternal) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -7803,7 +7701,6 @@ AddServiceParamsBodyExternalAddNode AddNodeParams holds node params and is used swagger:model AddServiceParamsBodyExternalAddNode */ type AddServiceParamsBodyExternalAddNode struct { - // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -7932,7 +7829,6 @@ AddServiceParamsBodyHaproxy add service params body haproxy swagger:model AddServiceParamsBodyHaproxy */ type AddServiceParamsBodyHaproxy struct { - // Node identifier on which an external exporter is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -8086,7 +7982,6 @@ func (o *AddServiceParamsBodyHaproxy) ContextValidate(ctx context.Context, forma } func (o *AddServiceParamsBodyHaproxy) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -8129,7 +8024,6 @@ AddServiceParamsBodyHaproxyAddNode AddNodeParams holds node params and is used t swagger:model AddServiceParamsBodyHaproxyAddNode */ type AddServiceParamsBodyHaproxyAddNode struct { - // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -8258,7 +8152,6 @@ AddServiceParamsBodyMongodb add service params body mongodb swagger:model AddServiceParamsBodyMongodb */ type AddServiceParamsBodyMongodb struct { - // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -8526,7 +8419,6 @@ func (o *AddServiceParamsBodyMongodb) ContextValidate(ctx context.Context, forma } func (o *AddServiceParamsBodyMongodb) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -8569,7 +8461,6 @@ AddServiceParamsBodyMongodbAddNode AddNodeParams holds node params and is used t swagger:model AddServiceParamsBodyMongodbAddNode */ type AddServiceParamsBodyMongodbAddNode struct { - // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -8698,7 +8589,6 @@ AddServiceParamsBodyMysql add service params body mysql swagger:model AddServiceParamsBodyMysql */ type AddServiceParamsBodyMysql struct { - // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -8967,7 +8857,6 @@ func (o *AddServiceParamsBodyMysql) ContextValidate(ctx context.Context, formats } func (o *AddServiceParamsBodyMysql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -9010,7 +8899,6 @@ AddServiceParamsBodyMysqlAddNode AddNodeParams holds node params and is used to swagger:model AddServiceParamsBodyMysqlAddNode */ type AddServiceParamsBodyMysqlAddNode struct { - // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -9139,7 +9027,6 @@ AddServiceParamsBodyPostgresql add service params body postgresql swagger:model AddServiceParamsBodyPostgresql */ type AddServiceParamsBodyPostgresql struct { - // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -9407,7 +9294,6 @@ func (o *AddServiceParamsBodyPostgresql) ContextValidate(ctx context.Context, fo } func (o *AddServiceParamsBodyPostgresql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -9450,7 +9336,6 @@ AddServiceParamsBodyPostgresqlAddNode AddNodeParams holds node params and is use swagger:model AddServiceParamsBodyPostgresqlAddNode */ type AddServiceParamsBodyPostgresqlAddNode struct { - // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -9579,7 +9464,6 @@ AddServiceParamsBodyProxysql add service params body proxysql swagger:model AddServiceParamsBodyProxysql */ type AddServiceParamsBodyProxysql struct { - // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -9814,7 +9698,6 @@ func (o *AddServiceParamsBodyProxysql) ContextValidate(ctx context.Context, form } func (o *AddServiceParamsBodyProxysql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -9857,7 +9740,6 @@ AddServiceParamsBodyProxysqlAddNode AddNodeParams holds node params and is used swagger:model AddServiceParamsBodyProxysqlAddNode */ type AddServiceParamsBodyProxysqlAddNode struct { - // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -9986,7 +9868,6 @@ AddServiceParamsBodyRDS add service params body RDS swagger:model AddServiceParamsBodyRDS */ type AddServiceParamsBodyRDS struct { - // AWS region. Region string `json:"region,omitempty"` diff --git a/api/management/v1/json/client/management_service/discover_azure_database_parameters.go b/api/management/v1/json/client/management_service/discover_azure_database_parameters.go index 75b1e24acb..f5f9f75a92 100644 --- a/api/management/v1/json/client/management_service/discover_azure_database_parameters.go +++ b/api/management/v1/json/client/management_service/discover_azure_database_parameters.go @@ -60,7 +60,6 @@ DiscoverAzureDatabaseParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type DiscoverAzureDatabaseParams struct { - /* Body. DiscoverAzureDatabaseRequest discover azure databases request. @@ -133,7 +132,6 @@ func (o *DiscoverAzureDatabaseParams) SetBody(body DiscoverAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/discover_azure_database_responses.go b/api/management/v1/json/client/management_service/discover_azure_database_responses.go index 7fed7bd497..d407a5acea 100644 --- a/api/management/v1/json/client/management_service/discover_azure_database_responses.go +++ b/api/management/v1/json/client/management_service/discover_azure_database_responses.go @@ -104,7 +104,6 @@ func (o *DiscoverAzureDatabaseOK) GetPayload() *DiscoverAzureDatabaseOKBody { } func (o *DiscoverAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DiscoverAzureDatabaseOKBody) // response payload @@ -178,7 +177,6 @@ func (o *DiscoverAzureDatabaseDefault) GetPayload() *DiscoverAzureDatabaseDefaul } func (o *DiscoverAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DiscoverAzureDatabaseDefaultBody) // response payload @@ -194,7 +192,6 @@ DiscoverAzureDatabaseBody DiscoverAzureDatabaseRequest discover azure databases swagger:model DiscoverAzureDatabaseBody */ type DiscoverAzureDatabaseBody struct { - // Azure client ID. AzureClientID string `json:"azure_client_id,omitempty"` @@ -241,7 +238,6 @@ DiscoverAzureDatabaseDefaultBody discover azure database default body swagger:model DiscoverAzureDatabaseDefaultBody */ type DiscoverAzureDatabaseDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -307,9 +303,7 @@ func (o *DiscoverAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, } func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -325,7 +319,6 @@ func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -354,7 +347,6 @@ DiscoverAzureDatabaseDefaultBodyDetailsItems0 discover azure database default bo swagger:model DiscoverAzureDatabaseDefaultBodyDetailsItems0 */ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -366,7 +358,6 @@ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { func (o *DiscoverAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -404,7 +395,6 @@ func (o *DiscoverAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o DiscoverAzureDatabaseDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -468,7 +458,6 @@ DiscoverAzureDatabaseOKBody DiscoverAzureDatabaseResponse discover azure databas swagger:model DiscoverAzureDatabaseOKBody */ type DiscoverAzureDatabaseOKBody struct { - // azure database instance AzureDatabaseInstance []*DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 `json:"azure_database_instance"` } @@ -528,9 +517,7 @@ func (o *DiscoverAzureDatabaseOKBody) ContextValidate(ctx context.Context, forma } func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AzureDatabaseInstance); i++ { - if o.AzureDatabaseInstance[i] != nil { if swag.IsZero(o.AzureDatabaseInstance[i]) { // not required @@ -546,7 +533,6 @@ func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx c return err } } - } return nil @@ -575,7 +561,6 @@ DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 DiscoverAzureDatabaseInst swagger:model DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 */ type DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 struct { - // Azure database instance ID. InstanceID string `json:"instance_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/discover_rds_parameters.go b/api/management/v1/json/client/management_service/discover_rds_parameters.go index 93e9487d96..ef5c0058c5 100644 --- a/api/management/v1/json/client/management_service/discover_rds_parameters.go +++ b/api/management/v1/json/client/management_service/discover_rds_parameters.go @@ -60,7 +60,6 @@ DiscoverRDSParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DiscoverRDSParams struct { - // Body. Body DiscoverRDSBody @@ -130,7 +129,6 @@ func (o *DiscoverRDSParams) SetBody(body DiscoverRDSBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverRDSParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/discover_rds_responses.go b/api/management/v1/json/client/management_service/discover_rds_responses.go index b0fe32a0f0..bf43f10f8b 100644 --- a/api/management/v1/json/client/management_service/discover_rds_responses.go +++ b/api/management/v1/json/client/management_service/discover_rds_responses.go @@ -104,7 +104,6 @@ func (o *DiscoverRDSOK) GetPayload() *DiscoverRDSOKBody { } func (o *DiscoverRDSOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DiscoverRDSOKBody) // response payload @@ -178,7 +177,6 @@ func (o *DiscoverRDSDefault) GetPayload() *DiscoverRDSDefaultBody { } func (o *DiscoverRDSDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DiscoverRDSDefaultBody) // response payload @@ -194,7 +192,6 @@ DiscoverRDSBody discover RDS body swagger:model DiscoverRDSBody */ type DiscoverRDSBody struct { - // AWS Access key. Optional. AWSAccessKey string `json:"aws_access_key,omitempty"` @@ -235,7 +232,6 @@ DiscoverRDSDefaultBody discover RDS default body swagger:model DiscoverRDSDefaultBody */ type DiscoverRDSDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -301,9 +297,7 @@ func (o *DiscoverRDSDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -319,7 +313,6 @@ func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -348,7 +341,6 @@ DiscoverRDSDefaultBodyDetailsItems0 discover RDS default body details items0 swagger:model DiscoverRDSDefaultBodyDetailsItems0 */ type DiscoverRDSDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -360,7 +352,6 @@ type DiscoverRDSDefaultBodyDetailsItems0 struct { func (o *DiscoverRDSDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -398,7 +389,6 @@ func (o *DiscoverRDSDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DiscoverRDSDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -462,7 +452,6 @@ DiscoverRDSOKBody discover RDS OK body swagger:model DiscoverRDSOKBody */ type DiscoverRDSOKBody struct { - // rds instances RDSInstances []*DiscoverRDSOKBodyRDSInstancesItems0 `json:"rds_instances"` } @@ -522,9 +511,7 @@ func (o *DiscoverRDSOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.RDSInstances); i++ { - if o.RDSInstances[i] != nil { if swag.IsZero(o.RDSInstances[i]) { // not required @@ -540,7 +527,6 @@ func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, for return err } } - } return nil @@ -569,7 +555,6 @@ DiscoverRDSOKBodyRDSInstancesItems0 DiscoverRDSInstance models an unique RDS ins swagger:model DiscoverRDSOKBodyRDSInstancesItems0 */ type DiscoverRDSOKBodyRDSInstancesItems0 struct { - // AWS region. Region string `json:"region,omitempty"` diff --git a/api/management/v1/json/client/management_service/get_node_parameters.go b/api/management/v1/json/client/management_service/get_node_parameters.go index 73629cc22d..63aa4bdf7c 100644 --- a/api/management/v1/json/client/management_service/get_node_parameters.go +++ b/api/management/v1/json/client/management_service/get_node_parameters.go @@ -60,7 +60,6 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { - /* NodeID. Unique Node identifier. @@ -133,7 +132,6 @@ func (o *GetNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/get_node_responses.go b/api/management/v1/json/client/management_service/get_node_responses.go index 6824619ea1..052114c3ad 100644 --- a/api/management/v1/json/client/management_service/get_node_responses.go +++ b/api/management/v1/json/client/management_service/get_node_responses.go @@ -104,7 +104,6 @@ func (o *GetNodeOK) GetPayload() *GetNodeOKBody { } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetNodeOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetNodeDefaultBody) // response payload @@ -194,7 +192,6 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -307,7 +301,6 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type GetNodeDefaultBodyDetailsItems0 struct { func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { - // node Node *GetNodeOKBodyNode `json:"node,omitempty"` } @@ -474,7 +464,6 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { - if o.Node != nil { if swag.IsZero(o.Node) { // not required @@ -517,7 +506,6 @@ GetNodeOKBodyNode get node OK body node swagger:model GetNodeOKBodyNode */ type GetNodeOKBodyNode struct { - // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -751,9 +739,7 @@ func (o *GetNodeOKBodyNode) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Agents); i++ { - if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -769,16 +755,13 @@ func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats s return err } } - } return nil } func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Services); i++ { - if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -794,7 +777,6 @@ func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats return err } } - } return nil @@ -823,7 +805,6 @@ GetNodeOKBodyNodeAgentsItems0 get node OK body node agents items0 swagger:model GetNodeOKBodyNodeAgentsItems0 */ type GetNodeOKBodyNodeAgentsItems0 struct { - // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -870,7 +851,6 @@ GetNodeOKBodyNodeServicesItems0 Service represents a service running on a node. swagger:model GetNodeOKBodyNodeServicesItems0 */ type GetNodeOKBodyNodeServicesItems0 struct { - // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_agent_versions_parameters.go b/api/management/v1/json/client/management_service/list_agent_versions_parameters.go index 97d2ce24b7..d7f16fa9b2 100644 --- a/api/management/v1/json/client/management_service/list_agent_versions_parameters.go +++ b/api/management/v1/json/client/management_service/list_agent_versions_parameters.go @@ -115,7 +115,6 @@ func (o *ListAgentVersionsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAgentVersionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_agent_versions_responses.go b/api/management/v1/json/client/management_service/list_agent_versions_responses.go index af03219404..c8e2470228 100644 --- a/api/management/v1/json/client/management_service/list_agent_versions_responses.go +++ b/api/management/v1/json/client/management_service/list_agent_versions_responses.go @@ -104,7 +104,6 @@ func (o *ListAgentVersionsOK) GetPayload() *ListAgentVersionsOKBody { } func (o *ListAgentVersionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentVersionsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListAgentVersionsDefault) GetPayload() *ListAgentVersionsDefaultBody { } func (o *ListAgentVersionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentVersionsDefaultBody) // response payload @@ -194,7 +192,6 @@ ListAgentVersionsDefaultBody list agent versions default body swagger:model ListAgentVersionsDefaultBody */ type ListAgentVersionsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListAgentVersionsDefaultBody) ContextValidate(ctx context.Context, form } func (o *ListAgentVersionsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListAgentVersionsDefaultBody) contextValidateDetails(ctx context.Contex return err } } - } return nil @@ -307,7 +301,6 @@ ListAgentVersionsDefaultBodyDetailsItems0 list agent versions default body detai swagger:model ListAgentVersionsDefaultBodyDetailsItems0 */ type ListAgentVersionsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListAgentVersionsDefaultBodyDetailsItems0 struct { func (o *ListAgentVersionsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListAgentVersionsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentVersionsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListAgentVersionsOKBody list agent versions OK body swagger:model ListAgentVersionsOKBody */ type ListAgentVersionsOKBody struct { - // List of Agent versions. AgentVersions []*ListAgentVersionsOKBodyAgentVersionsItems0 `json:"agent_versions"` } @@ -481,9 +471,7 @@ func (o *ListAgentVersionsOKBody) ContextValidate(ctx context.Context, formats s } func (o *ListAgentVersionsOKBody) contextValidateAgentVersions(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.AgentVersions); i++ { - if o.AgentVersions[i] != nil { if swag.IsZero(o.AgentVersions[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListAgentVersionsOKBody) contextValidateAgentVersions(ctx context.Conte return err } } - } return nil @@ -528,7 +515,6 @@ ListAgentVersionsOKBodyAgentVersionsItems0 list agent versions OK body agent ver swagger:model ListAgentVersionsOKBodyAgentVersionsItems0 */ type ListAgentVersionsOKBodyAgentVersionsItems0 struct { - // Agent ID. AgentID string `json:"agent_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_agents_parameters.go b/api/management/v1/json/client/management_service/list_agents_parameters.go index 7c16816c10..5dd7b7b6a4 100644 --- a/api/management/v1/json/client/management_service/list_agents_parameters.go +++ b/api/management/v1/json/client/management_service/list_agents_parameters.go @@ -60,7 +60,6 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { - /* NodeID. Return only Agents that relate to a specific NodeID. @@ -150,7 +149,6 @@ func (o *ListAgentsParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -166,7 +164,6 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qNodeID := qrNodeID if qNodeID != "" { - if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -183,7 +180,6 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qServiceID := qrServiceID if qServiceID != "" { - if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_agents_responses.go b/api/management/v1/json/client/management_service/list_agents_responses.go index 2c501bf8ba..57d0a04d55 100644 --- a/api/management/v1/json/client/management_service/list_agents_responses.go +++ b/api/management/v1/json/client/management_service/list_agents_responses.go @@ -104,7 +104,6 @@ func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListAgentsDefaultBody) // response payload @@ -194,7 +192,6 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -307,7 +301,6 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListAgentsDefaultBodyDetailsItems0 struct { func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { - // List of Agents. Agents []*ListAgentsOKBodyAgentsItems0 `json:"agents"` } @@ -481,9 +471,7 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Agents); i++ { - if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats st return err } } - } return nil @@ -528,7 +515,6 @@ ListAgentsOKBodyAgentsItems0 list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0 */ type ListAgentsOKBodyAgentsItems0 struct { - // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -876,7 +862,6 @@ func (o *ListAgentsOKBodyAgentsItems0) ContextValidate(ctx context.Context, form } func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { - if o.AzureOptions != nil { if swag.IsZero(o.AzureOptions) { // not required @@ -897,7 +882,6 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { - if o.MongoDBOptions != nil { if swag.IsZero(o.MongoDBOptions) { // not required @@ -918,7 +902,6 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlOptions != nil { if swag.IsZero(o.MysqlOptions) { // not required @@ -939,7 +922,6 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresqlOptions != nil { if swag.IsZero(o.PostgresqlOptions) { // not required @@ -982,7 +964,6 @@ ListAgentsOKBodyAgentsItems0AzureOptions list agents OK body agents items0 azure swagger:model ListAgentsOKBodyAgentsItems0AzureOptions */ type ListAgentsOKBodyAgentsItems0AzureOptions struct { - // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -1032,7 +1013,6 @@ ListAgentsOKBodyAgentsItems0MongoDBOptions list agents OK body agents items0 mon swagger:model ListAgentsOKBodyAgentsItems0MongoDBOptions */ type ListAgentsOKBodyAgentsItems0MongoDBOptions struct { - // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -1088,7 +1068,6 @@ ListAgentsOKBodyAgentsItems0MysqlOptions list agents OK body agents items0 mysql swagger:model ListAgentsOKBodyAgentsItems0MysqlOptions */ type ListAgentsOKBodyAgentsItems0MysqlOptions struct { - // True if TLS key is set. IsTLSKeySet bool `json:"is_tls_key_set,omitempty"` } @@ -1126,7 +1105,6 @@ ListAgentsOKBodyAgentsItems0PostgresqlOptions list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0PostgresqlOptions */ type ListAgentsOKBodyAgentsItems0PostgresqlOptions struct { - // True if TLS key is set. IsSslKeySet bool `json:"is_ssl_key_set,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_nodes_parameters.go b/api/management/v1/json/client/management_service/list_nodes_parameters.go index eeca2a1f5f..441e42660e 100644 --- a/api/management/v1/json/client/management_service/list_nodes_parameters.go +++ b/api/management/v1/json/client/management_service/list_nodes_parameters.go @@ -60,7 +60,6 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { - /* NodeType. Node type to be filtered out. @@ -86,9 +85,7 @@ func (o *ListNodesParams) WithDefaults() *ListNodesParams { // // All values with no default are reset to their zero value. func (o *ListNodesParams) SetDefaults() { - var ( - nodeTypeDefault = string("NODE_TYPE_UNSPECIFIED") - ) + nodeTypeDefault := string("NODE_TYPE_UNSPECIFIED") val := ListNodesParams{ NodeType: &nodeTypeDefault, @@ -146,7 +143,6 @@ func (o *ListNodesParams) SetNodeType(nodeType *string) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -162,7 +158,6 @@ func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } qNodeType := qrNodeType if qNodeType != "" { - if err := r.SetQueryParam("node_type", qNodeType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_nodes_responses.go b/api/management/v1/json/client/management_service/list_nodes_responses.go index 4b821c8d8f..a9ca575d18 100644 --- a/api/management/v1/json/client/management_service/list_nodes_responses.go +++ b/api/management/v1/json/client/management_service/list_nodes_responses.go @@ -104,7 +104,6 @@ func (o *ListNodesOK) GetPayload() *ListNodesOKBody { } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListNodesOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListNodesDefaultBody) // response payload @@ -194,7 +192,6 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -307,7 +301,6 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListNodesDefaultBodyDetailsItems0 struct { func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListNodesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { - // nodes Nodes []*ListNodesOKBodyNodesItems0 `json:"nodes"` } @@ -481,9 +471,7 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Nodes); i++ { - if o.Nodes[i] != nil { if swag.IsZero(o.Nodes[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strf return err } } - } return nil @@ -528,7 +515,6 @@ ListNodesOKBodyNodesItems0 list nodes OK body nodes items0 swagger:model ListNodesOKBodyNodesItems0 */ type ListNodesOKBodyNodesItems0 struct { - // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -762,9 +748,7 @@ func (o *ListNodesOKBodyNodesItems0) ContextValidate(ctx context.Context, format } func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Agents); i++ { - if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -780,16 +764,13 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, return err } } - } return nil } func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Services); i++ { - if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -805,7 +786,6 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context return err } } - } return nil @@ -834,7 +814,6 @@ ListNodesOKBodyNodesItems0AgentsItems0 list nodes OK body nodes items0 agents it swagger:model ListNodesOKBodyNodesItems0AgentsItems0 */ type ListNodesOKBodyNodesItems0AgentsItems0 struct { - // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -881,7 +860,6 @@ ListNodesOKBodyNodesItems0ServicesItems0 Service represents a service running on swagger:model ListNodesOKBodyNodesItems0ServicesItems0 */ type ListNodesOKBodyNodesItems0ServicesItems0 struct { - // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_services_parameters.go b/api/management/v1/json/client/management_service/list_services_parameters.go index d9a1cba103..80363638ef 100644 --- a/api/management/v1/json/client/management_service/list_services_parameters.go +++ b/api/management/v1/json/client/management_service/list_services_parameters.go @@ -60,7 +60,6 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { - /* ExternalGroup. Return only services in this external group. @@ -98,9 +97,7 @@ func (o *ListServicesParams) WithDefaults() *ListServicesParams { // // All values with no default are reset to their zero value. func (o *ListServicesParams) SetDefaults() { - var ( - serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") - ) + serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") val := ListServicesParams{ ServiceType: &serviceTypeDefault, @@ -180,7 +177,6 @@ func (o *ListServicesParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -196,7 +192,6 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qExternalGroup := qrExternalGroup if qExternalGroup != "" { - if err := r.SetQueryParam("external_group", qExternalGroup); err != nil { return err } @@ -213,7 +208,6 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qNodeID := qrNodeID if qNodeID != "" { - if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -230,7 +224,6 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qServiceType := qrServiceType if qServiceType != "" { - if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_services_responses.go b/api/management/v1/json/client/management_service/list_services_responses.go index 919a053f91..47af72c35e 100644 --- a/api/management/v1/json/client/management_service/list_services_responses.go +++ b/api/management/v1/json/client/management_service/list_services_responses.go @@ -104,7 +104,6 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListServicesOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListServicesDefaultBody) // response payload @@ -194,7 +192,6 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -307,7 +301,6 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { - // List of Services. Services []*ListServicesOKBodyServicesItems0 `json:"services"` } @@ -481,9 +471,7 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Services); i++ { - if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -499,7 +487,6 @@ func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, format return err } } - } return nil @@ -528,7 +515,6 @@ ListServicesOKBodyServicesItems0 list services OK body services items0 swagger:model ListServicesOKBodyServicesItems0 */ type ListServicesOKBodyServicesItems0 struct { - // Unique service identifier. ServiceID string `json:"service_id,omitempty"` @@ -737,9 +723,7 @@ func (o *ListServicesOKBodyServicesItems0) ContextValidate(ctx context.Context, } func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Agents); i++ { - if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -755,7 +739,6 @@ func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Con return err } } - } return nil @@ -784,7 +767,6 @@ ListServicesOKBodyServicesItems0AgentsItems0 list services OK body services item swagger:model ListServicesOKBodyServicesItems0AgentsItems0 */ type ListServicesOKBodyServicesItems0AgentsItems0 struct { - // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -1132,7 +1114,6 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) ContextValidate(ctx conte } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { - if o.AzureOptions != nil { if swag.IsZero(o.AzureOptions) { // not required @@ -1153,7 +1134,6 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { - if o.MongoDBOptions != nil { if swag.IsZero(o.MongoDBOptions) { // not required @@ -1174,7 +1154,6 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOpt } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { - if o.MysqlOptions != nil { if swag.IsZero(o.MysqlOptions) { // not required @@ -1195,7 +1174,6 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresqlOptions != nil { if swag.IsZero(o.PostgresqlOptions) { // not required @@ -1238,7 +1216,6 @@ ListServicesOKBodyServicesItems0AgentsItems0AzureOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0AzureOptions */ type ListServicesOKBodyServicesItems0AgentsItems0AzureOptions struct { - // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -1288,7 +1265,6 @@ ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions list services OK body swagger:model ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions struct { - // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -1344,7 +1320,6 @@ ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions struct { - // True if TLS key is set. IsTLSKeySet bool `json:"is_tls_key_set,omitempty"` } @@ -1382,7 +1357,6 @@ ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions list services OK b swagger:model ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions struct { - // True if TLS key is set. IsSslKeySet bool `json:"is_ssl_key_set,omitempty"` diff --git a/api/management/v1/json/client/management_service/register_node_parameters.go b/api/management/v1/json/client/management_service/register_node_parameters.go index 5de06b5b32..a614118a70 100644 --- a/api/management/v1/json/client/management_service/register_node_parameters.go +++ b/api/management/v1/json/client/management_service/register_node_parameters.go @@ -60,7 +60,6 @@ RegisterNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RegisterNodeParams struct { - // Body. Body RegisterNodeBody @@ -130,7 +129,6 @@ func (o *RegisterNodeParams) SetBody(body RegisterNodeBody) { // WriteToRequest writes these params to a swagger request func (o *RegisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/register_node_responses.go b/api/management/v1/json/client/management_service/register_node_responses.go index 576ddb268b..290a1e219e 100644 --- a/api/management/v1/json/client/management_service/register_node_responses.go +++ b/api/management/v1/json/client/management_service/register_node_responses.go @@ -104,7 +104,6 @@ func (o *RegisterNodeOK) GetPayload() *RegisterNodeOKBody { } func (o *RegisterNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RegisterNodeOKBody) // response payload @@ -178,7 +177,6 @@ func (o *RegisterNodeDefault) GetPayload() *RegisterNodeDefaultBody { } func (o *RegisterNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RegisterNodeDefaultBody) // response payload @@ -194,7 +192,6 @@ RegisterNodeBody register node body swagger:model RegisterNodeBody */ type RegisterNodeBody struct { - // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -394,7 +391,6 @@ RegisterNodeDefaultBody register node default body swagger:model RegisterNodeDefaultBody */ type RegisterNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -460,9 +456,7 @@ func (o *RegisterNodeDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -478,7 +472,6 @@ func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -507,7 +500,6 @@ RegisterNodeDefaultBodyDetailsItems0 register node default body details items0 swagger:model RegisterNodeDefaultBodyDetailsItems0 */ type RegisterNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -519,7 +511,6 @@ type RegisterNodeDefaultBodyDetailsItems0 struct { func (o *RegisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -557,7 +548,6 @@ func (o *RegisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RegisterNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -621,7 +611,6 @@ RegisterNodeOKBody register node OK body swagger:model RegisterNodeOKBody */ type RegisterNodeOKBody struct { - // Token represents token for vmagent auth config. Token string `json:"token,omitempty"` @@ -740,7 +729,6 @@ func (o *RegisterNodeOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, formats strfmt.Registry) error { - if o.ContainerNode != nil { if swag.IsZero(o.ContainerNode) { // not required @@ -761,7 +749,6 @@ func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, f } func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, formats strfmt.Registry) error { - if o.GenericNode != nil { if swag.IsZero(o.GenericNode) { // not required @@ -782,7 +769,6 @@ func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, for } func (o *RegisterNodeOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { - if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -825,7 +811,6 @@ RegisterNodeOKBodyContainerNode ContainerNode represents a Docker container. swagger:model RegisterNodeOKBodyContainerNode */ type RegisterNodeOKBodyContainerNode struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -890,7 +875,6 @@ RegisterNodeOKBodyGenericNode GenericNode represents a bare metal server or virt swagger:model RegisterNodeOKBodyGenericNode */ type RegisterNodeOKBodyGenericNode struct { - // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -952,7 +936,6 @@ RegisterNodeOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model RegisterNodeOKBodyPMMAgent */ type RegisterNodeOKBodyPMMAgent struct { - // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/remove_service_parameters.go b/api/management/v1/json/client/management_service/remove_service_parameters.go index 7700f22424..16511c1b2e 100644 --- a/api/management/v1/json/client/management_service/remove_service_parameters.go +++ b/api/management/v1/json/client/management_service/remove_service_parameters.go @@ -60,7 +60,6 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { - /* ServiceID. Either a Service ID or a Service Name. @@ -92,9 +91,7 @@ func (o *RemoveServiceParams) WithDefaults() *RemoveServiceParams { // // All values with no default are reset to their zero value. func (o *RemoveServiceParams) SetDefaults() { - var ( - serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") - ) + serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") val := RemoveServiceParams{ ServiceType: &serviceTypeDefault, @@ -163,7 +160,6 @@ func (o *RemoveServiceParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -184,7 +180,6 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qServiceType := qrServiceType if qServiceType != "" { - if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/remove_service_responses.go b/api/management/v1/json/client/management_service/remove_service_responses.go index d413afd47f..39934d4575 100644 --- a/api/management/v1/json/client/management_service/remove_service_responses.go +++ b/api/management/v1/json/client/management_service/remove_service_responses.go @@ -103,7 +103,6 @@ func (o *RemoveServiceOK) GetPayload() interface{} { } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -191,7 +189,6 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } - } return nil @@ -304,7 +298,6 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -316,7 +309,6 @@ type RemoveServiceDefaultBodyDetailsItems0 struct { func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -354,7 +346,6 @@ func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/unregister_node_parameters.go b/api/management/v1/json/client/management_service/unregister_node_parameters.go index 21d279574a..069530e44b 100644 --- a/api/management/v1/json/client/management_service/unregister_node_parameters.go +++ b/api/management/v1/json/client/management_service/unregister_node_parameters.go @@ -61,7 +61,6 @@ UnregisterNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UnregisterNodeParams struct { - /* Force. Force delete node, related service account, even if it has more service tokens attached. @@ -151,7 +150,6 @@ func (o *UnregisterNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *UnregisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -167,7 +165,6 @@ func (o *UnregisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qForce := swag.FormatBool(qrForce) if qForce != "" { - if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/unregister_node_responses.go b/api/management/v1/json/client/management_service/unregister_node_responses.go index 8204d24e15..4b94542ee5 100644 --- a/api/management/v1/json/client/management_service/unregister_node_responses.go +++ b/api/management/v1/json/client/management_service/unregister_node_responses.go @@ -103,7 +103,6 @@ func (o *UnregisterNodeOK) GetPayload() *UnregisterNodeOKBody { } func (o *UnregisterNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UnregisterNodeOKBody) // response payload @@ -177,7 +176,6 @@ func (o *UnregisterNodeDefault) GetPayload() *UnregisterNodeDefaultBody { } func (o *UnregisterNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UnregisterNodeDefaultBody) // response payload @@ -193,7 +191,6 @@ UnregisterNodeDefaultBody unregister node default body swagger:model UnregisterNodeDefaultBody */ type UnregisterNodeDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *UnregisterNodeDefaultBody) ContextValidate(ctx context.Context, formats } func (o *UnregisterNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *UnregisterNodeDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -306,7 +300,6 @@ UnregisterNodeDefaultBodyDetailsItems0 unregister node default body details item swagger:model UnregisterNodeDefaultBodyDetailsItems0 */ type UnregisterNodeDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type UnregisterNodeDefaultBodyDetailsItems0 struct { func (o *UnregisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *UnregisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o UnregisterNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ UnregisterNodeOKBody unregister node OK body swagger:model UnregisterNodeOKBody */ type UnregisterNodeOKBody struct { - // Warning message if there are more service tokens attached to service account. Warning string `json:"warning,omitempty"` } diff --git a/api/management/v1/metrics.pb.go b/api/management/v1/metrics.pb.go index db10b6ec8f..27faa2b842 100644 --- a/api/management/v1/metrics.pb.go +++ b/api/management/v1/metrics.pb.go @@ -7,10 +7,11 @@ package managementv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -109,10 +110,13 @@ func file_management_v1_metrics_proto_rawDescGZIP() []byte { return file_management_v1_metrics_proto_rawDescData } -var file_management_v1_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_management_v1_metrics_proto_goTypes = []any{ - (MetricsMode)(0), // 0: management.v1.MetricsMode -} +var ( + file_management_v1_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_management_v1_metrics_proto_goTypes = []any{ + (MetricsMode)(0), // 0: management.v1.MetricsMode + } +) + var file_management_v1_metrics_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/management/v1/mongodb.pb.go b/api/management/v1/mongodb.pb.go index ff0d61345b..48ebbb5909 100644 --- a/api/management/v1/mongodb.pb.go +++ b/api/management/v1/mongodb.pb.go @@ -7,12 +7,14 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -570,18 +572,21 @@ func file_management_v1_mongodb_proto_rawDescGZIP() []byte { return file_management_v1_mongodb_proto_rawDescData } -var file_management_v1_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_management_v1_mongodb_proto_goTypes = []any{ - (*AddMongoDBServiceParams)(nil), // 0: management.v1.AddMongoDBServiceParams - (*MongoDBServiceResult)(nil), // 1: management.v1.MongoDBServiceResult - nil, // 2: management.v1.AddMongoDBServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.MongoDBService)(nil), // 6: inventory.v1.MongoDBService - (*v1.MongoDBExporter)(nil), // 7: inventory.v1.MongoDBExporter - (*v1.QANMongoDBProfilerAgent)(nil), // 8: inventory.v1.QANMongoDBProfilerAgent -} +var ( + file_management_v1_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_management_v1_mongodb_proto_goTypes = []any{ + (*AddMongoDBServiceParams)(nil), // 0: management.v1.AddMongoDBServiceParams + (*MongoDBServiceResult)(nil), // 1: management.v1.MongoDBServiceResult + nil, // 2: management.v1.AddMongoDBServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.MongoDBService)(nil), // 6: inventory.v1.MongoDBService + (*v1.MongoDBExporter)(nil), // 7: inventory.v1.MongoDBExporter + (*v1.QANMongoDBProfilerAgent)(nil), // 8: inventory.v1.QANMongoDBProfilerAgent + } +) + var file_management_v1_mongodb_proto_depIdxs = []int32{ 3, // 0: management.v1.AddMongoDBServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddMongoDBServiceParams.custom_labels:type_name -> management.v1.AddMongoDBServiceParams.CustomLabelsEntry diff --git a/api/management/v1/mysql.pb.go b/api/management/v1/mysql.pb.go index 8471abb10e..28b64588a0 100644 --- a/api/management/v1/mysql.pb.go +++ b/api/management/v1/mysql.pb.go @@ -7,12 +7,14 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -589,19 +591,22 @@ func file_management_v1_mysql_proto_rawDescGZIP() []byte { return file_management_v1_mysql_proto_rawDescData } -var file_management_v1_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_management_v1_mysql_proto_goTypes = []any{ - (*AddMySQLServiceParams)(nil), // 0: management.v1.AddMySQLServiceParams - (*MySQLServiceResult)(nil), // 1: management.v1.MySQLServiceResult - nil, // 2: management.v1.AddMySQLServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.MySQLService)(nil), // 6: inventory.v1.MySQLService - (*v1.MySQLdExporter)(nil), // 7: inventory.v1.MySQLdExporter - (*v1.QANMySQLPerfSchemaAgent)(nil), // 8: inventory.v1.QANMySQLPerfSchemaAgent - (*v1.QANMySQLSlowlogAgent)(nil), // 9: inventory.v1.QANMySQLSlowlogAgent -} +var ( + file_management_v1_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_management_v1_mysql_proto_goTypes = []any{ + (*AddMySQLServiceParams)(nil), // 0: management.v1.AddMySQLServiceParams + (*MySQLServiceResult)(nil), // 1: management.v1.MySQLServiceResult + nil, // 2: management.v1.AddMySQLServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.MySQLService)(nil), // 6: inventory.v1.MySQLService + (*v1.MySQLdExporter)(nil), // 7: inventory.v1.MySQLdExporter + (*v1.QANMySQLPerfSchemaAgent)(nil), // 8: inventory.v1.QANMySQLPerfSchemaAgent + (*v1.QANMySQLSlowlogAgent)(nil), // 9: inventory.v1.QANMySQLSlowlogAgent + } +) + var file_management_v1_mysql_proto_depIdxs = []int32{ 3, // 0: management.v1.AddMySQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddMySQLServiceParams.custom_labels:type_name -> management.v1.AddMySQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/node.pb.go b/api/management/v1/node.pb.go index f6d26d11b4..6a5622ded1 100644 --- a/api/management/v1/node.pb.go +++ b/api/management/v1/node.pb.go @@ -7,13 +7,15 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -1305,32 +1307,35 @@ func file_management_v1_node_proto_rawDescGZIP() []byte { return file_management_v1_node_proto_rawDescData } -var file_management_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_management_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 15) -var file_management_v1_node_proto_goTypes = []any{ - (UniversalNode_Status)(0), // 0: management.v1.UniversalNode.Status - (*AddNodeParams)(nil), // 1: management.v1.AddNodeParams - (*RegisterNodeRequest)(nil), // 2: management.v1.RegisterNodeRequest - (*RegisterNodeResponse)(nil), // 3: management.v1.RegisterNodeResponse - (*UnregisterNodeRequest)(nil), // 4: management.v1.UnregisterNodeRequest - (*UnregisterNodeResponse)(nil), // 5: management.v1.UnregisterNodeResponse - (*UniversalNode)(nil), // 6: management.v1.UniversalNode - (*ListNodesRequest)(nil), // 7: management.v1.ListNodesRequest - (*ListNodesResponse)(nil), // 8: management.v1.ListNodesResponse - (*GetNodeRequest)(nil), // 9: management.v1.GetNodeRequest - (*GetNodeResponse)(nil), // 10: management.v1.GetNodeResponse - nil, // 11: management.v1.AddNodeParams.CustomLabelsEntry - nil, // 12: management.v1.RegisterNodeRequest.CustomLabelsEntry - (*UniversalNode_Service)(nil), // 13: management.v1.UniversalNode.Service - (*UniversalNode_Agent)(nil), // 14: management.v1.UniversalNode.Agent - nil, // 15: management.v1.UniversalNode.CustomLabelsEntry - (v1.NodeType)(0), // 16: inventory.v1.NodeType - (MetricsMode)(0), // 17: management.v1.MetricsMode - (*v1.GenericNode)(nil), // 18: inventory.v1.GenericNode - (*v1.ContainerNode)(nil), // 19: inventory.v1.ContainerNode - (*v1.PMMAgent)(nil), // 20: inventory.v1.PMMAgent - (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp -} +var ( + file_management_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_management_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 15) + file_management_v1_node_proto_goTypes = []any{ + (UniversalNode_Status)(0), // 0: management.v1.UniversalNode.Status + (*AddNodeParams)(nil), // 1: management.v1.AddNodeParams + (*RegisterNodeRequest)(nil), // 2: management.v1.RegisterNodeRequest + (*RegisterNodeResponse)(nil), // 3: management.v1.RegisterNodeResponse + (*UnregisterNodeRequest)(nil), // 4: management.v1.UnregisterNodeRequest + (*UnregisterNodeResponse)(nil), // 5: management.v1.UnregisterNodeResponse + (*UniversalNode)(nil), // 6: management.v1.UniversalNode + (*ListNodesRequest)(nil), // 7: management.v1.ListNodesRequest + (*ListNodesResponse)(nil), // 8: management.v1.ListNodesResponse + (*GetNodeRequest)(nil), // 9: management.v1.GetNodeRequest + (*GetNodeResponse)(nil), // 10: management.v1.GetNodeResponse + nil, // 11: management.v1.AddNodeParams.CustomLabelsEntry + nil, // 12: management.v1.RegisterNodeRequest.CustomLabelsEntry + (*UniversalNode_Service)(nil), // 13: management.v1.UniversalNode.Service + (*UniversalNode_Agent)(nil), // 14: management.v1.UniversalNode.Agent + nil, // 15: management.v1.UniversalNode.CustomLabelsEntry + (v1.NodeType)(0), // 16: inventory.v1.NodeType + (MetricsMode)(0), // 17: management.v1.MetricsMode + (*v1.GenericNode)(nil), // 18: inventory.v1.GenericNode + (*v1.ContainerNode)(nil), // 19: inventory.v1.ContainerNode + (*v1.PMMAgent)(nil), // 20: inventory.v1.PMMAgent + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp + } +) + var file_management_v1_node_proto_depIdxs = []int32{ 16, // 0: management.v1.AddNodeParams.node_type:type_name -> inventory.v1.NodeType 11, // 1: management.v1.AddNodeParams.custom_labels:type_name -> management.v1.AddNodeParams.CustomLabelsEntry diff --git a/api/management/v1/postgresql.pb.go b/api/management/v1/postgresql.pb.go index dec50c8201..08c3bee477 100644 --- a/api/management/v1/postgresql.pb.go +++ b/api/management/v1/postgresql.pb.go @@ -7,12 +7,14 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -605,19 +607,22 @@ func file_management_v1_postgresql_proto_rawDescGZIP() []byte { return file_management_v1_postgresql_proto_rawDescData } -var file_management_v1_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_management_v1_postgresql_proto_goTypes = []any{ - (*AddPostgreSQLServiceParams)(nil), // 0: management.v1.AddPostgreSQLServiceParams - (*PostgreSQLServiceResult)(nil), // 1: management.v1.PostgreSQLServiceResult - nil, // 2: management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.PostgreSQLService)(nil), // 6: inventory.v1.PostgreSQLService - (*v1.PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter - (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.v1.QANPostgreSQLPgStatementsAgent - (*v1.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.v1.QANPostgreSQLPgStatMonitorAgent -} +var ( + file_management_v1_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_management_v1_postgresql_proto_goTypes = []any{ + (*AddPostgreSQLServiceParams)(nil), // 0: management.v1.AddPostgreSQLServiceParams + (*PostgreSQLServiceResult)(nil), // 1: management.v1.PostgreSQLServiceResult + nil, // 2: management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.PostgreSQLService)(nil), // 6: inventory.v1.PostgreSQLService + (*v1.PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter + (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.v1.QANPostgreSQLPgStatementsAgent + (*v1.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.v1.QANPostgreSQLPgStatMonitorAgent + } +) + var file_management_v1_postgresql_proto_depIdxs = []int32{ 3, // 0: management.v1.AddPostgreSQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddPostgreSQLServiceParams.custom_labels:type_name -> management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/proxysql.pb.go b/api/management/v1/proxysql.pb.go index 2f654a181b..0360313e81 100644 --- a/api/management/v1/proxysql.pb.go +++ b/api/management/v1/proxysql.pb.go @@ -7,12 +7,14 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -431,17 +433,20 @@ func file_management_v1_proxysql_proto_rawDescGZIP() []byte { return file_management_v1_proxysql_proto_rawDescData } -var file_management_v1_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_management_v1_proxysql_proto_goTypes = []any{ - (*AddProxySQLServiceParams)(nil), // 0: management.v1.AddProxySQLServiceParams - (*ProxySQLServiceResult)(nil), // 1: management.v1.ProxySQLServiceResult - nil, // 2: management.v1.AddProxySQLServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.ProxySQLService)(nil), // 6: inventory.v1.ProxySQLService - (*v1.ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter -} +var ( + file_management_v1_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_management_v1_proxysql_proto_goTypes = []any{ + (*AddProxySQLServiceParams)(nil), // 0: management.v1.AddProxySQLServiceParams + (*ProxySQLServiceResult)(nil), // 1: management.v1.ProxySQLServiceResult + nil, // 2: management.v1.AddProxySQLServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.ProxySQLService)(nil), // 6: inventory.v1.ProxySQLService + (*v1.ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter + } +) + var file_management_v1_proxysql_proto_depIdxs = []int32{ 3, // 0: management.v1.AddProxySQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddProxySQLServiceParams.custom_labels:type_name -> management.v1.AddProxySQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/rds.pb.go b/api/management/v1/rds.pb.go index 093f671af3..d493683cda 100644 --- a/api/management/v1/rds.pb.go +++ b/api/management/v1/rds.pb.go @@ -7,12 +7,14 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" - v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -941,26 +943,29 @@ func file_management_v1_rds_proto_rawDescGZIP() []byte { return file_management_v1_rds_proto_rawDescData } -var file_management_v1_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_management_v1_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_management_v1_rds_proto_goTypes = []any{ - (DiscoverRDSEngine)(0), // 0: management.v1.DiscoverRDSEngine - (*DiscoverRDSInstance)(nil), // 1: management.v1.DiscoverRDSInstance - (*DiscoverRDSRequest)(nil), // 2: management.v1.DiscoverRDSRequest - (*DiscoverRDSResponse)(nil), // 3: management.v1.DiscoverRDSResponse - (*AddRDSServiceParams)(nil), // 4: management.v1.AddRDSServiceParams - (*RDSServiceResult)(nil), // 5: management.v1.RDSServiceResult - nil, // 6: management.v1.AddRDSServiceParams.CustomLabelsEntry - (MetricsMode)(0), // 7: management.v1.MetricsMode - (*v1.RemoteRDSNode)(nil), // 8: inventory.v1.RemoteRDSNode - (*v1.RDSExporter)(nil), // 9: inventory.v1.RDSExporter - (*v1.MySQLService)(nil), // 10: inventory.v1.MySQLService - (*v1.MySQLdExporter)(nil), // 11: inventory.v1.MySQLdExporter - (*v1.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.v1.QANMySQLPerfSchemaAgent - (*v1.PostgreSQLService)(nil), // 13: inventory.v1.PostgreSQLService - (*v1.PostgresExporter)(nil), // 14: inventory.v1.PostgresExporter - (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.v1.QANPostgreSQLPgStatementsAgent -} +var ( + file_management_v1_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_management_v1_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_management_v1_rds_proto_goTypes = []any{ + (DiscoverRDSEngine)(0), // 0: management.v1.DiscoverRDSEngine + (*DiscoverRDSInstance)(nil), // 1: management.v1.DiscoverRDSInstance + (*DiscoverRDSRequest)(nil), // 2: management.v1.DiscoverRDSRequest + (*DiscoverRDSResponse)(nil), // 3: management.v1.DiscoverRDSResponse + (*AddRDSServiceParams)(nil), // 4: management.v1.AddRDSServiceParams + (*RDSServiceResult)(nil), // 5: management.v1.RDSServiceResult + nil, // 6: management.v1.AddRDSServiceParams.CustomLabelsEntry + (MetricsMode)(0), // 7: management.v1.MetricsMode + (*v1.RemoteRDSNode)(nil), // 8: inventory.v1.RemoteRDSNode + (*v1.RDSExporter)(nil), // 9: inventory.v1.RDSExporter + (*v1.MySQLService)(nil), // 10: inventory.v1.MySQLService + (*v1.MySQLdExporter)(nil), // 11: inventory.v1.MySQLdExporter + (*v1.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.v1.QANMySQLPerfSchemaAgent + (*v1.PostgreSQLService)(nil), // 13: inventory.v1.PostgreSQLService + (*v1.PostgresExporter)(nil), // 14: inventory.v1.PostgresExporter + (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.v1.QANPostgreSQLPgStatementsAgent + } +) + var file_management_v1_rds_proto_depIdxs = []int32{ 0, // 0: management.v1.DiscoverRDSInstance.engine:type_name -> management.v1.DiscoverRDSEngine 1, // 1: management.v1.DiscoverRDSResponse.rds_instances:type_name -> management.v1.DiscoverRDSInstance diff --git a/api/management/v1/service.pb.go b/api/management/v1/service.pb.go index 90623dc839..d3b46ad63b 100644 --- a/api/management/v1/service.pb.go +++ b/api/management/v1/service.pb.go @@ -7,14 +7,16 @@ package managementv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -1149,56 +1151,59 @@ func file_management_v1_service_proto_rawDescGZIP() []byte { return file_management_v1_service_proto_rawDescData } -var file_management_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_management_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_management_v1_service_proto_goTypes = []any{ - (UniversalService_Status)(0), // 0: management.v1.UniversalService.Status - (*AddServiceRequest)(nil), // 1: management.v1.AddServiceRequest - (*AddServiceResponse)(nil), // 2: management.v1.AddServiceResponse - (*RemoveServiceRequest)(nil), // 3: management.v1.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 4: management.v1.RemoveServiceResponse - (*UniversalService)(nil), // 5: management.v1.UniversalService - (*ListServicesRequest)(nil), // 6: management.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 7: management.v1.ListServicesResponse - nil, // 8: management.v1.UniversalService.CustomLabelsEntry - (*AddMySQLServiceParams)(nil), // 9: management.v1.AddMySQLServiceParams - (*AddMongoDBServiceParams)(nil), // 10: management.v1.AddMongoDBServiceParams - (*AddPostgreSQLServiceParams)(nil), // 11: management.v1.AddPostgreSQLServiceParams - (*AddProxySQLServiceParams)(nil), // 12: management.v1.AddProxySQLServiceParams - (*AddHAProxyServiceParams)(nil), // 13: management.v1.AddHAProxyServiceParams - (*AddExternalServiceParams)(nil), // 14: management.v1.AddExternalServiceParams - (*AddRDSServiceParams)(nil), // 15: management.v1.AddRDSServiceParams - (*MySQLServiceResult)(nil), // 16: management.v1.MySQLServiceResult - (*MongoDBServiceResult)(nil), // 17: management.v1.MongoDBServiceResult - (*PostgreSQLServiceResult)(nil), // 18: management.v1.PostgreSQLServiceResult - (*ProxySQLServiceResult)(nil), // 19: management.v1.ProxySQLServiceResult - (*HAProxyServiceResult)(nil), // 20: management.v1.HAProxyServiceResult - (*ExternalServiceResult)(nil), // 21: management.v1.ExternalServiceResult - (*RDSServiceResult)(nil), // 22: management.v1.RDSServiceResult - (v1.ServiceType)(0), // 23: inventory.v1.ServiceType - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*UniversalAgent)(nil), // 25: management.v1.UniversalAgent - (*AddAnnotationRequest)(nil), // 26: management.v1.AddAnnotationRequest - (*ListAgentsRequest)(nil), // 27: management.v1.ListAgentsRequest - (*ListAgentVersionsRequest)(nil), // 28: management.v1.ListAgentVersionsRequest - (*RegisterNodeRequest)(nil), // 29: management.v1.RegisterNodeRequest - (*UnregisterNodeRequest)(nil), // 30: management.v1.UnregisterNodeRequest - (*ListNodesRequest)(nil), // 31: management.v1.ListNodesRequest - (*GetNodeRequest)(nil), // 32: management.v1.GetNodeRequest - (*DiscoverRDSRequest)(nil), // 33: management.v1.DiscoverRDSRequest - (*DiscoverAzureDatabaseRequest)(nil), // 34: management.v1.DiscoverAzureDatabaseRequest - (*AddAzureDatabaseRequest)(nil), // 35: management.v1.AddAzureDatabaseRequest - (*AddAnnotationResponse)(nil), // 36: management.v1.AddAnnotationResponse - (*ListAgentsResponse)(nil), // 37: management.v1.ListAgentsResponse - (*ListAgentVersionsResponse)(nil), // 38: management.v1.ListAgentVersionsResponse - (*RegisterNodeResponse)(nil), // 39: management.v1.RegisterNodeResponse - (*UnregisterNodeResponse)(nil), // 40: management.v1.UnregisterNodeResponse - (*ListNodesResponse)(nil), // 41: management.v1.ListNodesResponse - (*GetNodeResponse)(nil), // 42: management.v1.GetNodeResponse - (*DiscoverRDSResponse)(nil), // 43: management.v1.DiscoverRDSResponse - (*DiscoverAzureDatabaseResponse)(nil), // 44: management.v1.DiscoverAzureDatabaseResponse - (*AddAzureDatabaseResponse)(nil), // 45: management.v1.AddAzureDatabaseResponse -} +var ( + file_management_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_management_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) + file_management_v1_service_proto_goTypes = []any{ + (UniversalService_Status)(0), // 0: management.v1.UniversalService.Status + (*AddServiceRequest)(nil), // 1: management.v1.AddServiceRequest + (*AddServiceResponse)(nil), // 2: management.v1.AddServiceResponse + (*RemoveServiceRequest)(nil), // 3: management.v1.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 4: management.v1.RemoveServiceResponse + (*UniversalService)(nil), // 5: management.v1.UniversalService + (*ListServicesRequest)(nil), // 6: management.v1.ListServicesRequest + (*ListServicesResponse)(nil), // 7: management.v1.ListServicesResponse + nil, // 8: management.v1.UniversalService.CustomLabelsEntry + (*AddMySQLServiceParams)(nil), // 9: management.v1.AddMySQLServiceParams + (*AddMongoDBServiceParams)(nil), // 10: management.v1.AddMongoDBServiceParams + (*AddPostgreSQLServiceParams)(nil), // 11: management.v1.AddPostgreSQLServiceParams + (*AddProxySQLServiceParams)(nil), // 12: management.v1.AddProxySQLServiceParams + (*AddHAProxyServiceParams)(nil), // 13: management.v1.AddHAProxyServiceParams + (*AddExternalServiceParams)(nil), // 14: management.v1.AddExternalServiceParams + (*AddRDSServiceParams)(nil), // 15: management.v1.AddRDSServiceParams + (*MySQLServiceResult)(nil), // 16: management.v1.MySQLServiceResult + (*MongoDBServiceResult)(nil), // 17: management.v1.MongoDBServiceResult + (*PostgreSQLServiceResult)(nil), // 18: management.v1.PostgreSQLServiceResult + (*ProxySQLServiceResult)(nil), // 19: management.v1.ProxySQLServiceResult + (*HAProxyServiceResult)(nil), // 20: management.v1.HAProxyServiceResult + (*ExternalServiceResult)(nil), // 21: management.v1.ExternalServiceResult + (*RDSServiceResult)(nil), // 22: management.v1.RDSServiceResult + (v1.ServiceType)(0), // 23: inventory.v1.ServiceType + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*UniversalAgent)(nil), // 25: management.v1.UniversalAgent + (*AddAnnotationRequest)(nil), // 26: management.v1.AddAnnotationRequest + (*ListAgentsRequest)(nil), // 27: management.v1.ListAgentsRequest + (*ListAgentVersionsRequest)(nil), // 28: management.v1.ListAgentVersionsRequest + (*RegisterNodeRequest)(nil), // 29: management.v1.RegisterNodeRequest + (*UnregisterNodeRequest)(nil), // 30: management.v1.UnregisterNodeRequest + (*ListNodesRequest)(nil), // 31: management.v1.ListNodesRequest + (*GetNodeRequest)(nil), // 32: management.v1.GetNodeRequest + (*DiscoverRDSRequest)(nil), // 33: management.v1.DiscoverRDSRequest + (*DiscoverAzureDatabaseRequest)(nil), // 34: management.v1.DiscoverAzureDatabaseRequest + (*AddAzureDatabaseRequest)(nil), // 35: management.v1.AddAzureDatabaseRequest + (*AddAnnotationResponse)(nil), // 36: management.v1.AddAnnotationResponse + (*ListAgentsResponse)(nil), // 37: management.v1.ListAgentsResponse + (*ListAgentVersionsResponse)(nil), // 38: management.v1.ListAgentVersionsResponse + (*RegisterNodeResponse)(nil), // 39: management.v1.RegisterNodeResponse + (*UnregisterNodeResponse)(nil), // 40: management.v1.UnregisterNodeResponse + (*ListNodesResponse)(nil), // 41: management.v1.ListNodesResponse + (*GetNodeResponse)(nil), // 42: management.v1.GetNodeResponse + (*DiscoverRDSResponse)(nil), // 43: management.v1.DiscoverRDSResponse + (*DiscoverAzureDatabaseResponse)(nil), // 44: management.v1.DiscoverAzureDatabaseResponse + (*AddAzureDatabaseResponse)(nil), // 45: management.v1.AddAzureDatabaseResponse + } +) + var file_management_v1_service_proto_depIdxs = []int32{ 9, // 0: management.v1.AddServiceRequest.mysql:type_name -> management.v1.AddMySQLServiceParams 10, // 1: management.v1.AddServiceRequest.mongodb:type_name -> management.v1.AddMongoDBServiceParams diff --git a/api/management/v1/service.pb.gw.go b/api/management/v1/service.pb.gw.go index 1c029ecf7f..b71f27c3f6 100644 --- a/api/management/v1/service.pb.gw.go +++ b/api/management/v1/service.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_ManagementService_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddAnnotationRequest @@ -41,7 +43,6 @@ func request_ManagementService_AddAnnotation_0(ctx context.Context, marshaler ru msg, err := client.AddAnnotation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -54,12 +55,9 @@ func local_request_ManagementService_AddAnnotation_0(ctx context.Context, marsha msg, err := server.AddAnnotation(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ManagementService_ListAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_ManagementService_ListAgents_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_ManagementService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListAgentsRequest @@ -74,7 +72,6 @@ func request_ManagementService_ListAgents_0(ctx context.Context, marshaler runti msg, err := client.ListAgents(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_ListAgents_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -90,7 +87,6 @@ func local_request_ManagementService_ListAgents_0(ctx context.Context, marshaler msg, err := server.ListAgents(ctx, &protoReq) return msg, metadata, err - } func request_ManagementService_ListAgentVersions_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -99,7 +95,6 @@ func request_ManagementService_ListAgentVersions_0(ctx context.Context, marshale msg, err := client.ListAgentVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_ListAgentVersions_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -108,7 +103,6 @@ func local_request_ManagementService_ListAgentVersions_0(ctx context.Context, ma msg, err := server.ListAgentVersions(ctx, &protoReq) return msg, metadata, err - } func request_ManagementService_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -121,7 +115,6 @@ func request_ManagementService_RegisterNode_0(ctx context.Context, marshaler run msg, err := client.RegisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -134,12 +127,9 @@ func local_request_ManagementService_RegisterNode_0(ctx context.Context, marshal msg, err := server.RegisterNode(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ManagementService_UnregisterNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_ManagementService_UnregisterNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"node_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_ManagementService_UnregisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UnregisterNodeRequest @@ -171,7 +161,6 @@ func request_ManagementService_UnregisterNode_0(ctx context.Context, marshaler r msg, err := client.UnregisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_UnregisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -204,12 +193,9 @@ func local_request_ManagementService_UnregisterNode_0(ctx context.Context, marsh msg, err := server.UnregisterNode(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ManagementService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_ManagementService_ListNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_ManagementService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListNodesRequest @@ -224,7 +210,6 @@ func request_ManagementService_ListNodes_0(ctx context.Context, marshaler runtim msg, err := client.ListNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_ListNodes_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -240,7 +225,6 @@ func local_request_ManagementService_ListNodes_0(ctx context.Context, marshaler msg, err := server.ListNodes(ctx, &protoReq) return msg, metadata, err - } func request_ManagementService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -266,7 +250,6 @@ func request_ManagementService_GetNode_0(ctx context.Context, marshaler runtime. msg, err := client.GetNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_GetNode_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -292,7 +275,6 @@ func local_request_ManagementService_GetNode_0(ctx context.Context, marshaler ru msg, err := server.GetNode(ctx, &protoReq) return msg, metadata, err - } func request_ManagementService_AddService_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -305,7 +287,6 @@ func request_ManagementService_AddService_0(ctx context.Context, marshaler runti msg, err := client.AddService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_AddService_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -318,12 +299,9 @@ func local_request_ManagementService_AddService_0(ctx context.Context, marshaler msg, err := server.AddService(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ManagementService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_ManagementService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_ManagementService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListServicesRequest @@ -338,7 +316,6 @@ func request_ManagementService_ListServices_0(ctx context.Context, marshaler run msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -354,7 +331,6 @@ func local_request_ManagementService_ListServices_0(ctx context.Context, marshal msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err - } func request_ManagementService_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -367,7 +343,6 @@ func request_ManagementService_DiscoverRDS_0(ctx context.Context, marshaler runt msg, err := client.DiscoverRDS(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_DiscoverRDS_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -380,7 +355,6 @@ func local_request_ManagementService_DiscoverRDS_0(ctx context.Context, marshale msg, err := server.DiscoverRDS(ctx, &protoReq) return msg, metadata, err - } func request_ManagementService_DiscoverAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -393,7 +367,6 @@ func request_ManagementService_DiscoverAzureDatabase_0(ctx context.Context, mars msg, err := client.DiscoverAzureDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_DiscoverAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -406,7 +379,6 @@ func local_request_ManagementService_DiscoverAzureDatabase_0(ctx context.Context msg, err := server.DiscoverAzureDatabase(ctx, &protoReq) return msg, metadata, err - } func request_ManagementService_AddAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -419,7 +391,6 @@ func request_ManagementService_AddAzureDatabase_0(ctx context.Context, marshaler msg, err := client.AddAzureDatabase(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_AddAzureDatabase_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -432,12 +403,9 @@ func local_request_ManagementService_AddAzureDatabase_0(ctx context.Context, mar msg, err := server.AddAzureDatabase(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ManagementService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) +var filter_ManagementService_RemoveService_0 = &utilities.DoubleArray{Encoding: map[string]int{"service_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} func request_ManagementService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RemoveServiceRequest @@ -469,7 +437,6 @@ func request_ManagementService_RemoveService_0(ctx context.Context, marshaler ru msg, err := client.RemoveService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ManagementService_RemoveService_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -502,7 +469,6 @@ func local_request_ManagementService_RemoveService_0(ctx context.Context, marsha msg, err := server.RemoveService(ctx, &protoReq) return msg, metadata, err - } // RegisterManagementServiceHandlerServer registers the http handlers for service ManagementService to "mux". @@ -511,7 +477,6 @@ func local_request_ManagementService_RemoveService_0(ctx context.Context, marsha // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterManagementServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ManagementServiceServer) error { - mux.Handle("POST", pattern_ManagementService_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -534,7 +499,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -559,7 +523,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_ListAgentVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -584,7 +547,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListAgentVersions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -609,7 +571,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_ManagementService_UnregisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -634,7 +595,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_UnregisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -659,7 +619,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -684,7 +643,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -709,7 +667,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -734,7 +691,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_DiscoverRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -759,7 +715,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_DiscoverRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_DiscoverAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -784,7 +739,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_DiscoverAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_AddAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -809,7 +763,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -834,7 +787,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se } forward_ManagementService_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -877,7 +829,6 @@ func RegisterManagementServiceHandler(ctx context.Context, mux *runtime.ServeMux // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ManagementServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ManagementServiceClient) error { - mux.Handle("POST", pattern_ManagementService_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -897,7 +848,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_ListAgents_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -919,7 +869,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListAgents_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_ListAgentVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -941,7 +890,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListAgentVersions_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -963,7 +911,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_ManagementService_UnregisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -985,7 +932,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_UnregisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_ListNodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1007,7 +953,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListNodes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_GetNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1029,7 +974,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_GetNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1051,7 +995,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ManagementService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1073,7 +1016,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_DiscoverRDS_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1095,7 +1037,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_DiscoverRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_DiscoverAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1117,7 +1058,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_DiscoverAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ManagementService_AddAzureDatabase_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1139,7 +1079,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_AddAzureDatabase_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("DELETE", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1161,7 +1100,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } forward_ManagementService_RemoveService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/management/v1/service_grpc.pb.go b/api/management/v1/service_grpc.pb.go index 1d2237fe83..476fd197e4 100644 --- a/api/management/v1/service_grpc.pb.go +++ b/api/management/v1/service_grpc.pb.go @@ -8,6 +8,7 @@ package managementv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -251,39 +252,51 @@ type UnimplementedManagementServiceServer struct{} func (UnimplementedManagementServiceServer) AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAnnotation not implemented") } + func (UnimplementedManagementServiceServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgents not implemented") } + func (UnimplementedManagementServiceServer) ListAgentVersions(context.Context, *ListAgentVersionsRequest) (*ListAgentVersionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAgentVersions not implemented") } + func (UnimplementedManagementServiceServer) RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented") } + func (UnimplementedManagementServiceServer) UnregisterNode(context.Context, *UnregisterNodeRequest) (*UnregisterNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnregisterNode not implemented") } + func (UnimplementedManagementServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListNodes not implemented") } + func (UnimplementedManagementServiceServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNode not implemented") } + func (UnimplementedManagementServiceServer) AddService(context.Context, *AddServiceRequest) (*AddServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented") } + func (UnimplementedManagementServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") } + func (UnimplementedManagementServiceServer) DiscoverRDS(context.Context, *DiscoverRDSRequest) (*DiscoverRDSResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DiscoverRDS not implemented") } + func (UnimplementedManagementServiceServer) DiscoverAzureDatabase(context.Context, *DiscoverAzureDatabaseRequest) (*DiscoverAzureDatabaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DiscoverAzureDatabase not implemented") } + func (UnimplementedManagementServiceServer) AddAzureDatabase(context.Context, *AddAzureDatabaseRequest) (*AddAzureDatabaseResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddAzureDatabase not implemented") } + func (UnimplementedManagementServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented") } diff --git a/api/management/v1/severity.pb.go b/api/management/v1/severity.pb.go index e98b2bce61..5701f74476 100644 --- a/api/management/v1/severity.pb.go +++ b/api/management/v1/severity.pb.go @@ -7,10 +7,11 @@ package managementv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -133,10 +134,13 @@ func file_management_v1_severity_proto_rawDescGZIP() []byte { return file_management_v1_severity_proto_rawDescData } -var file_management_v1_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_management_v1_severity_proto_goTypes = []any{ - (Severity)(0), // 0: management.v1.Severity -} +var ( + file_management_v1_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_management_v1_severity_proto_goTypes = []any{ + (Severity)(0), // 0: management.v1.Severity + } +) + var file_management_v1_severity_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/platform/v1/json/client/platform_service/connect_parameters.go b/api/platform/v1/json/client/platform_service/connect_parameters.go index 22fbf3bda7..9c19eb64d1 100644 --- a/api/platform/v1/json/client/platform_service/connect_parameters.go +++ b/api/platform/v1/json/client/platform_service/connect_parameters.go @@ -60,7 +60,6 @@ ConnectParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ConnectParams struct { - // Body. Body ConnectBody @@ -130,7 +129,6 @@ func (o *ConnectParams) SetBody(body ConnectBody) { // WriteToRequest writes these params to a swagger request func (o *ConnectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/connect_responses.go b/api/platform/v1/json/client/platform_service/connect_responses.go index dc9fb1bba9..078c378f0e 100644 --- a/api/platform/v1/json/client/platform_service/connect_responses.go +++ b/api/platform/v1/json/client/platform_service/connect_responses.go @@ -103,7 +103,6 @@ func (o *ConnectOK) GetPayload() interface{} { } func (o *ConnectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *ConnectDefault) GetPayload() *ConnectDefaultBody { } func (o *ConnectDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ConnectDefaultBody) // response payload @@ -191,7 +189,6 @@ ConnectBody connect body swagger:model ConnectBody */ type ConnectBody struct { - // User defined human readable PMM Server Name. ServerName string `json:"server_name,omitempty"` @@ -232,7 +229,6 @@ ConnectDefaultBody connect default body swagger:model ConnectDefaultBody */ type ConnectDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -298,9 +294,7 @@ func (o *ConnectDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ConnectDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,7 +310,6 @@ func (o *ConnectDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -345,7 +338,6 @@ ConnectDefaultBodyDetailsItems0 connect default body details items0 swagger:model ConnectDefaultBodyDetailsItems0 */ type ConnectDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -357,7 +349,6 @@ type ConnectDefaultBodyDetailsItems0 struct { func (o *ConnectDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -395,7 +386,6 @@ func (o *ConnectDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ConnectDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/platform/v1/json/client/platform_service/disconnect_parameters.go b/api/platform/v1/json/client/platform_service/disconnect_parameters.go index 58be82dbfd..b8a19f5972 100644 --- a/api/platform/v1/json/client/platform_service/disconnect_parameters.go +++ b/api/platform/v1/json/client/platform_service/disconnect_parameters.go @@ -60,7 +60,6 @@ DisconnectParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DisconnectParams struct { - // Body. Body DisconnectBody @@ -130,7 +129,6 @@ func (o *DisconnectParams) SetBody(body DisconnectBody) { // WriteToRequest writes these params to a swagger request func (o *DisconnectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/disconnect_responses.go b/api/platform/v1/json/client/platform_service/disconnect_responses.go index 7e2c2b93cc..210eafa639 100644 --- a/api/platform/v1/json/client/platform_service/disconnect_responses.go +++ b/api/platform/v1/json/client/platform_service/disconnect_responses.go @@ -103,7 +103,6 @@ func (o *DisconnectOK) GetPayload() interface{} { } func (o *DisconnectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *DisconnectDefault) GetPayload() *DisconnectDefaultBody { } func (o *DisconnectDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(DisconnectDefaultBody) // response payload @@ -191,7 +189,6 @@ DisconnectBody disconnect body swagger:model DisconnectBody */ type DisconnectBody struct { - // Forces the cleanup process for connected PMM instances regardless of the Portal API response Force bool `json:"force,omitempty"` } @@ -229,7 +226,6 @@ DisconnectDefaultBody disconnect default body swagger:model DisconnectDefaultBody */ type DisconnectDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -295,9 +291,7 @@ func (o *DisconnectDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DisconnectDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -313,7 +307,6 @@ func (o *DisconnectDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -342,7 +335,6 @@ DisconnectDefaultBodyDetailsItems0 disconnect default body details items0 swagger:model DisconnectDefaultBodyDetailsItems0 */ type DisconnectDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -354,7 +346,6 @@ type DisconnectDefaultBodyDetailsItems0 struct { func (o *DisconnectDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -392,7 +383,6 @@ func (o *DisconnectDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DisconnectDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } diff --git a/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go b/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go index 8c907dc1d9..5f1da0f329 100644 --- a/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go +++ b/api/platform/v1/json/client/platform_service/get_contact_information_parameters.go @@ -115,7 +115,6 @@ func (o *GetContactInformationParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetContactInformationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/get_contact_information_responses.go b/api/platform/v1/json/client/platform_service/get_contact_information_responses.go index 5840df9484..048cac1845 100644 --- a/api/platform/v1/json/client/platform_service/get_contact_information_responses.go +++ b/api/platform/v1/json/client/platform_service/get_contact_information_responses.go @@ -103,7 +103,6 @@ func (o *GetContactInformationOK) GetPayload() *GetContactInformationOKBody { } func (o *GetContactInformationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetContactInformationOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetContactInformationDefault) GetPayload() *GetContactInformationDefaul } func (o *GetContactInformationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetContactInformationDefaultBody) // response payload @@ -193,7 +191,6 @@ GetContactInformationDefaultBody get contact information default body swagger:model GetContactInformationDefaultBody */ type GetContactInformationDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetContactInformationDefaultBody) ContextValidate(ctx context.Context, } func (o *GetContactInformationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetContactInformationDefaultBody) contextValidateDetails(ctx context.Co return err } } - } return nil @@ -306,7 +300,6 @@ GetContactInformationDefaultBodyDetailsItems0 get contact information default bo swagger:model GetContactInformationDefaultBodyDetailsItems0 */ type GetContactInformationDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetContactInformationDefaultBodyDetailsItems0 struct { func (o *GetContactInformationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetContactInformationDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o GetContactInformationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetContactInformationOKBody get contact information OK body swagger:model GetContactInformationOKBody */ type GetContactInformationOKBody struct { - // URL to open a new support ticket. NewTicketURL string `json:"new_ticket_url,omitempty"` @@ -476,7 +466,6 @@ func (o *GetContactInformationOKBody) ContextValidate(ctx context.Context, forma } func (o *GetContactInformationOKBody) contextValidateCustomerSuccess(ctx context.Context, formats strfmt.Registry) error { - if o.CustomerSuccess != nil { if swag.IsZero(o.CustomerSuccess) { // not required @@ -519,7 +508,6 @@ GetContactInformationOKBodyCustomerSuccess CustomerSuccess contains the contanct swagger:model GetContactInformationOKBodyCustomerSuccess */ type GetContactInformationOKBodyCustomerSuccess struct { - // name Name string `json:"name,omitempty"` diff --git a/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go b/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go index 6590caf39d..a63841d674 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go +++ b/api/platform/v1/json/client/platform_service/search_organization_entitlements_parameters.go @@ -115,7 +115,6 @@ func (o *SearchOrganizationEntitlementsParams) SetHTTPClient(client *http.Client // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationEntitlementsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go b/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go index 6e18d49e0e..eabef9309b 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go +++ b/api/platform/v1/json/client/platform_service/search_organization_entitlements_responses.go @@ -104,7 +104,6 @@ func (o *SearchOrganizationEntitlementsOK) GetPayload() *SearchOrganizationEntit } func (o *SearchOrganizationEntitlementsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SearchOrganizationEntitlementsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *SearchOrganizationEntitlementsDefault) GetPayload() *SearchOrganization } func (o *SearchOrganizationEntitlementsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SearchOrganizationEntitlementsDefaultBody) // response payload @@ -194,7 +192,6 @@ SearchOrganizationEntitlementsDefaultBody search organization entitlements defau swagger:model SearchOrganizationEntitlementsDefaultBody */ type SearchOrganizationEntitlementsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *SearchOrganizationEntitlementsDefaultBody) ContextValidate(ctx context. } func (o *SearchOrganizationEntitlementsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *SearchOrganizationEntitlementsDefaultBody) contextValidateDetails(ctx c return err } } - } return nil @@ -307,7 +301,6 @@ SearchOrganizationEntitlementsDefaultBodyDetailsItems0 search organization entit swagger:model SearchOrganizationEntitlementsDefaultBodyDetailsItems0 */ type SearchOrganizationEntitlementsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type SearchOrganizationEntitlementsDefaultBodyDetailsItems0 struct { func (o *SearchOrganizationEntitlementsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *SearchOrganizationEntitlementsDefaultBodyDetailsItems0) UnmarshalJSON(d // MarshalJSON marshals this object with additional properties into a JSON object func (o SearchOrganizationEntitlementsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ SearchOrganizationEntitlementsOKBody search organization entitlements OK body swagger:model SearchOrganizationEntitlementsOKBody */ type SearchOrganizationEntitlementsOKBody struct { - // entitlements Entitlements []*SearchOrganizationEntitlementsOKBodyEntitlementsItems0 `json:"entitlements"` } @@ -481,9 +471,7 @@ func (o *SearchOrganizationEntitlementsOKBody) ContextValidate(ctx context.Conte } func (o *SearchOrganizationEntitlementsOKBody) contextValidateEntitlements(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Entitlements); i++ { - if o.Entitlements[i] != nil { if swag.IsZero(o.Entitlements[i]) { // not required @@ -499,7 +487,6 @@ func (o *SearchOrganizationEntitlementsOKBody) contextValidateEntitlements(ctx c return err } } - } return nil @@ -528,7 +515,6 @@ SearchOrganizationEntitlementsOKBodyEntitlementsItems0 OrganizationEntitlement c swagger:model SearchOrganizationEntitlementsOKBodyEntitlementsItems0 */ type SearchOrganizationEntitlementsOKBodyEntitlementsItems0 struct { - // Entitlement number. Number string `json:"number,omitempty"` @@ -647,7 +633,6 @@ func (o *SearchOrganizationEntitlementsOKBodyEntitlementsItems0) ContextValidate } func (o *SearchOrganizationEntitlementsOKBodyEntitlementsItems0) contextValidatePlatform(ctx context.Context, formats strfmt.Registry) error { - if o.Platform != nil { if swag.IsZero(o.Platform) { // not required @@ -690,7 +675,6 @@ SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform Platform indicate swagger:model SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform */ type SearchOrganizationEntitlementsOKBodyEntitlementsItems0Platform struct { - // Flag indicates that security advisors are covered by this entitlement. SecurityAdvisor *string `json:"security_advisor,omitempty"` diff --git a/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go b/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go index 901e457f2a..b86868b75f 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go +++ b/api/platform/v1/json/client/platform_service/search_organization_tickets_parameters.go @@ -115,7 +115,6 @@ func (o *SearchOrganizationTicketsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *SearchOrganizationTicketsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go b/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go index 06cf0bb794..dc9d57f422 100644 --- a/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go +++ b/api/platform/v1/json/client/platform_service/search_organization_tickets_responses.go @@ -104,7 +104,6 @@ func (o *SearchOrganizationTicketsOK) GetPayload() *SearchOrganizationTicketsOKB } func (o *SearchOrganizationTicketsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SearchOrganizationTicketsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *SearchOrganizationTicketsDefault) GetPayload() *SearchOrganizationTicke } func (o *SearchOrganizationTicketsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SearchOrganizationTicketsDefaultBody) // response payload @@ -194,7 +192,6 @@ SearchOrganizationTicketsDefaultBody search organization tickets default body swagger:model SearchOrganizationTicketsDefaultBody */ type SearchOrganizationTicketsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *SearchOrganizationTicketsDefaultBody) ContextValidate(ctx context.Conte } func (o *SearchOrganizationTicketsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *SearchOrganizationTicketsDefaultBody) contextValidateDetails(ctx contex return err } } - } return nil @@ -307,7 +301,6 @@ SearchOrganizationTicketsDefaultBodyDetailsItems0 search organization tickets de swagger:model SearchOrganizationTicketsDefaultBodyDetailsItems0 */ type SearchOrganizationTicketsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -319,7 +312,6 @@ type SearchOrganizationTicketsDefaultBodyDetailsItems0 struct { func (o *SearchOrganizationTicketsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -357,7 +349,6 @@ func (o *SearchOrganizationTicketsDefaultBodyDetailsItems0) UnmarshalJSON(data [ // MarshalJSON marshals this object with additional properties into a JSON object func (o SearchOrganizationTicketsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -421,7 +412,6 @@ SearchOrganizationTicketsOKBody search organization tickets OK body swagger:model SearchOrganizationTicketsOKBody */ type SearchOrganizationTicketsOKBody struct { - // Support tickets belonging to the Percona Portal Organization. Tickets []*SearchOrganizationTicketsOKBodyTicketsItems0 `json:"tickets"` } @@ -481,9 +471,7 @@ func (o *SearchOrganizationTicketsOKBody) ContextValidate(ctx context.Context, f } func (o *SearchOrganizationTicketsOKBody) contextValidateTickets(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Tickets); i++ { - if o.Tickets[i] != nil { if swag.IsZero(o.Tickets[i]) { // not required @@ -499,7 +487,6 @@ func (o *SearchOrganizationTicketsOKBody) contextValidateTickets(ctx context.Con return err } } - } return nil @@ -528,7 +515,6 @@ SearchOrganizationTicketsOKBodyTicketsItems0 OrganizationTicket contains informa swagger:model SearchOrganizationTicketsOKBodyTicketsItems0 */ type SearchOrganizationTicketsOKBodyTicketsItems0 struct { - // Ticket number. Number string `json:"number,omitempty"` diff --git a/api/platform/v1/json/client/platform_service/server_info_parameters.go b/api/platform/v1/json/client/platform_service/server_info_parameters.go index 5dac32f83d..3dbeb11371 100644 --- a/api/platform/v1/json/client/platform_service/server_info_parameters.go +++ b/api/platform/v1/json/client/platform_service/server_info_parameters.go @@ -115,7 +115,6 @@ func (o *ServerInfoParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ServerInfoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/server_info_responses.go b/api/platform/v1/json/client/platform_service/server_info_responses.go index 9cc51b5d42..10d6d12ff4 100644 --- a/api/platform/v1/json/client/platform_service/server_info_responses.go +++ b/api/platform/v1/json/client/platform_service/server_info_responses.go @@ -103,7 +103,6 @@ func (o *ServerInfoOK) GetPayload() *ServerInfoOKBody { } func (o *ServerInfoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ServerInfoOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ServerInfoDefault) GetPayload() *ServerInfoDefaultBody { } func (o *ServerInfoDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ServerInfoDefaultBody) // response payload @@ -193,7 +191,6 @@ ServerInfoDefaultBody server info default body swagger:model ServerInfoDefaultBody */ type ServerInfoDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *ServerInfoDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ServerInfoDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *ServerInfoDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -306,7 +300,6 @@ ServerInfoDefaultBodyDetailsItems0 server info default body details items0 swagger:model ServerInfoDefaultBodyDetailsItems0 */ type ServerInfoDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type ServerInfoDefaultBodyDetailsItems0 struct { func (o *ServerInfoDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *ServerInfoDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ServerInfoDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ ServerInfoOKBody server info OK body swagger:model ServerInfoOKBody */ type ServerInfoOKBody struct { - // pmm server name PMMServerName string `json:"pmm_server_name,omitempty"` diff --git a/api/platform/v1/json/client/platform_service/user_status_parameters.go b/api/platform/v1/json/client/platform_service/user_status_parameters.go index 0a00f1925b..ea2a62482d 100644 --- a/api/platform/v1/json/client/platform_service/user_status_parameters.go +++ b/api/platform/v1/json/client/platform_service/user_status_parameters.go @@ -115,7 +115,6 @@ func (o *UserStatusParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *UserStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/platform/v1/json/client/platform_service/user_status_responses.go b/api/platform/v1/json/client/platform_service/user_status_responses.go index 95117fb73a..1cfe76a4d0 100644 --- a/api/platform/v1/json/client/platform_service/user_status_responses.go +++ b/api/platform/v1/json/client/platform_service/user_status_responses.go @@ -103,7 +103,6 @@ func (o *UserStatusOK) GetPayload() *UserStatusOKBody { } func (o *UserStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UserStatusOKBody) // response payload @@ -177,7 +176,6 @@ func (o *UserStatusDefault) GetPayload() *UserStatusDefaultBody { } func (o *UserStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UserStatusDefaultBody) // response payload @@ -193,7 +191,6 @@ UserStatusDefaultBody user status default body swagger:model UserStatusDefaultBody */ type UserStatusDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *UserStatusDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UserStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *UserStatusDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -306,7 +300,6 @@ UserStatusDefaultBodyDetailsItems0 user status default body details items0 swagger:model UserStatusDefaultBodyDetailsItems0 */ type UserStatusDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type UserStatusDefaultBodyDetailsItems0 struct { func (o *UserStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *UserStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UserStatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ UserStatusOKBody user status OK body swagger:model UserStatusOKBody */ type UserStatusOKBody struct { - // is platform user IsPlatformUser bool `json:"is_platform_user,omitempty"` } diff --git a/api/platform/v1/platform.pb.go b/api/platform/v1/platform.pb.go index cdcd2e86ba..c62f94c581 100644 --- a/api/platform/v1/platform.pb.go +++ b/api/platform/v1/platform.pb.go @@ -7,14 +7,15 @@ package platformv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -1284,28 +1285,31 @@ func file_platform_v1_platform_proto_rawDescGZIP() []byte { return file_platform_v1_platform_proto_rawDescData } -var file_platform_v1_platform_proto_msgTypes = make([]protoimpl.MessageInfo, 18) -var file_platform_v1_platform_proto_goTypes = []any{ - (*ConnectRequest)(nil), // 0: platform.v1.ConnectRequest - (*ConnectResponse)(nil), // 1: platform.v1.ConnectResponse - (*DisconnectRequest)(nil), // 2: platform.v1.DisconnectRequest - (*DisconnectResponse)(nil), // 3: platform.v1.DisconnectResponse - (*SearchOrganizationTicketsRequest)(nil), // 4: platform.v1.SearchOrganizationTicketsRequest - (*SearchOrganizationTicketsResponse)(nil), // 5: platform.v1.SearchOrganizationTicketsResponse - (*OrganizationTicket)(nil), // 6: platform.v1.OrganizationTicket - (*SearchOrganizationEntitlementsRequest)(nil), // 7: platform.v1.SearchOrganizationEntitlementsRequest - (*SearchOrganizationEntitlementsResponse)(nil), // 8: platform.v1.SearchOrganizationEntitlementsResponse - (*OrganizationEntitlement)(nil), // 9: platform.v1.OrganizationEntitlement - (*GetContactInformationRequest)(nil), // 10: platform.v1.GetContactInformationRequest - (*GetContactInformationResponse)(nil), // 11: platform.v1.GetContactInformationResponse - (*ServerInfoRequest)(nil), // 12: platform.v1.ServerInfoRequest - (*ServerInfoResponse)(nil), // 13: platform.v1.ServerInfoResponse - (*UserStatusRequest)(nil), // 14: platform.v1.UserStatusRequest - (*UserStatusResponse)(nil), // 15: platform.v1.UserStatusResponse - (*OrganizationEntitlement_Platform)(nil), // 16: platform.v1.OrganizationEntitlement.Platform - (*GetContactInformationResponse_CustomerSuccess)(nil), // 17: platform.v1.GetContactInformationResponse.CustomerSuccess - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp -} +var ( + file_platform_v1_platform_proto_msgTypes = make([]protoimpl.MessageInfo, 18) + file_platform_v1_platform_proto_goTypes = []any{ + (*ConnectRequest)(nil), // 0: platform.v1.ConnectRequest + (*ConnectResponse)(nil), // 1: platform.v1.ConnectResponse + (*DisconnectRequest)(nil), // 2: platform.v1.DisconnectRequest + (*DisconnectResponse)(nil), // 3: platform.v1.DisconnectResponse + (*SearchOrganizationTicketsRequest)(nil), // 4: platform.v1.SearchOrganizationTicketsRequest + (*SearchOrganizationTicketsResponse)(nil), // 5: platform.v1.SearchOrganizationTicketsResponse + (*OrganizationTicket)(nil), // 6: platform.v1.OrganizationTicket + (*SearchOrganizationEntitlementsRequest)(nil), // 7: platform.v1.SearchOrganizationEntitlementsRequest + (*SearchOrganizationEntitlementsResponse)(nil), // 8: platform.v1.SearchOrganizationEntitlementsResponse + (*OrganizationEntitlement)(nil), // 9: platform.v1.OrganizationEntitlement + (*GetContactInformationRequest)(nil), // 10: platform.v1.GetContactInformationRequest + (*GetContactInformationResponse)(nil), // 11: platform.v1.GetContactInformationResponse + (*ServerInfoRequest)(nil), // 12: platform.v1.ServerInfoRequest + (*ServerInfoResponse)(nil), // 13: platform.v1.ServerInfoResponse + (*UserStatusRequest)(nil), // 14: platform.v1.UserStatusRequest + (*UserStatusResponse)(nil), // 15: platform.v1.UserStatusResponse + (*OrganizationEntitlement_Platform)(nil), // 16: platform.v1.OrganizationEntitlement.Platform + (*GetContactInformationResponse_CustomerSuccess)(nil), // 17: platform.v1.GetContactInformationResponse.CustomerSuccess + (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp + } +) + var file_platform_v1_platform_proto_depIdxs = []int32{ 6, // 0: platform.v1.SearchOrganizationTicketsResponse.tickets:type_name -> platform.v1.OrganizationTicket 18, // 1: platform.v1.OrganizationTicket.create_time:type_name -> google.protobuf.Timestamp diff --git a/api/platform/v1/platform.pb.gw.go b/api/platform/v1/platform.pb.gw.go index a528eddb52..06cfee4c9e 100644 --- a/api/platform/v1/platform.pb.gw.go +++ b/api/platform/v1/platform.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_PlatformService_Connect_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ConnectRequest @@ -41,7 +43,6 @@ func request_PlatformService_Connect_0(ctx context.Context, marshaler runtime.Ma msg, err := client.Connect(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PlatformService_Connect_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -54,7 +55,6 @@ func local_request_PlatformService_Connect_0(ctx context.Context, marshaler runt msg, err := server.Connect(ctx, &protoReq) return msg, metadata, err - } func request_PlatformService_Disconnect_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -67,7 +67,6 @@ func request_PlatformService_Disconnect_0(ctx context.Context, marshaler runtime msg, err := client.Disconnect(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PlatformService_Disconnect_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -80,7 +79,6 @@ func local_request_PlatformService_Disconnect_0(ctx context.Context, marshaler r msg, err := server.Disconnect(ctx, &protoReq) return msg, metadata, err - } func request_PlatformService_SearchOrganizationTickets_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -89,7 +87,6 @@ func request_PlatformService_SearchOrganizationTickets_0(ctx context.Context, ma msg, err := client.SearchOrganizationTickets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PlatformService_SearchOrganizationTickets_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -98,7 +95,6 @@ func local_request_PlatformService_SearchOrganizationTickets_0(ctx context.Conte msg, err := server.SearchOrganizationTickets(ctx, &protoReq) return msg, metadata, err - } func request_PlatformService_SearchOrganizationEntitlements_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -107,7 +103,6 @@ func request_PlatformService_SearchOrganizationEntitlements_0(ctx context.Contex msg, err := client.SearchOrganizationEntitlements(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PlatformService_SearchOrganizationEntitlements_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -116,7 +111,6 @@ func local_request_PlatformService_SearchOrganizationEntitlements_0(ctx context. msg, err := server.SearchOrganizationEntitlements(ctx, &protoReq) return msg, metadata, err - } func request_PlatformService_GetContactInformation_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -125,7 +119,6 @@ func request_PlatformService_GetContactInformation_0(ctx context.Context, marsha msg, err := client.GetContactInformation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PlatformService_GetContactInformation_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -134,7 +127,6 @@ func local_request_PlatformService_GetContactInformation_0(ctx context.Context, msg, err := server.GetContactInformation(ctx, &protoReq) return msg, metadata, err - } func request_PlatformService_ServerInfo_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -143,7 +135,6 @@ func request_PlatformService_ServerInfo_0(ctx context.Context, marshaler runtime msg, err := client.ServerInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PlatformService_ServerInfo_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -152,7 +143,6 @@ func local_request_PlatformService_ServerInfo_0(ctx context.Context, marshaler r msg, err := server.ServerInfo(ctx, &protoReq) return msg, metadata, err - } func request_PlatformService_UserStatus_0(ctx context.Context, marshaler runtime.Marshaler, client PlatformServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -161,7 +151,6 @@ func request_PlatformService_UserStatus_0(ctx context.Context, marshaler runtime msg, err := client.UserStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_PlatformService_UserStatus_0(ctx context.Context, marshaler runtime.Marshaler, server PlatformServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -170,7 +159,6 @@ func local_request_PlatformService_UserStatus_0(ctx context.Context, marshaler r msg, err := server.UserStatus(ctx, &protoReq) return msg, metadata, err - } // RegisterPlatformServiceHandlerServer registers the http handlers for service PlatformService to "mux". @@ -179,7 +167,6 @@ func local_request_PlatformService_UserStatus_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPlatformServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PlatformServiceServer) error { - mux.Handle("POST", pattern_PlatformService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -202,7 +189,6 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_PlatformService_Disconnect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -227,7 +213,6 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -252,7 +237,6 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -277,7 +261,6 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -302,7 +285,6 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -327,7 +309,6 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -352,7 +333,6 @@ func RegisterPlatformServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_PlatformService_UserStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -395,7 +375,6 @@ func RegisterPlatformServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "PlatformServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PlatformServiceClient) error { - mux.Handle("POST", pattern_PlatformService_Connect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -415,7 +394,6 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_Connect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_PlatformService_Disconnect_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -437,7 +415,6 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_Disconnect_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_SearchOrganizationTickets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -459,7 +436,6 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_SearchOrganizationTickets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_SearchOrganizationEntitlements_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -481,7 +457,6 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_SearchOrganizationEntitlements_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_GetContactInformation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -503,7 +478,6 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_GetContactInformation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_ServerInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -525,7 +499,6 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_ServerInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_PlatformService_UserStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -547,7 +520,6 @@ func RegisterPlatformServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_PlatformService_UserStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/platform/v1/platform_grpc.pb.go b/api/platform/v1/platform_grpc.pb.go index 23bfcdbd5b..42cadaab2d 100644 --- a/api/platform/v1/platform_grpc.pb.go +++ b/api/platform/v1/platform_grpc.pb.go @@ -8,6 +8,7 @@ package platformv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -161,21 +162,27 @@ type UnimplementedPlatformServiceServer struct{} func (UnimplementedPlatformServiceServer) Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Connect not implemented") } + func (UnimplementedPlatformServiceServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Disconnect not implemented") } + func (UnimplementedPlatformServiceServer) SearchOrganizationTickets(context.Context, *SearchOrganizationTicketsRequest) (*SearchOrganizationTicketsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizationTickets not implemented") } + func (UnimplementedPlatformServiceServer) SearchOrganizationEntitlements(context.Context, *SearchOrganizationEntitlementsRequest) (*SearchOrganizationEntitlementsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchOrganizationEntitlements not implemented") } + func (UnimplementedPlatformServiceServer) GetContactInformation(context.Context, *GetContactInformationRequest) (*GetContactInformationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetContactInformation not implemented") } + func (UnimplementedPlatformServiceServer) ServerInfo(context.Context, *ServerInfoRequest) (*ServerInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ServerInfo not implemented") } + func (UnimplementedPlatformServiceServer) UserStatus(context.Context, *UserStatusRequest) (*UserStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserStatus not implemented") } diff --git a/api/qan/v1/collector.pb.go b/api/qan/v1/collector.pb.go index 13f3ebd295..2a2a08ad52 100644 --- a/api/qan/v1/collector.pb.go +++ b/api/qan/v1/collector.pb.go @@ -7,12 +7,14 @@ package qanv1 import ( - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + + v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -2787,17 +2789,20 @@ func file_qan_v1_collector_proto_rawDescGZIP() []byte { return file_qan_v1_collector_proto_rawDescData } -var file_qan_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) -var file_qan_v1_collector_proto_goTypes = []any{ - (*CollectRequest)(nil), // 0: qan.v1.CollectRequest - (*MetricsBucket)(nil), // 1: qan.v1.MetricsBucket - (*CollectResponse)(nil), // 2: qan.v1.CollectResponse - nil, // 3: qan.v1.MetricsBucket.LabelsEntry - nil, // 4: qan.v1.MetricsBucket.WarningsEntry - nil, // 5: qan.v1.MetricsBucket.ErrorsEntry - (v1.AgentType)(0), // 6: inventory.v1.AgentType - (ExampleType)(0), // 7: qan.v1.ExampleType -} +var ( + file_qan_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) + file_qan_v1_collector_proto_goTypes = []any{ + (*CollectRequest)(nil), // 0: qan.v1.CollectRequest + (*MetricsBucket)(nil), // 1: qan.v1.MetricsBucket + (*CollectResponse)(nil), // 2: qan.v1.CollectResponse + nil, // 3: qan.v1.MetricsBucket.LabelsEntry + nil, // 4: qan.v1.MetricsBucket.WarningsEntry + nil, // 5: qan.v1.MetricsBucket.ErrorsEntry + (v1.AgentType)(0), // 6: inventory.v1.AgentType + (ExampleType)(0), // 7: qan.v1.ExampleType + } +) + var file_qan_v1_collector_proto_depIdxs = []int32{ 1, // 0: qan.v1.CollectRequest.metrics_bucket:type_name -> qan.v1.MetricsBucket 6, // 1: qan.v1.MetricsBucket.agent_type:type_name -> inventory.v1.AgentType diff --git a/api/qan/v1/collector_grpc.pb.go b/api/qan/v1/collector_grpc.pb.go index 7434c418cc..27f7ffbcdd 100644 --- a/api/qan/v1/collector_grpc.pb.go +++ b/api/qan/v1/collector_grpc.pb.go @@ -8,6 +8,7 @@ package qanv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/qan/v1/filters.pb.go b/api/qan/v1/filters.pb.go index 43e18a957f..8449e2d557 100644 --- a/api/qan/v1/filters.pb.go +++ b/api/qan/v1/filters.pb.go @@ -7,11 +7,12 @@ package qanv1 import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -316,16 +317,19 @@ func file_qan_v1_filters_proto_rawDescGZIP() []byte { return file_qan_v1_filters_proto_rawDescData } -var file_qan_v1_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_qan_v1_filters_proto_goTypes = []any{ - (*GetFilteredMetricsNamesRequest)(nil), // 0: qan.v1.GetFilteredMetricsNamesRequest - (*GetFilteredMetricsNamesResponse)(nil), // 1: qan.v1.GetFilteredMetricsNamesResponse - (*ListLabels)(nil), // 2: qan.v1.ListLabels - (*Values)(nil), // 3: qan.v1.Values - nil, // 4: qan.v1.GetFilteredMetricsNamesResponse.LabelsEntry - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 6: qan.v1.MapFieldEntry -} +var ( + file_qan_v1_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) + file_qan_v1_filters_proto_goTypes = []any{ + (*GetFilteredMetricsNamesRequest)(nil), // 0: qan.v1.GetFilteredMetricsNamesRequest + (*GetFilteredMetricsNamesResponse)(nil), // 1: qan.v1.GetFilteredMetricsNamesResponse + (*ListLabels)(nil), // 2: qan.v1.ListLabels + (*Values)(nil), // 3: qan.v1.Values + nil, // 4: qan.v1.GetFilteredMetricsNamesResponse.LabelsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 6: qan.v1.MapFieldEntry + } +) + var file_qan_v1_filters_proto_depIdxs = []int32{ 5, // 0: qan.v1.GetFilteredMetricsNamesRequest.period_start_from:type_name -> google.protobuf.Timestamp 5, // 1: qan.v1.GetFilteredMetricsNamesRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go index 0b477d3a71..5b2c7bf438 100644 --- a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go +++ b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go @@ -60,7 +60,6 @@ ExplainFingerprintByQueryIDParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ExplainFingerprintByQueryIDParams struct { - /* Body. ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID. @@ -133,7 +132,6 @@ func (o *ExplainFingerprintByQueryIDParams) SetBody(body ExplainFingerprintByQue // WriteToRequest writes these params to a swagger request func (o *ExplainFingerprintByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go index 671866854f..49d669294f 100644 --- a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go +++ b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go @@ -103,7 +103,6 @@ func (o *ExplainFingerprintByQueryIDOK) GetPayload() *ExplainFingerprintByQueryI } func (o *ExplainFingerprintByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ExplainFingerprintByQueryIDOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ExplainFingerprintByQueryIDDefault) GetPayload() *ExplainFingerprintByQ } func (o *ExplainFingerprintByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ExplainFingerprintByQueryIDDefaultBody) // response payload @@ -193,7 +191,6 @@ ExplainFingerprintByQueryIDBody ExplainFingerprintByQueryIDRequest get explain f swagger:model ExplainFingerprintByQueryIDBody */ type ExplainFingerprintByQueryIDBody struct { - // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -234,7 +231,6 @@ ExplainFingerprintByQueryIDDefaultBody explain fingerprint by query ID default b swagger:model ExplainFingerprintByQueryIDDefaultBody */ type ExplainFingerprintByQueryIDDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -300,9 +296,7 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) ContextValidate(ctx context.Con } func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -318,7 +312,6 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx cont return err } } - } return nil @@ -347,7 +340,6 @@ ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 explain fingerprint by query swagger:model ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 */ type ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -359,7 +351,6 @@ type ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 struct { func (o *ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -397,7 +388,6 @@ func (o *ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data // MarshalJSON marshals this object with additional properties into a JSON object func (o ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -461,7 +451,6 @@ ExplainFingerprintByQueryIDOKBody ExplainFingerprintByQueryIDResponse is explain swagger:model ExplainFingerprintByQueryIDOKBody */ type ExplainFingerprintByQueryIDOKBody struct { - // explain fingerprint ExplainFingerprint string `json:"explain_fingerprint,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go index 14be6f6c2d..7b377ad61a 100644 --- a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go @@ -60,7 +60,6 @@ GetFilteredMetricsNamesParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type GetFilteredMetricsNamesParams struct { - /* Body. GetFilteredMetricsNamesRequest contains period for which we need filters. @@ -133,7 +132,6 @@ func (o *GetFilteredMetricsNamesParams) SetBody(body GetFilteredMetricsNamesBody // WriteToRequest writes these params to a swagger request func (o *GetFilteredMetricsNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go index ecd318b778..2fa39a5790 100644 --- a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go +++ b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go @@ -104,7 +104,6 @@ func (o *GetFilteredMetricsNamesOK) GetPayload() *GetFilteredMetricsNamesOKBody } func (o *GetFilteredMetricsNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetFilteredMetricsNamesOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetFilteredMetricsNamesDefault) GetPayload() *GetFilteredMetricsNamesDe } func (o *GetFilteredMetricsNamesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetFilteredMetricsNamesDefaultBody) // response payload @@ -194,7 +192,6 @@ GetFilteredMetricsNamesBody GetFilteredMetricsNamesRequest contains period for w swagger:model GetFilteredMetricsNamesBody */ type GetFilteredMetricsNamesBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -297,9 +294,7 @@ func (o *GetFilteredMetricsNamesBody) ContextValidate(ctx context.Context, forma } func (o *GetFilteredMetricsNamesBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -315,7 +310,6 @@ func (o *GetFilteredMetricsNamesBody) contextValidateLabels(ctx context.Context, return err } } - } return nil @@ -344,7 +338,6 @@ GetFilteredMetricsNamesDefaultBody get filtered metrics names default body swagger:model GetFilteredMetricsNamesDefaultBody */ type GetFilteredMetricsNamesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -410,9 +403,7 @@ func (o *GetFilteredMetricsNamesDefaultBody) ContextValidate(ctx context.Context } func (o *GetFilteredMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -428,7 +419,6 @@ func (o *GetFilteredMetricsNamesDefaultBody) contextValidateDetails(ctx context. return err } } - } return nil @@ -457,7 +447,6 @@ GetFilteredMetricsNamesDefaultBodyDetailsItems0 get filtered metrics names defau swagger:model GetFilteredMetricsNamesDefaultBodyDetailsItems0 */ type GetFilteredMetricsNamesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -469,7 +458,6 @@ type GetFilteredMetricsNamesDefaultBodyDetailsItems0 struct { func (o *GetFilteredMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -507,7 +495,6 @@ func (o *GetFilteredMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []b // MarshalJSON marshals this object with additional properties into a JSON object func (o GetFilteredMetricsNamesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -572,7 +559,6 @@ GetFilteredMetricsNamesOKBody GetFilteredMetricsNamesResponse is map of labels f swagger:model GetFilteredMetricsNamesOKBody */ type GetFilteredMetricsNamesOKBody struct { - // labels Labels map[string]GetFilteredMetricsNamesOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -632,15 +618,12 @@ func (o *GetFilteredMetricsNamesOKBody) ContextValidate(ctx context.Context, for } func (o *GetFilteredMetricsNamesOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Labels { - if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil @@ -669,7 +652,6 @@ GetFilteredMetricsNamesOKBodyLabelsAnon ListLabels is list of label's values: du swagger:model GetFilteredMetricsNamesOKBodyLabelsAnon */ type GetFilteredMetricsNamesOKBodyLabelsAnon struct { - // name Name []*GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 `json:"name"` } @@ -729,9 +711,7 @@ func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) ContextValidate(ctx context.Co } func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) contextValidateName(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Name); i++ { - if o.Name[i] != nil { if swag.IsZero(o.Name[i]) { // not required @@ -747,7 +727,6 @@ func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) contextValidateName(ctx contex return err } } - } return nil @@ -776,7 +755,6 @@ GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 Values is label values and mai swagger:model GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 */ type GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 struct { - // value Value string `json:"value,omitempty"` @@ -820,7 +798,6 @@ GetFilteredMetricsNamesParamsBodyLabelsItems0 MapFieldEntry allows to pass label swagger:model GetFilteredMetricsNamesParamsBodyLabelsItems0 */ type GetFilteredMetricsNamesParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_histogram_parameters.go b/api/qan/v1/json/client/qan_service/get_histogram_parameters.go index a86298f991..273d1c7ba3 100644 --- a/api/qan/v1/json/client/qan_service/get_histogram_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_histogram_parameters.go @@ -60,7 +60,6 @@ GetHistogramParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetHistogramParams struct { - /* Body. GetHistogramRequest defines filtering by time range, labels and queryid. @@ -133,7 +132,6 @@ func (o *GetHistogramParams) SetBody(body GetHistogramBody) { // WriteToRequest writes these params to a swagger request func (o *GetHistogramParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_histogram_responses.go b/api/qan/v1/json/client/qan_service/get_histogram_responses.go index 6d8dd5c127..a100823cb5 100644 --- a/api/qan/v1/json/client/qan_service/get_histogram_responses.go +++ b/api/qan/v1/json/client/qan_service/get_histogram_responses.go @@ -104,7 +104,6 @@ func (o *GetHistogramOK) GetPayload() *GetHistogramOKBody { } func (o *GetHistogramOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetHistogramOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetHistogramDefault) GetPayload() *GetHistogramDefaultBody { } func (o *GetHistogramDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetHistogramDefaultBody) // response payload @@ -194,7 +192,6 @@ GetHistogramBody GetHistogramRequest defines filtering by time range, labels and swagger:model GetHistogramBody */ type GetHistogramBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -297,9 +294,7 @@ func (o *GetHistogramBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -315,7 +310,6 @@ func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats st return err } } - } return nil @@ -344,7 +338,6 @@ GetHistogramDefaultBody get histogram default body swagger:model GetHistogramDefaultBody */ type GetHistogramDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -410,9 +403,7 @@ func (o *GetHistogramDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -428,7 +419,6 @@ func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -457,7 +447,6 @@ GetHistogramDefaultBodyDetailsItems0 get histogram default body details items0 swagger:model GetHistogramDefaultBodyDetailsItems0 */ type GetHistogramDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -469,7 +458,6 @@ type GetHistogramDefaultBodyDetailsItems0 struct { func (o *GetHistogramDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -507,7 +495,6 @@ func (o *GetHistogramDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetHistogramDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -571,7 +558,6 @@ GetHistogramOKBody GetHistogramResponse is histogram items as a list. swagger:model GetHistogramOKBody */ type GetHistogramOKBody struct { - // histogram items HistogramItems []*GetHistogramOKBodyHistogramItemsItems0 `json:"histogram_items"` } @@ -631,9 +617,7 @@ func (o *GetHistogramOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.HistogramItems); i++ { - if o.HistogramItems[i] != nil { if swag.IsZero(o.HistogramItems[i]) { // not required @@ -649,7 +633,6 @@ func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, return err } } - } return nil @@ -678,7 +661,6 @@ GetHistogramOKBodyHistogramItemsItems0 HistogramItem represents one item in hist swagger:model GetHistogramOKBodyHistogramItemsItems0 */ type GetHistogramOKBodyHistogramItemsItems0 struct { - // range Range string `json:"range,omitempty"` @@ -719,7 +701,6 @@ GetHistogramParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimension swagger:model GetHistogramParamsBodyLabelsItems0 */ type GetHistogramParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_labels_parameters.go b/api/qan/v1/json/client/qan_service/get_labels_parameters.go index 946aabc1dc..ebf388c128 100644 --- a/api/qan/v1/json/client/qan_service/get_labels_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_labels_parameters.go @@ -60,7 +60,6 @@ GetLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLabelsParams struct { - /* Body. GetLabelsRequest defines filtering of object detail's labels for specific value of @@ -134,7 +133,6 @@ func (o *GetLabelsParams) SetBody(body GetLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *GetLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_labels_responses.go b/api/qan/v1/json/client/qan_service/get_labels_responses.go index 5775729a1d..a1690be466 100644 --- a/api/qan/v1/json/client/qan_service/get_labels_responses.go +++ b/api/qan/v1/json/client/qan_service/get_labels_responses.go @@ -104,7 +104,6 @@ func (o *GetLabelsOK) GetPayload() *GetLabelsOKBody { } func (o *GetLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLabelsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetLabelsDefault) GetPayload() *GetLabelsDefaultBody { } func (o *GetLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetLabelsDefaultBody) // response payload @@ -195,7 +193,6 @@ GetLabelsBody GetLabelsRequest defines filtering of object detail's labels for s swagger:model GetLabelsBody */ type GetLabelsBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -281,7 +278,6 @@ GetLabelsDefaultBody get labels default body swagger:model GetLabelsDefaultBody */ type GetLabelsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -347,9 +343,7 @@ func (o *GetLabelsDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -365,7 +359,6 @@ func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -394,7 +387,6 @@ GetLabelsDefaultBodyDetailsItems0 get labels default body details items0 swagger:model GetLabelsDefaultBodyDetailsItems0 */ type GetLabelsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -406,7 +398,6 @@ type GetLabelsDefaultBodyDetailsItems0 struct { func (o *GetLabelsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -444,7 +435,6 @@ func (o *GetLabelsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLabelsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -508,7 +498,6 @@ GetLabelsOKBody GetLabelsResponse is a map of labels names as keys and labels va swagger:model GetLabelsOKBody */ type GetLabelsOKBody struct { - // labels Labels map[string]GetLabelsOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -568,15 +557,12 @@ func (o *GetLabelsOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetLabelsOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Labels { - if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil @@ -605,7 +591,6 @@ GetLabelsOKBodyLabelsAnon ListLabelValues is list of label's values. swagger:model GetLabelsOKBodyLabelsAnon */ type GetLabelsOKBodyLabelsAnon struct { - // values Values []string `json:"values"` } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go b/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go index 30ebadcf3a..ef138a2556 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go @@ -60,7 +60,6 @@ GetMetricsNamesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsNamesParams struct { - /* Body. MetricsNamesRequest is empty. @@ -133,7 +132,6 @@ func (o *GetMetricsNamesParams) SetBody(body interface{}) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go b/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go index f7ff85b571..89bc0b01e7 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go @@ -103,7 +103,6 @@ func (o *GetMetricsNamesOK) GetPayload() *GetMetricsNamesOKBody { } func (o *GetMetricsNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetMetricsNamesOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetMetricsNamesDefault) GetPayload() *GetMetricsNamesDefaultBody { } func (o *GetMetricsNamesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetMetricsNamesDefaultBody) // response payload @@ -193,7 +191,6 @@ GetMetricsNamesDefaultBody get metrics names default body swagger:model GetMetricsNamesDefaultBody */ type GetMetricsNamesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetMetricsNamesDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -306,7 +300,6 @@ GetMetricsNamesDefaultBodyDetailsItems0 get metrics names default body details i swagger:model GetMetricsNamesDefaultBodyDetailsItems0 */ type GetMetricsNamesDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetMetricsNamesDefaultBodyDetailsItems0 struct { func (o *GetMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetMetricsNamesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -422,7 +413,6 @@ GetMetricsNamesOKBody MetricsNamesReply is map of stored metrics: swagger:model GetMetricsNamesOKBody */ type GetMetricsNamesOKBody struct { - // data Data map[string]string `json:"data,omitempty"` } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_parameters.go b/api/qan/v1/json/client/qan_service/get_metrics_parameters.go index 6653906634..65e95eae00 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_parameters.go @@ -60,7 +60,6 @@ GetMetricsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsParams struct { - /* Body. GetMetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972. @@ -133,7 +132,6 @@ func (o *GetMetricsParams) SetBody(body GetMetricsBody) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_responses.go b/api/qan/v1/json/client/qan_service/get_metrics_responses.go index 43a1c4c77f..3ab221f11d 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_responses.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_responses.go @@ -104,7 +104,6 @@ func (o *GetMetricsOK) GetPayload() *GetMetricsOKBody { } func (o *GetMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetMetricsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetMetricsDefault) GetPayload() *GetMetricsDefaultBody { } func (o *GetMetricsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetMetricsDefaultBody) // response payload @@ -194,7 +192,6 @@ GetMetricsBody GetMetricsRequest defines filtering of metrics for specific value swagger:model GetMetricsBody */ type GetMetricsBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -306,9 +303,7 @@ func (o *GetMetricsBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -324,7 +319,6 @@ func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strf return err } } - } return nil @@ -353,7 +347,6 @@ GetMetricsDefaultBody get metrics default body swagger:model GetMetricsDefaultBody */ type GetMetricsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -419,9 +412,7 @@ func (o *GetMetricsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -437,7 +428,6 @@ func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -466,7 +456,6 @@ GetMetricsDefaultBodyDetailsItems0 get metrics default body details items0 swagger:model GetMetricsDefaultBodyDetailsItems0 */ type GetMetricsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -478,7 +467,6 @@ type GetMetricsDefaultBodyDetailsItems0 struct { func (o *GetMetricsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -516,7 +504,6 @@ func (o *GetMetricsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetMetricsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -580,7 +567,6 @@ GetMetricsOKBody GetMetricsResponse defines metrics for specific value of dimens swagger:model GetMetricsOKBody */ type GetMetricsOKBody struct { - // metrics Metrics map[string]GetMetricsOKBodyMetricsAnon `json:"metrics,omitempty"` @@ -750,24 +736,19 @@ func (o *GetMetricsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetMetricsOKBody) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Metrics { - if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil } func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Sparkline); i++ { - if o.Sparkline[i] != nil { if swag.IsZero(o.Sparkline[i]) { // not required @@ -783,29 +764,24 @@ func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats return err } } - } return nil } func (o *GetMetricsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Totals { - if val, ok := o.Totals[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil } func (o *GetMetricsOKBody) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { - if o.Metadata != nil { if swag.IsZero(o.Metadata) { // not required @@ -848,7 +824,6 @@ GetMetricsOKBodyMetadata GetSlecetedQueryMetadataResponse consists selected quer swagger:model GetMetricsOKBodyMetadata */ type GetMetricsOKBodyMetadata struct { - // service name ServiceName string `json:"service_name,omitempty"` @@ -919,7 +894,6 @@ GetMetricsOKBodyMetricsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyMetricsAnon */ type GetMetricsOKBodyMetricsAnon struct { - // rate Rate float32 `json:"rate,omitempty"` @@ -979,7 +953,6 @@ GetMetricsOKBodySparklineItems0 Point contains values that represents abscissa ( swagger:model GetMetricsOKBodySparklineItems0 */ type GetMetricsOKBodySparklineItems0 struct { - // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1212,7 +1185,6 @@ GetMetricsOKBodyTotalsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyTotalsAnon */ type GetMetricsOKBodyTotalsAnon struct { - // rate Rate float32 `json:"rate,omitempty"` @@ -1271,7 +1243,6 @@ GetMetricsParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimensions swagger:model GetMetricsParamsBodyLabelsItems0 */ type GetMetricsParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_query_example_parameters.go b/api/qan/v1/json/client/qan_service/get_query_example_parameters.go index 2d400fd9bb..7757bae1c9 100644 --- a/api/qan/v1/json/client/qan_service/get_query_example_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_query_example_parameters.go @@ -60,7 +60,6 @@ GetQueryExampleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryExampleParams struct { - /* Body. GetQueryExampleRequest defines filtering of query examples for specific value of @@ -134,7 +133,6 @@ func (o *GetQueryExampleParams) SetBody(body GetQueryExampleBody) { // WriteToRequest writes these params to a swagger request func (o *GetQueryExampleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_query_example_responses.go b/api/qan/v1/json/client/qan_service/get_query_example_responses.go index 1c005ca846..7dc92e072f 100644 --- a/api/qan/v1/json/client/qan_service/get_query_example_responses.go +++ b/api/qan/v1/json/client/qan_service/get_query_example_responses.go @@ -104,7 +104,6 @@ func (o *GetQueryExampleOK) GetPayload() *GetQueryExampleOKBody { } func (o *GetQueryExampleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetQueryExampleOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetQueryExampleDefault) GetPayload() *GetQueryExampleDefaultBody { } func (o *GetQueryExampleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetQueryExampleDefaultBody) // response payload @@ -195,7 +193,6 @@ GetQueryExampleBody GetQueryExampleRequest defines filtering of query examples f swagger:model GetQueryExampleBody */ type GetQueryExampleBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -304,9 +301,7 @@ func (o *GetQueryExampleBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -322,7 +317,6 @@ func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats return err } } - } return nil @@ -351,7 +345,6 @@ GetQueryExampleDefaultBody get query example default body swagger:model GetQueryExampleDefaultBody */ type GetQueryExampleDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -417,9 +410,7 @@ func (o *GetQueryExampleDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -435,7 +426,6 @@ func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -464,7 +454,6 @@ GetQueryExampleDefaultBodyDetailsItems0 get query example default body details i swagger:model GetQueryExampleDefaultBodyDetailsItems0 */ type GetQueryExampleDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -476,7 +465,6 @@ type GetQueryExampleDefaultBodyDetailsItems0 struct { func (o *GetQueryExampleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -514,7 +502,6 @@ func (o *GetQueryExampleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetQueryExampleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -578,7 +565,6 @@ GetQueryExampleOKBody GetQueryExampleResponse list of query examples. swagger:model GetQueryExampleOKBody */ type GetQueryExampleOKBody struct { - // query examples QueryExamples []*GetQueryExampleOKBodyQueryExamplesItems0 `json:"query_examples"` } @@ -638,9 +624,7 @@ func (o *GetQueryExampleOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.QueryExamples); i++ { - if o.QueryExamples[i] != nil { if swag.IsZero(o.QueryExamples[i]) { // not required @@ -656,7 +640,6 @@ func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context return err } } - } return nil @@ -685,7 +668,6 @@ GetQueryExampleOKBodyQueryExamplesItems0 QueryExample shows query examples and t swagger:model GetQueryExampleOKBodyQueryExamplesItems0 */ type GetQueryExampleOKBodyQueryExamplesItems0 struct { - // example Example string `json:"example,omitempty"` @@ -814,7 +796,6 @@ GetQueryExampleParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimens swagger:model GetQueryExampleParamsBodyLabelsItems0 */ type GetQueryExampleParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go b/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go index 367e78a912..3d94992021 100644 --- a/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go @@ -60,7 +60,6 @@ GetQueryPlanParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryPlanParams struct { - // Queryid. Queryid string @@ -130,7 +129,6 @@ func (o *GetQueryPlanParams) SetQueryid(queryid string) { // WriteToRequest writes these params to a swagger request func (o *GetQueryPlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_query_plan_responses.go b/api/qan/v1/json/client/qan_service/get_query_plan_responses.go index 888d4d3083..9bb8f78603 100644 --- a/api/qan/v1/json/client/qan_service/get_query_plan_responses.go +++ b/api/qan/v1/json/client/qan_service/get_query_plan_responses.go @@ -103,7 +103,6 @@ func (o *GetQueryPlanOK) GetPayload() *GetQueryPlanOKBody { } func (o *GetQueryPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetQueryPlanOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetQueryPlanDefault) GetPayload() *GetQueryPlanDefaultBody { } func (o *GetQueryPlanDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetQueryPlanDefaultBody) // response payload @@ -193,7 +191,6 @@ GetQueryPlanDefaultBody get query plan default body swagger:model GetQueryPlanDefaultBody */ type GetQueryPlanDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetQueryPlanDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -306,7 +300,6 @@ GetQueryPlanDefaultBodyDetailsItems0 get query plan default body details items0 swagger:model GetQueryPlanDefaultBodyDetailsItems0 */ type GetQueryPlanDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetQueryPlanDefaultBodyDetailsItems0 struct { func (o *GetQueryPlanDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetQueryPlanDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetQueryPlanDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetQueryPlanOKBody GetQueryPlanResponse contains planid and query_plan. swagger:model GetQueryPlanOKBody */ type GetQueryPlanOKBody struct { - // planid Planid string `json:"planid,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_report_parameters.go b/api/qan/v1/json/client/qan_service/get_report_parameters.go index 69d495bc6b..41494719a4 100644 --- a/api/qan/v1/json/client/qan_service/get_report_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_report_parameters.go @@ -60,7 +60,6 @@ GetReportParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetReportParams struct { - /* Body. ReportRequest defines filtering of metrics report for db server or other dimentions. @@ -133,7 +132,6 @@ func (o *GetReportParams) SetBody(body GetReportBody) { // WriteToRequest writes these params to a swagger request func (o *GetReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_report_responses.go b/api/qan/v1/json/client/qan_service/get_report_responses.go index bc186cb448..19383e587b 100644 --- a/api/qan/v1/json/client/qan_service/get_report_responses.go +++ b/api/qan/v1/json/client/qan_service/get_report_responses.go @@ -104,7 +104,6 @@ func (o *GetReportOK) GetPayload() *GetReportOKBody { } func (o *GetReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetReportOKBody) // response payload @@ -178,7 +177,6 @@ func (o *GetReportDefault) GetPayload() *GetReportDefaultBody { } func (o *GetReportDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetReportDefaultBody) // response payload @@ -194,7 +192,6 @@ GetReportBody ReportRequest defines filtering of metrics report for db server or swagger:model GetReportBody */ type GetReportBody struct { - // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -315,9 +312,7 @@ func (o *GetReportBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Labels); i++ { - if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -333,7 +328,6 @@ func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfm return err } } - } return nil @@ -362,7 +356,6 @@ GetReportDefaultBody get report default body swagger:model GetReportDefaultBody */ type GetReportDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -428,9 +421,7 @@ func (o *GetReportDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -446,7 +437,6 @@ func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -475,7 +465,6 @@ GetReportDefaultBodyDetailsItems0 get report default body details items0 swagger:model GetReportDefaultBodyDetailsItems0 */ type GetReportDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -487,7 +476,6 @@ type GetReportDefaultBodyDetailsItems0 struct { func (o *GetReportDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -525,7 +513,6 @@ func (o *GetReportDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetReportDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -589,7 +576,6 @@ GetReportOKBody ReportReply is list of reports per quieryids, hosts etc. swagger:model GetReportOKBody */ type GetReportOKBody struct { - // total rows TotalRows int64 `json:"total_rows,omitempty"` @@ -658,9 +644,7 @@ func (o *GetReportOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Rows); i++ { - if o.Rows[i] != nil { if swag.IsZero(o.Rows[i]) { // not required @@ -676,7 +660,6 @@ func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfm return err } } - } return nil @@ -705,7 +688,6 @@ GetReportOKBodyRowsItems0 Row define metrics for selected dimention. swagger:model GetReportOKBodyRowsItems0 */ type GetReportOKBodyRowsItems0 struct { - // rank Rank int64 `json:"rank,omitempty"` @@ -823,24 +805,19 @@ func (o *GetReportOKBodyRowsItems0) ContextValidate(ctx context.Context, formats } func (o *GetReportOKBodyRowsItems0) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { - for k := range o.Metrics { - if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } - } return nil } func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Sparkline); i++ { - if o.Sparkline[i] != nil { if swag.IsZero(o.Sparkline[i]) { // not required @@ -856,7 +833,6 @@ func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context return err } } - } return nil @@ -885,7 +861,6 @@ GetReportOKBodyRowsItems0MetricsAnon Metric cell. swagger:model GetReportOKBodyRowsItems0MetricsAnon */ type GetReportOKBodyRowsItems0MetricsAnon struct { - // stats Stats *GetReportOKBodyRowsItems0MetricsAnonStats `json:"stats,omitempty"` } @@ -938,7 +913,6 @@ func (o *GetReportOKBodyRowsItems0MetricsAnon) ContextValidate(ctx context.Conte } func (o *GetReportOKBodyRowsItems0MetricsAnon) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { - if o.Stats != nil { if swag.IsZero(o.Stats) { // not required @@ -981,7 +955,6 @@ GetReportOKBodyRowsItems0MetricsAnonStats Stat is statistics of specific metric. swagger:model GetReportOKBodyRowsItems0MetricsAnonStats */ type GetReportOKBodyRowsItems0MetricsAnonStats struct { - // rate Rate float32 `json:"rate,omitempty"` @@ -1041,7 +1014,6 @@ GetReportOKBodyRowsItems0SparklineItems0 Point contains values that represents a swagger:model GetReportOKBodyRowsItems0SparklineItems0 */ type GetReportOKBodyRowsItems0SparklineItems0 struct { - // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1274,7 +1246,6 @@ GetReportParamsBodyLabelsItems0 ReportMapFieldEntry allows to pass labels/diment swagger:model GetReportParamsBodyLabelsItems0 */ type GetReportParamsBodyLabelsItems0 struct { - // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/query_exists_parameters.go b/api/qan/v1/json/client/qan_service/query_exists_parameters.go index 21422ff17c..7650af6a9d 100644 --- a/api/qan/v1/json/client/qan_service/query_exists_parameters.go +++ b/api/qan/v1/json/client/qan_service/query_exists_parameters.go @@ -60,7 +60,6 @@ QueryExistsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type QueryExistsParams struct { - /* Body. QueryExistsRequest check if provided query exists or not. @@ -133,7 +132,6 @@ func (o *QueryExistsParams) SetBody(body QueryExistsBody) { // WriteToRequest writes these params to a swagger request func (o *QueryExistsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/query_exists_responses.go b/api/qan/v1/json/client/qan_service/query_exists_responses.go index db702bf180..e21f8d4b2f 100644 --- a/api/qan/v1/json/client/qan_service/query_exists_responses.go +++ b/api/qan/v1/json/client/qan_service/query_exists_responses.go @@ -103,7 +103,6 @@ func (o *QueryExistsOK) GetPayload() *QueryExistsOKBody { } func (o *QueryExistsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(QueryExistsOKBody) // response payload @@ -177,7 +176,6 @@ func (o *QueryExistsDefault) GetPayload() *QueryExistsDefaultBody { } func (o *QueryExistsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(QueryExistsDefaultBody) // response payload @@ -193,7 +191,6 @@ QueryExistsBody QueryExistsRequest check if provided query exists or not. swagger:model QueryExistsBody */ type QueryExistsBody struct { - // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -234,7 +231,6 @@ QueryExistsDefaultBody query exists default body swagger:model QueryExistsDefaultBody */ type QueryExistsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -300,9 +296,7 @@ func (o *QueryExistsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -318,7 +312,6 @@ func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -347,7 +340,6 @@ QueryExistsDefaultBodyDetailsItems0 query exists default body details items0 swagger:model QueryExistsDefaultBodyDetailsItems0 */ type QueryExistsDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -359,7 +351,6 @@ type QueryExistsDefaultBodyDetailsItems0 struct { func (o *QueryExistsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -397,7 +388,6 @@ func (o *QueryExistsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o QueryExistsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -461,7 +451,6 @@ QueryExistsOKBody QueryExistsResponse returns true if query exists. swagger:model QueryExistsOKBody */ type QueryExistsOKBody struct { - // exists Exists bool `json:"exists,omitempty"` } diff --git a/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go b/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go index 45d51b4b64..f0be4d869c 100644 --- a/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go +++ b/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go @@ -60,7 +60,6 @@ SchemaByQueryIDParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SchemaByQueryIDParams struct { - /* Body. SchemaByQueryIDRequest returns schema for given query ID and service ID. @@ -133,7 +132,6 @@ func (o *SchemaByQueryIDParams) SetBody(body SchemaByQueryIDBody) { // WriteToRequest writes these params to a swagger request func (o *SchemaByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go b/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go index a95d70829f..7856e075e9 100644 --- a/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go +++ b/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go @@ -103,7 +103,6 @@ func (o *SchemaByQueryIDOK) GetPayload() *SchemaByQueryIDOKBody { } func (o *SchemaByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SchemaByQueryIDOKBody) // response payload @@ -177,7 +176,6 @@ func (o *SchemaByQueryIDDefault) GetPayload() *SchemaByQueryIDDefaultBody { } func (o *SchemaByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(SchemaByQueryIDDefaultBody) // response payload @@ -193,7 +191,6 @@ SchemaByQueryIDBody SchemaByQueryIDRequest returns schema for given query ID and swagger:model SchemaByQueryIDBody */ type SchemaByQueryIDBody struct { - // service id ServiceID string `json:"service_id,omitempty"` @@ -234,7 +231,6 @@ SchemaByQueryIDDefaultBody schema by query ID default body swagger:model SchemaByQueryIDDefaultBody */ type SchemaByQueryIDDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -300,9 +296,7 @@ func (o *SchemaByQueryIDDefaultBody) ContextValidate(ctx context.Context, format } func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -318,7 +312,6 @@ func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -347,7 +340,6 @@ SchemaByQueryIDDefaultBodyDetailsItems0 schema by query ID default body details swagger:model SchemaByQueryIDDefaultBodyDetailsItems0 */ type SchemaByQueryIDDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -359,7 +351,6 @@ type SchemaByQueryIDDefaultBodyDetailsItems0 struct { func (o *SchemaByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -397,7 +388,6 @@ func (o *SchemaByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o SchemaByQueryIDDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -461,7 +451,6 @@ SchemaByQueryIDOKBody SchemaByQueryIDResponse is schema for given query ID and s swagger:model SchemaByQueryIDOKBody */ type SchemaByQueryIDOKBody struct { - // schema Schema string `json:"schema,omitempty"` } diff --git a/api/qan/v1/object_details.pb.go b/api/qan/v1/object_details.pb.go index 2c60c1a3a4..af39a8e43a 100644 --- a/api/qan/v1/object_details.pb.go +++ b/api/qan/v1/object_details.pb.go @@ -7,11 +7,12 @@ package qanv1 import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -1759,39 +1760,42 @@ func file_qan_v1_object_details_proto_rawDescGZIP() []byte { return file_qan_v1_object_details_proto_rawDescData } -var file_qan_v1_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 26) -var file_qan_v1_object_details_proto_goTypes = []any{ - (*GetMetricsRequest)(nil), // 0: qan.v1.GetMetricsRequest - (*GetMetricsResponse)(nil), // 1: qan.v1.GetMetricsResponse - (*MetricValues)(nil), // 2: qan.v1.MetricValues - (*Labels)(nil), // 3: qan.v1.Labels - (*GetQueryExampleRequest)(nil), // 4: qan.v1.GetQueryExampleRequest - (*GetQueryExampleResponse)(nil), // 5: qan.v1.GetQueryExampleResponse - (*QueryExample)(nil), // 6: qan.v1.QueryExample - (*GetLabelsRequest)(nil), // 7: qan.v1.GetLabelsRequest - (*GetLabelsResponse)(nil), // 8: qan.v1.GetLabelsResponse - (*ListLabelValues)(nil), // 9: qan.v1.ListLabelValues - (*GetQueryPlanRequest)(nil), // 10: qan.v1.GetQueryPlanRequest - (*GetQueryPlanResponse)(nil), // 11: qan.v1.GetQueryPlanResponse - (*GetHistogramRequest)(nil), // 12: qan.v1.GetHistogramRequest - (*GetHistogramResponse)(nil), // 13: qan.v1.GetHistogramResponse - (*HistogramItem)(nil), // 14: qan.v1.HistogramItem - (*QueryExistsRequest)(nil), // 15: qan.v1.QueryExistsRequest - (*QueryExistsResponse)(nil), // 16: qan.v1.QueryExistsResponse - (*SchemaByQueryIDRequest)(nil), // 17: qan.v1.SchemaByQueryIDRequest - (*SchemaByQueryIDResponse)(nil), // 18: qan.v1.SchemaByQueryIDResponse - (*ExplainFingerprintByQueryIDRequest)(nil), // 19: qan.v1.ExplainFingerprintByQueryIDRequest - (*ExplainFingerprintByQueryIDResponse)(nil), // 20: qan.v1.ExplainFingerprintByQueryIDResponse - (*GetSelectedQueryMetadataResponse)(nil), // 21: qan.v1.GetSelectedQueryMetadataResponse - nil, // 22: qan.v1.GetMetricsResponse.MetricsEntry - nil, // 23: qan.v1.GetMetricsResponse.TextMetricsEntry - nil, // 24: qan.v1.GetMetricsResponse.TotalsEntry - nil, // 25: qan.v1.GetLabelsResponse.LabelsEntry - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 27: qan.v1.MapFieldEntry - (*Point)(nil), // 28: qan.v1.Point - (ExampleType)(0), // 29: qan.v1.ExampleType -} +var ( + file_qan_v1_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 26) + file_qan_v1_object_details_proto_goTypes = []any{ + (*GetMetricsRequest)(nil), // 0: qan.v1.GetMetricsRequest + (*GetMetricsResponse)(nil), // 1: qan.v1.GetMetricsResponse + (*MetricValues)(nil), // 2: qan.v1.MetricValues + (*Labels)(nil), // 3: qan.v1.Labels + (*GetQueryExampleRequest)(nil), // 4: qan.v1.GetQueryExampleRequest + (*GetQueryExampleResponse)(nil), // 5: qan.v1.GetQueryExampleResponse + (*QueryExample)(nil), // 6: qan.v1.QueryExample + (*GetLabelsRequest)(nil), // 7: qan.v1.GetLabelsRequest + (*GetLabelsResponse)(nil), // 8: qan.v1.GetLabelsResponse + (*ListLabelValues)(nil), // 9: qan.v1.ListLabelValues + (*GetQueryPlanRequest)(nil), // 10: qan.v1.GetQueryPlanRequest + (*GetQueryPlanResponse)(nil), // 11: qan.v1.GetQueryPlanResponse + (*GetHistogramRequest)(nil), // 12: qan.v1.GetHistogramRequest + (*GetHistogramResponse)(nil), // 13: qan.v1.GetHistogramResponse + (*HistogramItem)(nil), // 14: qan.v1.HistogramItem + (*QueryExistsRequest)(nil), // 15: qan.v1.QueryExistsRequest + (*QueryExistsResponse)(nil), // 16: qan.v1.QueryExistsResponse + (*SchemaByQueryIDRequest)(nil), // 17: qan.v1.SchemaByQueryIDRequest + (*SchemaByQueryIDResponse)(nil), // 18: qan.v1.SchemaByQueryIDResponse + (*ExplainFingerprintByQueryIDRequest)(nil), // 19: qan.v1.ExplainFingerprintByQueryIDRequest + (*ExplainFingerprintByQueryIDResponse)(nil), // 20: qan.v1.ExplainFingerprintByQueryIDResponse + (*GetSelectedQueryMetadataResponse)(nil), // 21: qan.v1.GetSelectedQueryMetadataResponse + nil, // 22: qan.v1.GetMetricsResponse.MetricsEntry + nil, // 23: qan.v1.GetMetricsResponse.TextMetricsEntry + nil, // 24: qan.v1.GetMetricsResponse.TotalsEntry + nil, // 25: qan.v1.GetLabelsResponse.LabelsEntry + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 27: qan.v1.MapFieldEntry + (*Point)(nil), // 28: qan.v1.Point + (ExampleType)(0), // 29: qan.v1.ExampleType + } +) + var file_qan_v1_object_details_proto_depIdxs = []int32{ 26, // 0: qan.v1.GetMetricsRequest.period_start_from:type_name -> google.protobuf.Timestamp 26, // 1: qan.v1.GetMetricsRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/profile.pb.go b/api/qan/v1/profile.pb.go index 903e217600..49c017d4a7 100644 --- a/api/qan/v1/profile.pb.go +++ b/api/qan/v1/profile.pb.go @@ -7,11 +7,12 @@ package qanv1 import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" ) const ( @@ -625,18 +626,21 @@ func file_qan_v1_profile_proto_rawDescGZIP() []byte { return file_qan_v1_profile_proto_rawDescData } -var file_qan_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_qan_v1_profile_proto_goTypes = []any{ - (*GetReportRequest)(nil), // 0: qan.v1.GetReportRequest - (*ReportMapFieldEntry)(nil), // 1: qan.v1.ReportMapFieldEntry - (*GetReportResponse)(nil), // 2: qan.v1.GetReportResponse - (*Row)(nil), // 3: qan.v1.Row - (*Metric)(nil), // 4: qan.v1.Metric - (*Stat)(nil), // 5: qan.v1.Stat - nil, // 6: qan.v1.Row.MetricsEntry - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*Point)(nil), // 8: qan.v1.Point -} +var ( + file_qan_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) + file_qan_v1_profile_proto_goTypes = []any{ + (*GetReportRequest)(nil), // 0: qan.v1.GetReportRequest + (*ReportMapFieldEntry)(nil), // 1: qan.v1.ReportMapFieldEntry + (*GetReportResponse)(nil), // 2: qan.v1.GetReportResponse + (*Row)(nil), // 3: qan.v1.Row + (*Metric)(nil), // 4: qan.v1.Metric + (*Stat)(nil), // 5: qan.v1.Stat + nil, // 6: qan.v1.Row.MetricsEntry + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*Point)(nil), // 8: qan.v1.Point + } +) + var file_qan_v1_profile_proto_depIdxs = []int32{ 7, // 0: qan.v1.GetReportRequest.period_start_from:type_name -> google.protobuf.Timestamp 7, // 1: qan.v1.GetReportRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/qan.pb.go b/api/qan/v1/qan.pb.go index 8b995a5c6d..49eb549dbc 100644 --- a/api/qan/v1/qan.pb.go +++ b/api/qan/v1/qan.pb.go @@ -7,10 +7,11 @@ package qanv1 import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -1050,13 +1051,16 @@ func file_qan_v1_qan_proto_rawDescGZIP() []byte { return file_qan_v1_qan_proto_rawDescData } -var file_qan_v1_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_qan_v1_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_qan_v1_qan_proto_goTypes = []any{ - (ExampleType)(0), // 0: qan.v1.ExampleType - (*Point)(nil), // 1: qan.v1.Point - (*MapFieldEntry)(nil), // 2: qan.v1.MapFieldEntry -} +var ( + file_qan_v1_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_qan_v1_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) + file_qan_v1_qan_proto_goTypes = []any{ + (ExampleType)(0), // 0: qan.v1.ExampleType + (*Point)(nil), // 1: qan.v1.Point + (*MapFieldEntry)(nil), // 2: qan.v1.MapFieldEntry + } +) + var file_qan_v1_qan_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/qan/v1/service.pb.go b/api/qan/v1/service.pb.go index 2e63e0b028..5787f81592 100644 --- a/api/qan/v1/service.pb.go +++ b/api/qan/v1/service.pb.go @@ -7,12 +7,13 @@ package qanv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -284,32 +285,35 @@ func file_qan_v1_service_proto_rawDescGZIP() []byte { return file_qan_v1_service_proto_rawDescData } -var file_qan_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_qan_v1_service_proto_goTypes = []any{ - (*GetMetricsNamesRequest)(nil), // 0: qan.v1.GetMetricsNamesRequest - (*GetMetricsNamesResponse)(nil), // 1: qan.v1.GetMetricsNamesResponse - nil, // 2: qan.v1.GetMetricsNamesResponse.DataEntry - (*GetReportRequest)(nil), // 3: qan.v1.GetReportRequest - (*GetFilteredMetricsNamesRequest)(nil), // 4: qan.v1.GetFilteredMetricsNamesRequest - (*GetMetricsRequest)(nil), // 5: qan.v1.GetMetricsRequest - (*GetLabelsRequest)(nil), // 6: qan.v1.GetLabelsRequest - (*GetHistogramRequest)(nil), // 7: qan.v1.GetHistogramRequest - (*ExplainFingerprintByQueryIDRequest)(nil), // 8: qan.v1.ExplainFingerprintByQueryIDRequest - (*GetQueryPlanRequest)(nil), // 9: qan.v1.GetQueryPlanRequest - (*QueryExistsRequest)(nil), // 10: qan.v1.QueryExistsRequest - (*SchemaByQueryIDRequest)(nil), // 11: qan.v1.SchemaByQueryIDRequest - (*GetQueryExampleRequest)(nil), // 12: qan.v1.GetQueryExampleRequest - (*GetReportResponse)(nil), // 13: qan.v1.GetReportResponse - (*GetFilteredMetricsNamesResponse)(nil), // 14: qan.v1.GetFilteredMetricsNamesResponse - (*GetMetricsResponse)(nil), // 15: qan.v1.GetMetricsResponse - (*GetLabelsResponse)(nil), // 16: qan.v1.GetLabelsResponse - (*GetHistogramResponse)(nil), // 17: qan.v1.GetHistogramResponse - (*ExplainFingerprintByQueryIDResponse)(nil), // 18: qan.v1.ExplainFingerprintByQueryIDResponse - (*GetQueryPlanResponse)(nil), // 19: qan.v1.GetQueryPlanResponse - (*QueryExistsResponse)(nil), // 20: qan.v1.QueryExistsResponse - (*SchemaByQueryIDResponse)(nil), // 21: qan.v1.SchemaByQueryIDResponse - (*GetQueryExampleResponse)(nil), // 22: qan.v1.GetQueryExampleResponse -} +var ( + file_qan_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3) + file_qan_v1_service_proto_goTypes = []any{ + (*GetMetricsNamesRequest)(nil), // 0: qan.v1.GetMetricsNamesRequest + (*GetMetricsNamesResponse)(nil), // 1: qan.v1.GetMetricsNamesResponse + nil, // 2: qan.v1.GetMetricsNamesResponse.DataEntry + (*GetReportRequest)(nil), // 3: qan.v1.GetReportRequest + (*GetFilteredMetricsNamesRequest)(nil), // 4: qan.v1.GetFilteredMetricsNamesRequest + (*GetMetricsRequest)(nil), // 5: qan.v1.GetMetricsRequest + (*GetLabelsRequest)(nil), // 6: qan.v1.GetLabelsRequest + (*GetHistogramRequest)(nil), // 7: qan.v1.GetHistogramRequest + (*ExplainFingerprintByQueryIDRequest)(nil), // 8: qan.v1.ExplainFingerprintByQueryIDRequest + (*GetQueryPlanRequest)(nil), // 9: qan.v1.GetQueryPlanRequest + (*QueryExistsRequest)(nil), // 10: qan.v1.QueryExistsRequest + (*SchemaByQueryIDRequest)(nil), // 11: qan.v1.SchemaByQueryIDRequest + (*GetQueryExampleRequest)(nil), // 12: qan.v1.GetQueryExampleRequest + (*GetReportResponse)(nil), // 13: qan.v1.GetReportResponse + (*GetFilteredMetricsNamesResponse)(nil), // 14: qan.v1.GetFilteredMetricsNamesResponse + (*GetMetricsResponse)(nil), // 15: qan.v1.GetMetricsResponse + (*GetLabelsResponse)(nil), // 16: qan.v1.GetLabelsResponse + (*GetHistogramResponse)(nil), // 17: qan.v1.GetHistogramResponse + (*ExplainFingerprintByQueryIDResponse)(nil), // 18: qan.v1.ExplainFingerprintByQueryIDResponse + (*GetQueryPlanResponse)(nil), // 19: qan.v1.GetQueryPlanResponse + (*QueryExistsResponse)(nil), // 20: qan.v1.QueryExistsResponse + (*SchemaByQueryIDResponse)(nil), // 21: qan.v1.SchemaByQueryIDResponse + (*GetQueryExampleResponse)(nil), // 22: qan.v1.GetQueryExampleResponse + } +) + var file_qan_v1_service_proto_depIdxs = []int32{ 2, // 0: qan.v1.GetMetricsNamesResponse.data:type_name -> qan.v1.GetMetricsNamesResponse.DataEntry 3, // 1: qan.v1.QANService.GetReport:input_type -> qan.v1.GetReportRequest diff --git a/api/qan/v1/service.pb.gw.go b/api/qan/v1/service.pb.gw.go index 79903d4f40..7046112486 100644 --- a/api/qan/v1/service.pb.gw.go +++ b/api/qan/v1/service.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_QANService_GetReport_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetReportRequest @@ -41,7 +43,6 @@ func request_QANService_GetReport_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.GetReport(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_GetReport_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -54,7 +55,6 @@ func local_request_QANService_GetReport_0(ctx context.Context, marshaler runtime msg, err := server.GetReport(ctx, &protoReq) return msg, metadata, err - } func request_QANService_GetFilteredMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -67,7 +67,6 @@ func request_QANService_GetFilteredMetricsNames_0(ctx context.Context, marshaler msg, err := client.GetFilteredMetricsNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_GetFilteredMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -80,7 +79,6 @@ func local_request_QANService_GetFilteredMetricsNames_0(ctx context.Context, mar msg, err := server.GetFilteredMetricsNames(ctx, &protoReq) return msg, metadata, err - } func request_QANService_GetMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -93,7 +91,6 @@ func request_QANService_GetMetricsNames_0(ctx context.Context, marshaler runtime msg, err := client.GetMetricsNames(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_GetMetricsNames_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -106,7 +103,6 @@ func local_request_QANService_GetMetricsNames_0(ctx context.Context, marshaler r msg, err := server.GetMetricsNames(ctx, &protoReq) return msg, metadata, err - } func request_QANService_GetMetrics_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -119,7 +115,6 @@ func request_QANService_GetMetrics_0(ctx context.Context, marshaler runtime.Mars msg, err := client.GetMetrics(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_GetMetrics_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -132,7 +127,6 @@ func local_request_QANService_GetMetrics_0(ctx context.Context, marshaler runtim msg, err := server.GetMetrics(ctx, &protoReq) return msg, metadata, err - } func request_QANService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -145,7 +139,6 @@ func request_QANService_GetLabels_0(ctx context.Context, marshaler runtime.Marsh msg, err := client.GetLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -158,7 +151,6 @@ func local_request_QANService_GetLabels_0(ctx context.Context, marshaler runtime msg, err := server.GetLabels(ctx, &protoReq) return msg, metadata, err - } func request_QANService_GetHistogram_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -171,7 +163,6 @@ func request_QANService_GetHistogram_0(ctx context.Context, marshaler runtime.Ma msg, err := client.GetHistogram(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_GetHistogram_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -184,7 +175,6 @@ func local_request_QANService_GetHistogram_0(ctx context.Context, marshaler runt msg, err := server.GetHistogram(ctx, &protoReq) return msg, metadata, err - } func request_QANService_ExplainFingerprintByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -197,7 +187,6 @@ func request_QANService_ExplainFingerprintByQueryID_0(ctx context.Context, marsh msg, err := client.ExplainFingerprintByQueryID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_ExplainFingerprintByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -210,7 +199,6 @@ func local_request_QANService_ExplainFingerprintByQueryID_0(ctx context.Context, msg, err := server.ExplainFingerprintByQueryID(ctx, &protoReq) return msg, metadata, err - } func request_QANService_GetQueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -236,7 +224,6 @@ func request_QANService_GetQueryPlan_0(ctx context.Context, marshaler runtime.Ma msg, err := client.GetQueryPlan(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_GetQueryPlan_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -262,7 +249,6 @@ func local_request_QANService_GetQueryPlan_0(ctx context.Context, marshaler runt msg, err := server.GetQueryPlan(ctx, &protoReq) return msg, metadata, err - } func request_QANService_QueryExists_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -275,7 +261,6 @@ func request_QANService_QueryExists_0(ctx context.Context, marshaler runtime.Mar msg, err := client.QueryExists(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_QueryExists_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -288,7 +273,6 @@ func local_request_QANService_QueryExists_0(ctx context.Context, marshaler runti msg, err := server.QueryExists(ctx, &protoReq) return msg, metadata, err - } func request_QANService_SchemaByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -301,7 +285,6 @@ func request_QANService_SchemaByQueryID_0(ctx context.Context, marshaler runtime msg, err := client.SchemaByQueryID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_SchemaByQueryID_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -314,7 +297,6 @@ func local_request_QANService_SchemaByQueryID_0(ctx context.Context, marshaler r msg, err := server.SchemaByQueryID(ctx, &protoReq) return msg, metadata, err - } func request_QANService_GetQueryExample_0(ctx context.Context, marshaler runtime.Marshaler, client QANServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -327,7 +309,6 @@ func request_QANService_GetQueryExample_0(ctx context.Context, marshaler runtime msg, err := client.GetQueryExample(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_QANService_GetQueryExample_0(ctx context.Context, marshaler runtime.Marshaler, server QANServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -340,7 +321,6 @@ func local_request_QANService_GetQueryExample_0(ctx context.Context, marshaler r msg, err := server.GetQueryExample(ctx, &protoReq) return msg, metadata, err - } // RegisterQANServiceHandlerServer registers the http handlers for service QANService to "mux". @@ -349,7 +329,6 @@ func local_request_QANService_GetQueryExample_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQANServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QANServiceServer) error { - mux.Handle("POST", pattern_QANService_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -372,7 +351,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetReport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetFilteredMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -397,7 +375,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetFilteredMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -422,7 +399,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -447,7 +423,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -472,7 +447,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetHistogram_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -497,7 +471,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetHistogram_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_ExplainFingerprintByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -522,7 +495,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_ExplainFingerprintByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_QANService_GetQueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -547,7 +519,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetQueryPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_QueryExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -572,7 +543,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_QueryExists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_SchemaByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -597,7 +567,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_SchemaByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetQueryExample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -622,7 +591,6 @@ func RegisterQANServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetQueryExample_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -665,7 +633,6 @@ func RegisterQANServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "QANServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QANServiceClient) error { - mux.Handle("POST", pattern_QANService_GetReport_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -685,7 +652,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetReport_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetFilteredMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -707,7 +673,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetFilteredMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetMetricsNames_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -729,7 +694,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetMetricsNames_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetMetrics_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -751,7 +715,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetMetrics_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -773,7 +736,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetLabels_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetHistogram_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -795,7 +757,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetHistogram_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_ExplainFingerprintByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -817,7 +778,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_ExplainFingerprintByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_QANService_GetQueryPlan_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -839,7 +799,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetQueryPlan_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_QueryExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -861,7 +820,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_QueryExists_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_SchemaByQueryID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -883,7 +841,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_SchemaByQueryID_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_QANService_GetQueryExample_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -905,7 +862,6 @@ func RegisterQANServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, } forward_QANService_GetQueryExample_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/qan/v1/service_grpc.pb.go b/api/qan/v1/service_grpc.pb.go index acef2a20cf..75fc7b8118 100644 --- a/api/qan/v1/service_grpc.pb.go +++ b/api/qan/v1/service_grpc.pb.go @@ -8,6 +8,7 @@ package qanv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -221,33 +222,43 @@ type UnimplementedQANServiceServer struct{} func (UnimplementedQANServiceServer) GetReport(context.Context, *GetReportRequest) (*GetReportResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetReport not implemented") } + func (UnimplementedQANServiceServer) GetFilteredMetricsNames(context.Context, *GetFilteredMetricsNamesRequest) (*GetFilteredMetricsNamesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFilteredMetricsNames not implemented") } + func (UnimplementedQANServiceServer) GetMetricsNames(context.Context, *GetMetricsNamesRequest) (*GetMetricsNamesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetricsNames not implemented") } + func (UnimplementedQANServiceServer) GetMetrics(context.Context, *GetMetricsRequest) (*GetMetricsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMetrics not implemented") } + func (UnimplementedQANServiceServer) GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented") } + func (UnimplementedQANServiceServer) GetHistogram(context.Context, *GetHistogramRequest) (*GetHistogramResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetHistogram not implemented") } + func (UnimplementedQANServiceServer) ExplainFingerprintByQueryID(context.Context, *ExplainFingerprintByQueryIDRequest) (*ExplainFingerprintByQueryIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExplainFingerprintByQueryID not implemented") } + func (UnimplementedQANServiceServer) GetQueryPlan(context.Context, *GetQueryPlanRequest) (*GetQueryPlanResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQueryPlan not implemented") } + func (UnimplementedQANServiceServer) QueryExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryExists not implemented") } + func (UnimplementedQANServiceServer) SchemaByQueryID(context.Context, *SchemaByQueryIDRequest) (*SchemaByQueryIDResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SchemaByQueryID not implemented") } + func (UnimplementedQANServiceServer) GetQueryExample(context.Context, *GetQueryExampleRequest) (*GetQueryExampleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetQueryExample not implemented") } diff --git a/api/server/v1/httperror.pb.go b/api/server/v1/httperror.pb.go index 7033239ec8..15550a0c7f 100644 --- a/api/server/v1/httperror.pb.go +++ b/api/server/v1/httperror.pb.go @@ -7,11 +7,12 @@ package serverv1 import ( + reflect "reflect" + sync "sync" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" - reflect "reflect" - sync "sync" ) const ( @@ -133,11 +134,14 @@ func file_server_v1_httperror_proto_rawDescGZIP() []byte { return file_server_v1_httperror_proto_rawDescData } -var file_server_v1_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_server_v1_httperror_proto_goTypes = []any{ - (*HttpError)(nil), // 0: server.v1.HttpError - (*anypb.Any)(nil), // 1: google.protobuf.Any -} +var ( + file_server_v1_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) + file_server_v1_httperror_proto_goTypes = []any{ + (*HttpError)(nil), // 0: server.v1.HttpError + (*anypb.Any)(nil), // 1: google.protobuf.Any + } +) + var file_server_v1_httperror_proto_depIdxs = []int32{ 1, // 0: server.v1.HttpError.details:type_name -> google.protobuf.Any 1, // [1:1] is the sub-list for method output_type diff --git a/api/server/v1/json/client/server_service/change_settings_parameters.go b/api/server/v1/json/client/server_service/change_settings_parameters.go index 8fd09d8309..12afd77da3 100644 --- a/api/server/v1/json/client/server_service/change_settings_parameters.go +++ b/api/server/v1/json/client/server_service/change_settings_parameters.go @@ -60,7 +60,6 @@ ChangeSettingsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeSettingsParams struct { - // Body. Body ChangeSettingsBody @@ -130,7 +129,6 @@ func (o *ChangeSettingsParams) SetBody(body ChangeSettingsBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/change_settings_responses.go b/api/server/v1/json/client/server_service/change_settings_responses.go index 6014f3bc4b..e8dbdc0e8d 100644 --- a/api/server/v1/json/client/server_service/change_settings_responses.go +++ b/api/server/v1/json/client/server_service/change_settings_responses.go @@ -103,7 +103,6 @@ func (o *ChangeSettingsOK) GetPayload() *ChangeSettingsOKBody { } func (o *ChangeSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeSettingsOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ChangeSettingsDefault) GetPayload() *ChangeSettingsDefaultBody { } func (o *ChangeSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ChangeSettingsDefaultBody) // response payload @@ -193,7 +191,6 @@ ChangeSettingsBody change settings body swagger:model ChangeSettingsBody */ type ChangeSettingsBody struct { - // enable updates EnableUpdates *bool `json:"enable_updates,omitempty"` @@ -336,7 +333,6 @@ func (o *ChangeSettingsBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeSettingsBody) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { - if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -357,7 +353,6 @@ func (o *ChangeSettingsBody) contextValidateAdvisorRunIntervals(ctx context.Cont } func (o *ChangeSettingsBody) contextValidateAWSPartitions(ctx context.Context, formats strfmt.Registry) error { - if o.AWSPartitions != nil { if swag.IsZero(o.AWSPartitions) { // not required @@ -378,7 +373,6 @@ func (o *ChangeSettingsBody) contextValidateAWSPartitions(ctx context.Context, f } func (o *ChangeSettingsBody) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -421,7 +415,6 @@ ChangeSettingsDefaultBody change settings default body swagger:model ChangeSettingsDefaultBody */ type ChangeSettingsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -487,9 +480,7 @@ func (o *ChangeSettingsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -505,7 +496,6 @@ func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -618,7 +608,6 @@ ChangeSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized pr swagger:model ChangeSettingsDefaultBodyDetailsItems0 */ type ChangeSettingsDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -657,7 +646,6 @@ type ChangeSettingsDefaultBodyDetailsItems0 struct { func (o *ChangeSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -722,7 +710,6 @@ func (o *ChangeSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeSettingsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -813,7 +800,6 @@ ChangeSettingsOKBody change settings OK body swagger:model ChangeSettingsOKBody */ type ChangeSettingsOKBody struct { - // settings Settings *ChangeSettingsOKBodySettings `json:"settings,omitempty"` } @@ -866,7 +852,6 @@ func (o *ChangeSettingsOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ChangeSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { - if o.Settings != nil { if swag.IsZero(o.Settings) { // not required @@ -909,7 +894,6 @@ ChangeSettingsOKBodySettings Settings represents PMM Server settings. swagger:model ChangeSettingsOKBodySettings */ type ChangeSettingsOKBodySettings struct { - // True if updates are enabled. UpdatesEnabled bool `json:"updates_enabled,omitempty"` @@ -1037,7 +1021,6 @@ func (o *ChangeSettingsOKBodySettings) ContextValidate(ctx context.Context, form } func (o *ChangeSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { - if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -1058,7 +1041,6 @@ func (o *ChangeSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx co } func (o *ChangeSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1101,7 +1083,6 @@ ChangeSettingsOKBodySettingsAdvisorRunIntervals AdvisorRunIntervals represents i swagger:model ChangeSettingsOKBodySettingsAdvisorRunIntervals */ type ChangeSettingsOKBodySettingsAdvisorRunIntervals struct { - // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -1145,7 +1126,6 @@ ChangeSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeSettingsOKBodySettingsMetricsResolutions */ type ChangeSettingsOKBodySettingsMetricsResolutions struct { - // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -1189,7 +1169,6 @@ ChangeSettingsParamsBodyAWSPartitions A wrapper for a string array. This type al swagger:model ChangeSettingsParamsBodyAWSPartitions */ type ChangeSettingsParamsBodyAWSPartitions struct { - // values Values []string `json:"values"` } @@ -1227,7 +1206,6 @@ ChangeSettingsParamsBodyAdvisorRunIntervals AdvisorRunIntervals represents inter swagger:model ChangeSettingsParamsBodyAdvisorRunIntervals */ type ChangeSettingsParamsBodyAdvisorRunIntervals struct { - // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -1271,7 +1249,6 @@ ChangeSettingsParamsBodyMetricsResolutions MetricsResolutions represents Prometh swagger:model ChangeSettingsParamsBodyMetricsResolutions */ type ChangeSettingsParamsBodyMetricsResolutions struct { - // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` diff --git a/api/server/v1/json/client/server_service/check_updates_parameters.go b/api/server/v1/json/client/server_service/check_updates_parameters.go index 601149cc3e..9bf5b1322d 100644 --- a/api/server/v1/json/client/server_service/check_updates_parameters.go +++ b/api/server/v1/json/client/server_service/check_updates_parameters.go @@ -61,7 +61,6 @@ CheckUpdatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CheckUpdatesParams struct { - /* Force. If false, cached information may be returned. @@ -151,7 +150,6 @@ func (o *CheckUpdatesParams) SetOnlyInstalledVersion(onlyInstalledVersion *bool) // WriteToRequest writes these params to a swagger request func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -167,7 +165,6 @@ func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qForce := swag.FormatBool(qrForce) if qForce != "" { - if err := r.SetQueryParam("force", qForce); err != nil { return err } @@ -184,7 +181,6 @@ func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qOnlyInstalledVersion := swag.FormatBool(qrOnlyInstalledVersion) if qOnlyInstalledVersion != "" { - if err := r.SetQueryParam("only_installed_version", qOnlyInstalledVersion); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/check_updates_responses.go b/api/server/v1/json/client/server_service/check_updates_responses.go index cc429561ac..093065dd97 100644 --- a/api/server/v1/json/client/server_service/check_updates_responses.go +++ b/api/server/v1/json/client/server_service/check_updates_responses.go @@ -104,7 +104,6 @@ func (o *CheckUpdatesOK) GetPayload() *CheckUpdatesOKBody { } func (o *CheckUpdatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CheckUpdatesOKBody) // response payload @@ -178,7 +177,6 @@ func (o *CheckUpdatesDefault) GetPayload() *CheckUpdatesDefaultBody { } func (o *CheckUpdatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(CheckUpdatesDefaultBody) // response payload @@ -194,7 +192,6 @@ CheckUpdatesDefaultBody check updates default body swagger:model CheckUpdatesDefaultBody */ type CheckUpdatesDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *CheckUpdatesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -391,7 +385,6 @@ CheckUpdatesDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model CheckUpdatesDefaultBodyDetailsItems0 */ type CheckUpdatesDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -430,7 +423,6 @@ type CheckUpdatesDefaultBodyDetailsItems0 struct { func (o *CheckUpdatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -495,7 +487,6 @@ func (o *CheckUpdatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o CheckUpdatesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -586,7 +577,6 @@ CheckUpdatesOKBody check updates OK body swagger:model CheckUpdatesOKBody */ type CheckUpdatesOKBody struct { - // True if there is a PMM Server update available. UpdateAvailable bool `json:"update_available,omitempty"` @@ -695,7 +685,6 @@ func (o *CheckUpdatesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, formats strfmt.Registry) error { - if o.Installed != nil { if swag.IsZero(o.Installed) { // not required @@ -716,7 +705,6 @@ func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, forma } func (o *CheckUpdatesOKBody) contextValidateLatest(ctx context.Context, formats strfmt.Registry) error { - if o.Latest != nil { if swag.IsZero(o.Latest) { // not required @@ -759,7 +747,6 @@ CheckUpdatesOKBodyInstalled VersionInfo describes component version, or PMM Serv swagger:model CheckUpdatesOKBodyInstalled */ type CheckUpdatesOKBodyInstalled struct { - // User-visible version. Version string `json:"version,omitempty"` @@ -825,7 +812,6 @@ CheckUpdatesOKBodyLatest check updates OK body latest swagger:model CheckUpdatesOKBodyLatest */ type CheckUpdatesOKBodyLatest struct { - // PMM Version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/json/client/server_service/get_settings_parameters.go b/api/server/v1/json/client/server_service/get_settings_parameters.go index f41cc41534..a25fa8d3b2 100644 --- a/api/server/v1/json/client/server_service/get_settings_parameters.go +++ b/api/server/v1/json/client/server_service/get_settings_parameters.go @@ -115,7 +115,6 @@ func (o *GetSettingsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/get_settings_responses.go b/api/server/v1/json/client/server_service/get_settings_responses.go index de95c91cb3..5431615125 100644 --- a/api/server/v1/json/client/server_service/get_settings_responses.go +++ b/api/server/v1/json/client/server_service/get_settings_responses.go @@ -103,7 +103,6 @@ func (o *GetSettingsOK) GetPayload() *GetSettingsOKBody { } func (o *GetSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetSettingsOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetSettingsDefault) GetPayload() *GetSettingsDefaultBody { } func (o *GetSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetSettingsDefaultBody) // response payload @@ -193,7 +191,6 @@ GetSettingsDefaultBody get settings default body swagger:model GetSettingsDefaultBody */ type GetSettingsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetSettingsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -390,7 +384,6 @@ GetSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model GetSettingsDefaultBodyDetailsItems0 */ type GetSettingsDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -429,7 +422,6 @@ type GetSettingsDefaultBodyDetailsItems0 struct { func (o *GetSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -494,7 +486,6 @@ func (o *GetSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetSettingsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -585,7 +576,6 @@ GetSettingsOKBody get settings OK body swagger:model GetSettingsOKBody */ type GetSettingsOKBody struct { - // settings Settings *GetSettingsOKBodySettings `json:"settings,omitempty"` } @@ -638,7 +628,6 @@ func (o *GetSettingsOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { - if o.Settings != nil { if swag.IsZero(o.Settings) { // not required @@ -681,7 +670,6 @@ GetSettingsOKBodySettings Settings represents PMM Server settings. swagger:model GetSettingsOKBodySettings */ type GetSettingsOKBodySettings struct { - // True if updates are enabled. UpdatesEnabled bool `json:"updates_enabled,omitempty"` @@ -809,7 +797,6 @@ func (o *GetSettingsOKBodySettings) ContextValidate(ctx context.Context, formats } func (o *GetSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { - if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -830,7 +817,6 @@ func (o *GetSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx conte } func (o *GetSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { - if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -873,7 +859,6 @@ GetSettingsOKBodySettingsAdvisorRunIntervals AdvisorRunIntervals represents inte swagger:model GetSettingsOKBodySettingsAdvisorRunIntervals */ type GetSettingsOKBodySettingsAdvisorRunIntervals struct { - // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -917,7 +902,6 @@ GetSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Promet swagger:model GetSettingsOKBodySettingsMetricsResolutions */ type GetSettingsOKBodySettingsMetricsResolutions struct { - // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` diff --git a/api/server/v1/json/client/server_service/leader_health_check_parameters.go b/api/server/v1/json/client/server_service/leader_health_check_parameters.go index 4cb5355dc7..86cdd9c398 100644 --- a/api/server/v1/json/client/server_service/leader_health_check_parameters.go +++ b/api/server/v1/json/client/server_service/leader_health_check_parameters.go @@ -115,7 +115,6 @@ func (o *LeaderHealthCheckParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *LeaderHealthCheckParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/leader_health_check_responses.go b/api/server/v1/json/client/server_service/leader_health_check_responses.go index 4ba7a4a496..b1deec1fbd 100644 --- a/api/server/v1/json/client/server_service/leader_health_check_responses.go +++ b/api/server/v1/json/client/server_service/leader_health_check_responses.go @@ -103,7 +103,6 @@ func (o *LeaderHealthCheckOK) GetPayload() interface{} { } func (o *LeaderHealthCheckOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *LeaderHealthCheckDefault) GetPayload() *LeaderHealthCheckDefaultBody { } func (o *LeaderHealthCheckDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(LeaderHealthCheckDefaultBody) // response payload @@ -191,7 +189,6 @@ LeaderHealthCheckDefaultBody leader health check default body swagger:model LeaderHealthCheckDefaultBody */ type LeaderHealthCheckDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *LeaderHealthCheckDefaultBody) ContextValidate(ctx context.Context, form } func (o *LeaderHealthCheckDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *LeaderHealthCheckDefaultBody) contextValidateDetails(ctx context.Contex return err } } - } return nil @@ -388,7 +382,6 @@ LeaderHealthCheckDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized swagger:model LeaderHealthCheckDefaultBodyDetailsItems0 */ type LeaderHealthCheckDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -427,7 +420,6 @@ type LeaderHealthCheckDefaultBodyDetailsItems0 struct { func (o *LeaderHealthCheckDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -492,7 +484,6 @@ func (o *LeaderHealthCheckDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o LeaderHealthCheckDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/server/v1/json/client/server_service/list_change_logs_parameters.go b/api/server/v1/json/client/server_service/list_change_logs_parameters.go index b801f277d1..4160eaf6fa 100644 --- a/api/server/v1/json/client/server_service/list_change_logs_parameters.go +++ b/api/server/v1/json/client/server_service/list_change_logs_parameters.go @@ -115,7 +115,6 @@ func (o *ListChangeLogsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListChangeLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/list_change_logs_responses.go b/api/server/v1/json/client/server_service/list_change_logs_responses.go index 384991c84e..8abd8afe26 100644 --- a/api/server/v1/json/client/server_service/list_change_logs_responses.go +++ b/api/server/v1/json/client/server_service/list_change_logs_responses.go @@ -104,7 +104,6 @@ func (o *ListChangeLogsOK) GetPayload() *ListChangeLogsOKBody { } func (o *ListChangeLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListChangeLogsOKBody) // response payload @@ -178,7 +177,6 @@ func (o *ListChangeLogsDefault) GetPayload() *ListChangeLogsDefaultBody { } func (o *ListChangeLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListChangeLogsDefaultBody) // response payload @@ -194,7 +192,6 @@ ListChangeLogsDefaultBody list change logs default body swagger:model ListChangeLogsDefaultBody */ type ListChangeLogsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *ListChangeLogsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListChangeLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *ListChangeLogsDefaultBody) contextValidateDetails(ctx context.Context, return err } } - } return nil @@ -391,7 +385,6 @@ ListChangeLogsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized pr swagger:model ListChangeLogsDefaultBodyDetailsItems0 */ type ListChangeLogsDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -430,7 +423,6 @@ type ListChangeLogsDefaultBodyDetailsItems0 struct { func (o *ListChangeLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -495,7 +487,6 @@ func (o *ListChangeLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ListChangeLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -586,7 +577,6 @@ ListChangeLogsOKBody list change logs OK body swagger:model ListChangeLogsOKBody */ type ListChangeLogsOKBody struct { - // List of available updates. Updates []*ListChangeLogsOKBodyUpdatesItems0 `json:"updates"` @@ -666,9 +656,7 @@ func (o *ListChangeLogsOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ListChangeLogsOKBody) contextValidateUpdates(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Updates); i++ { - if o.Updates[i] != nil { if swag.IsZero(o.Updates[i]) { // not required @@ -684,7 +672,6 @@ func (o *ListChangeLogsOKBody) contextValidateUpdates(ctx context.Context, forma return err } } - } return nil @@ -713,7 +700,6 @@ ListChangeLogsOKBodyUpdatesItems0 list change logs OK body updates items0 swagger:model ListChangeLogsOKBodyUpdatesItems0 */ type ListChangeLogsOKBodyUpdatesItems0 struct { - // PMM Version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/json/client/server_service/logs_parameters.go b/api/server/v1/json/client/server_service/logs_parameters.go index 31b876d12f..eac190ca90 100644 --- a/api/server/v1/json/client/server_service/logs_parameters.go +++ b/api/server/v1/json/client/server_service/logs_parameters.go @@ -61,7 +61,6 @@ LogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type LogsParams struct { - /* Pprof. Include performance profiling data, @@ -134,7 +133,6 @@ func (o *LogsParams) SetPprof(pprof *bool) { // WriteToRequest writes these params to a swagger request func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -150,7 +148,6 @@ func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry } qPprof := swag.FormatBool(qrPprof) if qPprof != "" { - if err := r.SetQueryParam("pprof", qPprof); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/logs_responses.go b/api/server/v1/json/client/server_service/logs_responses.go index e7b5e1a6b7..51d28dc669 100644 --- a/api/server/v1/json/client/server_service/logs_responses.go +++ b/api/server/v1/json/client/server_service/logs_responses.go @@ -46,7 +46,6 @@ func (o *LogsReader) ReadResponse(response runtime.ClientResponse, consumer runt // NewLogsOK creates a LogsOK with default headers values func NewLogsOK(writer io.Writer) *LogsOK { return &LogsOK{ - Payload: writer, } } @@ -103,7 +102,6 @@ func (o *LogsOK) GetPayload() io.Writer { } func (o *LogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +173,6 @@ func (o *LogsDefault) GetPayload() *LogsDefaultBody { } func (o *LogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(LogsDefaultBody) // response payload @@ -191,7 +188,6 @@ LogsDefaultBody ErrorResponse is a message returned on HTTP error. swagger:model LogsDefaultBody */ type LogsDefaultBody struct { - // code Code int32 `json:"code,omitempty"` diff --git a/api/server/v1/json/client/server_service/readiness_parameters.go b/api/server/v1/json/client/server_service/readiness_parameters.go index ed27b25482..88fbc32380 100644 --- a/api/server/v1/json/client/server_service/readiness_parameters.go +++ b/api/server/v1/json/client/server_service/readiness_parameters.go @@ -115,7 +115,6 @@ func (o *ReadinessParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ReadinessParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/readiness_responses.go b/api/server/v1/json/client/server_service/readiness_responses.go index ac87e89462..eb6439b803 100644 --- a/api/server/v1/json/client/server_service/readiness_responses.go +++ b/api/server/v1/json/client/server_service/readiness_responses.go @@ -103,7 +103,6 @@ func (o *ReadinessOK) GetPayload() interface{} { } func (o *ReadinessOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err @@ -175,7 +174,6 @@ func (o *ReadinessDefault) GetPayload() *ReadinessDefaultBody { } func (o *ReadinessDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ReadinessDefaultBody) // response payload @@ -191,7 +189,6 @@ ReadinessDefaultBody readiness default body swagger:model ReadinessDefaultBody */ type ReadinessDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -257,9 +254,7 @@ func (o *ReadinessDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -275,7 +270,6 @@ func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -388,7 +382,6 @@ ReadinessDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protoco swagger:model ReadinessDefaultBodyDetailsItems0 */ type ReadinessDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -427,7 +420,6 @@ type ReadinessDefaultBodyDetailsItems0 struct { func (o *ReadinessDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -492,7 +484,6 @@ func (o *ReadinessDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ReadinessDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/server/v1/json/client/server_service/start_update_parameters.go b/api/server/v1/json/client/server_service/start_update_parameters.go index 9ee4645d34..82bb6c7915 100644 --- a/api/server/v1/json/client/server_service/start_update_parameters.go +++ b/api/server/v1/json/client/server_service/start_update_parameters.go @@ -60,7 +60,6 @@ StartUpdateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartUpdateParams struct { - // Body. Body StartUpdateBody @@ -130,7 +129,6 @@ func (o *StartUpdateParams) SetBody(body StartUpdateBody) { // WriteToRequest writes these params to a swagger request func (o *StartUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/start_update_responses.go b/api/server/v1/json/client/server_service/start_update_responses.go index 058a9b72b5..e84a835d03 100644 --- a/api/server/v1/json/client/server_service/start_update_responses.go +++ b/api/server/v1/json/client/server_service/start_update_responses.go @@ -103,7 +103,6 @@ func (o *StartUpdateOK) GetPayload() *StartUpdateOKBody { } func (o *StartUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartUpdateOKBody) // response payload @@ -177,7 +176,6 @@ func (o *StartUpdateDefault) GetPayload() *StartUpdateDefaultBody { } func (o *StartUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(StartUpdateDefaultBody) // response payload @@ -193,7 +191,6 @@ StartUpdateBody start update body swagger:model StartUpdateBody */ type StartUpdateBody struct { - // new image NewImage string `json:"new_image,omitempty"` } @@ -231,7 +228,6 @@ StartUpdateDefaultBody start update default body swagger:model StartUpdateDefaultBody */ type StartUpdateDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -297,9 +293,7 @@ func (o *StartUpdateDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -315,7 +309,6 @@ func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, for return err } } - } return nil @@ -428,7 +421,6 @@ StartUpdateDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model StartUpdateDefaultBodyDetailsItems0 */ type StartUpdateDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -467,7 +459,6 @@ type StartUpdateDefaultBodyDetailsItems0 struct { func (o *StartUpdateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -532,7 +523,6 @@ func (o *StartUpdateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartUpdateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -623,7 +613,6 @@ StartUpdateOKBody start update OK body swagger:model StartUpdateOKBody */ type StartUpdateOKBody struct { - // Authentication token for getting update statuses. AuthToken string `json:"auth_token,omitempty"` diff --git a/api/server/v1/json/client/server_service/update_status_parameters.go b/api/server/v1/json/client/server_service/update_status_parameters.go index fe3f759e40..c9ad778284 100644 --- a/api/server/v1/json/client/server_service/update_status_parameters.go +++ b/api/server/v1/json/client/server_service/update_status_parameters.go @@ -60,7 +60,6 @@ UpdateStatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateStatusParams struct { - // Body. Body UpdateStatusBody @@ -130,7 +129,6 @@ func (o *UpdateStatusParams) SetBody(body UpdateStatusBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/update_status_responses.go b/api/server/v1/json/client/server_service/update_status_responses.go index 1b6b7fe741..b09accb8ca 100644 --- a/api/server/v1/json/client/server_service/update_status_responses.go +++ b/api/server/v1/json/client/server_service/update_status_responses.go @@ -103,7 +103,6 @@ func (o *UpdateStatusOK) GetPayload() *UpdateStatusOKBody { } func (o *UpdateStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateStatusOKBody) // response payload @@ -177,7 +176,6 @@ func (o *UpdateStatusDefault) GetPayload() *UpdateStatusDefaultBody { } func (o *UpdateStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateStatusDefaultBody) // response payload @@ -193,7 +191,6 @@ UpdateStatusBody update status body swagger:model UpdateStatusBody */ type UpdateStatusBody struct { - // Authentication token. AuthToken string `json:"auth_token,omitempty"` @@ -234,7 +231,6 @@ UpdateStatusDefaultBody update status default body swagger:model UpdateStatusDefaultBody */ type UpdateStatusDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -300,9 +296,7 @@ func (o *UpdateStatusDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -318,7 +312,6 @@ func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } - } return nil @@ -431,7 +424,6 @@ UpdateStatusDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model UpdateStatusDefaultBodyDetailsItems0 */ type UpdateStatusDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -470,7 +462,6 @@ type UpdateStatusDefaultBodyDetailsItems0 struct { func (o *UpdateStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -535,7 +526,6 @@ func (o *UpdateStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateStatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -626,7 +616,6 @@ UpdateStatusOKBody update status OK body swagger:model UpdateStatusOKBody */ type UpdateStatusOKBody struct { - // Progress log lines. LogLines []string `json:"log_lines"` diff --git a/api/server/v1/json/client/server_service/version_parameters.go b/api/server/v1/json/client/server_service/version_parameters.go index 3712817fa8..89ff607417 100644 --- a/api/server/v1/json/client/server_service/version_parameters.go +++ b/api/server/v1/json/client/server_service/version_parameters.go @@ -60,7 +60,6 @@ VersionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type VersionParams struct { - /* Dummy. Dummy parameter for internal testing. Do not use. @@ -133,7 +132,6 @@ func (o *VersionParams) SetDummy(dummy *string) { // WriteToRequest writes these params to a swagger request func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -149,7 +147,6 @@ func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qDummy := qrDummy if qDummy != "" { - if err := r.SetQueryParam("dummy", qDummy); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/version_responses.go b/api/server/v1/json/client/server_service/version_responses.go index aeff9e043c..4cf40e1d0c 100644 --- a/api/server/v1/json/client/server_service/version_responses.go +++ b/api/server/v1/json/client/server_service/version_responses.go @@ -104,7 +104,6 @@ func (o *VersionOK) GetPayload() *VersionOKBody { } func (o *VersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(VersionOKBody) // response payload @@ -178,7 +177,6 @@ func (o *VersionDefault) GetPayload() *VersionDefaultBody { } func (o *VersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(VersionDefaultBody) // response payload @@ -194,7 +192,6 @@ VersionDefaultBody version default body swagger:model VersionDefaultBody */ type VersionDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -260,9 +257,7 @@ func (o *VersionDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -278,7 +273,6 @@ func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -391,7 +385,6 @@ VersionDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol swagger:model VersionDefaultBodyDetailsItems0 */ type VersionDefaultBodyDetailsItems0 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -430,7 +423,6 @@ type VersionDefaultBodyDetailsItems0 struct { func (o *VersionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -495,7 +487,6 @@ func (o *VersionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o VersionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -586,7 +577,6 @@ VersionOKBody version OK body swagger:model VersionOKBody */ type VersionOKBody struct { - // PMM Server version. Version string `json:"version,omitempty"` @@ -734,7 +724,6 @@ func (o *VersionOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strfmt.Registry) error { - if o.Managed != nil { if swag.IsZero(o.Managed) { // not required @@ -755,7 +744,6 @@ func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strf } func (o *VersionOKBody) contextValidateServer(ctx context.Context, formats strfmt.Registry) error { - if o.Server != nil { if swag.IsZero(o.Server) { // not required @@ -798,7 +786,6 @@ VersionOKBodyManaged VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyManaged */ type VersionOKBodyManaged struct { - // User-visible version. Version string `json:"version,omitempty"` @@ -864,7 +851,6 @@ VersionOKBodyServer VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyServer */ type VersionOKBodyServer struct { - // User-visible version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/server.pb.go b/api/server/v1/server.pb.go index 68ebfac20c..5afb755095 100644 --- a/api/server/v1/server.pb.go +++ b/api/server/v1/server.pb.go @@ -7,15 +7,17 @@ package serverv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" + + common "github.com/percona/pmm/api/common" ) const ( @@ -1946,37 +1948,40 @@ func file_server_v1_server_proto_rawDescGZIP() []byte { return file_server_v1_server_proto_rawDescData } -var file_server_v1_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_server_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_server_v1_server_proto_goTypes = []any{ - (DistributionMethod)(0), // 0: server.v1.DistributionMethod - (*VersionInfo)(nil), // 1: server.v1.VersionInfo - (*VersionRequest)(nil), // 2: server.v1.VersionRequest - (*VersionResponse)(nil), // 3: server.v1.VersionResponse - (*ReadinessRequest)(nil), // 4: server.v1.ReadinessRequest - (*ReadinessResponse)(nil), // 5: server.v1.ReadinessResponse - (*LeaderHealthCheckRequest)(nil), // 6: server.v1.LeaderHealthCheckRequest - (*LeaderHealthCheckResponse)(nil), // 7: server.v1.LeaderHealthCheckResponse - (*CheckUpdatesRequest)(nil), // 8: server.v1.CheckUpdatesRequest - (*DockerVersionInfo)(nil), // 9: server.v1.DockerVersionInfo - (*CheckUpdatesResponse)(nil), // 10: server.v1.CheckUpdatesResponse - (*ListChangeLogsRequest)(nil), // 11: server.v1.ListChangeLogsRequest - (*ListChangeLogsResponse)(nil), // 12: server.v1.ListChangeLogsResponse - (*StartUpdateRequest)(nil), // 13: server.v1.StartUpdateRequest - (*StartUpdateResponse)(nil), // 14: server.v1.StartUpdateResponse - (*UpdateStatusRequest)(nil), // 15: server.v1.UpdateStatusRequest - (*UpdateStatusResponse)(nil), // 16: server.v1.UpdateStatusResponse - (*MetricsResolutions)(nil), // 17: server.v1.MetricsResolutions - (*AdvisorRunIntervals)(nil), // 18: server.v1.AdvisorRunIntervals - (*Settings)(nil), // 19: server.v1.Settings - (*GetSettingsRequest)(nil), // 20: server.v1.GetSettingsRequest - (*GetSettingsResponse)(nil), // 21: server.v1.GetSettingsResponse - (*ChangeSettingsRequest)(nil), // 22: server.v1.ChangeSettingsRequest - (*ChangeSettingsResponse)(nil), // 23: server.v1.ChangeSettingsResponse - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 25: google.protobuf.Duration - (*common.StringArray)(nil), // 26: common.StringArray -} +var ( + file_server_v1_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_server_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 23) + file_server_v1_server_proto_goTypes = []any{ + (DistributionMethod)(0), // 0: server.v1.DistributionMethod + (*VersionInfo)(nil), // 1: server.v1.VersionInfo + (*VersionRequest)(nil), // 2: server.v1.VersionRequest + (*VersionResponse)(nil), // 3: server.v1.VersionResponse + (*ReadinessRequest)(nil), // 4: server.v1.ReadinessRequest + (*ReadinessResponse)(nil), // 5: server.v1.ReadinessResponse + (*LeaderHealthCheckRequest)(nil), // 6: server.v1.LeaderHealthCheckRequest + (*LeaderHealthCheckResponse)(nil), // 7: server.v1.LeaderHealthCheckResponse + (*CheckUpdatesRequest)(nil), // 8: server.v1.CheckUpdatesRequest + (*DockerVersionInfo)(nil), // 9: server.v1.DockerVersionInfo + (*CheckUpdatesResponse)(nil), // 10: server.v1.CheckUpdatesResponse + (*ListChangeLogsRequest)(nil), // 11: server.v1.ListChangeLogsRequest + (*ListChangeLogsResponse)(nil), // 12: server.v1.ListChangeLogsResponse + (*StartUpdateRequest)(nil), // 13: server.v1.StartUpdateRequest + (*StartUpdateResponse)(nil), // 14: server.v1.StartUpdateResponse + (*UpdateStatusRequest)(nil), // 15: server.v1.UpdateStatusRequest + (*UpdateStatusResponse)(nil), // 16: server.v1.UpdateStatusResponse + (*MetricsResolutions)(nil), // 17: server.v1.MetricsResolutions + (*AdvisorRunIntervals)(nil), // 18: server.v1.AdvisorRunIntervals + (*Settings)(nil), // 19: server.v1.Settings + (*GetSettingsRequest)(nil), // 20: server.v1.GetSettingsRequest + (*GetSettingsResponse)(nil), // 21: server.v1.GetSettingsResponse + (*ChangeSettingsRequest)(nil), // 22: server.v1.ChangeSettingsRequest + (*ChangeSettingsResponse)(nil), // 23: server.v1.ChangeSettingsResponse + (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 25: google.protobuf.Duration + (*common.StringArray)(nil), // 26: common.StringArray + } +) + var file_server_v1_server_proto_depIdxs = []int32{ 24, // 0: server.v1.VersionInfo.timestamp:type_name -> google.protobuf.Timestamp 1, // 1: server.v1.VersionResponse.server:type_name -> server.v1.VersionInfo diff --git a/api/server/v1/server.pb.gw.go b/api/server/v1/server.pb.gw.go index a9cb941776..26253aedbb 100644 --- a/api/server/v1/server.pb.gw.go +++ b/api/server/v1/server.pb.gw.go @@ -24,17 +24,17 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - var ( - filter_ServerService_Version_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) +var filter_ServerService_Version_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + func request_ServerService_Version_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq VersionRequest var metadata runtime.ServerMetadata @@ -48,7 +48,6 @@ func request_ServerService_Version_0(ctx context.Context, marshaler runtime.Mars msg, err := client.Version(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_Version_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -64,7 +63,6 @@ func local_request_ServerService_Version_0(ctx context.Context, marshaler runtim msg, err := server.Version(ctx, &protoReq) return msg, metadata, err - } func request_ServerService_Readiness_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -73,7 +71,6 @@ func request_ServerService_Readiness_0(ctx context.Context, marshaler runtime.Ma msg, err := client.Readiness(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_Readiness_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -82,7 +79,6 @@ func local_request_ServerService_Readiness_0(ctx context.Context, marshaler runt msg, err := server.Readiness(ctx, &protoReq) return msg, metadata, err - } func request_ServerService_LeaderHealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -91,7 +87,6 @@ func request_ServerService_LeaderHealthCheck_0(ctx context.Context, marshaler ru msg, err := client.LeaderHealthCheck(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_LeaderHealthCheck_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -100,12 +95,9 @@ func local_request_ServerService_LeaderHealthCheck_0(ctx context.Context, marsha msg, err := server.LeaderHealthCheck(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_ServerService_CheckUpdates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +var filter_ServerService_CheckUpdates_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} func request_ServerService_CheckUpdates_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CheckUpdatesRequest @@ -120,7 +112,6 @@ func request_ServerService_CheckUpdates_0(ctx context.Context, marshaler runtime msg, err := client.CheckUpdates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_CheckUpdates_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -136,7 +127,6 @@ func local_request_ServerService_CheckUpdates_0(ctx context.Context, marshaler r msg, err := server.CheckUpdates(ctx, &protoReq) return msg, metadata, err - } func request_ServerService_ListChangeLogs_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -145,7 +135,6 @@ func request_ServerService_ListChangeLogs_0(ctx context.Context, marshaler runti msg, err := client.ListChangeLogs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_ListChangeLogs_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -154,7 +143,6 @@ func local_request_ServerService_ListChangeLogs_0(ctx context.Context, marshaler msg, err := server.ListChangeLogs(ctx, &protoReq) return msg, metadata, err - } func request_ServerService_StartUpdate_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -167,7 +155,6 @@ func request_ServerService_StartUpdate_0(ctx context.Context, marshaler runtime. msg, err := client.StartUpdate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_StartUpdate_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -180,7 +167,6 @@ func local_request_ServerService_StartUpdate_0(ctx context.Context, marshaler ru msg, err := server.StartUpdate(ctx, &protoReq) return msg, metadata, err - } func request_ServerService_UpdateStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -193,7 +179,6 @@ func request_ServerService_UpdateStatus_0(ctx context.Context, marshaler runtime msg, err := client.UpdateStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_UpdateStatus_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -206,7 +191,6 @@ func local_request_ServerService_UpdateStatus_0(ctx context.Context, marshaler r msg, err := server.UpdateStatus(ctx, &protoReq) return msg, metadata, err - } func request_ServerService_GetSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -215,7 +199,6 @@ func request_ServerService_GetSettings_0(ctx context.Context, marshaler runtime. msg, err := client.GetSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_GetSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -224,7 +207,6 @@ func local_request_ServerService_GetSettings_0(ctx context.Context, marshaler ru msg, err := server.GetSettings(ctx, &protoReq) return msg, metadata, err - } func request_ServerService_ChangeSettings_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -237,7 +219,6 @@ func request_ServerService_ChangeSettings_0(ctx context.Context, marshaler runti msg, err := client.ChangeSettings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_ServerService_ChangeSettings_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -250,7 +231,6 @@ func local_request_ServerService_ChangeSettings_0(ctx context.Context, marshaler msg, err := server.ChangeSettings(ctx, &protoReq) return msg, metadata, err - } // RegisterServerServiceHandlerServer registers the http handlers for service ServerService to "mux". @@ -259,7 +239,6 @@ func local_request_ServerService_ChangeSettings_0(ctx context.Context, marshaler // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServerServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServerServiceServer) error { - mux.Handle("GET", pattern_ServerService_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -282,7 +261,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_Readiness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -307,7 +285,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_Readiness_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_LeaderHealthCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -332,7 +309,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_LeaderHealthCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_CheckUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -357,7 +333,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_CheckUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_ListChangeLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -382,7 +357,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ListChangeLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ServerService_StartUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -407,7 +381,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_StartUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ServerService_UpdateStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -432,7 +405,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_UpdateStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_GetSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -457,7 +429,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_GetSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_ServerService_ChangeSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -482,7 +453,6 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -525,7 +495,6 @@ func RegisterServerServiceHandler(ctx context.Context, mux *runtime.ServeMux, co // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServerServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerServiceClient) error { - mux.Handle("GET", pattern_ServerService_Version_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -545,7 +514,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_Version_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_Readiness_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -567,7 +535,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_Readiness_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_LeaderHealthCheck_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -589,7 +556,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_LeaderHealthCheck_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_CheckUpdates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -611,7 +577,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_CheckUpdates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_ListChangeLogs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -633,7 +598,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ListChangeLogs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ServerService_StartUpdate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -655,7 +619,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_StartUpdate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("POST", pattern_ServerService_UpdateStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -677,7 +640,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_UpdateStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_ServerService_GetSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -699,7 +661,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_GetSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_ServerService_ChangeSettings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -721,7 +682,6 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/server/v1/server.pb.validate.go b/api/server/v1/server.pb.validate.go index b14ed39f7f..48dad7e546 100644 --- a/api/server/v1/server.pb.validate.go +++ b/api/server/v1/server.pb.validate.go @@ -2907,7 +2907,6 @@ func (m *ChangeSettingsRequest) validate(all bool) error { } if m.AwsPartitions != nil { - if all { switch v := interface{}(m.GetAwsPartitions()).(type) { case interface{ ValidateAll() error }: @@ -2936,7 +2935,6 @@ func (m *ChangeSettingsRequest) validate(all bool) error { } } } - } if m.EnableAdvisor != nil { diff --git a/api/server/v1/server_grpc.pb.go b/api/server/v1/server_grpc.pb.go index 17cf2c8ee6..1e91e3cc14 100644 --- a/api/server/v1/server_grpc.pb.go +++ b/api/server/v1/server_grpc.pb.go @@ -8,6 +8,7 @@ package serverv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -193,27 +194,35 @@ type UnimplementedServerServiceServer struct{} func (UnimplementedServerServiceServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") } + func (UnimplementedServerServiceServer) Readiness(context.Context, *ReadinessRequest) (*ReadinessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Readiness not implemented") } + func (UnimplementedServerServiceServer) LeaderHealthCheck(context.Context, *LeaderHealthCheckRequest) (*LeaderHealthCheckResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method LeaderHealthCheck not implemented") } + func (UnimplementedServerServiceServer) CheckUpdates(context.Context, *CheckUpdatesRequest) (*CheckUpdatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckUpdates not implemented") } + func (UnimplementedServerServiceServer) ListChangeLogs(context.Context, *ListChangeLogsRequest) (*ListChangeLogsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListChangeLogs not implemented") } + func (UnimplementedServerServiceServer) StartUpdate(context.Context, *StartUpdateRequest) (*StartUpdateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StartUpdate not implemented") } + func (UnimplementedServerServiceServer) UpdateStatus(context.Context, *UpdateStatusRequest) (*UpdateStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStatus not implemented") } + func (UnimplementedServerServiceServer) GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSettings not implemented") } + func (UnimplementedServerServiceServer) ChangeSettings(context.Context, *ChangeSettingsRequest) (*ChangeSettingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangeSettings not implemented") } diff --git a/api/uievents/v1/server.pb.go b/api/uievents/v1/server.pb.go index aef7f50cb2..22a36775af 100644 --- a/api/uievents/v1/server.pb.go +++ b/api/uievents/v1/server.pb.go @@ -7,12 +7,13 @@ package uieventsv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -528,16 +529,19 @@ func file_uievents_v1_server_proto_rawDescGZIP() []byte { return file_uievents_v1_server_proto_rawDescData } -var file_uievents_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_uievents_v1_server_proto_goTypes = []any{ - (*NotificationEvent)(nil), // 0: uievents.v1.NotificationEvent - (*FetchingEvent)(nil), // 1: uievents.v1.FetchingEvent - (*DashboardUsageEvent)(nil), // 2: uievents.v1.DashboardUsageEvent - (*UserFlowEvent)(nil), // 3: uievents.v1.UserFlowEvent - (*StoreRequest)(nil), // 4: uievents.v1.StoreRequest - (*StoreResponse)(nil), // 5: uievents.v1.StoreResponse - nil, // 6: uievents.v1.UserFlowEvent.ParamsEntry -} +var ( + file_uievents_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) + file_uievents_v1_server_proto_goTypes = []any{ + (*NotificationEvent)(nil), // 0: uievents.v1.NotificationEvent + (*FetchingEvent)(nil), // 1: uievents.v1.FetchingEvent + (*DashboardUsageEvent)(nil), // 2: uievents.v1.DashboardUsageEvent + (*UserFlowEvent)(nil), // 3: uievents.v1.UserFlowEvent + (*StoreRequest)(nil), // 4: uievents.v1.StoreRequest + (*StoreResponse)(nil), // 5: uievents.v1.StoreResponse + nil, // 6: uievents.v1.UserFlowEvent.ParamsEntry + } +) + var file_uievents_v1_server_proto_depIdxs = []int32{ 6, // 0: uievents.v1.UserFlowEvent.params:type_name -> uievents.v1.UserFlowEvent.ParamsEntry 0, // 1: uievents.v1.StoreRequest.notifications:type_name -> uievents.v1.NotificationEvent diff --git a/api/uievents/v1/server.pb.gw.go b/api/uievents/v1/server.pb.gw.go index c42a546251..784ea0403f 100644 --- a/api/uievents/v1/server.pb.gw.go +++ b/api/uievents/v1/server.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_UIEventsService_Store_0(ctx context.Context, marshaler runtime.Marshaler, client UIEventsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq StoreRequest @@ -41,7 +43,6 @@ func request_UIEventsService_Store_0(ctx context.Context, marshaler runtime.Mars msg, err := client.Store(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UIEventsService_Store_0(ctx context.Context, marshaler runtime.Marshaler, server UIEventsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -54,7 +55,6 @@ func local_request_UIEventsService_Store_0(ctx context.Context, marshaler runtim msg, err := server.Store(ctx, &protoReq) return msg, metadata, err - } // RegisterUIEventsServiceHandlerServer registers the http handlers for service UIEventsService to "mux". @@ -63,7 +63,6 @@ func local_request_UIEventsService_Store_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUIEventsServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterUIEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UIEventsServiceServer) error { - mux.Handle("POST", pattern_UIEventsService_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -86,7 +85,6 @@ func RegisterUIEventsServiceHandlerServer(ctx context.Context, mux *runtime.Serv } forward_UIEventsService_Store_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -129,7 +127,6 @@ func RegisterUIEventsServiceHandler(ctx context.Context, mux *runtime.ServeMux, // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UIEventsServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterUIEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UIEventsServiceClient) error { - mux.Handle("POST", pattern_UIEventsService_Store_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -149,16 +146,11 @@ func RegisterUIEventsServiceHandlerClient(ctx context.Context, mux *runtime.Serv } forward_UIEventsService_Store_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil } -var ( - pattern_UIEventsService_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) -) +var pattern_UIEventsService_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) -var ( - forward_UIEventsService_Store_0 = runtime.ForwardResponseMessage -) +var forward_UIEventsService_Store_0 = runtime.ForwardResponseMessage diff --git a/api/uievents/v1/server_grpc.pb.go b/api/uievents/v1/server_grpc.pb.go index b392738521..b763803e1f 100644 --- a/api/uievents/v1/server_grpc.pb.go +++ b/api/uievents/v1/server_grpc.pb.go @@ -8,6 +8,7 @@ package uieventsv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/user/v1/json/client/user_service/get_user_parameters.go b/api/user/v1/json/client/user_service/get_user_parameters.go index 8bf63bd7f8..9d7ebe5ff7 100644 --- a/api/user/v1/json/client/user_service/get_user_parameters.go +++ b/api/user/v1/json/client/user_service/get_user_parameters.go @@ -115,7 +115,6 @@ func (o *GetUserParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/get_user_responses.go b/api/user/v1/json/client/user_service/get_user_responses.go index 5fd99d2fc3..e9ef71e832 100644 --- a/api/user/v1/json/client/user_service/get_user_responses.go +++ b/api/user/v1/json/client/user_service/get_user_responses.go @@ -103,7 +103,6 @@ func (o *GetUserOK) GetPayload() *GetUserOKBody { } func (o *GetUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetUserOKBody) // response payload @@ -177,7 +176,6 @@ func (o *GetUserDefault) GetPayload() *GetUserDefaultBody { } func (o *GetUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(GetUserDefaultBody) // response payload @@ -193,7 +191,6 @@ GetUserDefaultBody get user default body swagger:model GetUserDefaultBody */ type GetUserDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *GetUserDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } - } return nil @@ -306,7 +300,6 @@ GetUserDefaultBodyDetailsItems0 get user default body details items0 swagger:model GetUserDefaultBodyDetailsItems0 */ type GetUserDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type GetUserDefaultBodyDetailsItems0 struct { func (o *GetUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *GetUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetUserDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ GetUserOKBody get user OK body swagger:model GetUserOKBody */ type GetUserOKBody struct { - // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/json/client/user_service/list_users_parameters.go b/api/user/v1/json/client/user_service/list_users_parameters.go index d5b20ea07c..1d3c35510b 100644 --- a/api/user/v1/json/client/user_service/list_users_parameters.go +++ b/api/user/v1/json/client/user_service/list_users_parameters.go @@ -115,7 +115,6 @@ func (o *ListUsersParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/list_users_responses.go b/api/user/v1/json/client/user_service/list_users_responses.go index 01ece2d1c9..2c5cfcf892 100644 --- a/api/user/v1/json/client/user_service/list_users_responses.go +++ b/api/user/v1/json/client/user_service/list_users_responses.go @@ -103,7 +103,6 @@ func (o *ListUsersOK) GetPayload() *ListUsersOKBody { } func (o *ListUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListUsersOKBody) // response payload @@ -177,7 +176,6 @@ func (o *ListUsersDefault) GetPayload() *ListUsersDefaultBody { } func (o *ListUsersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(ListUsersDefaultBody) // response payload @@ -193,7 +191,6 @@ ListUsersDefaultBody list users default body swagger:model ListUsersDefaultBody */ type ListUsersDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -259,9 +256,7 @@ func (o *ListUsersDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -277,7 +272,6 @@ func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } - } return nil @@ -306,7 +300,6 @@ ListUsersDefaultBodyDetailsItems0 list users default body details items0 swagger:model ListUsersDefaultBodyDetailsItems0 */ type ListUsersDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -318,7 +311,6 @@ type ListUsersDefaultBodyDetailsItems0 struct { func (o *ListUsersDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -356,7 +348,6 @@ func (o *ListUsersDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListUsersDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -420,7 +411,6 @@ ListUsersOKBody list users OK body swagger:model ListUsersOKBody */ type ListUsersOKBody struct { - // users Users []*ListUsersOKBodyUsersItems0 `json:"users"` } @@ -480,9 +470,7 @@ func (o *ListUsersOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Users); i++ { - if o.Users[i] != nil { if swag.IsZero(o.Users[i]) { // not required @@ -498,7 +486,6 @@ func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strf return err } } - } return nil @@ -527,7 +514,6 @@ ListUsersOKBodyUsersItems0 list users OK body users items0 swagger:model ListUsersOKBodyUsersItems0 */ type ListUsersOKBodyUsersItems0 struct { - // user id UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/json/client/user_service/update_user_parameters.go b/api/user/v1/json/client/user_service/update_user_parameters.go index d98c9c45bb..c1e0a19fa5 100644 --- a/api/user/v1/json/client/user_service/update_user_parameters.go +++ b/api/user/v1/json/client/user_service/update_user_parameters.go @@ -60,7 +60,6 @@ UpdateUserParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateUserParams struct { - // Body. Body UpdateUserBody @@ -130,7 +129,6 @@ func (o *UpdateUserParams) SetBody(body UpdateUserBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/update_user_responses.go b/api/user/v1/json/client/user_service/update_user_responses.go index f3ddbaa09d..93a7ec4357 100644 --- a/api/user/v1/json/client/user_service/update_user_responses.go +++ b/api/user/v1/json/client/user_service/update_user_responses.go @@ -103,7 +103,6 @@ func (o *UpdateUserOK) GetPayload() *UpdateUserOKBody { } func (o *UpdateUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateUserOKBody) // response payload @@ -177,7 +176,6 @@ func (o *UpdateUserDefault) GetPayload() *UpdateUserDefaultBody { } func (o *UpdateUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(UpdateUserDefaultBody) // response payload @@ -193,7 +191,6 @@ UpdateUserBody update user body swagger:model UpdateUserBody */ type UpdateUserBody struct { - // Product Tour ProductTourCompleted *bool `json:"product_tour_completed,omitempty"` @@ -237,7 +234,6 @@ UpdateUserDefaultBody update user default body swagger:model UpdateUserDefaultBody */ type UpdateUserDefaultBody struct { - // code Code int32 `json:"code,omitempty"` @@ -303,9 +299,7 @@ func (o *UpdateUserDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -321,7 +315,6 @@ func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, form return err } } - } return nil @@ -350,7 +343,6 @@ UpdateUserDefaultBodyDetailsItems0 update user default body details items0 swagger:model UpdateUserDefaultBodyDetailsItems0 */ type UpdateUserDefaultBodyDetailsItems0 struct { - // at type AtType string `json:"@type,omitempty"` @@ -362,7 +354,6 @@ type UpdateUserDefaultBodyDetailsItems0 struct { func (o *UpdateUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -400,7 +391,6 @@ func (o *UpdateUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateUserDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { - // at type AtType string `json:"@type,omitempty"` } @@ -464,7 +454,6 @@ UpdateUserOKBody update user OK body swagger:model UpdateUserOKBody */ type UpdateUserOKBody struct { - // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/user.pb.go b/api/user/v1/user.pb.go index 159b850422..703d234e8b 100644 --- a/api/user/v1/user.pb.go +++ b/api/user/v1/user.pb.go @@ -7,12 +7,13 @@ package userv1 import ( + reflect "reflect" + sync "sync" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( @@ -521,16 +522,19 @@ func file_user_v1_user_proto_rawDescGZIP() []byte { return file_user_v1_user_proto_rawDescData } -var file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_user_v1_user_proto_goTypes = []any{ - (*GetUserRequest)(nil), // 0: user.v1.GetUserRequest - (*GetUserResponse)(nil), // 1: user.v1.GetUserResponse - (*UpdateUserRequest)(nil), // 2: user.v1.UpdateUserRequest - (*UpdateUserResponse)(nil), // 3: user.v1.UpdateUserResponse - (*ListUsersRequest)(nil), // 4: user.v1.ListUsersRequest - (*ListUsersResponse)(nil), // 5: user.v1.ListUsersResponse - (*ListUsersResponse_UserDetail)(nil), // 6: user.v1.ListUsersResponse.UserDetail -} +var ( + file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 7) + file_user_v1_user_proto_goTypes = []any{ + (*GetUserRequest)(nil), // 0: user.v1.GetUserRequest + (*GetUserResponse)(nil), // 1: user.v1.GetUserResponse + (*UpdateUserRequest)(nil), // 2: user.v1.UpdateUserRequest + (*UpdateUserResponse)(nil), // 3: user.v1.UpdateUserResponse + (*ListUsersRequest)(nil), // 4: user.v1.ListUsersRequest + (*ListUsersResponse)(nil), // 5: user.v1.ListUsersResponse + (*ListUsersResponse_UserDetail)(nil), // 6: user.v1.ListUsersResponse.UserDetail + } +) + var file_user_v1_user_proto_depIdxs = []int32{ 6, // 0: user.v1.ListUsersResponse.users:type_name -> user.v1.ListUsersResponse.UserDetail 0, // 1: user.v1.UserService.GetUser:input_type -> user.v1.GetUserRequest diff --git a/api/user/v1/user.pb.gw.go b/api/user/v1/user.pb.gw.go index 0f372e1c20..890714f191 100644 --- a/api/user/v1/user.pb.gw.go +++ b/api/user/v1/user.pb.gw.go @@ -24,12 +24,14 @@ import ( ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join +var ( + _ codes.Code + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join +) func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetUserRequest @@ -37,7 +39,6 @@ func request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marsha msg, err := client.GetUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -46,7 +47,6 @@ func local_request_UserService_GetUser_0(ctx context.Context, marshaler runtime. msg, err := server.GetUser(ctx, &protoReq) return msg, metadata, err - } func request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -59,7 +59,6 @@ func request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Mar msg, err := client.UpdateUser(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_UpdateUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -72,7 +71,6 @@ func local_request_UserService_UpdateUser_0(ctx context.Context, marshaler runti msg, err := server.UpdateUser(ctx, &protoReq) return msg, metadata, err - } func request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -81,7 +79,6 @@ func request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ListUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -90,7 +87,6 @@ func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtim msg, err := server.ListUsers(ctx, &protoReq) return msg, metadata, err - } // RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". @@ -99,7 +95,6 @@ func local_request_UserService_ListUsers_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead. // GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error { - mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -122,7 +117,6 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -147,7 +141,6 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_UserService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -172,7 +165,6 @@ func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux } forward_UserService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -215,7 +207,6 @@ func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "UserServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error { - mux.Handle("GET", pattern_UserService_GetUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -235,7 +226,6 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_UserService_GetUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("PUT", pattern_UserService_UpdateUser_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -257,7 +247,6 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_UserService_UpdateUser_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) mux.Handle("GET", pattern_UserService_ListUsers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -279,7 +268,6 @@ func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux } forward_UserService_ListUsers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil diff --git a/api/user/v1/user_grpc.pb.go b/api/user/v1/user_grpc.pb.go index 307067de16..2a74efe6ff 100644 --- a/api/user/v1/user_grpc.pb.go +++ b/api/user/v1/user_grpc.pb.go @@ -8,6 +8,7 @@ package userv1 import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -95,9 +96,11 @@ type UnimplementedUserServiceServer struct{} func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } + func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") } + func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented") } diff --git a/managed/services/agents/encryption.key b/managed/services/agents/encryption.key new file mode 100644 index 0000000000..98c161d058 --- /dev/null +++ b/managed/services/agents/encryption.key @@ -0,0 +1 @@ +CKSprv8IEmQKWAowdHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUuY3J5cHRvLnRpbmsuQWVzR2NtS2V5EiIaIMxMAgxuYisbREYQUSmC4DsGOHJ/EVBhQa5SC0+j9cj9GAEQARikqa7/CCAB \ No newline at end of file diff --git a/managed/services/alerting/mock_grafana_client_test.go b/managed/services/alerting/mock_grafana_client_test.go new file mode 100644 index 0000000000..b0af805207 --- /dev/null +++ b/managed/services/alerting/mock_grafana_client_test.go @@ -0,0 +1,108 @@ +// Code generated by mockery. DO NOT EDIT. + +package alerting + +import ( + context "context" + + gapi "github.com/grafana/grafana-api-golang-client" + mock "github.com/stretchr/testify/mock" + + services "github.com/percona/pmm/managed/services" +) + +// mockGrafanaClient is an autogenerated mock type for the grafanaClient type +type mockGrafanaClient struct { + mock.Mock +} + +// CreateAlertRule provides a mock function with given fields: ctx, folderUID, groupName, interval, rule +func (_m *mockGrafanaClient) CreateAlertRule(ctx context.Context, folderUID string, groupName string, interval string, rule *services.Rule) error { + ret := _m.Called(ctx, folderUID, groupName, interval, rule) + + if len(ret) == 0 { + panic("no return value specified for CreateAlertRule") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *services.Rule) error); ok { + r0 = rf(ctx, folderUID, groupName, interval, rule) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// GetDatasourceUIDByID provides a mock function with given fields: ctx, id +func (_m *mockGrafanaClient) GetDatasourceUIDByID(ctx context.Context, id int64) (string, error) { + ret := _m.Called(ctx, id) + + if len(ret) == 0 { + panic("no return value specified for GetDatasourceUIDByID") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, int64) (string, error)); ok { + return rf(ctx, id) + } + if rf, ok := ret.Get(0).(func(context.Context, int64) string); ok { + r0 = rf(ctx, id) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, int64) error); ok { + r1 = rf(ctx, id) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetFolderByUID provides a mock function with given fields: ctx, uid +func (_m *mockGrafanaClient) GetFolderByUID(ctx context.Context, uid string) (*gapi.Folder, error) { + ret := _m.Called(ctx, uid) + + if len(ret) == 0 { + panic("no return value specified for GetFolderByUID") + } + + var r0 *gapi.Folder + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (*gapi.Folder, error)); ok { + return rf(ctx, uid) + } + if rf, ok := ret.Get(0).(func(context.Context, string) *gapi.Folder); ok { + r0 = rf(ctx, uid) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*gapi.Folder) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, uid) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockGrafanaClient creates a new instance of mockGrafanaClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockGrafanaClient(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockGrafanaClient { + mock := &mockGrafanaClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/backup/mock_agent_service_test.go b/managed/services/backup/mock_agent_service_test.go new file mode 100644 index 0000000000..8c94ca89f5 --- /dev/null +++ b/managed/services/backup/mock_agent_service_test.go @@ -0,0 +1,47 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + mock "github.com/stretchr/testify/mock" + + models "github.com/percona/pmm/managed/models" +) + +// mockAgentService is an autogenerated mock type for the agentService type +type mockAgentService struct { + mock.Mock +} + +// PBMSwitchPITR provides a mock function with given fields: pmmAgentID, dsn, files, tdp, enabled +func (_m *mockAgentService) PBMSwitchPITR(pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair, enabled bool) error { + ret := _m.Called(pmmAgentID, dsn, files, tdp, enabled) + + if len(ret) == 0 { + panic("no return value specified for PBMSwitchPITR") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, map[string]string, *models.DelimiterPair, bool) error); ok { + r0 = rf(pmmAgentID, dsn, files, tdp, enabled) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockAgentService creates a new instance of mockAgentService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAgentService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAgentService { + mock := &mockAgentService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/backup/mock_compatibility_service_test.go b/managed/services/backup/mock_compatibility_service_test.go new file mode 100644 index 0000000000..8573887dfb --- /dev/null +++ b/managed/services/backup/mock_compatibility_service_test.go @@ -0,0 +1,75 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockCompatibilityService is an autogenerated mock type for the compatibilityService type +type mockCompatibilityService struct { + mock.Mock +} + +// CheckArtifactCompatibility provides a mock function with given fields: artifactID, targetDBVersion +func (_m *mockCompatibilityService) CheckArtifactCompatibility(artifactID string, targetDBVersion string) error { + ret := _m.Called(artifactID, targetDBVersion) + + if len(ret) == 0 { + panic("no return value specified for CheckArtifactCompatibility") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string) error); ok { + r0 = rf(artifactID, targetDBVersion) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// CheckSoftwareCompatibilityForService provides a mock function with given fields: ctx, serviceID +func (_m *mockCompatibilityService) CheckSoftwareCompatibilityForService(ctx context.Context, serviceID string) (string, error) { + ret := _m.Called(ctx, serviceID) + + if len(ret) == 0 { + panic("no return value specified for CheckSoftwareCompatibilityForService") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) (string, error)); ok { + return rf(ctx, serviceID) + } + if rf, ok := ret.Get(0).(func(context.Context, string) string); ok { + r0 = rf(ctx, serviceID) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, serviceID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockCompatibilityService creates a new instance of mockCompatibilityService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockCompatibilityService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockCompatibilityService { + mock := &mockCompatibilityService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/backup/mock_jobs_service_test.go b/managed/services/backup/mock_jobs_service_test.go new file mode 100644 index 0000000000..8d75301db5 --- /dev/null +++ b/managed/services/backup/mock_jobs_service_test.go @@ -0,0 +1,121 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + time "time" + + mock "github.com/stretchr/testify/mock" + + models "github.com/percona/pmm/managed/models" +) + +// mockJobsService is an autogenerated mock type for the jobsService type +type mockJobsService struct { + mock.Mock +} + +// StartMongoDBBackupJob provides a mock function with given fields: service, jobID, pmmAgentID, timeout, name, mode, dataModel, locationConfig, folder +func (_m *mockJobsService) StartMongoDBBackupJob(service *models.Service, jobID string, pmmAgentID string, timeout time.Duration, name string, mode models.BackupMode, dataModel models.DataModel, locationConfig *models.BackupLocationConfig, folder string) error { + ret := _m.Called(service, jobID, pmmAgentID, timeout, name, mode, dataModel, locationConfig, folder) + + if len(ret) == 0 { + panic("no return value specified for StartMongoDBBackupJob") + } + + var r0 error + if rf, ok := ret.Get(0).(func(*models.Service, string, string, time.Duration, string, models.BackupMode, models.DataModel, *models.BackupLocationConfig, string) error); ok { + r0 = rf(service, jobID, pmmAgentID, timeout, name, mode, dataModel, locationConfig, folder) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMongoDBRestoreBackupJob provides a mock function with given fields: service, jobID, pmmAgentID, timeout, name, pbmBackupName, dataModel, locationConfig, pitrTimestamp, folder +func (_m *mockJobsService) StartMongoDBRestoreBackupJob(service *models.Service, jobID string, pmmAgentID string, timeout time.Duration, name string, pbmBackupName string, dataModel models.DataModel, locationConfig *models.BackupLocationConfig, pitrTimestamp time.Time, folder string) error { + ret := _m.Called(service, jobID, pmmAgentID, timeout, name, pbmBackupName, dataModel, locationConfig, pitrTimestamp, folder) + + if len(ret) == 0 { + panic("no return value specified for StartMongoDBRestoreBackupJob") + } + + var r0 error + if rf, ok := ret.Get(0).(func(*models.Service, string, string, time.Duration, string, string, models.DataModel, *models.BackupLocationConfig, time.Time, string) error); ok { + r0 = rf(service, jobID, pmmAgentID, timeout, name, pbmBackupName, dataModel, locationConfig, pitrTimestamp, folder) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMySQLBackupJob provides a mock function with given fields: jobID, pmmAgentID, timeout, name, dbConfig, locationConfig, folder +func (_m *mockJobsService) StartMySQLBackupJob(jobID string, pmmAgentID string, timeout time.Duration, name string, dbConfig *models.DBConfig, locationConfig *models.BackupLocationConfig, folder string) error { + ret := _m.Called(jobID, pmmAgentID, timeout, name, dbConfig, locationConfig, folder) + + if len(ret) == 0 { + panic("no return value specified for StartMySQLBackupJob") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, time.Duration, string, *models.DBConfig, *models.BackupLocationConfig, string) error); ok { + r0 = rf(jobID, pmmAgentID, timeout, name, dbConfig, locationConfig, folder) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMySQLRestoreBackupJob provides a mock function with given fields: jobID, pmmAgentID, serviceID, timeout, name, locationConfig, folder +func (_m *mockJobsService) StartMySQLRestoreBackupJob(jobID string, pmmAgentID string, serviceID string, timeout time.Duration, name string, locationConfig *models.BackupLocationConfig, folder string) error { + ret := _m.Called(jobID, pmmAgentID, serviceID, timeout, name, locationConfig, folder) + + if len(ret) == 0 { + panic("no return value specified for StartMySQLRestoreBackupJob") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, string, string, time.Duration, string, *models.BackupLocationConfig, string) error); ok { + r0 = rf(jobID, pmmAgentID, serviceID, timeout, name, locationConfig, folder) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StopJob provides a mock function with given fields: jobID +func (_m *mockJobsService) StopJob(jobID string) error { + ret := _m.Called(jobID) + + if len(ret) == 0 { + panic("no return value specified for StopJob") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(jobID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockJobsService creates a new instance of mockJobsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockJobsService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockJobsService { + mock := &mockJobsService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/backup/mock_pbm_pitr_service_test.go b/managed/services/backup/mock_pbm_pitr_service_test.go new file mode 100644 index 0000000000..f082a303ce --- /dev/null +++ b/managed/services/backup/mock_pbm_pitr_service_test.go @@ -0,0 +1,92 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + context "context" + time "time" + + mock "github.com/stretchr/testify/mock" + + models "github.com/percona/pmm/managed/models" +) + +// mockPbmPITRService is an autogenerated mock type for the pbmPITRService type +type mockPbmPITRService struct { + mock.Mock +} + +// GetPITRFiles provides a mock function with given fields: ctx, locationClient, location, artifact, until +func (_m *mockPbmPITRService) GetPITRFiles(ctx context.Context, locationClient Storage, location *models.BackupLocation, artifact *models.Artifact, until *time.Time) ([]*oplogChunk, error) { + ret := _m.Called(ctx, locationClient, location, artifact, until) + + if len(ret) == 0 { + panic("no return value specified for GetPITRFiles") + } + + var r0 []*oplogChunk + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact, *time.Time) ([]*oplogChunk, error)); ok { + return rf(ctx, locationClient, location, artifact, until) + } + if rf, ok := ret.Get(0).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact, *time.Time) []*oplogChunk); ok { + r0 = rf(ctx, locationClient, location, artifact, until) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*oplogChunk) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact, *time.Time) error); ok { + r1 = rf(ctx, locationClient, location, artifact, until) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// ListPITRTimeranges provides a mock function with given fields: ctx, locationClient, location, artifact +func (_m *mockPbmPITRService) ListPITRTimeranges(ctx context.Context, locationClient Storage, location *models.BackupLocation, artifact *models.Artifact) ([]Timeline, error) { + ret := _m.Called(ctx, locationClient, location, artifact) + + if len(ret) == 0 { + panic("no return value specified for ListPITRTimeranges") + } + + var r0 []Timeline + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact) ([]Timeline, error)); ok { + return rf(ctx, locationClient, location, artifact) + } + if rf, ok := ret.Get(0).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact) []Timeline); ok { + r0 = rf(ctx, locationClient, location, artifact) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]Timeline) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, Storage, *models.BackupLocation, *models.Artifact) error); ok { + r1 = rf(ctx, locationClient, location, artifact) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockPbmPITRService creates a new instance of mockPbmPITRService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockPbmPITRService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockPbmPITRService { + mock := &mockPbmPITRService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/backup/mock_removal_service_test.go b/managed/services/backup/mock_removal_service_test.go new file mode 100644 index 0000000000..710a5691ca --- /dev/null +++ b/managed/services/backup/mock_removal_service_test.go @@ -0,0 +1,61 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import mock "github.com/stretchr/testify/mock" + +// mockRemovalService is an autogenerated mock type for the removalService type +type mockRemovalService struct { + mock.Mock +} + +// DeleteArtifact provides a mock function with given fields: storage, artifactID, removeFiles +func (_m *mockRemovalService) DeleteArtifact(storage Storage, artifactID string, removeFiles bool) error { + ret := _m.Called(storage, artifactID, removeFiles) + + if len(ret) == 0 { + panic("no return value specified for DeleteArtifact") + } + + var r0 error + if rf, ok := ret.Get(0).(func(Storage, string, bool) error); ok { + r0 = rf(storage, artifactID, removeFiles) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// TrimPITRArtifact provides a mock function with given fields: storage, artifactID, firstN +func (_m *mockRemovalService) TrimPITRArtifact(storage Storage, artifactID string, firstN int) error { + ret := _m.Called(storage, artifactID, firstN) + + if len(ret) == 0 { + panic("no return value specified for TrimPITRArtifact") + } + + var r0 error + if rf, ok := ret.Get(0).(func(Storage, string, int) error); ok { + r0 = rf(storage, artifactID, firstN) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockRemovalService creates a new instance of mockRemovalService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRemovalService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockRemovalService { + mock := &mockRemovalService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/backup/mock_storage_test.go b/managed/services/backup/mock_storage_test.go new file mode 100644 index 0000000000..f39dd8a564 --- /dev/null +++ b/managed/services/backup/mock_storage_test.go @@ -0,0 +1,125 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + minio "github.com/percona/pmm/managed/services/minio" +) + +// MockStorage is an autogenerated mock type for the Storage type +type MockStorage struct { + mock.Mock +} + +// FileStat provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, name +func (_m *MockStorage) FileStat(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, name string) (minio.FileInfo, error) { + ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, name) + + if len(ret) == 0 { + panic("no return value specified for FileStat") + } + + var r0 minio.FileInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) (minio.FileInfo, error)); ok { + return rf(ctx, endpoint, accessKey, secretKey, bucketName, name) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) minio.FileInfo); ok { + r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, name) + } else { + r0 = ret.Get(0).(minio.FileInfo) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, string) error); ok { + r1 = rf(ctx, endpoint, accessKey, secretKey, bucketName, name) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// List provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix +func (_m *MockStorage) List(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, prefix string, suffix string) ([]minio.FileInfo, error) { + ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix) + + if len(ret) == 0 { + panic("no return value specified for List") + } + + var r0 []minio.FileInfo + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, string) ([]minio.FileInfo, error)); ok { + return rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string, string) []minio.FileInfo); ok { + r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]minio.FileInfo) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string, string, string) error); ok { + r1 = rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix, suffix) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Remove provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, objectName +func (_m *MockStorage) Remove(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, objectName string) error { + ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, objectName) + + if len(ret) == 0 { + panic("no return value specified for Remove") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) error); ok { + r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, objectName) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// RemoveRecursive provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, prefix +func (_m *MockStorage) RemoveRecursive(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, prefix string) error { + ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, prefix) + + if len(ret) == 0 { + panic("no return value specified for RemoveRecursive") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) error); ok { + r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NewMockStorage creates a new instance of MockStorage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockStorage(t interface { + mock.TestingT + Cleanup(func()) +}, +) *MockStorage { + mock := &MockStorage{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/backup/mock_versioner_test.go b/managed/services/backup/mock_versioner_test.go new file mode 100644 index 0000000000..649d52c382 --- /dev/null +++ b/managed/services/backup/mock_versioner_test.go @@ -0,0 +1,59 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + mock "github.com/stretchr/testify/mock" + + agents "github.com/percona/pmm/managed/services/agents" +) + +// mockVersioner is an autogenerated mock type for the versioner type +type mockVersioner struct { + mock.Mock +} + +// GetVersions provides a mock function with given fields: pmmAgentID, softwares +func (_m *mockVersioner) GetVersions(pmmAgentID string, softwares []agents.Software) ([]agents.Version, error) { + ret := _m.Called(pmmAgentID, softwares) + + if len(ret) == 0 { + panic("no return value specified for GetVersions") + } + + var r0 []agents.Version + var r1 error + if rf, ok := ret.Get(0).(func(string, []agents.Software) ([]agents.Version, error)); ok { + return rf(pmmAgentID, softwares) + } + if rf, ok := ret.Get(0).(func(string, []agents.Software) []agents.Version); ok { + r0 = rf(pmmAgentID, softwares) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]agents.Version) + } + } + + if rf, ok := ret.Get(1).(func(string, []agents.Software) error); ok { + r1 = rf(pmmAgentID, softwares) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockVersioner creates a new instance of mockVersioner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVersioner(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockVersioner { + mock := &mockVersioner{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/checks/mock_agents_registry_test.go b/managed/services/checks/mock_agents_registry_test.go new file mode 100644 index 0000000000..c1b5b37b7f --- /dev/null +++ b/managed/services/checks/mock_agents_registry_test.go @@ -0,0 +1,193 @@ +// Code generated by mockery. DO NOT EDIT. + +package checks + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + models "github.com/percona/pmm/managed/models" +) + +// mockAgentsRegistry is an autogenerated mock type for the agentsRegistry type +type mockAgentsRegistry struct { + mock.Mock +} + +// StartMongoDBQueryBuildInfoAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp +func (_m *mockAgentsRegistry) StartMongoDBQueryBuildInfoAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) + + if len(ret) == 0 { + panic("no return value specified for StartMongoDBQueryBuildInfoAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMongoDBQueryGetCmdLineOptsAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp +func (_m *mockAgentsRegistry) StartMongoDBQueryGetCmdLineOptsAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) + + if len(ret) == 0 { + panic("no return value specified for StartMongoDBQueryGetCmdLineOptsAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMongoDBQueryGetDiagnosticDataAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp +func (_m *mockAgentsRegistry) StartMongoDBQueryGetDiagnosticDataAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) + + if len(ret) == 0 { + panic("no return value specified for StartMongoDBQueryGetDiagnosticDataAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMongoDBQueryGetParameterAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp +func (_m *mockAgentsRegistry) StartMongoDBQueryGetParameterAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) + + if len(ret) == 0 { + panic("no return value specified for StartMongoDBQueryGetParameterAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMongoDBQueryReplSetGetStatusAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, files, tdp +func (_m *mockAgentsRegistry) StartMongoDBQueryReplSetGetStatusAction(ctx context.Context, id string, pmmAgentID string, dsn string, files map[string]string, tdp *models.DelimiterPair) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn, files, tdp) + + if len(ret) == 0 { + panic("no return value specified for StartMongoDBQueryReplSetGetStatusAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, map[string]string, *models.DelimiterPair) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn, files, tdp) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMySQLQuerySelectAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify +func (_m *mockAgentsRegistry) StartMySQLQuerySelectAction(ctx context.Context, id string, pmmAgentID string, dsn string, query string, files map[string]string, tdp *models.DelimiterPair, tlsSkipVerify bool) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify) + + if len(ret) == 0 { + panic("no return value specified for StartMySQLQuerySelectAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, map[string]string, *models.DelimiterPair, bool) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartMySQLQueryShowAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify +func (_m *mockAgentsRegistry) StartMySQLQueryShowAction(ctx context.Context, id string, pmmAgentID string, dsn string, query string, files map[string]string, tdp *models.DelimiterPair, tlsSkipVerify bool) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify) + + if len(ret) == 0 { + panic("no return value specified for StartMySQLQueryShowAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, map[string]string, *models.DelimiterPair, bool) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn, query, files, tdp, tlsSkipVerify) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartPostgreSQLQuerySelectAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn, query +func (_m *mockAgentsRegistry) StartPostgreSQLQuerySelectAction(ctx context.Context, id string, pmmAgentID string, dsn string, query string) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn, query) + + if len(ret) == 0 { + panic("no return value specified for StartPostgreSQLQuerySelectAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn, query) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// StartPostgreSQLQueryShowAction provides a mock function with given fields: ctx, id, pmmAgentID, dsn +func (_m *mockAgentsRegistry) StartPostgreSQLQueryShowAction(ctx context.Context, id string, pmmAgentID string, dsn string) error { + ret := _m.Called(ctx, id, pmmAgentID, dsn) + + if len(ret) == 0 { + panic("no return value specified for StartPostgreSQLQueryShowAction") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok { + r0 = rf(ctx, id, pmmAgentID, dsn) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockAgentsRegistry creates a new instance of mockAgentsRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAgentsRegistry(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAgentsRegistry { + mock := &mockAgentsRegistry{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/inventory/mock_agent_service_test.go b/managed/services/inventory/mock_agent_service_test.go new file mode 100644 index 0000000000..e529b62739 --- /dev/null +++ b/managed/services/inventory/mock_agent_service_test.go @@ -0,0 +1,66 @@ +// Code generated by mockery. DO NOT EDIT. + +package inventory + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockAgentService is an autogenerated mock type for the agentService type +type mockAgentService struct { + mock.Mock +} + +// Logs provides a mock function with given fields: ctx, pmmAgentID, agentID, limit +func (_m *mockAgentService) Logs(ctx context.Context, pmmAgentID string, agentID string, limit uint32) ([]string, uint32, error) { + ret := _m.Called(ctx, pmmAgentID, agentID, limit) + + if len(ret) == 0 { + panic("no return value specified for Logs") + } + + var r0 []string + var r1 uint32 + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, uint32) ([]string, uint32, error)); ok { + return rf(ctx, pmmAgentID, agentID, limit) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, uint32) []string); ok { + r0 = rf(ctx, pmmAgentID, agentID, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, uint32) uint32); ok { + r1 = rf(ctx, pmmAgentID, agentID, limit) + } else { + r1 = ret.Get(1).(uint32) + } + + if rf, ok := ret.Get(2).(func(context.Context, string, string, uint32) error); ok { + r2 = rf(ctx, pmmAgentID, agentID, limit) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// newMockAgentService creates a new instance of mockAgentService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAgentService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAgentService { + mock := &mockAgentService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/inventory/mock_agents_registry_test.go b/managed/services/inventory/mock_agents_registry_test.go new file mode 100644 index 0000000000..6fd0ab4aa6 --- /dev/null +++ b/managed/services/inventory/mock_agents_registry_test.go @@ -0,0 +1,52 @@ +// Code generated by mockery. DO NOT EDIT. + +package inventory + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockAgentsRegistry is an autogenerated mock type for the agentsRegistry type +type mockAgentsRegistry struct { + mock.Mock +} + +// IsConnected provides a mock function with given fields: pmmAgentID +func (_m *mockAgentsRegistry) IsConnected(pmmAgentID string) bool { + ret := _m.Called(pmmAgentID) + + if len(ret) == 0 { + panic("no return value specified for IsConnected") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(string) bool); ok { + r0 = rf(pmmAgentID) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Kick provides a mock function with given fields: ctx, pmmAgentID +func (_m *mockAgentsRegistry) Kick(ctx context.Context, pmmAgentID string) { + _m.Called(ctx, pmmAgentID) +} + +// newMockAgentsRegistry creates a new instance of mockAgentsRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAgentsRegistry(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAgentsRegistry { + mock := &mockAgentsRegistry{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/inventory/mock_agents_state_updater_test.go b/managed/services/inventory/mock_agents_state_updater_test.go new file mode 100644 index 0000000000..2791d7718b --- /dev/null +++ b/managed/services/inventory/mock_agents_state_updater_test.go @@ -0,0 +1,34 @@ +// Code generated by mockery. DO NOT EDIT. + +package inventory + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockAgentsStateUpdater is an autogenerated mock type for the agentsStateUpdater type +type mockAgentsStateUpdater struct { + mock.Mock +} + +// RequestStateUpdate provides a mock function with given fields: ctx, pmmAgentID +func (_m *mockAgentsStateUpdater) RequestStateUpdate(ctx context.Context, pmmAgentID string) { + _m.Called(ctx, pmmAgentID) +} + +// newMockAgentsStateUpdater creates a new instance of mockAgentsStateUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAgentsStateUpdater(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAgentsStateUpdater { + mock := &mockAgentsStateUpdater{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/inventory/mock_connection_checker_test.go b/managed/services/inventory/mock_connection_checker_test.go new file mode 100644 index 0000000000..b7f27f1bdb --- /dev/null +++ b/managed/services/inventory/mock_connection_checker_test.go @@ -0,0 +1,50 @@ +// Code generated by mockery. DO NOT EDIT. + +package inventory + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + reform "gopkg.in/reform.v1" + + models "github.com/percona/pmm/managed/models" +) + +// mockConnectionChecker is an autogenerated mock type for the connectionChecker type +type mockConnectionChecker struct { + mock.Mock +} + +// CheckConnectionToService provides a mock function with given fields: ctx, q, service, agent +func (_m *mockConnectionChecker) CheckConnectionToService(ctx context.Context, q *reform.Querier, service *models.Service, agent *models.Agent) error { + ret := _m.Called(ctx, q, service, agent) + + if len(ret) == 0 { + panic("no return value specified for CheckConnectionToService") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *reform.Querier, *models.Service, *models.Agent) error); ok { + r0 = rf(ctx, q, service, agent) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockConnectionChecker creates a new instance of mockConnectionChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockConnectionChecker(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockConnectionChecker { + mock := &mockConnectionChecker{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/inventory/mock_inventory_metrics_test.go b/managed/services/inventory/mock_inventory_metrics_test.go new file mode 100644 index 0000000000..8fdd570b86 --- /dev/null +++ b/managed/services/inventory/mock_inventory_metrics_test.go @@ -0,0 +1,119 @@ +// Code generated by mockery. DO NOT EDIT. + +package inventory + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockInventoryMetrics is an autogenerated mock type for the inventoryMetrics type +type mockInventoryMetrics struct { + mock.Mock +} + +// GetAgentMetrics provides a mock function with given fields: ctx +func (_m *mockInventoryMetrics) GetAgentMetrics(ctx context.Context) ([]Metric, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetAgentMetrics") + } + + var r0 []Metric + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]Metric, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) []Metric); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]Metric) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetNodeMetrics provides a mock function with given fields: ctx +func (_m *mockInventoryMetrics) GetNodeMetrics(ctx context.Context) ([]Metric, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetNodeMetrics") + } + + var r0 []Metric + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]Metric, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) []Metric); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]Metric) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetServiceMetrics provides a mock function with given fields: ctx +func (_m *mockInventoryMetrics) GetServiceMetrics(ctx context.Context) ([]Metric, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetServiceMetrics") + } + + var r0 []Metric + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) ([]Metric, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) []Metric); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]Metric) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockInventoryMetrics creates a new instance of mockInventoryMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockInventoryMetrics(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockInventoryMetrics { + mock := &mockInventoryMetrics{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/inventory/mock_prometheus_service_test.go b/managed/services/inventory/mock_prometheus_service_test.go new file mode 100644 index 0000000000..fc1e1e2144 --- /dev/null +++ b/managed/services/inventory/mock_prometheus_service_test.go @@ -0,0 +1,30 @@ +// Code generated by mockery. DO NOT EDIT. + +package inventory + +import mock "github.com/stretchr/testify/mock" + +// mockPrometheusService is an autogenerated mock type for the prometheusService type +type mockPrometheusService struct { + mock.Mock +} + +// RequestConfigurationUpdate provides a mock function with given fields: +func (_m *mockPrometheusService) RequestConfigurationUpdate() { + _m.Called() +} + +// newMockPrometheusService creates a new instance of mockPrometheusService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockPrometheusService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockPrometheusService { + mock := &mockPrometheusService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/inventory/mock_service_info_broker_test.go b/managed/services/inventory/mock_service_info_broker_test.go new file mode 100644 index 0000000000..0329393a2e --- /dev/null +++ b/managed/services/inventory/mock_service_info_broker_test.go @@ -0,0 +1,50 @@ +// Code generated by mockery. DO NOT EDIT. + +package inventory + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + reform "gopkg.in/reform.v1" + + models "github.com/percona/pmm/managed/models" +) + +// mockServiceInfoBroker is an autogenerated mock type for the serviceInfoBroker type +type mockServiceInfoBroker struct { + mock.Mock +} + +// GetInfoFromService provides a mock function with given fields: ctx, q, service, agent +func (_m *mockServiceInfoBroker) GetInfoFromService(ctx context.Context, q *reform.Querier, service *models.Service, agent *models.Agent) error { + ret := _m.Called(ctx, q, service, agent) + + if len(ret) == 0 { + panic("no return value specified for GetInfoFromService") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *reform.Querier, *models.Service, *models.Agent) error); ok { + r0 = rf(ctx, q, service, agent) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockServiceInfoBroker creates a new instance of mockServiceInfoBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockServiceInfoBroker(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockServiceInfoBroker { + mock := &mockServiceInfoBroker{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/inventory/mock_version_cache_test.go b/managed/services/inventory/mock_version_cache_test.go new file mode 100644 index 0000000000..5957bb2798 --- /dev/null +++ b/managed/services/inventory/mock_version_cache_test.go @@ -0,0 +1,30 @@ +// Code generated by mockery. DO NOT EDIT. + +package inventory + +import mock "github.com/stretchr/testify/mock" + +// mockVersionCache is an autogenerated mock type for the versionCache type +type mockVersionCache struct { + mock.Mock +} + +// RequestSoftwareVersionsUpdate provides a mock function with given fields: +func (_m *mockVersionCache) RequestSoftwareVersionsUpdate() { + _m.Called() +} + +// newMockVersionCache creates a new instance of mockVersionCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVersionCache(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockVersionCache { + mock := &mockVersionCache{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/backup/mock_aws_s3_test.go b/managed/services/management/backup/mock_aws_s3_test.go new file mode 100644 index 0000000000..87a2f17d1a --- /dev/null +++ b/managed/services/management/backup/mock_aws_s3_test.go @@ -0,0 +1,103 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockAwsS3 is an autogenerated mock type for the awsS3 type +type mockAwsS3 struct { + mock.Mock +} + +// BucketExists provides a mock function with given fields: ctx, host, accessKey, secretKey, name +func (_m *mockAwsS3) BucketExists(ctx context.Context, host string, accessKey string, secretKey string, name string) (bool, error) { + ret := _m.Called(ctx, host, accessKey, secretKey, name) + + if len(ret) == 0 { + panic("no return value specified for BucketExists") + } + + var r0 bool + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) (bool, error)); ok { + return rf(ctx, host, accessKey, secretKey, name) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) bool); ok { + r0 = rf(ctx, host, accessKey, secretKey, name) + } else { + r0 = ret.Get(0).(bool) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, host, accessKey, secretKey, name) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetBucketLocation provides a mock function with given fields: ctx, host, accessKey, secretKey, name +func (_m *mockAwsS3) GetBucketLocation(ctx context.Context, host string, accessKey string, secretKey string, name string) (string, error) { + ret := _m.Called(ctx, host, accessKey, secretKey, name) + + if len(ret) == 0 { + panic("no return value specified for GetBucketLocation") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) (string, error)); ok { + return rf(ctx, host, accessKey, secretKey, name) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) string); ok { + r0 = rf(ctx, host, accessKey, secretKey, name) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok { + r1 = rf(ctx, host, accessKey, secretKey, name) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoveRecursive provides a mock function with given fields: ctx, endpoint, accessKey, secretKey, bucketName, prefix +func (_m *mockAwsS3) RemoveRecursive(ctx context.Context, endpoint string, accessKey string, secretKey string, bucketName string, prefix string) error { + ret := _m.Called(ctx, endpoint, accessKey, secretKey, bucketName, prefix) + + if len(ret) == 0 { + panic("no return value specified for RemoveRecursive") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string, string) error); ok { + r0 = rf(ctx, endpoint, accessKey, secretKey, bucketName, prefix) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockAwsS3 creates a new instance of mockAwsS3. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAwsS3(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAwsS3 { + mock := &mockAwsS3{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/backup/mock_backup_service_test.go b/managed/services/management/backup/mock_backup_service_test.go new file mode 100644 index 0000000000..da3008674d --- /dev/null +++ b/managed/services/management/backup/mock_backup_service_test.go @@ -0,0 +1,106 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + context "context" + time "time" + + mock "github.com/stretchr/testify/mock" + + servicesbackup "github.com/percona/pmm/managed/services/backup" +) + +// mockBackupService is an autogenerated mock type for the backupService type +type mockBackupService struct { + mock.Mock +} + +// PerformBackup provides a mock function with given fields: ctx, params +func (_m *mockBackupService) PerformBackup(ctx context.Context, params servicesbackup.PerformBackupParams) (string, error) { + ret := _m.Called(ctx, params) + + if len(ret) == 0 { + panic("no return value specified for PerformBackup") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, servicesbackup.PerformBackupParams) (string, error)); ok { + return rf(ctx, params) + } + if rf, ok := ret.Get(0).(func(context.Context, servicesbackup.PerformBackupParams) string); ok { + r0 = rf(ctx, params) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, servicesbackup.PerformBackupParams) error); ok { + r1 = rf(ctx, params) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RestoreBackup provides a mock function with given fields: ctx, serviceID, artifactID, pitrTimestamp +func (_m *mockBackupService) RestoreBackup(ctx context.Context, serviceID string, artifactID string, pitrTimestamp time.Time) (string, error) { + ret := _m.Called(ctx, serviceID, artifactID, pitrTimestamp) + + if len(ret) == 0 { + panic("no return value specified for RestoreBackup") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Time) (string, error)); ok { + return rf(ctx, serviceID, artifactID, pitrTimestamp) + } + if rf, ok := ret.Get(0).(func(context.Context, string, string, time.Time) string); ok { + r0 = rf(ctx, serviceID, artifactID, pitrTimestamp) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, string, time.Time) error); ok { + r1 = rf(ctx, serviceID, artifactID, pitrTimestamp) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// SwitchMongoPITR provides a mock function with given fields: ctx, serviceID, enabled +func (_m *mockBackupService) SwitchMongoPITR(ctx context.Context, serviceID string, enabled bool) error { + ret := _m.Called(ctx, serviceID, enabled) + + if len(ret) == 0 { + panic("no return value specified for SwitchMongoPITR") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) error); ok { + r0 = rf(ctx, serviceID, enabled) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockBackupService creates a new instance of mockBackupService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockBackupService { + mock := &mockBackupService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/backup/mock_pbm_pitr_service_test.go b/managed/services/management/backup/mock_pbm_pitr_service_test.go new file mode 100644 index 0000000000..fdb7789adf --- /dev/null +++ b/managed/services/management/backup/mock_pbm_pitr_service_test.go @@ -0,0 +1,62 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + models "github.com/percona/pmm/managed/models" + servicesbackup "github.com/percona/pmm/managed/services/backup" +) + +// mockPbmPITRService is an autogenerated mock type for the pbmPITRService type +type mockPbmPITRService struct { + mock.Mock +} + +// ListPITRTimeranges provides a mock function with given fields: ctx, locationClient, location, artifact +func (_m *mockPbmPITRService) ListPITRTimeranges(ctx context.Context, locationClient servicesbackup.Storage, location *models.BackupLocation, artifact *models.Artifact) ([]servicesbackup.Timeline, error) { + ret := _m.Called(ctx, locationClient, location, artifact) + + if len(ret) == 0 { + panic("no return value specified for ListPITRTimeranges") + } + + var r0 []servicesbackup.Timeline + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, servicesbackup.Storage, *models.BackupLocation, *models.Artifact) ([]servicesbackup.Timeline, error)); ok { + return rf(ctx, locationClient, location, artifact) + } + if rf, ok := ret.Get(0).(func(context.Context, servicesbackup.Storage, *models.BackupLocation, *models.Artifact) []servicesbackup.Timeline); ok { + r0 = rf(ctx, locationClient, location, artifact) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]servicesbackup.Timeline) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, servicesbackup.Storage, *models.BackupLocation, *models.Artifact) error); ok { + r1 = rf(ctx, locationClient, location, artifact) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockPbmPITRService creates a new instance of mockPbmPITRService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockPbmPITRService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockPbmPITRService { + mock := &mockPbmPITRService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/backup/mock_removal_service_test.go b/managed/services/management/backup/mock_removal_service_test.go new file mode 100644 index 0000000000..5c584ca301 --- /dev/null +++ b/managed/services/management/backup/mock_removal_service_test.go @@ -0,0 +1,47 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + mock "github.com/stretchr/testify/mock" + + servicesbackup "github.com/percona/pmm/managed/services/backup" +) + +// mockRemovalService is an autogenerated mock type for the removalService type +type mockRemovalService struct { + mock.Mock +} + +// DeleteArtifact provides a mock function with given fields: storage, artifactID, removeFiles +func (_m *mockRemovalService) DeleteArtifact(storage servicesbackup.Storage, artifactID string, removeFiles bool) error { + ret := _m.Called(storage, artifactID, removeFiles) + + if len(ret) == 0 { + panic("no return value specified for DeleteArtifact") + } + + var r0 error + if rf, ok := ret.Get(0).(func(servicesbackup.Storage, string, bool) error); ok { + r0 = rf(storage, artifactID, removeFiles) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockRemovalService creates a new instance of mockRemovalService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockRemovalService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockRemovalService { + mock := &mockRemovalService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/backup/mock_schedule_service_test.go b/managed/services/management/backup/mock_schedule_service_test.go new file mode 100644 index 0000000000..524fd66d88 --- /dev/null +++ b/managed/services/management/backup/mock_schedule_service_test.go @@ -0,0 +1,103 @@ +// Code generated by mockery. DO NOT EDIT. + +package backup + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + models "github.com/percona/pmm/managed/models" + scheduler "github.com/percona/pmm/managed/services/scheduler" +) + +// mockScheduleService is an autogenerated mock type for the scheduleService type +type mockScheduleService struct { + mock.Mock +} + +// Add provides a mock function with given fields: task, params +func (_m *mockScheduleService) Add(task scheduler.Task, params scheduler.AddParams) (*models.ScheduledTask, error) { + ret := _m.Called(task, params) + + if len(ret) == 0 { + panic("no return value specified for Add") + } + + var r0 *models.ScheduledTask + var r1 error + if rf, ok := ret.Get(0).(func(scheduler.Task, scheduler.AddParams) (*models.ScheduledTask, error)); ok { + return rf(task, params) + } + if rf, ok := ret.Get(0).(func(scheduler.Task, scheduler.AddParams) *models.ScheduledTask); ok { + r0 = rf(task, params) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*models.ScheduledTask) + } + } + + if rf, ok := ret.Get(1).(func(scheduler.Task, scheduler.AddParams) error); ok { + r1 = rf(task, params) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Remove provides a mock function with given fields: id +func (_m *mockScheduleService) Remove(id string) error { + ret := _m.Called(id) + + if len(ret) == 0 { + panic("no return value specified for Remove") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(id) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Run provides a mock function with given fields: ctx +func (_m *mockScheduleService) Run(ctx context.Context) { + _m.Called(ctx) +} + +// Update provides a mock function with given fields: id, params +func (_m *mockScheduleService) Update(id string, params models.ChangeScheduledTaskParams) error { + ret := _m.Called(id, params) + + if len(ret) == 0 { + panic("no return value specified for Update") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string, models.ChangeScheduledTaskParams) error); ok { + r0 = rf(id, params) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockScheduleService creates a new instance of mockScheduleService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockScheduleService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockScheduleService { + mock := &mockScheduleService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/dump/mock_dump_service_test.go b/managed/services/management/dump/mock_dump_service_test.go new file mode 100644 index 0000000000..137a00f8e6 --- /dev/null +++ b/managed/services/management/dump/mock_dump_service_test.go @@ -0,0 +1,105 @@ +// Code generated by mockery. DO NOT EDIT. + +package dump + +import ( + mock "github.com/stretchr/testify/mock" + + servicesdump "github.com/percona/pmm/managed/services/dump" +) + +// mockDumpService is an autogenerated mock type for the dumpService type +type mockDumpService struct { + mock.Mock +} + +// DeleteDump provides a mock function with given fields: dumpID +func (_m *mockDumpService) DeleteDump(dumpID string) error { + ret := _m.Called(dumpID) + + if len(ret) == 0 { + panic("no return value specified for DeleteDump") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(dumpID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// GetFilePathsForDumps provides a mock function with given fields: dumpIDs +func (_m *mockDumpService) GetFilePathsForDumps(dumpIDs []string) (map[string]string, error) { + ret := _m.Called(dumpIDs) + + if len(ret) == 0 { + panic("no return value specified for GetFilePathsForDumps") + } + + var r0 map[string]string + var r1 error + if rf, ok := ret.Get(0).(func([]string) (map[string]string, error)); ok { + return rf(dumpIDs) + } + if rf, ok := ret.Get(0).(func([]string) map[string]string); ok { + r0 = rf(dumpIDs) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]string) + } + } + + if rf, ok := ret.Get(1).(func([]string) error); ok { + r1 = rf(dumpIDs) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StartDump provides a mock function with given fields: params +func (_m *mockDumpService) StartDump(params *servicesdump.Params) (string, error) { + ret := _m.Called(params) + + if len(ret) == 0 { + panic("no return value specified for StartDump") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(*servicesdump.Params) (string, error)); ok { + return rf(params) + } + if rf, ok := ret.Get(0).(func(*servicesdump.Params) string); ok { + r0 = rf(params) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(*servicesdump.Params) error); ok { + r1 = rf(params) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockDumpService creates a new instance of mockDumpService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockDumpService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockDumpService { + mock := &mockDumpService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_agents_registry_test.go b/managed/services/management/mock_agents_registry_test.go new file mode 100644 index 0000000000..964290878f --- /dev/null +++ b/managed/services/management/mock_agents_registry_test.go @@ -0,0 +1,52 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockAgentsRegistry is an autogenerated mock type for the agentsRegistry type +type mockAgentsRegistry struct { + mock.Mock +} + +// IsConnected provides a mock function with given fields: pmmAgentID +func (_m *mockAgentsRegistry) IsConnected(pmmAgentID string) bool { + ret := _m.Called(pmmAgentID) + + if len(ret) == 0 { + panic("no return value specified for IsConnected") + } + + var r0 bool + if rf, ok := ret.Get(0).(func(string) bool); ok { + r0 = rf(pmmAgentID) + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// Kick provides a mock function with given fields: ctx, pmmAgentID +func (_m *mockAgentsRegistry) Kick(ctx context.Context, pmmAgentID string) { + _m.Called(ctx, pmmAgentID) +} + +// newMockAgentsRegistry creates a new instance of mockAgentsRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAgentsRegistry(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAgentsRegistry { + mock := &mockAgentsRegistry{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_agents_state_updater_test.go b/managed/services/management/mock_agents_state_updater_test.go new file mode 100644 index 0000000000..369404d302 --- /dev/null +++ b/managed/services/management/mock_agents_state_updater_test.go @@ -0,0 +1,34 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockAgentsStateUpdater is an autogenerated mock type for the agentsStateUpdater type +type mockAgentsStateUpdater struct { + mock.Mock +} + +// RequestStateUpdate provides a mock function with given fields: ctx, pmmAgentID +func (_m *mockAgentsStateUpdater) RequestStateUpdate(ctx context.Context, pmmAgentID string) { + _m.Called(ctx, pmmAgentID) +} + +// newMockAgentsStateUpdater creates a new instance of mockAgentsStateUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAgentsStateUpdater(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAgentsStateUpdater { + mock := &mockAgentsStateUpdater{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_checks_service_test.go b/managed/services/management/mock_checks_service_test.go new file mode 100644 index 0000000000..b0bd6a7b49 --- /dev/null +++ b/managed/services/management/mock_checks_service_test.go @@ -0,0 +1,224 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import ( + context "context" + + check "github.com/percona/saas/pkg/check" + mock "github.com/stretchr/testify/mock" + + services "github.com/percona/pmm/managed/services" +) + +// mockChecksService is an autogenerated mock type for the checksService type +type mockChecksService struct { + mock.Mock +} + +// ChangeInterval provides a mock function with given fields: params +func (_m *mockChecksService) ChangeInterval(params map[string]check.Interval) error { + ret := _m.Called(params) + + if len(ret) == 0 { + panic("no return value specified for ChangeInterval") + } + + var r0 error + if rf, ok := ret.Get(0).(func(map[string]check.Interval) error); ok { + r0 = rf(params) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// DisableChecks provides a mock function with given fields: checkNames +func (_m *mockChecksService) DisableChecks(checkNames []string) error { + ret := _m.Called(checkNames) + + if len(ret) == 0 { + panic("no return value specified for DisableChecks") + } + + var r0 error + if rf, ok := ret.Get(0).(func([]string) error); ok { + r0 = rf(checkNames) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// EnableChecks provides a mock function with given fields: checkNames +func (_m *mockChecksService) EnableChecks(checkNames []string) error { + ret := _m.Called(checkNames) + + if len(ret) == 0 { + panic("no return value specified for EnableChecks") + } + + var r0 error + if rf, ok := ret.Get(0).(func([]string) error); ok { + r0 = rf(checkNames) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// GetAdvisors provides a mock function with given fields: +func (_m *mockChecksService) GetAdvisors() ([]check.Advisor, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetAdvisors") + } + + var r0 []check.Advisor + var r1 error + if rf, ok := ret.Get(0).(func() ([]check.Advisor, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []check.Advisor); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]check.Advisor) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetChecks provides a mock function with given fields: +func (_m *mockChecksService) GetChecks() (map[string]check.Check, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetChecks") + } + + var r0 map[string]check.Check + var r1 error + if rf, ok := ret.Get(0).(func() (map[string]check.Check, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() map[string]check.Check); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]check.Check) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetChecksResults provides a mock function with given fields: ctx, serviceID +func (_m *mockChecksService) GetChecksResults(ctx context.Context, serviceID string) ([]services.CheckResult, error) { + ret := _m.Called(ctx, serviceID) + + if len(ret) == 0 { + panic("no return value specified for GetChecksResults") + } + + var r0 []services.CheckResult + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string) ([]services.CheckResult, error)); ok { + return rf(ctx, serviceID) + } + if rf, ok := ret.Get(0).(func(context.Context, string) []services.CheckResult); ok { + r0 = rf(ctx, serviceID) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]services.CheckResult) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { + r1 = rf(ctx, serviceID) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetDisabledChecks provides a mock function with given fields: +func (_m *mockChecksService) GetDisabledChecks() ([]string, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetDisabledChecks") + } + + var r0 []string + var r1 error + if rf, ok := ret.Get(0).(func() ([]string, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() []string); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// StartChecks provides a mock function with given fields: checkNames +func (_m *mockChecksService) StartChecks(checkNames []string) error { + ret := _m.Called(checkNames) + + if len(ret) == 0 { + panic("no return value specified for StartChecks") + } + + var r0 error + if rf, ok := ret.Get(0).(func([]string) error); ok { + r0 = rf(checkNames) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockChecksService creates a new instance of mockChecksService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockChecksService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockChecksService { + mock := &mockChecksService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_connection_checker_test.go b/managed/services/management/mock_connection_checker_test.go new file mode 100644 index 0000000000..b0ea5d8d68 --- /dev/null +++ b/managed/services/management/mock_connection_checker_test.go @@ -0,0 +1,50 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + reform "gopkg.in/reform.v1" + + models "github.com/percona/pmm/managed/models" +) + +// mockConnectionChecker is an autogenerated mock type for the connectionChecker type +type mockConnectionChecker struct { + mock.Mock +} + +// CheckConnectionToService provides a mock function with given fields: ctx, q, service, agent +func (_m *mockConnectionChecker) CheckConnectionToService(ctx context.Context, q *reform.Querier, service *models.Service, agent *models.Agent) error { + ret := _m.Called(ctx, q, service, agent) + + if len(ret) == 0 { + panic("no return value specified for CheckConnectionToService") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *reform.Querier, *models.Service, *models.Agent) error); ok { + r0 = rf(ctx, q, service, agent) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockConnectionChecker creates a new instance of mockConnectionChecker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockConnectionChecker(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockConnectionChecker { + mock := &mockConnectionChecker{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_grafana_client_test.go b/managed/services/management/mock_grafana_client_test.go new file mode 100644 index 0000000000..cd58f21d8e --- /dev/null +++ b/managed/services/management/mock_grafana_client_test.go @@ -0,0 +1,121 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import ( + context "context" + time "time" + + mock "github.com/stretchr/testify/mock" +) + +// mockGrafanaClient is an autogenerated mock type for the grafanaClient type +type mockGrafanaClient struct { + mock.Mock +} + +// CreateAnnotation provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4 +func (_m *mockGrafanaClient) CreateAnnotation(_a0 context.Context, _a1 []string, _a2 time.Time, _a3 string, _a4 string) (string, error) { + ret := _m.Called(_a0, _a1, _a2, _a3, _a4) + + if len(ret) == 0 { + panic("no return value specified for CreateAnnotation") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, []string, time.Time, string, string) (string, error)); ok { + return rf(_a0, _a1, _a2, _a3, _a4) + } + if rf, ok := ret.Get(0).(func(context.Context, []string, time.Time, string, string) string); ok { + r0 = rf(_a0, _a1, _a2, _a3, _a4) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, []string, time.Time, string, string) error); ok { + r1 = rf(_a0, _a1, _a2, _a3, _a4) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// CreateServiceAccount provides a mock function with given fields: ctx, noneName, reregister +func (_m *mockGrafanaClient) CreateServiceAccount(ctx context.Context, noneName string, reregister bool) (int, string, error) { + ret := _m.Called(ctx, noneName, reregister) + + if len(ret) == 0 { + panic("no return value specified for CreateServiceAccount") + } + + var r0 int + var r1 string + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) (int, string, error)); ok { + return rf(ctx, noneName, reregister) + } + if rf, ok := ret.Get(0).(func(context.Context, string, bool) int); ok { + r0 = rf(ctx, noneName, reregister) + } else { + r0 = ret.Get(0).(int) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, bool) string); ok { + r1 = rf(ctx, noneName, reregister) + } else { + r1 = ret.Get(1).(string) + } + + if rf, ok := ret.Get(2).(func(context.Context, string, bool) error); ok { + r2 = rf(ctx, noneName, reregister) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// DeleteServiceAccount provides a mock function with given fields: ctx, noneName, force +func (_m *mockGrafanaClient) DeleteServiceAccount(ctx context.Context, noneName string, force bool) (string, error) { + ret := _m.Called(ctx, noneName, force) + + if len(ret) == 0 { + panic("no return value specified for DeleteServiceAccount") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, string, bool) (string, error)); ok { + return rf(ctx, noneName, force) + } + if rf, ok := ret.Get(0).(func(context.Context, string, bool) string); ok { + r0 = rf(ctx, noneName, force) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, string, bool) error); ok { + r1 = rf(ctx, noneName, force) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockGrafanaClient creates a new instance of mockGrafanaClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockGrafanaClient(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockGrafanaClient { + mock := &mockGrafanaClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_jobs_service_test.go b/managed/services/management/mock_jobs_service_test.go new file mode 100644 index 0000000000..1c781180de --- /dev/null +++ b/managed/services/management/mock_jobs_service_test.go @@ -0,0 +1,43 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import mock "github.com/stretchr/testify/mock" + +// mockJobsService is an autogenerated mock type for the jobsService type +type mockJobsService struct { + mock.Mock +} + +// StopJob provides a mock function with given fields: jobID +func (_m *mockJobsService) StopJob(jobID string) error { + ret := _m.Called(jobID) + + if len(ret) == 0 { + panic("no return value specified for StopJob") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(jobID) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockJobsService creates a new instance of mockJobsService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockJobsService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockJobsService { + mock := &mockJobsService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_prometheus_service_test.go b/managed/services/management/mock_prometheus_service_test.go new file mode 100644 index 0000000000..1648abb75b --- /dev/null +++ b/managed/services/management/mock_prometheus_service_test.go @@ -0,0 +1,30 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import mock "github.com/stretchr/testify/mock" + +// mockPrometheusService is an autogenerated mock type for the prometheusService type +type mockPrometheusService struct { + mock.Mock +} + +// RequestConfigurationUpdate provides a mock function with given fields: +func (_m *mockPrometheusService) RequestConfigurationUpdate() { + _m.Called() +} + +// newMockPrometheusService creates a new instance of mockPrometheusService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockPrometheusService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockPrometheusService { + mock := &mockPrometheusService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_service_info_broker_test.go b/managed/services/management/mock_service_info_broker_test.go new file mode 100644 index 0000000000..d3bcf6aa12 --- /dev/null +++ b/managed/services/management/mock_service_info_broker_test.go @@ -0,0 +1,50 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + reform "gopkg.in/reform.v1" + + models "github.com/percona/pmm/managed/models" +) + +// mockServiceInfoBroker is an autogenerated mock type for the serviceInfoBroker type +type mockServiceInfoBroker struct { + mock.Mock +} + +// GetInfoFromService provides a mock function with given fields: ctx, q, service, agent +func (_m *mockServiceInfoBroker) GetInfoFromService(ctx context.Context, q *reform.Querier, service *models.Service, agent *models.Agent) error { + ret := _m.Called(ctx, q, service, agent) + + if len(ret) == 0 { + panic("no return value specified for GetInfoFromService") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *reform.Querier, *models.Service, *models.Agent) error); ok { + r0 = rf(ctx, q, service, agent) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockServiceInfoBroker creates a new instance of mockServiceInfoBroker. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockServiceInfoBroker(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockServiceInfoBroker { + mock := &mockServiceInfoBroker{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_version_cache_test.go b/managed/services/management/mock_version_cache_test.go new file mode 100644 index 0000000000..1c30b27082 --- /dev/null +++ b/managed/services/management/mock_version_cache_test.go @@ -0,0 +1,30 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import mock "github.com/stretchr/testify/mock" + +// mockVersionCache is an autogenerated mock type for the versionCache type +type mockVersionCache struct { + mock.Mock +} + +// RequestSoftwareVersionsUpdate provides a mock function with given fields: +func (_m *mockVersionCache) RequestSoftwareVersionsUpdate() { + _m.Called() +} + +// newMockVersionCache creates a new instance of mockVersionCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVersionCache(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockVersionCache { + mock := &mockVersionCache{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/management/mock_victoria_metrics_client_test.go b/managed/services/management/mock_victoria_metrics_client_test.go new file mode 100644 index 0000000000..e3ee63ad93 --- /dev/null +++ b/managed/services/management/mock_victoria_metrics_client_test.go @@ -0,0 +1,78 @@ +// Code generated by mockery. DO NOT EDIT. + +package management + +import ( + context "context" + time "time" + + v1 "github.com/prometheus/client_golang/api/prometheus/v1" + model "github.com/prometheus/common/model" + mock "github.com/stretchr/testify/mock" +) + +// mockVictoriaMetricsClient is an autogenerated mock type for the victoriaMetricsClient type +type mockVictoriaMetricsClient struct { + mock.Mock +} + +// Query provides a mock function with given fields: ctx, query, ts, opts +func (_m *mockVictoriaMetricsClient) Query(ctx context.Context, query string, ts time.Time, opts ...v1.Option) (model.Value, v1.Warnings, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, query, ts) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for Query") + } + + var r0 model.Value + var r1 v1.Warnings + var r2 error + if rf, ok := ret.Get(0).(func(context.Context, string, time.Time, ...v1.Option) (model.Value, v1.Warnings, error)); ok { + return rf(ctx, query, ts, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, string, time.Time, ...v1.Option) model.Value); ok { + r0 = rf(ctx, query, ts, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(model.Value) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, string, time.Time, ...v1.Option) v1.Warnings); ok { + r1 = rf(ctx, query, ts, opts...) + } else { + if ret.Get(1) != nil { + r1 = ret.Get(1).(v1.Warnings) + } + } + + if rf, ok := ret.Get(2).(func(context.Context, string, time.Time, ...v1.Option) error); ok { + r2 = rf(ctx, query, ts, opts...) + } else { + r2 = ret.Error(2) + } + + return r0, r1, r2 +} + +// newMockVictoriaMetricsClient creates a new instance of mockVictoriaMetricsClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVictoriaMetricsClient(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockVictoriaMetricsClient { + mock := &mockVictoriaMetricsClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/qan/mock_qan_collector_client_test.go b/managed/services/qan/mock_qan_collector_client_test.go new file mode 100644 index 0000000000..1d8f83b3c5 --- /dev/null +++ b/managed/services/qan/mock_qan_collector_client_test.go @@ -0,0 +1,69 @@ +// Code generated by mockery. DO NOT EDIT. + +package qan + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + grpc "google.golang.org/grpc" + + qanv1 "github.com/percona/pmm/api/qan/v1" +) + +// mockQanCollectorClient is an autogenerated mock type for the qanCollectorClient type +type mockQanCollectorClient struct { + mock.Mock +} + +// Collect provides a mock function with given fields: ctx, in, opts +func (_m *mockQanCollectorClient) Collect(ctx context.Context, in *qanv1.CollectRequest, opts ...grpc.CallOption) (*qanv1.CollectResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for Collect") + } + + var r0 *qanv1.CollectResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *qanv1.CollectRequest, ...grpc.CallOption) (*qanv1.CollectResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *qanv1.CollectRequest, ...grpc.CallOption) *qanv1.CollectResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*qanv1.CollectResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *qanv1.CollectRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockQanCollectorClient creates a new instance of mockQanCollectorClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockQanCollectorClient(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockQanCollectorClient { + mock := &mockQanCollectorClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/scheduler/mock_backup_service_test.go b/managed/services/scheduler/mock_backup_service_test.go new file mode 100644 index 0000000000..d9862f38f2 --- /dev/null +++ b/managed/services/scheduler/mock_backup_service_test.go @@ -0,0 +1,59 @@ +// Code generated by mockery. DO NOT EDIT. + +package scheduler + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + backup "github.com/percona/pmm/managed/services/backup" +) + +// mockBackupService is an autogenerated mock type for the backupService type +type mockBackupService struct { + mock.Mock +} + +// PerformBackup provides a mock function with given fields: ctx, params +func (_m *mockBackupService) PerformBackup(ctx context.Context, params backup.PerformBackupParams) (string, error) { + ret := _m.Called(ctx, params) + + if len(ret) == 0 { + panic("no return value specified for PerformBackup") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, backup.PerformBackupParams) (string, error)); ok { + return rf(ctx, params) + } + if rf, ok := ret.Get(0).(func(context.Context, backup.PerformBackupParams) string); ok { + r0 = rf(ctx, params) + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func(context.Context, backup.PerformBackupParams) error); ok { + r1 = rf(ctx, params) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockBackupService creates a new instance of mockBackupService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockBackupService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockBackupService { + mock := &mockBackupService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/server/mock_agents_state_updater_test.go b/managed/services/server/mock_agents_state_updater_test.go new file mode 100644 index 0000000000..5ed1085f3f --- /dev/null +++ b/managed/services/server/mock_agents_state_updater_test.go @@ -0,0 +1,47 @@ +// Code generated by mockery. DO NOT EDIT. + +package server + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockAgentsStateUpdater is an autogenerated mock type for the agentsStateUpdater type +type mockAgentsStateUpdater struct { + mock.Mock +} + +// UpdateAgentsState provides a mock function with given fields: ctx +func (_m *mockAgentsStateUpdater) UpdateAgentsState(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for UpdateAgentsState") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockAgentsStateUpdater creates a new instance of mockAgentsStateUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockAgentsStateUpdater(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockAgentsStateUpdater { + mock := &mockAgentsStateUpdater{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/server/mock_checks_service_test.go b/managed/services/server/mock_checks_service_test.go new file mode 100644 index 0000000000..2f2e1d04e8 --- /dev/null +++ b/managed/services/server/mock_checks_service_test.go @@ -0,0 +1,63 @@ +// Code generated by mockery. DO NOT EDIT. + +package server + +import ( + context "context" + time "time" + + mock "github.com/stretchr/testify/mock" +) + +// mockChecksService is an autogenerated mock type for the checksService type +type mockChecksService struct { + mock.Mock +} + +// CleanupAlerts provides a mock function with given fields: +func (_m *mockChecksService) CleanupAlerts() { + _m.Called() +} + +// CollectAdvisors provides a mock function with given fields: ctx +func (_m *mockChecksService) CollectAdvisors(ctx context.Context) { + _m.Called(ctx) +} + +// StartChecks provides a mock function with given fields: checkNames +func (_m *mockChecksService) StartChecks(checkNames []string) error { + ret := _m.Called(checkNames) + + if len(ret) == 0 { + panic("no return value specified for StartChecks") + } + + var r0 error + if rf, ok := ret.Get(0).(func([]string) error); ok { + r0 = rf(checkNames) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// UpdateIntervals provides a mock function with given fields: rare, standard, frequent +func (_m *mockChecksService) UpdateIntervals(rare time.Duration, standard time.Duration, frequent time.Duration) { + _m.Called(rare, standard, frequent) +} + +// newMockChecksService creates a new instance of mockChecksService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockChecksService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockChecksService { + mock := &mockChecksService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/server/mock_grafana_client_test.go b/managed/services/server/mock_grafana_client_test.go new file mode 100644 index 0000000000..ae782b1e40 --- /dev/null +++ b/managed/services/server/mock_grafana_client_test.go @@ -0,0 +1,47 @@ +// Code generated by mockery. DO NOT EDIT. + +package server + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockGrafanaClient is an autogenerated mock type for the grafanaClient type +type mockGrafanaClient struct { + mock.Mock +} + +// IsReady provides a mock function with given fields: ctx +func (_m *mockGrafanaClient) IsReady(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for IsReady") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockGrafanaClient creates a new instance of mockGrafanaClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockGrafanaClient(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockGrafanaClient { + mock := &mockGrafanaClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/server/mock_prometheus_service_test.go b/managed/services/server/mock_prometheus_service_test.go new file mode 100644 index 0000000000..352ea8b250 --- /dev/null +++ b/managed/services/server/mock_prometheus_service_test.go @@ -0,0 +1,52 @@ +// Code generated by mockery. DO NOT EDIT. + +package server + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockPrometheusService is an autogenerated mock type for the prometheusService type +type mockPrometheusService struct { + mock.Mock +} + +// IsReady provides a mock function with given fields: ctx +func (_m *mockPrometheusService) IsReady(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for IsReady") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// RequestConfigurationUpdate provides a mock function with given fields: +func (_m *mockPrometheusService) RequestConfigurationUpdate() { + _m.Called() +} + +// newMockPrometheusService creates a new instance of mockPrometheusService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockPrometheusService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockPrometheusService { + mock := &mockPrometheusService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/server/mock_supervisord_service_test.go b/managed/services/server/mock_supervisord_service_test.go new file mode 100644 index 0000000000..792e5987f1 --- /dev/null +++ b/managed/services/server/mock_supervisord_service_test.go @@ -0,0 +1,47 @@ +// Code generated by mockery. DO NOT EDIT. + +package server + +import ( + mock "github.com/stretchr/testify/mock" + + models "github.com/percona/pmm/managed/models" +) + +// mockSupervisordService is an autogenerated mock type for the supervisordService type +type mockSupervisordService struct { + mock.Mock +} + +// UpdateConfiguration provides a mock function with given fields: settings, ssoDetails +func (_m *mockSupervisordService) UpdateConfiguration(settings *models.Settings, ssoDetails *models.PerconaSSODetails) error { + ret := _m.Called(settings, ssoDetails) + + if len(ret) == 0 { + panic("no return value specified for UpdateConfiguration") + } + + var r0 error + if rf, ok := ret.Get(0).(func(*models.Settings, *models.PerconaSSODetails) error); ok { + r0 = rf(settings, ssoDetails) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockSupervisordService creates a new instance of mockSupervisordService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockSupervisordService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockSupervisordService { + mock := &mockSupervisordService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/server/mock_telemetry_service_test.go b/managed/services/server/mock_telemetry_service_test.go new file mode 100644 index 0000000000..4b94e03f27 --- /dev/null +++ b/managed/services/server/mock_telemetry_service_test.go @@ -0,0 +1,67 @@ +// Code generated by mockery. DO NOT EDIT. + +package server + +import ( + mock "github.com/stretchr/testify/mock" + + serverv1 "github.com/percona/pmm/api/server/v1" +) + +// mockTelemetryService is an autogenerated mock type for the telemetryService type +type mockTelemetryService struct { + mock.Mock +} + +// DistributionMethod provides a mock function with given fields: +func (_m *mockTelemetryService) DistributionMethod() serverv1.DistributionMethod { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for DistributionMethod") + } + + var r0 serverv1.DistributionMethod + if rf, ok := ret.Get(0).(func() serverv1.DistributionMethod); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(serverv1.DistributionMethod) + } + + return r0 +} + +// GetSummaries provides a mock function with given fields: +func (_m *mockTelemetryService) GetSummaries() []string { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetSummaries") + } + + var r0 []string + if rf, ok := ret.Get(0).(func() []string); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]string) + } + } + + return r0 +} + +// newMockTelemetryService creates a new instance of mockTelemetryService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockTelemetryService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockTelemetryService { + mock := &mockTelemetryService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/server/mock_templates_service_test.go b/managed/services/server/mock_templates_service_test.go new file mode 100644 index 0000000000..e0f75bcf0c --- /dev/null +++ b/managed/services/server/mock_templates_service_test.go @@ -0,0 +1,34 @@ +// Code generated by mockery. DO NOT EDIT. + +package server + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockTemplatesService is an autogenerated mock type for the templatesService type +type mockTemplatesService struct { + mock.Mock +} + +// CollectTemplates provides a mock function with given fields: ctx +func (_m *mockTemplatesService) CollectTemplates(ctx context.Context) { + _m.Called(ctx) +} + +// newMockTemplatesService creates a new instance of mockTemplatesService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockTemplatesService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockTemplatesService { + mock := &mockTemplatesService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/server/mock_vm_alert_external_rules_test.go b/managed/services/server/mock_vm_alert_external_rules_test.go new file mode 100644 index 0000000000..80b12640e9 --- /dev/null +++ b/managed/services/server/mock_vm_alert_external_rules_test.go @@ -0,0 +1,111 @@ +// Code generated by mockery. DO NOT EDIT. + +package server + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// mockVmAlertExternalRules is an autogenerated mock type for the vmAlertExternalRules type +type mockVmAlertExternalRules struct { + mock.Mock +} + +// ReadRules provides a mock function with given fields: +func (_m *mockVmAlertExternalRules) ReadRules() (string, error) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for ReadRules") + } + + var r0 string + var r1 error + if rf, ok := ret.Get(0).(func() (string, error)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() string); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(string) + } + + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// RemoveRulesFile provides a mock function with given fields: +func (_m *mockVmAlertExternalRules) RemoveRulesFile() error { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for RemoveRulesFile") + } + + var r0 error + if rf, ok := ret.Get(0).(func() error); ok { + r0 = rf() + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// ValidateRules provides a mock function with given fields: ctx, rules +func (_m *mockVmAlertExternalRules) ValidateRules(ctx context.Context, rules string) error { + ret := _m.Called(ctx, rules) + + if len(ret) == 0 { + panic("no return value specified for ValidateRules") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = rf(ctx, rules) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// WriteRules provides a mock function with given fields: rules +func (_m *mockVmAlertExternalRules) WriteRules(rules string) error { + ret := _m.Called(rules) + + if len(ret) == 0 { + panic("no return value specified for WriteRules") + } + + var r0 error + if rf, ok := ret.Get(0).(func(string) error); ok { + r0 = rf(rules) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockVmAlertExternalRules creates a new instance of mockVmAlertExternalRules. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockVmAlertExternalRules(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockVmAlertExternalRules { + mock := &mockVmAlertExternalRules{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/telemetry/mock_data_source_locator_test.go b/managed/services/telemetry/mock_data_source_locator_test.go new file mode 100644 index 0000000000..8663cd5ee0 --- /dev/null +++ b/managed/services/telemetry/mock_data_source_locator_test.go @@ -0,0 +1,55 @@ +// Code generated by mockery. DO NOT EDIT. + +package telemetry + +import mock "github.com/stretchr/testify/mock" + +// mockDataSourceLocator is an autogenerated mock type for the DataSourceLocator type +type mockDataSourceLocator struct { + mock.Mock +} + +// LocateTelemetryDataSource provides a mock function with given fields: name +func (_m *mockDataSourceLocator) LocateTelemetryDataSource(name string) (DataSource, error) { + ret := _m.Called(name) + + if len(ret) == 0 { + panic("no return value specified for LocateTelemetryDataSource") + } + + var r0 DataSource + var r1 error + if rf, ok := ret.Get(0).(func(string) (DataSource, error)); ok { + return rf(name) + } + if rf, ok := ret.Get(0).(func(string) DataSource); ok { + r0 = rf(name) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(DataSource) + } + } + + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(name) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// newMockDataSourceLocator creates a new instance of mockDataSourceLocator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockDataSourceLocator(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockDataSourceLocator { + mock := &mockDataSourceLocator{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/telemetry/mock_data_source_test.go b/managed/services/telemetry/mock_data_source_test.go new file mode 100644 index 0000000000..e6b004ebb5 --- /dev/null +++ b/managed/services/telemetry/mock_data_source_test.go @@ -0,0 +1,114 @@ +// Code generated by mockery. DO NOT EDIT. + +package telemetry + +import ( + context "context" + + genericv1 "github.com/percona/saas/gen/telemetry/generic" + mock "github.com/stretchr/testify/mock" +) + +// mockDataSource is an autogenerated mock type for the DataSource type +type mockDataSource struct { + mock.Mock +} + +// Dispose provides a mock function with given fields: ctx +func (_m *mockDataSource) Dispose(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Dispose") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// Enabled provides a mock function with given fields: +func (_m *mockDataSource) Enabled() bool { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for Enabled") + } + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} + +// FetchMetrics provides a mock function with given fields: ctx, config +func (_m *mockDataSource) FetchMetrics(ctx context.Context, config Config) ([]*genericv1.GenericReport_Metric, error) { + ret := _m.Called(ctx, config) + + if len(ret) == 0 { + panic("no return value specified for FetchMetrics") + } + + var r0 []*genericv1.GenericReport_Metric + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, Config) ([]*genericv1.GenericReport_Metric, error)); ok { + return rf(ctx, config) + } + if rf, ok := ret.Get(0).(func(context.Context, Config) []*genericv1.GenericReport_Metric); ok { + r0 = rf(ctx, config) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]*genericv1.GenericReport_Metric) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, Config) error); ok { + r1 = rf(ctx, config) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// Init provides a mock function with given fields: ctx +func (_m *mockDataSource) Init(ctx context.Context) error { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for Init") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockDataSource creates a new instance of mockDataSource. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockDataSource(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockDataSource { + mock := &mockDataSource{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/telemetry/mock_distribution_util_service_test.go b/managed/services/telemetry/mock_distribution_util_service_test.go new file mode 100644 index 0000000000..d4c8871399 --- /dev/null +++ b/managed/services/telemetry/mock_distribution_util_service_test.go @@ -0,0 +1,65 @@ +// Code generated by mockery. DO NOT EDIT. + +package telemetry + +import ( + pmmv1 "github.com/percona/saas/gen/telemetry/events/pmm" + mock "github.com/stretchr/testify/mock" + + serverv1 "github.com/percona/pmm/api/server/v1" +) + +// mockDistributionUtilService is an autogenerated mock type for the distributionUtilService type +type mockDistributionUtilService struct { + mock.Mock +} + +// GetDistributionMethodAndOS provides a mock function with given fields: +func (_m *mockDistributionUtilService) GetDistributionMethodAndOS() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string) { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for GetDistributionMethodAndOS") + } + + var r0 serverv1.DistributionMethod + var r1 pmmv1.DistributionMethod + var r2 string + if rf, ok := ret.Get(0).(func() (serverv1.DistributionMethod, pmmv1.DistributionMethod, string)); ok { + return rf() + } + if rf, ok := ret.Get(0).(func() serverv1.DistributionMethod); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(serverv1.DistributionMethod) + } + + if rf, ok := ret.Get(1).(func() pmmv1.DistributionMethod); ok { + r1 = rf() + } else { + r1 = ret.Get(1).(pmmv1.DistributionMethod) + } + + if rf, ok := ret.Get(2).(func() string); ok { + r2 = rf() + } else { + r2 = ret.Get(2).(string) + } + + return r0, r1, r2 +} + +// newMockDistributionUtilService creates a new instance of mockDistributionUtilService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockDistributionUtilService(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockDistributionUtilService { + mock := &mockDistributionUtilService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/telemetry/mock_sender_test.go b/managed/services/telemetry/mock_sender_test.go new file mode 100644 index 0000000000..3c943e8de4 --- /dev/null +++ b/managed/services/telemetry/mock_sender_test.go @@ -0,0 +1,48 @@ +// Code generated by mockery. DO NOT EDIT. + +package telemetry + +import ( + context "context" + + genericv1 "github.com/percona/saas/gen/telemetry/generic" + mock "github.com/stretchr/testify/mock" +) + +// mockSender is an autogenerated mock type for the sender type +type mockSender struct { + mock.Mock +} + +// SendTelemetry provides a mock function with given fields: ctx, report +func (_m *mockSender) SendTelemetry(ctx context.Context, report *genericv1.ReportRequest) error { + ret := _m.Called(ctx, report) + + if len(ret) == 0 { + panic("no return value specified for SendTelemetry") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, *genericv1.ReportRequest) error); ok { + r0 = rf(ctx, report) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// newMockSender creates a new instance of mockSender. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func newMockSender(t interface { + mock.TestingT + Cleanup(func()) +}, +) *mockSender { + mock := &mockSender{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/managed/services/versioncache/mock_versioner_test.go b/managed/services/versioncache/mock_versioner_test.go new file mode 100644 index 0000000000..ce2ca7190c --- /dev/null +++ b/managed/services/versioncache/mock_versioner_test.go @@ -0,0 +1,59 @@ +// Code generated by mockery. DO NOT EDIT. + +package versioncache + +import ( + mock "github.com/stretchr/testify/mock" + + agents "github.com/percona/pmm/managed/services/agents" +) + +// MockVersioner is an autogenerated mock type for the Versioner type +type MockVersioner struct { + mock.Mock +} + +// GetVersions provides a mock function with given fields: pmmAgentID, softwares +func (_m *MockVersioner) GetVersions(pmmAgentID string, softwares []agents.Software) ([]agents.Version, error) { + ret := _m.Called(pmmAgentID, softwares) + + if len(ret) == 0 { + panic("no return value specified for GetVersions") + } + + var r0 []agents.Version + var r1 error + if rf, ok := ret.Get(0).(func(string, []agents.Software) ([]agents.Version, error)); ok { + return rf(pmmAgentID, softwares) + } + if rf, ok := ret.Get(0).(func(string, []agents.Software) []agents.Version); ok { + r0 = rf(pmmAgentID, softwares) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]agents.Version) + } + } + + if rf, ok := ret.Get(1).(func(string, []agents.Software) error); ok { + r1 = rf(pmmAgentID, softwares) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NewMockVersioner creates a new instance of MockVersioner. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewMockVersioner(t interface { + mock.TestingT + Cleanup(func()) +}, +) *MockVersioner { + mock := &MockVersioner{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} From 614270fdac9a5d82b07c0664a99ff154a0b98158 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Thu, 19 Dec 2024 21:59:36 +0300 Subject: [PATCH 03/10] PMM-13629 fix tests. --- managed/models/agent_helpers_test.go | 258 ++++++++-------------- managed/models/agent_model_test.go | 6 +- managed/services/management/agent_test.go | 154 ++----------- 3 files changed, 115 insertions(+), 303 deletions(-) diff --git a/managed/models/agent_helpers_test.go b/managed/models/agent_helpers_test.go index 3fed20a0eb..14e3e15683 100644 --- a/managed/models/agent_helpers_test.go +++ b/managed/models/agent_helpers_test.go @@ -178,15 +178,14 @@ func TestAgentHelpers(t *testing.T) { }, }, &models.Agent{ - AgentID: "A10", - AgentType: models.MongoDBExporterType, - PMMAgentID: pointer.ToString("A10"), - RunsOnNodeID: nil, - NodeID: pointer.ToString("N1"), - ListenPort: pointer.ToUint16(8200), - TLS: true, - TLSSkipVerify: true, - MongoDBOptions: nil, + AgentID: "A10", + AgentType: models.MongoDBExporterType, + PMMAgentID: pointer.ToString("A10"), + RunsOnNodeID: nil, + NodeID: pointer.ToString("N1"), + ListenPort: pointer.ToUint16(8200), + TLS: true, + TLSSkipVerify: true, }, } { require.NoError(t, q.Insert(str)) @@ -207,41 +206,27 @@ func TestAgentHelpers(t *testing.T) { require.NoError(t, err) expected := []*models.Agent{ { - CreatedAt: now, - UpdatedAt: now, - Status: models.AgentStatusUnknown, - AgentID: "A10", - AgentType: models.MongoDBExporterType, - PMMAgentID: pointer.ToString("A10"), - RunsOnNodeID: nil, - NodeID: pointer.ToString("N1"), - ListenPort: pointer.ToUint16(8200), - TLS: true, - TLSSkipVerify: true, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, + CreatedAt: now, + UpdatedAt: now, + Status: models.AgentStatusUnknown, + AgentID: "A10", + AgentType: models.MongoDBExporterType, + PMMAgentID: pointer.ToString("A10"), + RunsOnNodeID: nil, + NodeID: pointer.ToString("N1"), + ListenPort: pointer.ToUint16(8200), + TLS: true, + TLSSkipVerify: true, }, { - AgentID: "A3", - AgentType: models.NodeExporterType, - PMMAgentID: pointer.ToStringOrNil("A1"), - RunsOnNodeID: nil, - CreatedAt: now, - UpdatedAt: now, - NodeID: pointer.ToString("N1"), - Status: models.AgentStatusUnknown, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, + AgentID: "A3", + AgentType: models.NodeExporterType, + PMMAgentID: pointer.ToStringOrNil("A1"), + RunsOnNodeID: nil, + CreatedAt: now, + UpdatedAt: now, + NodeID: pointer.ToString("N1"), + Status: models.AgentStatusUnknown, }, { AgentID: "A7", @@ -261,11 +246,6 @@ func TestAgentHelpers(t *testing.T) { LR: 15 * time.Minute, }, }, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, PostgreSQLOptions: models.PostgreSQLOptions{ SSLCa: "ssl_ca", SSLCert: "ssl_cert", @@ -273,20 +253,16 @@ func TestAgentHelpers(t *testing.T) { }, }, { - AgentID: "A8", - AgentType: "mongodb_exporter", - NodeID: pointer.ToStringOrNil("N1"), - PMMAgentID: pointer.ToStringOrNil("A8"), - CreatedAt: now, - UpdatedAt: now, - Status: models.AgentStatusUnknown, - ListenPort: pointer.ToUint16OrNil(8200), - TLS: true, - TLSSkipVerify: true, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, + AgentID: "A8", + AgentType: "mongodb_exporter", + NodeID: pointer.ToStringOrNil("N1"), + PMMAgentID: pointer.ToStringOrNil("A8"), + CreatedAt: now, + UpdatedAt: now, + Status: models.AgentStatusUnknown, + ListenPort: pointer.ToUint16OrNil(8200), + TLS: true, + TLSSkipVerify: true, MongoDBOptions: models.MongoDBOptions{ TLSCertificateKey: "tls_certificate_key", TLSCertificateKeyFilePassword: "tls_certificate_key_file_password", @@ -296,24 +272,18 @@ func TestAgentHelpers(t *testing.T) { StatsCollections: nil, CollectionsLimit: 0, // no limit }, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, }, { - AgentID: "A9", - AgentType: "mongodb_exporter", - NodeID: pointer.ToStringOrNil("N1"), - PMMAgentID: pointer.ToStringOrNil("A9"), - CreatedAt: now, - UpdatedAt: now, - Status: models.AgentStatusUnknown, - ListenPort: pointer.ToUint16OrNil(8200), - TLS: true, - TLSSkipVerify: true, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, + AgentID: "A9", + AgentType: "mongodb_exporter", + NodeID: pointer.ToStringOrNil("N1"), + PMMAgentID: pointer.ToStringOrNil("A9"), + CreatedAt: now, + UpdatedAt: now, + Status: models.AgentStatusUnknown, + ListenPort: pointer.ToUint16OrNil(8200), + TLS: true, + TLSSkipVerify: true, MongoDBOptions: models.MongoDBOptions{ TLSCertificateKey: "tls_certificate_key", TLSCertificateKeyFilePassword: "tls_certificate_key_file_password", @@ -324,8 +294,6 @@ func TestAgentHelpers(t *testing.T) { CollectionsLimit: 79014, EnableAllCollectors: true, }, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, }, } assert.Equal(t, expected, agents) @@ -338,37 +306,23 @@ func TestAgentHelpers(t *testing.T) { agents, err := models.FindAgents(q, models.AgentFilters{PMMAgentID: "A1"}) require.NoError(t, err) expected := []*models.Agent{{ - AgentID: "A2", - AgentType: models.MySQLdExporterType, - PMMAgentID: pointer.ToStringOrNil("A1"), - ServiceID: pointer.ToString("S1"), - RunsOnNodeID: nil, - CreatedAt: now, - UpdatedAt: now, - Status: models.AgentStatusUnknown, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, + AgentID: "A2", + AgentType: models.MySQLdExporterType, + PMMAgentID: pointer.ToStringOrNil("A1"), + ServiceID: pointer.ToString("S1"), + RunsOnNodeID: nil, + CreatedAt: now, + UpdatedAt: now, + Status: models.AgentStatusUnknown, }, { - AgentID: "A3", - AgentType: models.NodeExporterType, - PMMAgentID: pointer.ToStringOrNil("A1"), - NodeID: pointer.ToString("N1"), - RunsOnNodeID: nil, - CreatedAt: now, - UpdatedAt: now, - Status: models.AgentStatusUnknown, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, + AgentID: "A3", + AgentType: models.NodeExporterType, + PMMAgentID: pointer.ToStringOrNil("A1"), + NodeID: pointer.ToString("N1"), + RunsOnNodeID: nil, + CreatedAt: now, + UpdatedAt: now, + Status: models.AgentStatusUnknown, }} assert.Equal(t, expected, agents) }) @@ -380,21 +334,14 @@ func TestAgentHelpers(t *testing.T) { agents, err := models.FindAgents(q, models.AgentFilters{PMMAgentID: "A1", AgentType: pointerToAgentType(models.MySQLdExporterType)}) require.NoError(t, err) expected := []*models.Agent{{ - AgentID: "A2", - AgentType: models.MySQLdExporterType, - PMMAgentID: pointer.ToStringOrNil("A1"), - ServiceID: pointer.ToString("S1"), - RunsOnNodeID: nil, - CreatedAt: now, - UpdatedAt: now, - Status: models.AgentStatusUnknown, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, + AgentID: "A2", + AgentType: models.MySQLdExporterType, + PMMAgentID: pointer.ToStringOrNil("A1"), + ServiceID: pointer.ToString("S1"), + RunsOnNodeID: nil, + CreatedAt: now, + UpdatedAt: now, + Status: models.AgentStatusUnknown, }} assert.Equal(t, expected, agents) }) @@ -406,42 +353,28 @@ func TestAgentHelpers(t *testing.T) { agents, err := models.FindAgents(q, models.AgentFilters{ServiceID: "S1"}) require.NoError(t, err) expected := []*models.Agent{{ - AgentID: "A2", - AgentType: models.MySQLdExporterType, - PMMAgentID: pointer.ToStringOrNil("A1"), - ServiceID: pointer.ToString("S1"), - RunsOnNodeID: nil, - CreatedAt: now, - UpdatedAt: now, - Status: models.AgentStatusUnknown, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, + AgentID: "A2", + AgentType: models.MySQLdExporterType, + PMMAgentID: pointer.ToStringOrNil("A1"), + ServiceID: pointer.ToString("S1"), + RunsOnNodeID: nil, + CreatedAt: now, + UpdatedAt: now, + Status: models.AgentStatusUnknown, }} assert.Equal(t, expected, agents) agents, err = models.FindAgents(q, models.AgentFilters{ServiceID: "S1", AgentType: pointerToAgentType(models.MySQLdExporterType)}) require.NoError(t, err) expected = []*models.Agent{{ - AgentID: "A2", - AgentType: models.MySQLdExporterType, - PMMAgentID: pointer.ToStringOrNil("A1"), - ServiceID: pointer.ToString("S1"), - RunsOnNodeID: nil, - CreatedAt: now, - UpdatedAt: now, - Status: models.AgentStatusUnknown, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, + AgentID: "A2", + AgentType: models.MySQLdExporterType, + PMMAgentID: pointer.ToStringOrNil("A1"), + ServiceID: pointer.ToString("S1"), + RunsOnNodeID: nil, + CreatedAt: now, + UpdatedAt: now, + Status: models.AgentStatusUnknown, }} assert.Equal(t, expected, agents) @@ -471,18 +404,11 @@ func TestAgentHelpers(t *testing.T) { tests.AssertGRPCError(t, status.New(codes.FailedPrecondition, `pmm-agent with ID A1 has agents.`), err) expected := &models.Agent{ - AgentID: "A1", - AgentType: models.PMMAgentType, - RunsOnNodeID: pointer.ToString("N1"), - CreatedAt: now, - UpdatedAt: now, - ExporterOptions: models.ExporterOptions{}, - QANOptions: models.QANOptions{}, - AWSOptions: models.AWSOptions{}, - AzureOptions: models.AzureOptions{}, - MongoDBOptions: models.MongoDBOptions{}, - MySQLOptions: models.MySQLOptions{}, - PostgreSQLOptions: models.PostgreSQLOptions{}, + AgentID: "A1", + AgentType: models.PMMAgentType, + RunsOnNodeID: pointer.ToString("N1"), + CreatedAt: now, + UpdatedAt: now, } agent, err = models.RemoveAgent(q, "A1", models.RemoveCascade) assert.Equal(t, expected, agent) diff --git a/managed/models/agent_model_test.go b/managed/models/agent_model_test.go index fe35c68788..d95e153b8a 100644 --- a/managed/models/agent_model_test.go +++ b/managed/models/agent_model_test.go @@ -151,9 +151,9 @@ func TestAgent(t *testing.T) { Password: pointer.ToString("s3cur3 p@$$w0r4."), TLS: true, ExporterOptions: models.ExporterOptions{}, - MongoDBOptions: &mongoDBOptions, - MySQLOptions: &mysqlOptions, - PostgreSQLOptions: &postgresqlOptions, + MongoDBOptions: mongoDBOptions, + MySQLOptions: mysqlOptions, + PostgreSQLOptions: postgresqlOptions, } service := &models.Service{ Address: pointer.ToString("1.2.3.4"), diff --git a/managed/services/management/agent_test.go b/managed/services/management/agent_test.go index 40705bc901..e6d0461f73 100644 --- a/managed/services/management/agent_test.go +++ b/managed/services/management/agent_test.go @@ -148,78 +148,36 @@ func TestAgentService(t *testing.T) { expected := []*agentv1.UniversalAgent{ { - AgentId: pgExporterID, - AgentType: "postgres_exporter", - PmmAgentId: models.PMMServerAgentID, - IsConnected: false, - CreatedAt: timestamppb.New(now), - UpdatedAt: timestamppb.New(now), - Username: "postgres", + AgentId: pgExporterID, + AgentType: "postgres_exporter", + PmmAgentId: models.PMMServerAgentID, + IsConnected: false, + CreatedAt: timestamppb.New(now), + UpdatedAt: timestamppb.New(now), + Username: "postgres", + PostgresqlOptions: &agentv1.UniversalAgent_PostgreSQLOptions{ + IsSslKeySet: false, + }, ServiceId: "00000000-0000-4000-8000-000000000002", Status: "AGENT_STATUS_UNKNOWN", Tls: true, CommentsParsingDisabled: true, - AzureOptions: &agentv1.UniversalAgent_AzureOptions{ - ClientId: "", - IsClientSecretSet: false, - ResourceGroup: "", - SubscriptionId: "", - TenantId: "", - }, - MongoDbOptions: &agentv1.UniversalAgent_MongoDBOptions{ - IsTlsCertificateKeySet: false, - IsTlsCertificateKeyFilePasswordSet: false, - AuthenticationMechanism: "", - AuthenticationDatabase: "", - StatsCollections: nil, - CollectionsLimit: 0, - EnableAllCollectors: false, - }, - MysqlOptions: &agentv1.UniversalAgent_MySQLOptions{ - IsTlsKeySet: false, - }, - PostgresqlOptions: &agentv1.UniversalAgent_PostgreSQLOptions{ - IsSslKeySet: false, - AutoDiscoveryLimit: 0, - MaxExporterConnections: 0, - }, }, { - AgentId: pgStatStatementID, - AgentType: "qan-postgresql-pgstatements-agent", - PmmAgentId: models.PMMServerAgentID, - IsConnected: false, - CreatedAt: timestamppb.New(now), - UpdatedAt: timestamppb.New(now), - Username: "postgres", + AgentId: pgStatStatementID, + AgentType: "qan-postgresql-pgstatements-agent", + PmmAgentId: models.PMMServerAgentID, + IsConnected: false, + CreatedAt: timestamppb.New(now), + UpdatedAt: timestamppb.New(now), + Username: "postgres", + PostgresqlOptions: &agentv1.UniversalAgent_PostgreSQLOptions{ + IsSslKeySet: false, + }, ServiceId: "00000000-0000-4000-8000-000000000002", Status: "AGENT_STATUS_UNKNOWN", Tls: true, CommentsParsingDisabled: true, - AzureOptions: &agentv1.UniversalAgent_AzureOptions{ - ClientId: "", - IsClientSecretSet: false, - ResourceGroup: "", - SubscriptionId: "", - TenantId: "", - }, - MongoDbOptions: &agentv1.UniversalAgent_MongoDBOptions{ - IsTlsCertificateKeySet: false, - IsTlsCertificateKeyFilePasswordSet: false, - AuthenticationMechanism: "", - AuthenticationDatabase: "", - StatsCollections: nil, - CollectionsLimit: 0, - EnableAllCollectors: false, - }, - MysqlOptions: &agentv1.UniversalAgent_MySQLOptions{ - IsTlsKeySet: false, - }, - PostgresqlOptions: &agentv1.UniversalAgent_PostgreSQLOptions{ - IsSslKeySet: false, - AutoDiscoveryLimit: 0, - MaxExporterConnections: 0, - }, }, { AgentId: models.PMMServerAgentID, @@ -228,30 +186,6 @@ func TestAgentService(t *testing.T) { IsConnected: true, CreatedAt: timestamppb.New(now), UpdatedAt: timestamppb.New(now), - AzureOptions: &agentv1.UniversalAgent_AzureOptions{ - ClientId: "", - IsClientSecretSet: false, - ResourceGroup: "", - SubscriptionId: "", - TenantId: "", - }, - MongoDbOptions: &agentv1.UniversalAgent_MongoDBOptions{ - IsTlsCertificateKeySet: false, - IsTlsCertificateKeyFilePasswordSet: false, - AuthenticationMechanism: "", - AuthenticationDatabase: "", - StatsCollections: nil, - CollectionsLimit: 0, - EnableAllCollectors: false, - }, - MysqlOptions: &agentv1.UniversalAgent_MySQLOptions{ - IsTlsKeySet: false, - }, - PostgresqlOptions: &agentv1.UniversalAgent_PostgreSQLOptions{ - IsSslKeySet: false, - AutoDiscoveryLimit: 0, - MaxExporterConnections: 0, - }, }, } @@ -303,30 +237,6 @@ func TestAgentService(t *testing.T) { UpdatedAt: timestamppb.New(now), ServiceId: "00000000-0000-4000-8000-000000000006", Status: "AGENT_STATUS_UNKNOWN", - AzureOptions: &agentv1.UniversalAgent_AzureOptions{ - ClientId: "", - IsClientSecretSet: false, - ResourceGroup: "", - SubscriptionId: "", - TenantId: "", - }, - MongoDbOptions: &agentv1.UniversalAgent_MongoDBOptions{ - IsTlsCertificateKeySet: false, - IsTlsCertificateKeyFilePasswordSet: false, - AuthenticationMechanism: "", - AuthenticationDatabase: "", - StatsCollections: nil, - CollectionsLimit: 0, - EnableAllCollectors: false, - }, - MysqlOptions: &agentv1.UniversalAgent_MySQLOptions{ - IsTlsKeySet: false, - }, - PostgresqlOptions: &agentv1.UniversalAgent_PostgreSQLOptions{ - IsSslKeySet: false, - AutoDiscoveryLimit: 0, - MaxExporterConnections: 0, - }, }, } assert.Equal(t, expected, response.Agents) @@ -377,30 +287,6 @@ func TestAgentService(t *testing.T) { UpdatedAt: timestamppb.New(now), ServiceId: "00000000-0000-4000-8000-000000000006", Status: "AGENT_STATUS_UNKNOWN", - AzureOptions: &agentv1.UniversalAgent_AzureOptions{ - ClientId: "", - IsClientSecretSet: false, - ResourceGroup: "", - SubscriptionId: "", - TenantId: "", - }, - MongoDbOptions: &agentv1.UniversalAgent_MongoDBOptions{ - IsTlsCertificateKeySet: false, - IsTlsCertificateKeyFilePasswordSet: false, - AuthenticationMechanism: "", - AuthenticationDatabase: "", - StatsCollections: nil, - CollectionsLimit: 0, - EnableAllCollectors: false, - }, - MysqlOptions: &agentv1.UniversalAgent_MySQLOptions{ - IsTlsKeySet: false, - }, - PostgresqlOptions: &agentv1.UniversalAgent_PostgreSQLOptions{ - IsSslKeySet: false, - AutoDiscoveryLimit: 0, - MaxExporterConnections: 0, - }, }, } assert.Equal(t, expected, response.Agents) From 941414b8c01e04be265a46748bae2e23312d8fd3 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Thu, 19 Dec 2024 22:08:45 +0300 Subject: [PATCH 04/10] PMM-13629 Add comments. --- managed/models/agent_model.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/managed/models/agent_model.go b/managed/models/agent_model.go index 78f0c934be..a7c515f3b2 100644 --- a/managed/models/agent_model.go +++ b/managed/models/agent_model.go @@ -94,6 +94,16 @@ func (c ExporterOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *ExporterOptions) Scan(src interface{}) error { return jsonScan(c, src) } +// IsEmpty returns true if all ExporterOptions fields are unset or have zero values, otherwise returns false. +func (c ExporterOptions) IsEmpty() bool { + return !c.ExposeExporter && + !c.PushMetrics && + len(c.DisabledCollectors) == 0 && + c.MetricsResolutions == nil && + c.MetricsPath == "" && + c.MetricsScheme == "" +} + // QANOptions represents structure for special QAN options. type QANOptions struct { MaxQueryLength int32 `json:"max_query_length"` @@ -108,6 +118,14 @@ func (c QANOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *QANOptions) Scan(src interface{}) error { return jsonScan(c, src) } +// IsEmpty returns true if all QANOptions fields are unset or have zero values, otherwise returns false. +func (c QANOptions) IsEmpty() bool { + return c.MaxQueryLength == 0 && + c.MaxQueryLogSize == 0 && + !c.QueryExamplesDisabled && + !c.CommentsParsingDisabled +} + // AWSOptions represents structure for special AWS options. type AWSOptions struct { AWSAccessKey string `json:"aws_access_key"` @@ -122,6 +140,7 @@ func (c AWSOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *AWSOptions) Scan(src interface{}) error { return jsonScan(c, src) } +// IsEmpty returns true if all AWSOptions fields are unset or have zero values, otherwise returns false. func (c AWSOptions) IsEmpty() bool { return c.AWSAccessKey == "" && c.AWSSecretKey == "" && @@ -144,6 +163,7 @@ func (c AzureOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *AzureOptions) Scan(src interface{}) error { return jsonScan(c, src) } +// IsEmpty returns true if all AzureOptions fields are unset or have zero values, otherwise returns false. func (c AzureOptions) IsEmpty() bool { return c.SubscriptionID == "" && c.ClientID == "" && @@ -170,6 +190,7 @@ func (c MongoDBOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *MongoDBOptions) Scan(src interface{}) error { return jsonScan(c, src) } +// IsEmpty returns true if all MongoDBOptions fields are unset or have zero values, otherwise returns false. func (c MongoDBOptions) IsEmpty() bool { return c.TLSCertificateKey == "" && c.TLSCertificateKeyFilePassword == "" && @@ -203,6 +224,7 @@ func (c MySQLOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *MySQLOptions) Scan(src interface{}) error { return jsonScan(c, src) } +// IsEmpty returns true if all MySQLOptions fields are unset or have zero values, otherwise returns false. func (c MySQLOptions) IsEmpty() bool { return c.TLSCa == "" && c.TLSCert == "" && @@ -228,6 +250,7 @@ func (c PostgreSQLOptions) Value() (driver.Value, error) { return jsonValue(c) } // Scan implements database/sql.Scanner interface. Should be defined on the pointer. func (c *PostgreSQLOptions) Scan(src interface{}) error { return jsonScan(c, src) } +// IsEmpty returns true if all PostgreSQLOptions fields are unset or have zero values, otherwise returns false. func (c PostgreSQLOptions) IsEmpty() bool { return c.SSLCa == "" && c.SSLCert == "" && From 0a19d38245222834df0cff9ddc9f936ba3490257 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Thu, 19 Dec 2024 22:37:18 +0300 Subject: [PATCH 05/10] PMM-13629 Fix tests. --- managed/services/management/agent.go | 27 +++++++++-------------- managed/services/management/agent_test.go | 17 +++++++------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/managed/services/management/agent.go b/managed/services/management/agent.go index 99c221ca63..207f7904e2 100644 --- a/managed/services/management/agent.go +++ b/managed/services/management/agent.go @@ -159,13 +159,8 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive ua.QueryExamplesDisabled = agent.QANOptions.QueryExamplesDisabled ua.CommentsParsingDisabled = agent.QANOptions.CommentsParsingDisabled - // AWS options - ua.IsAwsSecretKeySet = agent.AWSOptions.AWSAccessKey != "" - ua.AwsAccessKey = agent.AWSOptions.AWSAccessKey - ua.RdsBasicMetricsDisabled = agent.AWSOptions.RDSBasicMetricsDisabled - ua.RdsEnhancedMetricsDisabled = agent.AWSOptions.RDSEnhancedMetricsDisabled - - if !agent.AzureOptions.IsEmpty() { + switch agent.AgentType { + case models.AzureDatabaseExporterType: ua.AzureOptions = &managementv1.UniversalAgent_AzureOptions{ ClientId: agent.AzureOptions.ClientID, IsClientSecretSet: agent.AzureOptions.ClientSecret != "", @@ -173,9 +168,7 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive SubscriptionId: agent.AzureOptions.SubscriptionID, ResourceGroup: agent.AzureOptions.ResourceGroup, } - } - - if !agent.MongoDBOptions.IsEmpty() { + case models.MongoDBExporterType, models.QANMongoDBProfilerAgentType: ua.MongoDbOptions = &managementv1.UniversalAgent_MongoDBOptions{ AuthenticationMechanism: agent.MongoDBOptions.AuthenticationMechanism, AuthenticationDatabase: agent.MongoDBOptions.AuthenticationDatabase, @@ -185,23 +178,23 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive IsTlsCertificateKeySet: agent.MongoDBOptions.TLSCertificateKey != "", IsTlsCertificateKeyFilePasswordSet: agent.MongoDBOptions.TLSCertificateKeyFilePassword != "", } - } - - if !agent.MySQLOptions.IsEmpty() { + case models.MySQLdExporterType, models.QANMySQLSlowlogAgentType, models.QANMySQLPerfSchemaAgentType: ua.MysqlOptions = &managementv1.UniversalAgent_MySQLOptions{ IsTlsKeySet: agent.MySQLOptions.TLSKey != "", } ua.TableCount = pointer.GetInt32(agent.MySQLOptions.TableCount) ua.TableCountTablestatsGroupLimit = agent.MySQLOptions.TableCountTablestatsGroupLimit - - } - - if !agent.PostgreSQLOptions.IsEmpty() { + case models.PostgresExporterType, models.QANPostgreSQLPgStatementsAgentType, models.QANPostgreSQLPgStatMonitorAgentType: ua.PostgresqlOptions = &managementv1.UniversalAgent_PostgreSQLOptions{ IsSslKeySet: agent.PostgreSQLOptions.SSLKey != "", AutoDiscoveryLimit: pointer.GetInt32(agent.PostgreSQLOptions.AutoDiscoveryLimit), MaxExporterConnections: agent.PostgreSQLOptions.MaxExporterConnections, } + case models.RDSExporterType: + ua.IsAwsSecretKeySet = agent.AWSOptions.AWSAccessKey != "" + ua.AwsAccessKey = agent.AWSOptions.AWSAccessKey + ua.RdsBasicMetricsDisabled = agent.AWSOptions.RDSBasicMetricsDisabled + ua.RdsEnhancedMetricsDisabled = agent.AWSOptions.RDSEnhancedMetricsDisabled } return ua, nil diff --git a/managed/services/management/agent_test.go b/managed/services/management/agent_test.go index e6d0461f73..97c6c36288 100644 --- a/managed/services/management/agent_test.go +++ b/managed/services/management/agent_test.go @@ -279,14 +279,15 @@ func TestAgentService(t *testing.T) { expected := []*agentv1.UniversalAgent{ { - AgentId: azureExporter.AgentID, - AgentType: "azure_database_exporter", - PmmAgentId: "00000000-0000-4000-8000-000000000007", - IsConnected: false, - CreatedAt: timestamppb.New(now), - UpdatedAt: timestamppb.New(now), - ServiceId: "00000000-0000-4000-8000-000000000006", - Status: "AGENT_STATUS_UNKNOWN", + AgentId: azureExporter.AgentID, + AgentType: "azure_database_exporter", + PmmAgentId: "00000000-0000-4000-8000-000000000007", + IsConnected: false, + CreatedAt: timestamppb.New(now), + UpdatedAt: timestamppb.New(now), + ServiceId: "00000000-0000-4000-8000-000000000006", + Status: "AGENT_STATUS_UNKNOWN", + AzureOptions: &agentv1.UniversalAgent_AzureOptions{}, }, } assert.Equal(t, expected, response.Agents) From 4cce3522b25eb6f67b82597030141d30f3907ed5 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Mon, 6 Jan 2025 12:20:22 +0300 Subject: [PATCH 06/10] PMM-13629 Fix linters. --- managed/services/management/agent.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/managed/services/management/agent.go b/managed/services/management/agent.go index 207f7904e2..6e0e2540d0 100644 --- a/managed/services/management/agent.go +++ b/managed/services/management/agent.go @@ -195,6 +195,8 @@ func (s *ManagementService) agentToAPI(agent *models.Agent) (*managementv1.Unive ua.AwsAccessKey = agent.AWSOptions.AWSAccessKey ua.RdsBasicMetricsDisabled = agent.AWSOptions.RDSBasicMetricsDisabled ua.RdsEnhancedMetricsDisabled = agent.AWSOptions.RDSEnhancedMetricsDisabled + default: + // Do nothing. } return ua, nil From 17a0dea61c1a82f2df5382b4bc3b1a2322ad59b2 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Mon, 6 Jan 2025 13:01:40 +0300 Subject: [PATCH 07/10] PMM-13629 Remove encryption.key. --- .gitignore | 1 + managed/services/agents/encryption.key | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 managed/services/agents/encryption.key diff --git a/.gitignore b/.gitignore index 2d01020e57..ee601f2d71 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ api-tests/pmm-api-tests-output.txt api-tests/pmm-api-tests-junit-report.xml packer.log +encryption.key \ No newline at end of file diff --git a/managed/services/agents/encryption.key b/managed/services/agents/encryption.key deleted file mode 100644 index 98c161d058..0000000000 --- a/managed/services/agents/encryption.key +++ /dev/null @@ -1 +0,0 @@ -CKSprv8IEmQKWAowdHlwZS5nb29nbGVhcGlzLmNvbS9nb29nbGUuY3J5cHRvLnRpbmsuQWVzR2NtS2V5EiIaIMxMAgxuYisbREYQUSmC4DsGOHJ/EVBhQa5SC0+j9cj9GAEQARikqa7/CCAB \ No newline at end of file From f1fcbd8f01119a1d056f4806bc2e6b3af71fe120 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Wed, 8 Jan 2025 11:24:56 +0300 Subject: [PATCH 08/10] PMM-13648 fix migration. --- managed/models/database.go | 55 +++++++---------- managed/models/database_test.go | 105 ++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+), 34 deletions(-) diff --git a/managed/models/database.go b/managed/models/database.go index 3185d42bab..7b4c0ccc95 100644 --- a/managed/models/database.go +++ b/managed/models/database.go @@ -1094,12 +1094,13 @@ var databaseSchema = [][]string{ `UPDATE agents SET postgresql_options = '{}'::jsonb WHERE postgresql_options IS NULL`, - `UPDATE agents SET exporter_options = jsonb_set(exporter_options, '{expose_exporter}', to_jsonb(expose_exporter));`, - `UPDATE agents SET exporter_options = jsonb_set(exporter_options, '{push_metrics}', to_jsonb(push_metrics));`, - `UPDATE agents SET exporter_options = jsonb_set(exporter_options, '{disabled_collectors}', to_jsonb(disabled_collectors));`, - `UPDATE agents SET exporter_options = jsonb_set(exporter_options, '{metrics_resolutions}', to_jsonb(metrics_resolutions));`, - `UPDATE agents SET exporter_options = jsonb_set(exporter_options, '{metrics_path}', to_jsonb(metrics_path));`, - `UPDATE agents SET exporter_options = jsonb_set(exporter_options, '{metrics_scheme}', to_jsonb(metrics_scheme));`, + `UPDATE agents SET exporter_options['expose_exporter'] = to_jsonb(expose_exporter)`, + `UPDATE agents SET exporter_options['push_metrics'] = to_jsonb(push_metrics)`, + `UPDATE agents SET exporter_options['disabled_collectors'] = to_jsonb(disabled_collectors)`, + `UPDATE agents SET exporter_options['metrics_resolutions'] = to_jsonb(metrics_resolutions)`, + `UPDATE agents SET exporter_options['metrics_path'] = to_jsonb(metrics_path)`, + `UPDATE agents SET exporter_options['metrics_scheme'] = to_jsonb(metrics_scheme)`, + `ALTER TABLE agents DROP COLUMN expose_exporter`, `ALTER TABLE agents DROP COLUMN push_metrics`, `ALTER TABLE agents DROP COLUMN disabled_collectors`, @@ -1107,42 +1108,28 @@ var databaseSchema = [][]string{ `ALTER TABLE agents DROP COLUMN metrics_path`, `ALTER TABLE agents DROP COLUMN metrics_scheme`, - `UPDATE agents SET qan_options = jsonb_set(qan_options, '{max_query_length}', to_jsonb(max_query_length));`, - `UPDATE agents SET qan_options = jsonb_set(qan_options, '{max_query_log_size}', to_jsonb(max_query_log_size));`, - `UPDATE agents SET qan_options = jsonb_set(qan_options, '{query_examples_disabled}', to_jsonb(query_examples_disabled));`, - `UPDATE agents SET qan_options = jsonb_set(qan_options, '{comments_parsing_disabled}', to_jsonb(comments_parsing_disabled));`, + `UPDATE agents SET qan_options['max_query_length'] = to_jsonb(max_query_length)`, + `UPDATE agents SET qan_options['max_query_log_size'] = to_jsonb(max_query_log_size)`, + `UPDATE agents SET qan_options['query_examples_disabled'] = to_jsonb(query_examples_disabled)`, + `UPDATE agents SET qan_options['comments_parsing_disabled'] = to_jsonb(comments_parsing_disabled)`, `ALTER TABLE agents DROP COLUMN max_query_length`, `ALTER TABLE agents DROP COLUMN max_query_log_size`, `ALTER TABLE agents DROP COLUMN query_examples_disabled`, `ALTER TABLE agents DROP COLUMN comments_parsing_disabled`, - `UPDATE agents SET aws_options = jsonb_set(aws_options, '{aws_access_key}', to_jsonb(aws_access_key));`, - `UPDATE agents SET aws_options = jsonb_set(aws_options, '{aws_secret_key}', to_jsonb(aws_secret_key));`, - `UPDATE agents SET aws_options = jsonb_set(aws_options, '{rds_basic_metrics_disabled}', to_jsonb(rds_basic_metrics_disabled));`, - `UPDATE agents SET aws_options = jsonb_set(aws_options, '{rds_enhanced_metrics_disabled}', to_jsonb(rds_enhanced_metrics_disabled));`, + `UPDATE agents SET aws_options['aws_access_key'] = to_jsonb(aws_access_key);`, + `UPDATE agents SET aws_options['aws_secret_key'] = to_jsonb(aws_secret_key);`, + `UPDATE agents SET aws_options['rds_basic_metrics_disabled'] = to_jsonb(rds_basic_metrics_disabled);`, + `UPDATE agents SET aws_options['rds_enhanced_metrics_disabled'] = to_jsonb(rds_enhanced_metrics_disabled);`, `ALTER TABLE agents DROP COLUMN aws_access_key`, `ALTER TABLE agents DROP COLUMN aws_secret_key`, `ALTER TABLE agents DROP COLUMN rds_basic_metrics_disabled`, `ALTER TABLE agents DROP COLUMN rds_enhanced_metrics_disabled`, - `UPDATE agents SET mysql_options = jsonb_set(mysql_options, '{table_count}', to_jsonb(table_count));`, - `UPDATE agents SET mysql_options = jsonb_set(mysql_options, '{table_count_tablestats_group_limit}', to_jsonb(table_count_tablestats_group_limit));`, + `UPDATE agents SET mysql_options['table_count'] = to_jsonb(table_count);`, + `UPDATE agents SET mysql_options['table_count_tablestats_group_limit'] = to_jsonb(table_count_tablestats_group_limit);`, `ALTER TABLE agents DROP COLUMN table_count`, `ALTER TABLE agents DROP COLUMN table_count_tablestats_group_limit`, - - `UPDATE settings SET settings = jsonb_set(settings, '{encrypted_items}', - '[ - "pmm-managed.agents.username", - "pmm-managed.agents.password", - "pmm-managed.agents.agent_password", - "pmm-managed.agents.aws_options", - "pmm-managed.agents.azure_options", - "pmm-managed.agents.mongo_options", - "pmm-managed.agents.mysql_options", - "pmm-managed.agents.postgresql_options" - ]'::jsonb - ) - WHERE settings ? 'encrypted_items';`, }, } @@ -1407,15 +1394,15 @@ func migrateDB(db *reform.DB, params SetupDBParams) error { } } + if params.SetupFixtures == SkipFixtures { + return nil + } + err := EncryptDB(tx, params.Name, DefaultAgentEncryptionColumnsV3) if err != nil { return err } - if params.SetupFixtures == SkipFixtures { - return nil - } - // fill settings with defaults s, err := GetSettings(tx) if err != nil { diff --git a/managed/models/database_test.go b/managed/models/database_test.go index 42175ac305..761b371104 100644 --- a/managed/models/database_test.go +++ b/managed/models/database_test.go @@ -17,8 +17,10 @@ package models_test import ( + "context" "database/sql" "fmt" + "github.com/AlekSi/pointer" "testing" "github.com/lib/pq" @@ -319,3 +321,106 @@ func TestDatabaseChecks(t *testing.T) { }) }) } + +func TestDatabaseMigrations(t *testing.T) { + t.Run("stats_collections field migration: string to string array", func(t *testing.T) { + sqlDB := testdb.Open(t, models.SkipFixtures, pointer.ToInt(57)) + defer sqlDB.Close() //nolint:errcheck + + // Insert dummy node in DB + _, err := sqlDB.ExecContext(context.Background(), + `INSERT INTO + nodes(node_id, node_type, node_name, distro, node_model, az, address, created_at, updated_at) + VALUES + ('node_id', 'node_type', 'node_name', 'distro', 'node_model', 'az', 'address', '03/03/2014 02:03:04', '03/03/2014 02:03:04')`, + ) + require.NoError(t, err) + + // Insert dummy agent in DB + _, err = sqlDB.ExecContext(context.Background(), + `INSERT INTO + agents(mongo_db_tls_options, agent_id, agent_type, runs_on_node_id, created_at, updated_at, disabled, status, tls, tls_skip_verify, query_examples_disabled, max_query_log_size, table_count_tablestats_group_limit, rds_basic_metrics_disabled, rds_enhanced_metrics_disabled, push_metrics) + VALUES + ('{"stats_collections": "db.col1,db.col2,db.col3"}', 'id', 'pmm-agent', 'node_id' , '03/03/2014 02:03:04', '03/03/2014 02:03:04', false, 'alive', false, false, false, 0, 0, false, false, false)`, + ) + require.NoError(t, err) + + // Apply migration + testdb.SetupDB(t, sqlDB, models.SkipFixtures, pointer.ToInt(68)) + + var agentID string + var mongoDBOptions *models.MongoDBOptions + err = sqlDB.QueryRow(`SELECT agent_id, mongo_db_tls_options FROM agents WHERE agent_id = $1`, "id").Scan(&agentID, &mongoDBOptions) + + require.NoError(t, err) + require.Equal(t, "id", agentID) + require.Equal(t, []string{"db.col1", "db.col2", "db.col3"}, mongoDBOptions.StatsCollections) + }) + + t.Run("stats_collections field migration: string array to string array", func(t *testing.T) { + sqlDB := testdb.Open(t, models.SkipFixtures, pointer.ToInt(58)) + defer sqlDB.Close() //nolint:errcheck + + // Insert dummy node in DB + _, err := sqlDB.ExecContext(context.Background(), + `INSERT INTO + nodes(node_id, node_type, node_name, distro, node_model, az, address, created_at, updated_at) + VALUES + ('node_id', 'generic', 'node_name', 'distro', 'node_model', 'az', 'address', '03/03/2014 02:03:04', '03/03/2014 02:03:04')`, + ) + require.NoError(t, err) + + // Insert dummy agent in DB + _, err = sqlDB.ExecContext(context.Background(), + `INSERT INTO + agents(mongo_db_tls_options, agent_id, agent_type, runs_on_node_id, created_at, updated_at, disabled, status, tls, tls_skip_verify, query_examples_disabled, max_query_log_size, table_count_tablestats_group_limit, rds_basic_metrics_disabled, rds_enhanced_metrics_disabled, push_metrics) + VALUES + ('{"stats_collections": ["db.col1", "db.col2", "db.col3"]}', 'id', 'pmm-agent', 'node_id' , '03/03/2014 02:03:04', '03/03/2014 02:03:04', false, 'alive', false, false, false, 0, 0, false, false, false)`, + ) + require.NoError(t, err) + + // Apply migration + testdb.SetupDB(t, sqlDB, models.SkipFixtures, pointer.ToInt(68)) + + var agentID string + var mongoDBOptions *models.MongoDBOptions + err = sqlDB.QueryRow(`SELECT agent_id, mongo_db_tls_options FROM agents WHERE agent_id = $1`, "id").Scan(&agentID, &mongoDBOptions) + + require.NoError(t, err) + require.Equal(t, "id", agentID) + require.Equal(t, []string{"db.col1", "db.col2", "db.col3"}, mongoDBOptions.StatsCollections) + }) + t.Run("push metrics field migration: from root to exporter_options", func(t *testing.T) { + sqlDB := testdb.Open(t, models.SkipFixtures, pointer.ToInt(58)) + defer sqlDB.Close() //nolint:errcheck + + // Insert dummy node in DB + _, err := sqlDB.ExecContext(context.Background(), + `INSERT INTO + nodes(node_id, node_type, node_name, distro, node_model, az, address, created_at, updated_at) + VALUES + ('node_id', 'generic', 'node_name', 'distro', 'node_model', 'az', 'address', '03/03/2014 02:03:04', '03/03/2014 02:03:04')`, + ) + require.NoError(t, err) + + // Insert dummy agent in DB + _, err = sqlDB.ExecContext(context.Background(), + `INSERT INTO + agents(agent_id, agent_type, runs_on_node_id, created_at, updated_at, disabled, status, tls, tls_skip_verify, query_examples_disabled, max_query_log_size, table_count_tablestats_group_limit, rds_basic_metrics_disabled, rds_enhanced_metrics_disabled, push_metrics) + VALUES + ('id', 'pmm-agent', 'node_id' , '03/03/2014 02:03:04', '03/03/2014 02:03:04', true, 'alive', true, true, true, 2000, 1000, true, true, true)`, + ) + require.NoError(t, err) + + // Apply migration + testdb.SetupDB(t, sqlDB, models.SkipFixtures, pointer.ToInt(107)) + + var agentID string + var exporterOptions models.ExporterOptions + err = sqlDB.QueryRow(`SELECT agent_id, exporter_options FROM agents WHERE agent_id = $1`, "id").Scan(&agentID, &exporterOptions) + + require.NoError(t, err) + require.Equal(t, "id", agentID) + require.True(t, exporterOptions.PushMetrics) + }) +} From f0d6403770d6077b45c29b2e30b7e7964a66b0c0 Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Wed, 8 Jan 2025 11:27:25 +0300 Subject: [PATCH 09/10] PMM-13648 remove outdated tests. --- managed/models/database_test.go | 67 --------------------------------- 1 file changed, 67 deletions(-) diff --git a/managed/models/database_test.go b/managed/models/database_test.go index 761b371104..6c2c274272 100644 --- a/managed/models/database_test.go +++ b/managed/models/database_test.go @@ -323,73 +323,6 @@ func TestDatabaseChecks(t *testing.T) { } func TestDatabaseMigrations(t *testing.T) { - t.Run("stats_collections field migration: string to string array", func(t *testing.T) { - sqlDB := testdb.Open(t, models.SkipFixtures, pointer.ToInt(57)) - defer sqlDB.Close() //nolint:errcheck - - // Insert dummy node in DB - _, err := sqlDB.ExecContext(context.Background(), - `INSERT INTO - nodes(node_id, node_type, node_name, distro, node_model, az, address, created_at, updated_at) - VALUES - ('node_id', 'node_type', 'node_name', 'distro', 'node_model', 'az', 'address', '03/03/2014 02:03:04', '03/03/2014 02:03:04')`, - ) - require.NoError(t, err) - - // Insert dummy agent in DB - _, err = sqlDB.ExecContext(context.Background(), - `INSERT INTO - agents(mongo_db_tls_options, agent_id, agent_type, runs_on_node_id, created_at, updated_at, disabled, status, tls, tls_skip_verify, query_examples_disabled, max_query_log_size, table_count_tablestats_group_limit, rds_basic_metrics_disabled, rds_enhanced_metrics_disabled, push_metrics) - VALUES - ('{"stats_collections": "db.col1,db.col2,db.col3"}', 'id', 'pmm-agent', 'node_id' , '03/03/2014 02:03:04', '03/03/2014 02:03:04', false, 'alive', false, false, false, 0, 0, false, false, false)`, - ) - require.NoError(t, err) - - // Apply migration - testdb.SetupDB(t, sqlDB, models.SkipFixtures, pointer.ToInt(68)) - - var agentID string - var mongoDBOptions *models.MongoDBOptions - err = sqlDB.QueryRow(`SELECT agent_id, mongo_db_tls_options FROM agents WHERE agent_id = $1`, "id").Scan(&agentID, &mongoDBOptions) - - require.NoError(t, err) - require.Equal(t, "id", agentID) - require.Equal(t, []string{"db.col1", "db.col2", "db.col3"}, mongoDBOptions.StatsCollections) - }) - - t.Run("stats_collections field migration: string array to string array", func(t *testing.T) { - sqlDB := testdb.Open(t, models.SkipFixtures, pointer.ToInt(58)) - defer sqlDB.Close() //nolint:errcheck - - // Insert dummy node in DB - _, err := sqlDB.ExecContext(context.Background(), - `INSERT INTO - nodes(node_id, node_type, node_name, distro, node_model, az, address, created_at, updated_at) - VALUES - ('node_id', 'generic', 'node_name', 'distro', 'node_model', 'az', 'address', '03/03/2014 02:03:04', '03/03/2014 02:03:04')`, - ) - require.NoError(t, err) - - // Insert dummy agent in DB - _, err = sqlDB.ExecContext(context.Background(), - `INSERT INTO - agents(mongo_db_tls_options, agent_id, agent_type, runs_on_node_id, created_at, updated_at, disabled, status, tls, tls_skip_verify, query_examples_disabled, max_query_log_size, table_count_tablestats_group_limit, rds_basic_metrics_disabled, rds_enhanced_metrics_disabled, push_metrics) - VALUES - ('{"stats_collections": ["db.col1", "db.col2", "db.col3"]}', 'id', 'pmm-agent', 'node_id' , '03/03/2014 02:03:04', '03/03/2014 02:03:04', false, 'alive', false, false, false, 0, 0, false, false, false)`, - ) - require.NoError(t, err) - - // Apply migration - testdb.SetupDB(t, sqlDB, models.SkipFixtures, pointer.ToInt(68)) - - var agentID string - var mongoDBOptions *models.MongoDBOptions - err = sqlDB.QueryRow(`SELECT agent_id, mongo_db_tls_options FROM agents WHERE agent_id = $1`, "id").Scan(&agentID, &mongoDBOptions) - - require.NoError(t, err) - require.Equal(t, "id", agentID) - require.Equal(t, []string{"db.col1", "db.col2", "db.col3"}, mongoDBOptions.StatsCollections) - }) t.Run("push metrics field migration: from root to exporter_options", func(t *testing.T) { sqlDB := testdb.Open(t, models.SkipFixtures, pointer.ToInt(58)) defer sqlDB.Close() //nolint:errcheck From 106254c153a6273ab96c9c310961aa2814c4aeab Mon Sep 17 00:00:00 2001 From: Nurlan Moldomurov Date: Wed, 8 Jan 2025 13:35:33 +0300 Subject: [PATCH 10/10] PMM-13648 fix linter. --- managed/models/database_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/managed/models/database_test.go b/managed/models/database_test.go index 6c2c274272..cc0c078f0b 100644 --- a/managed/models/database_test.go +++ b/managed/models/database_test.go @@ -20,9 +20,9 @@ import ( "context" "database/sql" "fmt" - "github.com/AlekSi/pointer" "testing" + "github.com/AlekSi/pointer" "github.com/lib/pq" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require"