From 6b6a566684d988a3a8302d3fe150c311b64adb51 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Wed, 27 Mar 2024 06:51:33 +0000 Subject: [PATCH] PMM-12913 migrate /v1/management/Service --- .github/workflows/main.yml | 15 +- .golangci.yml | 1 + admin/commands/management/add_external.go | 42 +- .../management/add_external_serverless.go | 62 +- .../commands/management/add_external_test.go | 2 +- admin/commands/management/add_mongodb.go | 80 +- admin/commands/management/add_mongodb_test.go | 2 +- admin/commands/management/add_mysql.go | 86 +- admin/commands/management/add_mysql_test.go | 20 +- admin/commands/management/add_postgresql.go | 86 +- admin/commands/management/management.go | 20 +- admin/commands/management/remove.go | 37 +- admin/helpers/helpers.go | 11 +- agent/agents/mysql/slowlog/slowlog_test.go | 2 +- .../actions/mongodb_explain_action_test.go | 6 +- .../actions/mysql_explain_action_test.go | 2 +- api-tests/backup/backups_test.go | 70 +- api-tests/inventory/services_test.go | 10 +- api-tests/management/external_test.go | 311 +- api-tests/management/haproxy_test.go | 45 +- api-tests/management/mongodb_test.go | 511 +- api-tests/management/mysql_test.go | 546 +- api-tests/management/postgresql_test.go | 527 +- api-tests/management/proxysql_test.go | 48 +- api/MIGRATION_EXAMPLES.md | 11 +- api/MIGRATION_TO_V3.md | 28 +- api/management/v1/agent/agent.pb.go | 397 +- api/management/v1/agent/agent.proto | 1 - api/management/v1/annotation.pb.go | 4 +- api/management/v1/annotation.proto | 4 +- api/management/v1/azure/azure.pb.go | 274 +- api/management/v1/azure/azure.proto | 1 - api/management/v1/external.pb.go | 234 +- api/management/v1/external.pb.validate.go | 126 +- api/management/v1/external.proto | 13 +- .../add_annotation_responses.go | 8 +- .../add_external_parameters.go | 144 - .../add_external_responses.go | 847 -- .../add_mongo_db_parameters.go | 144 - .../add_mongo_db_responses.go | 1372 --- .../add_my_sql_parameters.go | 144 - .../add_my_sql_responses.go | 1669 ---- .../add_postgre_sql_parameters.go | 144 - .../add_postgre_sql_responses.go | 1636 ---- .../add_service_parameters.go | 144 + .../add_service_responses.go | 5186 ++++++++++++ .../discover_rds_responses.go | 4 +- .../management_service_client.go | 195 +- .../register_node_responses.go | 4 +- .../remove_service_parameters.go | 69 +- .../remove_service_responses.go | 117 +- api/management/v1/json/v1.json | 5721 +++++++------ api/management/v1/mongodb.pb.go | 340 +- api/management/v1/mongodb.pb.validate.go | 138 +- api/management/v1/mongodb.proto | 5 +- api/management/v1/mysql.pb.go | 336 +- api/management/v1/mysql.pb.validate.go | 146 +- api/management/v1/mysql.proto | 5 +- api/management/v1/node.pb.go | 219 +- api/management/v1/node.proto | 1 - api/management/v1/node/node.pb.go | 203 +- api/management/v1/node/node.proto | 1 - api/management/v1/postgresql.pb.go | 348 +- api/management/v1/postgresql.pb.validate.go | 144 +- api/management/v1/postgresql.proto | 5 +- api/management/v1/proxysql.pb.go | 189 +- api/management/v1/proxysql.proto | 1 - api/management/v1/rds.pb.go | 379 +- api/management/v1/rds.proto | 1 - api/management/v1/service.pb.go | 778 +- api/management/v1/service.pb.gw.go | 325 +- api/management/v1/service.pb.validate.go | 546 +- api/management/v1/service.proto | 114 +- api/management/v1/service_grpc.pb.go | 186 +- api/qan/v1/filters.pb.go | 107 +- api/qan/v1/filters.proto | 1 - api/qan/v1/profile.pb.go | 175 +- api/qan/v1/profile.proto | 1 - api/swagger/swagger-dev.json | 7337 ++++++++--------- api/swagger/swagger.json | 5727 +++++++------ descriptor.bin | Bin 682249 -> 681996 bytes managed/models/service_helpers.go | 2 +- managed/services/agents/connection_checker.go | 7 +- managed/services/agents/mysql.go | 2 +- managed/services/agents/postgresql_test.go | 8 +- .../services/agents/service_info_broker.go | 3 - managed/services/grafana/auth_server.go | 3 +- managed/services/grafana/auth_server_test.go | 22 +- managed/services/management/external.go | 24 +- managed/services/management/mongodb.go | 16 +- managed/services/management/mysql.go | 28 +- managed/services/management/postgresql.go | 29 +- managed/services/management/service.go | 40 +- managed/services/management/service_test.go | 17 +- managed/services/management/utils.go | 8 + 95 files changed, 19092 insertions(+), 20058 deletions(-) delete mode 100644 api/management/v1/json/client/management_service/add_external_parameters.go delete mode 100644 api/management/v1/json/client/management_service/add_external_responses.go delete mode 100644 api/management/v1/json/client/management_service/add_mongo_db_parameters.go delete mode 100644 api/management/v1/json/client/management_service/add_mongo_db_responses.go delete mode 100644 api/management/v1/json/client/management_service/add_my_sql_parameters.go delete mode 100644 api/management/v1/json/client/management_service/add_my_sql_responses.go delete mode 100644 api/management/v1/json/client/management_service/add_postgre_sql_parameters.go delete mode 100644 api/management/v1/json/client/management_service/add_postgre_sql_responses.go create mode 100644 api/management/v1/json/client/management_service/add_service_parameters.go create mode 100644 api/management/v1/json/client/management_service/add_service_responses.go diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 062bbfcce19..7c5450c6471 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -81,17 +81,18 @@ jobs: - name: Run API linter env: - COMMAND: 'bin/buf lint -v api' - REDIRECT: "| bin/reviewdog -f=buf -reporter=github-pr-review -fail-on-error=true" REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.ROBOT_TOKEN || secrets.GITHUB_TOKEN }} run: | - if out=$( ${{ env.COMMAND }} ); exit_code=$?; [ $exit_code -ne 0 ]; then + if out=$(bin/buf lint -v api); code="$?"; test "$code" -ne 0; then + echo "API linter exited with code: $code" + echo "$out" ## buf uses exit code 100 for linter warnings - if [ $exit_code != 100 ] || ${{ github.event.pull_request == null }}; then - echo "$out" - exit $exit_code + if [ "$code" -ne 100 ] || ${{ github.event.pull_request == null }}; then + exit $code else - echo "$out" ${{ env.REDIRECT }} + echo + # suppress passing to reviewdog because of https://github.com/reviewdog/reviewdog/issues/1696 + # echo "$out" | bin/reviewdog -f=buf -reporter=github-pr-review -fail-on-error=true fi else echo "$out" diff --git a/.golangci.yml b/.golangci.yml index 81024e0a880..22e8b34ba82 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -149,6 +149,7 @@ issues: - forcetypeassert # for tests' brevity sake - funlen # tests may be long - gocognit # triggered by subtests + - goconst # not critical for tests - gomnd # tests are full of magic numbers - ireturn # we have exceptions, so need to silence them in tests - lll # tests often require long lines diff --git a/admin/commands/management/add_external.go b/admin/commands/management/add_external.go index 0371e9a2013..f79e8b320e6 100644 --- a/admin/commands/management/add_external.go +++ b/admin/commands/management/add_external.go @@ -42,7 +42,7 @@ Group : {{ .Service.Group }} `) type addExternalResult struct { - Service *mservice.AddExternalOKBodyService `json:"service"` + Service *mservice.AddServiceOKBodyExternalService `json:"service"` } func (res *addExternalResult) Result() {} @@ -120,32 +120,34 @@ func (cmd *AddExternalCommand) RunCmd() (commands.Result, error) { } } - params := &mservice.AddExternalParams{ - Body: mservice.AddExternalBody{ - RunsOnNodeID: cmd.RunsOnNodeID, - ServiceName: cmd.ServiceName, - Username: cmd.Username, - Password: cmd.Password, - Scheme: cmd.Scheme, - MetricsPath: cmd.MetricsPath, - ListenPort: int64(cmd.ListenPort), - NodeID: cmd.NodeID, - Environment: cmd.Environment, - Cluster: cmd.Cluster, - ReplicationSet: cmd.ReplicationSet, - CustomLabels: customLabels, - MetricsMode: pointer.ToString(strings.ToUpper(cmd.MetricsMode)), - Group: cmd.Group, - SkipConnectionCheck: cmd.SkipConnectionCheck, + params := &mservice.AddServiceParams{ + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + RunsOnNodeID: cmd.RunsOnNodeID, + ServiceName: cmd.ServiceName, + Username: cmd.Username, + Password: cmd.Password, + Scheme: cmd.Scheme, + MetricsPath: cmd.MetricsPath, + ListenPort: int64(cmd.ListenPort), + NodeID: cmd.NodeID, + Environment: cmd.Environment, + Cluster: cmd.Cluster, + ReplicationSet: cmd.ReplicationSet, + CustomLabels: customLabels, + MetricsMode: pointer.ToString(strings.ToUpper(cmd.MetricsMode)), + Group: cmd.Group, + SkipConnectionCheck: cmd.SkipConnectionCheck, + }, }, Context: commands.Ctx, } - resp, err := client.Default.ManagementService.AddExternal(params) + resp, err := client.Default.ManagementService.AddService(params) if err != nil { return nil, err } return &addExternalResult{ - Service: resp.Payload.Service, + Service: resp.Payload.External.Service, }, nil } diff --git a/admin/commands/management/add_external_serverless.go b/admin/commands/management/add_external_serverless.go index 16a8df72c76..0ee34a9ec7d 100644 --- a/admin/commands/management/add_external_serverless.go +++ b/admin/commands/management/add_external_serverless.go @@ -37,7 +37,7 @@ Group : {{ .Service.Group }} `) type addExternalServerlessResult struct { - Service *mservice.AddExternalOKBodyService `json:"service"` + Service *mservice.AddServiceOKBodyExternalService `json:"service"` } func (res *addExternalServerlessResult) Result() {} @@ -125,44 +125,46 @@ func (cmd *AddExternalServerlessCommand) RunCmd() (commands.Result, error) { } } - params := &mservice.AddExternalParams{ - Body: mservice.AddExternalBody{ - AddNode: &mservice.AddExternalParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE), - NodeName: serviceName, - MachineID: cmd.MachineID, - Distro: cmd.Distro, - ContainerID: cmd.ContainerID, - ContainerName: cmd.ContainerName, - NodeModel: cmd.NodeModel, - Region: cmd.Region, - Az: cmd.Az, - CustomLabels: customLabels, + params := &mservice.AddServiceParams{ + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + AddNode: &mservice.AddServiceParamsBodyExternalAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTENODE), + NodeName: serviceName, + MachineID: cmd.MachineID, + Distro: cmd.Distro, + ContainerID: cmd.ContainerID, + ContainerName: cmd.ContainerName, + NodeModel: cmd.NodeModel, + Region: cmd.Region, + Az: cmd.Az, + CustomLabels: customLabels, + }, + Address: address, + ServiceName: serviceName, + Username: cmd.Username, + Password: cmd.Password, + Scheme: scheme, + MetricsPath: metricsPath, + ListenPort: int64(port), + Environment: cmd.Environment, + Cluster: cmd.Cluster, + ReplicationSet: cmd.ReplicationSet, + CustomLabels: customLabels, + MetricsMode: pointer.ToString(mservice.AddServiceParamsBodyExternalMetricsModeMETRICSMODEPULL), + Group: cmd.Group, + SkipConnectionCheck: cmd.SkipConnectionCheck, }, - Address: address, - ServiceName: serviceName, - Username: cmd.Username, - Password: cmd.Password, - Scheme: scheme, - MetricsPath: metricsPath, - ListenPort: int64(port), - Environment: cmd.Environment, - Cluster: cmd.Cluster, - ReplicationSet: cmd.ReplicationSet, - CustomLabels: customLabels, - MetricsMode: pointer.ToString(mservice.AddExternalBodyMetricsModeMETRICSMODEPULL), - Group: cmd.Group, - SkipConnectionCheck: cmd.SkipConnectionCheck, }, Context: commands.Ctx, } - resp, err := client.Default.ManagementService.AddExternal(params) + resp, err := client.Default.ManagementService.AddService(params) if err != nil { return nil, err } return &addExternalServerlessResult{ - Service: resp.Payload.Service, + Service: resp.Payload.External.Service, }, nil } diff --git a/admin/commands/management/add_external_test.go b/admin/commands/management/add_external_test.go index 61e17f94e36..e09c75c564a 100644 --- a/admin/commands/management/add_external_test.go +++ b/admin/commands/management/add_external_test.go @@ -26,7 +26,7 @@ import ( func TestAddExternal(t *testing.T) { t.Run("Basic", func(t *testing.T) { res := &addExternalResult{ - Service: &mservice.AddExternalOKBodyService{ + Service: &mservice.AddServiceOKBodyExternalService{ ServiceID: "/service_id/1", ServiceName: "myhost-redis", Group: "redis", diff --git a/admin/commands/management/add_mongodb.go b/admin/commands/management/add_mongodb.go index 5f7cd318f68..5c3e5a6f4e0 100644 --- a/admin/commands/management/add_mongodb.go +++ b/admin/commands/management/add_mongodb.go @@ -40,7 +40,7 @@ Service name: {{ .Service.ServiceName }} `) type addMongoDBResult struct { - Service *mservice.AddMongoDBOKBodyService `json:"service"` + Service *mservice.AddServiceOKBodyMongodbService `json:"service"` } func (res *addMongoDBResult) Result() {} @@ -159,51 +159,53 @@ func (cmd *AddMongoDBCommand) RunCmd() (commands.Result, error) { } } - params := &mservice.AddMongoDBParams{ - Body: mservice.AddMongoDBBody{ - NodeID: cmd.NodeID, - ServiceName: serviceName, - Address: host, - Socket: socket, - Port: int64(port), - ExposeExporter: cmd.ExposeExporter, - PMMAgentID: cmd.PMMAgentID, - Environment: cmd.Environment, - Cluster: cmd.Cluster, - ReplicationSet: cmd.ReplicationSet, - Username: cmd.Username, - Password: cmd.Password, - AgentPassword: cmd.AgentPassword, - - QANMongodbProfiler: cmd.QuerySource == MongodbQuerySourceProfiler, - - CustomLabels: customLabels, - SkipConnectionCheck: cmd.SkipConnectionCheck, - MaxQueryLength: cmd.MaxQueryLength, - TLS: cmd.TLS, - TLSSkipVerify: cmd.TLSSkipVerify, - TLSCertificateKey: tlsCertificateKey, - TLSCertificateKeyFilePassword: cmd.TLSCertificateKeyFilePassword, - TLSCa: tlsCa, - AuthenticationMechanism: cmd.AuthenticationMechanism, - AuthenticationDatabase: cmd.AuthenticationDatabase, - - MetricsMode: pointer.ToString(strings.ToUpper(cmd.MetricsMode)), - - EnableAllCollectors: cmd.EnableAllCollectors, - DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors), - StatsCollections: commands.ParseDisableCollectors(cmd.StatsCollections), - CollectionsLimit: cmd.CollectionsLimit, - LogLevel: &cmd.AddLogLevel, + params := &mservice.AddServiceParams{ + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: cmd.NodeID, + ServiceName: serviceName, + Address: host, + Socket: socket, + Port: int64(port), + ExposeExporter: cmd.ExposeExporter, + PMMAgentID: cmd.PMMAgentID, + Environment: cmd.Environment, + Cluster: cmd.Cluster, + ReplicationSet: cmd.ReplicationSet, + Username: cmd.Username, + Password: cmd.Password, + AgentPassword: cmd.AgentPassword, + + QANMongodbProfiler: cmd.QuerySource == MongodbQuerySourceProfiler, + + CustomLabels: customLabels, + SkipConnectionCheck: cmd.SkipConnectionCheck, + MaxQueryLength: cmd.MaxQueryLength, + TLS: cmd.TLS, + TLSSkipVerify: cmd.TLSSkipVerify, + TLSCertificateKey: tlsCertificateKey, + TLSCertificateKeyFilePassword: cmd.TLSCertificateKeyFilePassword, + TLSCa: tlsCa, + AuthenticationMechanism: cmd.AuthenticationMechanism, + AuthenticationDatabase: cmd.AuthenticationDatabase, + + MetricsMode: pointer.ToString(strings.ToUpper(cmd.MetricsMode)), + + EnableAllCollectors: cmd.EnableAllCollectors, + DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors), + StatsCollections: commands.ParseDisableCollectors(cmd.StatsCollections), + CollectionsLimit: cmd.CollectionsLimit, + LogLevel: &cmd.AddLogLevel, + }, }, Context: commands.Ctx, } - resp, err := client.Default.ManagementService.AddMongoDB(params) + resp, err := client.Default.ManagementService.AddService(params) if err != nil { return nil, err } return &addMongoDBResult{ - Service: resp.Payload.Service, + Service: resp.Payload.Mongodb.Service, }, nil } diff --git a/admin/commands/management/add_mongodb_test.go b/admin/commands/management/add_mongodb_test.go index 468d9828e78..1753bda2a80 100644 --- a/admin/commands/management/add_mongodb_test.go +++ b/admin/commands/management/add_mongodb_test.go @@ -26,7 +26,7 @@ import ( func TestAddMongoDB(t *testing.T) { t.Run("TablestatEnabled", func(t *testing.T) { res := &addMongoDBResult{ - Service: &mservice.AddMongoDBOKBodyService{ + Service: &mservice.AddServiceOKBodyMongodbService{ ServiceID: "/service_id/1", ServiceName: "mysql-1", }, diff --git a/admin/commands/management/add_mysql.go b/admin/commands/management/add_mysql.go index 4ad757b3bc5..dd6d876b4d4 100644 --- a/admin/commands/management/add_mysql.go +++ b/admin/commands/management/add_mysql.go @@ -47,9 +47,9 @@ Service name: {{ .Service.ServiceName }} `) type addMySQLResult struct { - Service *mservice.AddMySQLOKBodyService `json:"service"` - MysqldExporter *mservice.AddMySQLOKBodyMysqldExporter `json:"mysqld_exporter,omitempty"` - TableCount int32 `json:"table_count,omitempty"` + Service *mservice.AddServiceOKBodyMysqlService `json:"service"` + MysqldExporter *mservice.AddServiceOKBodyMysqlMysqldExporter `json:"mysqld_exporter,omitempty"` + TableCount int32 `json:"table_count,omitempty"` } func (res *addMySQLResult) Result() {} @@ -208,52 +208,54 @@ func (cmd *AddMySQLCommand) RunCmd() (commands.Result, error) { tablestatsGroupTableLimit = -1 } - params := &mservice.AddMySQLParams{ - Body: mservice.AddMySQLBody{ - NodeID: cmd.NodeID, - ServiceName: serviceName, - Address: host, - Socket: socket, - Port: int64(port), - ExposeExporter: cmd.ExposeExporter, - PMMAgentID: cmd.PMMAgentID, - Environment: cmd.Environment, - Cluster: cmd.Cluster, - ReplicationSet: cmd.ReplicationSet, - Username: cmd.Username, - Password: cmd.Password, - AgentPassword: cmd.AgentPassword, - CustomLabels: customLabels, - - QANMysqlSlowlog: cmd.QuerySource == MysqlQuerySourceSlowLog, - QANMysqlPerfschema: cmd.QuerySource == MysqlQuerySourcePerfSchema, - - SkipConnectionCheck: cmd.SkipConnectionCheck, - DisableCommentsParsing: disableCommentsParsing, - MaxQueryLength: cmd.MaxQueryLength, - DisableQueryExamples: cmd.DisableQueryExamples, - - MaxSlowlogFileSize: strconv.FormatInt(int64(cmd.MaxSlowlogFileSize), 10), - TLS: cmd.TLS, - TLSSkipVerify: cmd.TLSSkipVerify, - TLSCa: tlsCa, - TLSCert: tlsCert, - TLSKey: tlsKey, - TablestatsGroupTableLimit: tablestatsGroupTableLimit, - MetricsMode: pointer.ToString(strings.ToUpper(cmd.MetricsMode)), - DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors), - LogLevel: &cmd.AddLogLevel, + params := &mservice.AddServiceParams{ + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: cmd.NodeID, + ServiceName: serviceName, + Address: host, + Socket: socket, + Port: int64(port), + ExposeExporter: cmd.ExposeExporter, + PMMAgentID: cmd.PMMAgentID, + Environment: cmd.Environment, + Cluster: cmd.Cluster, + ReplicationSet: cmd.ReplicationSet, + Username: cmd.Username, + Password: cmd.Password, + AgentPassword: cmd.AgentPassword, + CustomLabels: customLabels, + + QANMysqlSlowlog: cmd.QuerySource == MysqlQuerySourceSlowLog, + QANMysqlPerfschema: cmd.QuerySource == MysqlQuerySourcePerfSchema, + + SkipConnectionCheck: cmd.SkipConnectionCheck, + DisableCommentsParsing: disableCommentsParsing, + MaxQueryLength: cmd.MaxQueryLength, + DisableQueryExamples: cmd.DisableQueryExamples, + + MaxSlowlogFileSize: strconv.FormatInt(int64(cmd.MaxSlowlogFileSize), 10), + TLS: cmd.TLS, + TLSSkipVerify: cmd.TLSSkipVerify, + TLSCa: tlsCa, + TLSCert: tlsCert, + TLSKey: tlsKey, + TablestatsGroupTableLimit: tablestatsGroupTableLimit, + MetricsMode: pointer.ToString(strings.ToUpper(cmd.MetricsMode)), + DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors), + LogLevel: &cmd.AddLogLevel, + }, }, Context: commands.Ctx, } - resp, err := client.Default.ManagementService.AddMySQL(params) + resp, err := client.Default.ManagementService.AddService(params) if err != nil { return nil, err } return &addMySQLResult{ - Service: resp.Payload.Service, - MysqldExporter: resp.Payload.MysqldExporter, - TableCount: resp.Payload.TableCount, + Service: resp.Payload.Mysql.Service, + MysqldExporter: resp.Payload.Mysql.MysqldExporter, + TableCount: resp.Payload.Mysql.TableCount, }, nil } diff --git a/admin/commands/management/add_mysql_test.go b/admin/commands/management/add_mysql_test.go index 098ffc214d1..e8000583245 100644 --- a/admin/commands/management/add_mysql_test.go +++ b/admin/commands/management/add_mysql_test.go @@ -26,11 +26,11 @@ import ( func TestAddMySQL(t *testing.T) { t.Run("TablestatEnabled", func(t *testing.T) { res := &addMySQLResult{ - Service: &mservice.AddMySQLOKBodyService{ + Service: &mservice.AddServiceOKBodyMysqlService{ ServiceID: "/service_id/1", ServiceName: "mysql-1", }, - MysqldExporter: &mservice.AddMySQLOKBodyMysqldExporter{ + MysqldExporter: &mservice.AddServiceOKBodyMysqlMysqldExporter{ TablestatsGroupTableLimit: 1000, TablestatsGroupDisabled: false, }, @@ -48,11 +48,11 @@ Table statistics collection enabled (the limit is 1000, the actual table count i t.Run("TablestatEnabledNoLimit", func(t *testing.T) { res := &addMySQLResult{ - Service: &mservice.AddMySQLOKBodyService{ + Service: &mservice.AddServiceOKBodyMysqlService{ ServiceID: "/service_id/1", ServiceName: "mysql-1", }, - MysqldExporter: &mservice.AddMySQLOKBodyMysqldExporter{ + MysqldExporter: &mservice.AddServiceOKBodyMysqlMysqldExporter{ TablestatsGroupTableLimit: 0, TablestatsGroupDisabled: false, }, @@ -70,11 +70,11 @@ Table statistics collection enabled (the table count limit is not set). t.Run("TablestatEnabledUnknown", func(t *testing.T) { res := &addMySQLResult{ - Service: &mservice.AddMySQLOKBodyService{ + Service: &mservice.AddServiceOKBodyMysqlService{ ServiceID: "/service_id/1", ServiceName: "mysql-1", }, - MysqldExporter: &mservice.AddMySQLOKBodyMysqldExporter{ + MysqldExporter: &mservice.AddServiceOKBodyMysqlMysqldExporter{ TablestatsGroupTableLimit: 1000, TablestatsGroupDisabled: false, }, @@ -92,11 +92,11 @@ Table statistics collection enabled (the limit is 1000, the actual table count i t.Run("TablestatDisabled", func(t *testing.T) { res := &addMySQLResult{ - Service: &mservice.AddMySQLOKBodyService{ + Service: &mservice.AddServiceOKBodyMysqlService{ ServiceID: "/service_id/1", ServiceName: "mysql-1", }, - MysqldExporter: &mservice.AddMySQLOKBodyMysqldExporter{ + MysqldExporter: &mservice.AddServiceOKBodyMysqlMysqldExporter{ TablestatsGroupTableLimit: 1000, TablestatsGroupDisabled: true, TLS: true, @@ -118,11 +118,11 @@ Table statistics collection disabled (the limit is 1000, the actual table count t.Run("TablestatDisabledAlways", func(t *testing.T) { res := &addMySQLResult{ - Service: &mservice.AddMySQLOKBodyService{ + Service: &mservice.AddServiceOKBodyMysqlService{ ServiceID: "/service_id/1", ServiceName: "mysql-1", }, - MysqldExporter: &mservice.AddMySQLOKBodyMysqldExporter{ + MysqldExporter: &mservice.AddServiceOKBodyMysqlMysqldExporter{ TablestatsGroupTableLimit: -1, TablestatsGroupDisabled: true, }, diff --git a/admin/commands/management/add_postgresql.go b/admin/commands/management/add_postgresql.go index a3f8108f864..372cef5b15c 100644 --- a/admin/commands/management/add_postgresql.go +++ b/admin/commands/management/add_postgresql.go @@ -36,8 +36,8 @@ Warning: {{ .Warning }} `) type addPostgreSQLResult struct { - Service *mservice.AddPostgreSQLOKBodyService `json:"service"` - Warning string `json:"warning"` + Service *mservice.AddServiceOKBodyPostgresqlService `json:"service"` + Warning string `json:"warning"` } func (res *addPostgreSQLResult) Result() {} @@ -182,53 +182,55 @@ func (cmd *AddPostgreSQLCommand) RunCmd() (commands.Result, error) { } } - params := &mservice.AddPostgreSQLParams{ - Body: mservice.AddPostgreSQLBody{ - NodeID: cmd.NodeID, - ServiceName: serviceName, - Address: host, - Socket: socket, - Port: int64(port), - ExposeExporter: cmd.ExposeExporter, - Username: cmd.Username, - Password: cmd.Password, - Database: cmd.Database, - AgentPassword: cmd.AgentPassword, - SkipConnectionCheck: cmd.SkipConnectionCheck, - DisableCommentsParsing: disableCommentsParsing, - - PMMAgentID: cmd.PMMAgentID, - Environment: cmd.Environment, - Cluster: cmd.Cluster, - ReplicationSet: cmd.ReplicationSet, - CustomLabels: customLabels, - - QANPostgresqlPgstatementsAgent: usePgStatements, - QANPostgresqlPgstatmonitorAgent: usePgStatMonitor, - - TLS: cmd.TLS, - TLSCa: tlsCa, - TLSCert: tlsCert, - TLSKey: tlsKey, - TLSSkipVerify: cmd.TLSSkipVerify, - - MaxQueryLength: cmd.MaxQueryLength, - DisableQueryExamples: cmd.DisableQueryExamples, - MetricsMode: pointer.ToString(strings.ToUpper(cmd.MetricsMode)), - DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors), - AutoDiscoveryLimit: cmd.AutoDiscoveryLimit, - MaxExporterConnections: cmd.MaxExporterConnections, - LogLevel: &cmd.AddLogLevel, + params := &mservice.AddServiceParams{ + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: cmd.NodeID, + ServiceName: serviceName, + Address: host, + Socket: socket, + Port: int64(port), + ExposeExporter: cmd.ExposeExporter, + Username: cmd.Username, + Password: cmd.Password, + Database: cmd.Database, + AgentPassword: cmd.AgentPassword, + SkipConnectionCheck: cmd.SkipConnectionCheck, + DisableCommentsParsing: disableCommentsParsing, + + PMMAgentID: cmd.PMMAgentID, + Environment: cmd.Environment, + Cluster: cmd.Cluster, + ReplicationSet: cmd.ReplicationSet, + CustomLabels: customLabels, + + QANPostgresqlPgstatementsAgent: usePgStatements, + QANPostgresqlPgstatmonitorAgent: usePgStatMonitor, + + TLS: cmd.TLS, + TLSCa: tlsCa, + TLSCert: tlsCert, + TLSKey: tlsKey, + TLSSkipVerify: cmd.TLSSkipVerify, + + MaxQueryLength: cmd.MaxQueryLength, + DisableQueryExamples: cmd.DisableQueryExamples, + MetricsMode: pointer.ToString(strings.ToUpper(cmd.MetricsMode)), + DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors), + AutoDiscoveryLimit: cmd.AutoDiscoveryLimit, + MaxExporterConnections: cmd.MaxExporterConnections, + LogLevel: &cmd.AddLogLevel, + }, }, Context: commands.Ctx, } - resp, err := client.Default.ManagementService.AddPostgreSQL(params) + resp, err := client.Default.ManagementService.AddService(params) if err != nil { return nil, err } return &addPostgreSQLResult{ - Service: resp.Payload.Service, - Warning: resp.Payload.Warning, + Service: resp.Payload.Postgresql.Service, + Warning: resp.Payload.Postgresql.Warning, }, nil } diff --git a/admin/commands/management/management.go b/admin/commands/management/management.go index ef2586dc5c4..6d3921e9f55 100644 --- a/admin/commands/management/management.go +++ b/admin/commands/management/management.go @@ -16,23 +16,23 @@ package management import ( - mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" + "github.com/percona/pmm/api/inventory/v1/types" ) var ( allNodeTypes = map[string]string{ - "generic": mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE, - "container": mservice.RegisterNodeBodyNodeTypeNODETYPECONTAINERNODE, - "remote": mservice.RegisterNodeBodyNodeTypeNODETYPEREMOTENODE, + "generic": types.NodeTypeGenericNode, + "container": types.NodeTypeContainerNode, + "remote": types.NodeTypeRemoteNode, } allServiceTypes = map[string]string{ - "mysql": mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE, - "mongodb": mservice.RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE, - "postgresql": mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE, - "proxysql": mservice.RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE, - "haproxy": mservice.RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE, - "external": mservice.RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE, + "mysql": types.ServiceTypeMySQLService, + "mongodb": types.ServiceTypeMongoDBService, + "postgresql": types.ServiceTypePostgreSQLService, + "proxysql": types.ServiceTypeProxySQLService, + "haproxy": types.ServiceTypeHAProxyService, + "external": types.ServiceTypeExternalService, } // AllServiceTypesKeys lists all possible service types. diff --git a/admin/commands/management/remove.go b/admin/commands/management/remove.go index f7bd18d4ebc..ff4681fdb64 100644 --- a/admin/commands/management/remove.go +++ b/admin/commands/management/remove.go @@ -20,6 +20,7 @@ import ( "github.com/percona/pmm/admin/agentlocal" "github.com/percona/pmm/admin/commands" + "github.com/percona/pmm/admin/helpers" inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" "github.com/percona/pmm/api/management/v1/json/client" @@ -47,11 +48,16 @@ type RemoveCommand struct { // RunCmd runs the command for RemoveCommand. func (cmd *RemoveCommand) RunCmd() (commands.Result, error) { - if cmd.ServiceID == "" && cmd.ServiceName == "" { + // As RemoveService method accepts only one of the service ID or service name in its `serviceID` parameter. + // Therefore, we need to check if both are provided. If only one is provided, we take that one. + // If both are provided, we take the service ID. + var serviceID string + + switch { + case cmd.ServiceID == "" && cmd.ServiceName == "": // Automatic service lookup during removal // - // Get services and remove it automatically once it's only one - // service registered + // Remove the service automatically as long as it's the only service registered status, err := agentlocal.GetStatus(agentlocal.DoNotRequestNetworkInfo) if err != nil { return nil, err @@ -67,31 +73,32 @@ func (cmd *RemoveCommand) RunCmd() (commands.Result, error) { } switch { case len(servicesRes.Payload.Mysql) == 1: - cmd.ServiceID = servicesRes.Payload.Mysql[0].ServiceID + serviceID = servicesRes.Payload.Mysql[0].ServiceID case len(servicesRes.Payload.Mongodb) == 1: - cmd.ServiceID = servicesRes.Payload.Mongodb[0].ServiceID + serviceID = servicesRes.Payload.Mongodb[0].ServiceID case len(servicesRes.Payload.Postgresql) == 1: - cmd.ServiceID = servicesRes.Payload.Postgresql[0].ServiceID + serviceID = servicesRes.Payload.Postgresql[0].ServiceID case len(servicesRes.Payload.Proxysql) == 1: - cmd.ServiceID = servicesRes.Payload.Proxysql[0].ServiceID + serviceID = servicesRes.Payload.Proxysql[0].ServiceID case len(servicesRes.Payload.Haproxy) == 1: - cmd.ServiceID = servicesRes.Payload.Haproxy[0].ServiceID + serviceID = servicesRes.Payload.Haproxy[0].ServiceID case len(servicesRes.Payload.External) == 1: - cmd.ServiceID = servicesRes.Payload.External[0].ServiceID + serviceID = servicesRes.Payload.External[0].ServiceID } if cmd.ServiceID == "" { //nolint:revive,golint return nil, errors.New(`We could not find a service associated with the local node. Please provide "Service ID" or "Service name".`) } + case cmd.ServiceName != "" && cmd.ServiceID == "": + serviceID = cmd.ServiceName + default: + serviceID = cmd.ServiceID } params := &mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: cmd.ServiceID, - ServiceName: cmd.ServiceName, - ServiceType: cmd.serviceType(), - }, - Context: commands.Ctx, + ServiceID: helpers.StripServiceIDPrefix(serviceID), + ServiceType: cmd.serviceType(), + Context: commands.Ctx, } _, err := client.Default.ManagementService.RemoveService(params) if err != nil { diff --git a/admin/helpers/helpers.go b/admin/helpers/helpers.go index 73aaa7b0952..32ca502baaa 100644 --- a/admin/helpers/helpers.go +++ b/admin/helpers/helpers.go @@ -17,6 +17,7 @@ package helpers import ( "fmt" + "strings" "github.com/pkg/errors" @@ -28,7 +29,10 @@ import ( var errNoNode = errors.New("no node available") // HAProxyMinPMMServerVersion contains minimum version for running HAProxy. -const haProxyMinPMMServerVersion = "2.15.0" +const ( + haProxyMinPMMServerVersion = "2.15.0" + serviceIDPrefix = "/service_id" +) // ServerVersionLessThan return if provided version is lower than server version. func ServerVersionLessThan(currentVersion string) (bool, error) { @@ -92,3 +96,8 @@ func IsOnPmmServer() (bool, error) { return status.NodeID == "pmm-server", nil } + +// StripServiceIDPrefix removes the prefix from the service ID if present. +func StripServiceIDPrefix(serviceID string) string { + return strings.TrimPrefix(serviceID, serviceIDPrefix) +} diff --git a/agent/agents/mysql/slowlog/slowlog_test.go b/agent/agents/mysql/slowlog/slowlog_test.go index f767ef3f4a5..6b60684cec4 100644 --- a/agent/agents/mysql/slowlog/slowlog_test.go +++ b/agent/agents/mysql/slowlog/slowlog_test.go @@ -81,7 +81,7 @@ func TestSlowLogMakeBucketsInvalidUTF8(t *testing.T) { }, } - require.Equal(t, 1, len(actualBuckets)) + require.Len(t, actualBuckets, 1) assert.True(t, utf8.ValidString(actualBuckets[0].Common.Example)) tests.AssertBucketsEqual(t, expectedBuckets[0], actualBuckets[0]) } diff --git a/agent/runner/actions/mongodb_explain_action_test.go b/agent/runner/actions/mongodb_explain_action_test.go index 28d65a8cdbc..d350c435d58 100644 --- a/agent/runner/actions/mongodb_explain_action_test.go +++ b/agent/runner/actions/mongodb_explain_action_test.go @@ -54,7 +54,7 @@ func TestMongoDBExplain(t *testing.T) { ex := NewMongoDBExplainAction(id, 0, params, os.TempDir()) res, err := ex.Run(ctx) - assert.Nil(t, err) + assert.NoError(t, err) want := map[string]interface{}{ "indexFilterSet": false, @@ -69,9 +69,9 @@ func TestMongoDBExplain(t *testing.T) { explainM := make(map[string]interface{}) err = json.Unmarshal(res, &explainM) - assert.Nil(t, err) + assert.NoError(t, err) queryPlanner, ok := explainM["queryPlanner"] - assert.Equal(t, ok, true) + assert.True(t, ok) assert.NotEmpty(t, queryPlanner) assert.Equal(t, want, queryPlanner) }) diff --git a/agent/runner/actions/mysql_explain_action_test.go b/agent/runner/actions/mysql_explain_action_test.go index ad63bb0fc26..a6939b5a2b9 100644 --- a/agent/runner/actions/mysql_explain_action_test.go +++ b/agent/runner/actions/mysql_explain_action_test.go @@ -193,7 +193,7 @@ func TestMySQLExplain(t *testing.T) { var er explainResponse err = json.Unmarshal(resp, &er) assert.NoError(t, err) - assert.Equal(t, er.IsDMLQuery, true) + assert.True(t, er.IsDMLQuery) assert.Equal(t, er.Query, `SELECT * FROM city WHERE Name='Rosario'`) }) diff --git a/api-tests/backup/backups_test.go b/api-tests/backup/backups_test.go index 2e346daade3..e97734ca644 100644 --- a/api-tests/backup/backups_test.go +++ b/api-tests/backup/backups_test.go @@ -45,42 +45,48 @@ func TestScheduleBackup(t *testing.T) { mongo1Name := pmmapitests.TestString(t, "mongo") mongo2Name := pmmapitests.TestString(t, "mongo") - mongo1Resp, err := managementClient.Default.ManagementService.AddMongoDB(&mservice.AddMongoDBParams{ - Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - Cluster: "test_cluster", - PMMAgentID: pmmAgentID, - ServiceName: mongo1Name, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - - SkipConnectionCheck: true, - DisableCollectors: []string{"global_status", "perf_schema.tablelocks"}, - }, - }) + mongo1Resp, err := managementClient.Default.ManagementService.AddService( + &mservice.AddServiceParams{ + Context: pmmapitests.Context, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + Cluster: "test_cluster", + PMMAgentID: pmmAgentID, + ServiceName: mongo1Name, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + + SkipConnectionCheck: true, + DisableCollectors: []string{"global_status", "perf_schema.tablelocks"}, + }, + }, + }) require.NoError(t, err) - mongo1ID := mongo1Resp.Payload.Service.ServiceID + mongo1ID := mongo1Resp.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, mongo1ID) - mongo2Resp, err := managementClient.Default.ManagementService.AddMongoDB(&mservice.AddMongoDBParams{ - Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - Cluster: "test_cluster", - PMMAgentID: pmmAgentID, - ServiceName: mongo2Name, - Address: "10.10.10.11", - Port: 27017, - Username: "username", - - SkipConnectionCheck: true, - DisableCollectors: []string{"global_status", "perf_schema.tablelocks"}, - }, - }) + mongo2Resp, err := managementClient.Default.ManagementService.AddService( + &mservice.AddServiceParams{ + Context: pmmapitests.Context, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + Cluster: "test_cluster", + PMMAgentID: pmmAgentID, + ServiceName: mongo2Name, + Address: "10.10.10.11", + Port: 27017, + Username: "username", + + SkipConnectionCheck: true, + DisableCollectors: []string{"global_status", "perf_schema.tablelocks"}, + }, + }, + }) require.NoError(t, err) - mongo2ID := mongo2Resp.Payload.Service.ServiceID + mongo2ID := mongo2Resp.Payload.Postgresql.Service.ServiceID defer pmmapitests.RemoveServices(t, mongo2ID) resp, err := backupClient.Default.LocationsService.AddLocation(&locations.AddLocationParams{ diff --git a/api-tests/inventory/services_test.go b/api-tests/inventory/services_test.go index f85fe46d9a7..380bbd60506 100644 --- a/api-tests/inventory/services_test.go +++ b/api-tests/inventory/services_test.go @@ -444,7 +444,7 @@ func TestMySQLService(t *testing.T) { Context: pmmapitests.Context, } res, err := client.Default.ServicesService.AddService(params) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port are expected to be passed with address.") + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port is expected to be passed along with the host address.") if !assert.Nil(t, res) { pmmapitests.RemoveServices(t, res.Payload.Mysql.ServiceID) } @@ -902,7 +902,7 @@ func TestPostgreSQLService(t *testing.T) { Context: pmmapitests.Context, } res, err := client.Default.ServicesService.AddService(params) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port are expected to be passed with address.") + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port is expected to be passed along with the host address.") if !assert.Nil(t, res) { pmmapitests.RemoveServices(t, res.Payload.Postgresql.ServiceID) } @@ -1122,7 +1122,7 @@ func TestProxySQLService(t *testing.T) { Context: pmmapitests.Context, } res, err := client.Default.ServicesService.AddService(params) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port are expected to be passed with address.") + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port is expected to be passed along with the host address.") if !assert.Nil(t, res) { pmmapitests.RemoveServices(t, res.Payload.Proxysql.ServiceID) } @@ -1329,9 +1329,9 @@ func TestExternalService(t *testing.T) { assert.NotNil(t, noFilterServicesList) assert.GreaterOrEqual(t, len(noFilterServicesList.Payload.Mysql), 0) assert.GreaterOrEqual(t, len(noFilterServicesList.Payload.Mongodb), 0) - assert.GreaterOrEqual(t, len(noFilterServicesList.Payload.Postgresql), 1) + assert.NotEmpty(t, noFilterServicesList.Payload.Postgresql) assert.GreaterOrEqual(t, len(noFilterServicesList.Payload.Proxysql), 0) - assert.GreaterOrEqual(t, len(noFilterServicesList.Payload.External), 1) + assert.NotEmpty(t, noFilterServicesList.Payload.External) assert.Conditionf(t, containsExternalWithGroup(noFilterServicesList.Payload.External, "redis"), "list does not contain external group %s", "redis") // Check duplicates. diff --git a/api-tests/management/external_test.go b/api-tests/management/external_test.go index 141a3bc73f6..250dba219f8 100644 --- a/api-tests/management/external_test.go +++ b/api-tests/management/external_test.go @@ -28,6 +28,7 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -41,22 +42,24 @@ func TestAddExternal(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - RunsOnNodeID: nodeID, - ServiceName: serviceName, - ListenPort: 9104, - NodeID: nodeID, - Group: "", // empty group - pmm-admin does not support group. - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + RunsOnNodeID: nodeID, + ServiceName: serviceName, + ListenPort: 9104, + NodeID: nodeID, + Group: "", // empty group - pmm-admin does not support groups. + SkipConnectionCheck: true, + }, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addExternalOK) - require.NotNil(t, addExternalOK.Payload.Service) - serviceID := addExternalOK.Payload.Service.ServiceID + require.NotNil(t, addExternalOK.Payload.External.Service) + serviceID := addExternalOK.Payload.External.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -104,30 +107,32 @@ func TestAddExternal(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-all-fields-name") - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - RunsOnNodeID: nodeID, - ServiceName: serviceName, - Username: "username", - Password: "password", - Scheme: "https", - MetricsPath: "/metrics-path", - ListenPort: 9250, - NodeID: nodeID, - Environment: "some-environment", - Cluster: "cluster-name", - ReplicationSet: "replication-set", - CustomLabels: map[string]string{"bar": "foo"}, - Group: "redis", - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + RunsOnNodeID: nodeID, + ServiceName: serviceName, + Username: "username", + Password: "password", + Scheme: "https", + MetricsPath: "/metrics-path", + ListenPort: 9250, + NodeID: nodeID, + Environment: "some-environment", + Cluster: "cluster-name", + ReplicationSet: "replication-set", + CustomLabels: map[string]string{"bar": "foo"}, + Group: "redis", + SkipConnectionCheck: true, + }, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addExternalOK) - require.NotNil(t, addExternalOK.Payload.Service) - serviceID := addExternalOK.Payload.Service.ServiceID + require.NotNil(t, addExternalOK.Payload.External.Service) + serviceID := addExternalOK.Payload.External.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) defer removeServiceAgents(t, serviceID) @@ -158,31 +163,33 @@ func TestAddExternal(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - AddNode: &mservice.AddExternalParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE), - NodeName: nodeName, - MachineID: "/machine-id/", - Distro: "linux", - Region: "us-west2", - CustomLabels: map[string]string{"foo": "bar-for-node"}, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + AddNode: &mservice.AddServiceParamsBodyExternalAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTENODE), + NodeName: nodeName, + MachineID: "/machine-id/", + Distro: "linux", + Region: "us-west2", + CustomLabels: map[string]string{"foo": "bar-for-node"}, + }, + Address: "localhost", + ServiceName: serviceName, + ListenPort: 9104, + Group: "", // empty group - pmm-admin does not support group. + SkipConnectionCheck: true, }, - Address: "localhost", - ServiceName: serviceName, - ListenPort: 9104, - Group: "", // empty group - pmm-admin does not support group. - SkipConnectionCheck: true, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addExternalOK) - require.NotNil(t, addExternalOK.Payload.Service) - nodeID := addExternalOK.Payload.Service.NodeID + require.NotNil(t, addExternalOK.Payload.External.Service) + nodeID := addExternalOK.Payload.External.Service.NodeID defer pmmapitests.RemoveNodes(t, nodeID) - serviceID := addExternalOK.Payload.Service.ServiceID + serviceID := addExternalOK.Payload.External.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that node is created and its fields. @@ -247,37 +254,41 @@ func TestAddExternal(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-the-same-name") - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - NodeID: nodeID, - RunsOnNodeID: nodeID, - ServiceName: serviceName, - ListenPort: 9250, - Group: "external", - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + NodeID: nodeID, + RunsOnNodeID: nodeID, + ServiceName: serviceName, + ListenPort: 9250, + Group: "external", + SkipConnectionCheck: true, + }, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addExternalOK) - require.NotNil(t, addExternalOK.Payload.Service) - serviceID := addExternalOK.Payload.Service.ServiceID + require.NotNil(t, addExternalOK.Payload.External.Service) + serviceID := addExternalOK.Payload.External.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) defer removeServiceAgents(t, serviceID) - params = &mservice.AddExternalParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - NodeID: nodeID, - RunsOnNodeID: nodeID, - ServiceName: serviceName, - ListenPort: 9260, - Group: "external", - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + NodeID: nodeID, + RunsOnNodeID: nodeID, + ServiceName: serviceName, + ListenPort: 9260, + Group: "external", + SkipConnectionCheck: true, + }, }, } - addExternalOK, err = client.Default.ManagementService.AddExternal(params) + addExternalOK, err = client.Default.ManagementService.AddService(params) require.Nil(t, addExternalOK) pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, `Service with name %q already exists.`, serviceName) }) @@ -288,16 +299,18 @@ func TestAddExternal(t *testing.T) { nodeID := genericNode.NodeID defer pmmapitests.RemoveNodes(t, nodeID) - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - NodeID: nodeID, - RunsOnNodeID: nodeID, - Group: "external", - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + NodeID: nodeID, + RunsOnNodeID: nodeID, + Group: "external", + SkipConnectionCheck: true, + }, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddExternalRequest.ServiceName: value length must be at least 1 runes") assert.Nil(t, addExternalOK) }) @@ -309,17 +322,19 @@ func TestAddExternal(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - NodeID: nodeID, - ServiceName: serviceName, - RunsOnNodeID: nodeID, - Group: "external", - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + NodeID: nodeID, + ServiceName: serviceName, + RunsOnNodeID: nodeID, + Group: "external", + SkipConnectionCheck: true, + }, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddExternalRequest.ListenPort: value must be inside range (0, 65536)") assert.Nil(t, addExternalOK) }) @@ -331,17 +346,19 @@ func TestAddExternal(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - RunsOnNodeID: nodeID, - ServiceName: serviceName, - ListenPort: 12345, - Group: "external", - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + RunsOnNodeID: nodeID, + ServiceName: serviceName, + ListenPort: 12345, + Group: "external", + SkipConnectionCheck: true, + }, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "runs_on_node_id and node_id should be specified together.") assert.Nil(t, addExternalOK) }) @@ -353,17 +370,19 @@ func TestAddExternal(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - NodeID: nodeID, - ServiceName: serviceName, - ListenPort: 12345, - Group: "external", - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + NodeID: nodeID, + ServiceName: serviceName, + ListenPort: 12345, + Group: "external", + SkipConnectionCheck: true, + }, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "runs_on_node_id and node_id should be specified together.") assert.Nil(t, addExternalOK) }) @@ -375,20 +394,22 @@ func TestAddExternal(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - AddNode: &mservice.AddExternalParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE), - NodeName: "external-serverless", + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + AddNode: &mservice.AddServiceParamsBodyExternalAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTENODE), + NodeName: "external-serverless", + }, + ServiceName: serviceName, + ListenPort: 12345, + Group: "external", + SkipConnectionCheck: true, }, - ServiceName: serviceName, - ListenPort: 12345, - Group: "external", - SkipConnectionCheck: true, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "address can't be empty for add node request.") assert.Nil(t, addExternalOK) }) @@ -400,24 +421,26 @@ func TestRemoveExternal(t *testing.T) { genericNode := pmmapitests.AddGenericNode(t, nodeName) nodeID = genericNode.NodeID - params := &mservice.AddExternalParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddExternalBody{ - NodeID: nodeID, - RunsOnNodeID: nodeID, - ServiceName: serviceName, - Username: "username", - Password: "password", - ListenPort: 12345, - Group: "external", - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + External: &mservice.AddServiceParamsBodyExternal{ + NodeID: nodeID, + RunsOnNodeID: nodeID, + ServiceName: serviceName, + Username: "username", + Password: "password", + ListenPort: 12345, + Group: "external", + SkipConnectionCheck: true, + }, }, } - addExternalOK, err := client.Default.ManagementService.AddExternal(params) + addExternalOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addExternalOK) - require.NotNil(t, addExternalOK.Payload.Service) - serviceID = addExternalOK.Payload.Service.ServiceID + require.NotNil(t, addExternalOK.Payload.External.Service) + serviceID = addExternalOK.Payload.External.Service.ServiceID return } @@ -428,11 +451,9 @@ func TestRemoveExternal(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeExternalService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -456,11 +477,9 @@ func TestRemoveExternal(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeExternalService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -477,25 +496,6 @@ func TestRemoveExternal(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, serviceID := addExternal(t, serviceName, nodeName) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -504,11 +504,9 @@ func TestRemoveExternal(t *testing.T) { defer pmmapitests.RemoveServices(t, serviceID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") @@ -516,7 +514,6 @@ func TestRemoveExternal(t *testing.T) { t.Run("No params", func(t *testing.T) { removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{}, Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) diff --git a/api-tests/management/haproxy_test.go b/api-tests/management/haproxy_test.go index 803e9965373..f1518444e80 100644 --- a/api-tests/management/haproxy_test.go +++ b/api-tests/management/haproxy_test.go @@ -28,6 +28,7 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -389,11 +390,9 @@ func TestRemoveHAProxy(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeHAProxyService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -417,11 +416,9 @@ func TestRemoveHAProxy(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeHAProxyService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -438,25 +435,6 @@ func TestRemoveHAProxy(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, serviceID := addHAProxy(t, serviceName, nodeName) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -465,11 +443,9 @@ func TestRemoveHAProxy(t *testing.T) { defer pmmapitests.RemoveServices(t, serviceID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") @@ -477,7 +453,6 @@ func TestRemoveHAProxy(t *testing.T) { t.Run("No params", func(t *testing.T) { removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{}, Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) diff --git a/api-tests/management/mongodb_test.go b/api-tests/management/mongodb_test.go index d7944f911bb..cc1616a24ad 100644 --- a/api-tests/management/mongodb_test.go +++ b/api-tests/management/mongodb_test.go @@ -27,6 +27,7 @@ import ( inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -43,24 +44,26 @@ func TestAddMongoDB(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-name-for-basic-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - - SkipConnectionCheck: true, - DisableCollectors: []string{"database"}, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + + SkipConnectionCheck: true, + DisableCollectors: []string{"database"}, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -114,26 +117,28 @@ func TestAddMongoDB(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-name-for-all-fields") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - Password: "password", - QANMongodbProfiler: true, - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + Password: "password", + QANMongodbProfiler: true, + + SkipConnectionCheck: true, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -203,27 +208,29 @@ func TestAddMongoDB(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-name-for-all-fields") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Environment: "some-environment", - Cluster: "cluster-name", - ReplicationSet: "replication-set", - CustomLabels: map[string]string{"bar": "foo"}, - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Environment: "some-environment", + Cluster: "cluster-name", + ReplicationSet: "replication-set", + CustomLabels: map[string]string{"bar": "foo"}, + + SkipConnectionCheck: true, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) defer removeServiceAgents(t, serviceID) @@ -260,37 +267,41 @@ func TestAddMongoDB(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-the-same-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + + SkipConnectionCheck: true, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) defer removeServiceAgents(t, serviceID) - params = &mservice.AddMongoDBParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "11.11.11.11", - Port: 27017, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "11.11.11.11", + Port: 27017, + }, }, } - addMongoDBOK, err = client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err = client.Default.ManagementService.AddService(params) require.Nil(t, addMongoDBOK) pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, `Service with name %q already exists.`, serviceName) }) @@ -307,64 +318,70 @@ func TestAddMongoDB(t *testing.T) { nodeNameAddNode := pmmapitests.TestString(t, "node-for-add-node-name") serviceName := pmmapitests.TestString(t, "service-name-for-basic-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - AddNode: &mservice.AddMongoDBParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + AddNode: &mservice.AddServiceParamsBodyMongodbAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEGENERICNODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + + SkipConnectionCheck: true, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - - SkipConnectionCheck: true, }, } - _, err := client.Default.ManagementService.AddMongoDB(params) + _, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "add_node structure can be used only for remote nodes") - params = &mservice.AddMongoDBParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - AddNode: &mservice.AddMongoDBParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + AddNode: &mservice.AddServiceParamsBodyMongodbAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEREMOTERDSNODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + + SkipConnectionCheck: true, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - - SkipConnectionCheck: true, }, } - _, err = client.Default.ManagementService.AddMongoDB(params) + _, err = client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "add_node structure can be used only for remote nodes") - params = &mservice.AddMongoDBParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - AddNode: &mservice.AddMongoDBParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + AddNode: &mservice.AddServiceParamsBodyMongodbAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEREMOTENODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + + SkipConnectionCheck: true, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - - SkipConnectionCheck: true, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID - newNodeID := addMongoDBOK.Payload.Service.NodeID + newNodeID := addMongoDBOK.Payload.Mongodb.Service.NodeID require.NotEqual(t, nodeID, newNodeID) defer pmmapitests.RemoveNodes(t, newNodeID) defer pmmapitests.RemoveServices(t, serviceID) @@ -424,19 +441,21 @@ func TestAddMongoDB(t *testing.T) { defer pmmapitests.RemoveNodes(t, remoteNodeID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: remoteNodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - PMMAgentID: pmmAgentID, - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: remoteNodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + PMMAgentID: pmmAgentID, + + SkipConnectionCheck: true, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "node_id or node_name can be used only for generic nodes or container nodes") assert.Nil(t, addMongoDBOK) }) @@ -450,11 +469,15 @@ func TestAddMongoDB(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{NodeID: nodeID}, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + }, + }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddMongoDBRequest.ServiceName: value length must be at least 1 runes") assert.Nil(t, addMongoDBOK) }) @@ -469,15 +492,17 @@ func TestAddMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - ServiceName: serviceName, - PMMAgentID: pmmAgentID, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + ServiceName: serviceName, + PMMAgentID: pmmAgentID, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Neither socket nor address passed.") assert.Nil(t, addMongoDBOK) }) @@ -492,17 +517,19 @@ func TestAddMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - PMMAgentID: pmmAgentID, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + PMMAgentID: pmmAgentID, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port are expected to be passed with address.") + addMongoDBOK, err := client.Default.ManagementService.AddService(params) + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port is expected to be passed along with the host address.") assert.Nil(t, addMongoDBOK) }) @@ -516,16 +543,18 @@ func TestAddMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddMongoDBRequest.PmmAgentId: value length must be at least 1 runes") assert.Nil(t, addMongoDBOK) }) @@ -540,20 +569,22 @@ func TestAddMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - PMMAgentID: pmmAgentID, - Username: "username", - Password: "password", - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Socket: "/tmp/mongodb-27017.sock", + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + PMMAgentID: pmmAgentID, + Username: "username", + Password: "password", + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Socket: "/tmp/mongodb-27017.sock", + }, }, } - addProxySQLOK, err := client.Default.ManagementService.AddMongoDB(params) + addProxySQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Socket and address cannot be specified together.") assert.Nil(t, addProxySQLOK) }) @@ -569,22 +600,24 @@ func TestAddMongoDB(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-name-for-mongo-socket-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Socket: "/tmp/mongodb-27017.sock", - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Socket: "/tmp/mongodb-27017.sock", + + SkipConnectionCheck: true, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -637,24 +670,26 @@ func TestAddMongoDB(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-name-for-basic-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_PUSH"), + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_PUSH"), + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -708,24 +743,26 @@ func TestAddMongoDB(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-name-for-basic-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_PULL"), + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_PULL"), + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -778,24 +815,26 @@ func TestAddMongoDB(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-name-for-basic-name") - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_UNSPECIFIED"), + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_UNSPECIFIED"), + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID := addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID := addMongoDBOK.Payload.Mongodb.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -847,26 +886,28 @@ func TestRemoveMongoDB(t *testing.T) { NodeType: pointer.ToString(mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) - params := &mservice.AddMongoDBParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMongoDBBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - Password: "password", - QANMongodbProfiler: withAgents, - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mongodb: &mservice.AddServiceParamsBodyMongodb{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + Password: "password", + QANMongodbProfiler: withAgents, + + SkipConnectionCheck: true, + }, }, } - addMongoDBOK, err := client.Default.ManagementService.AddMongoDB(params) + addMongoDBOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMongoDBOK) - require.NotNil(t, addMongoDBOK.Payload.Service) - serviceID = addMongoDBOK.Payload.Service.ServiceID + require.NotNil(t, addMongoDBOK.Payload.Mongodb.Service) + serviceID = addMongoDBOK.Payload.Mongodb.Service.ServiceID return } @@ -878,11 +919,9 @@ func TestRemoveMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeMongoDBService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -907,11 +946,9 @@ func TestRemoveMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeMongoDBService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -928,26 +965,6 @@ func TestRemoveMongoDB(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, pmmAgentID, serviceID := addMongoDB(t, serviceName, nodeName, false) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -957,11 +974,9 @@ func TestRemoveMongoDB(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") diff --git a/api-tests/management/mysql_test.go b/api-tests/management/mysql_test.go index 05ee6e4c4e7..f426b355faa 100644 --- a/api-tests/management/mysql_test.go +++ b/api-tests/management/mysql_test.go @@ -27,6 +27,7 @@ import ( inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -43,25 +44,27 @@ func TestAddMySQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Username: "username", - - SkipConnectionCheck: true, - DisableCollectors: []string{"global_status", "perf_schema.tablelocks"}, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Username: "username", + + SkipConnectionCheck: true, + DisableCollectors: []string{"global_status", "perf_schema.tablelocks"}, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID := addMySQLOK.Payload.Service.ServiceID + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID := addMySQLOK.Payload.Mysql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -116,28 +119,30 @@ func TestAddMySQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-all-fields-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Username: "username", - Password: "password", - QANMysqlSlowlog: true, - QANMysqlPerfschema: true, - - SkipConnectionCheck: true, - TablestatsGroupTableLimit: -1, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Username: "username", + Password: "password", + QANMysqlSlowlog: true, + QANMysqlPerfschema: true, + + SkipConnectionCheck: true, + TablestatsGroupTableLimit: -1, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID := addMySQLOK.Payload.Service.ServiceID + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID := addMySQLOK.Payload.Mysql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -223,29 +228,31 @@ func TestAddMySQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-all-fields-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Username: "username", - Password: "password", - Environment: "some-environment", - Cluster: "cluster-name", - ReplicationSet: "replication-set", - CustomLabels: map[string]string{"bar": "foo"}, - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Username: "username", + Password: "password", + Environment: "some-environment", + Cluster: "cluster-name", + ReplicationSet: "replication-set", + CustomLabels: map[string]string{"bar": "foo"}, + + SkipConnectionCheck: true, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID := addMySQLOK.Payload.Service.ServiceID + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID := addMySQLOK.Payload.Mysql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) defer removeServiceAgents(t, serviceID) @@ -282,39 +289,43 @@ func TestAddMySQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-the-same-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Username: "username", - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Username: "username", + + SkipConnectionCheck: true, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID := addMySQLOK.Payload.Service.ServiceID + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID := addMySQLOK.Payload.Mysql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) defer removeServiceAgents(t, serviceID) - params = &mservice.AddMySQLParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "11.11.11.11", - Port: 3307, - Username: "username", + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "11.11.11.11", + Port: 3307, + Username: "username", + }, }, } - addMySQLOK, err = client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err = client.Default.ManagementService.AddService(params) require.Nil(t, addMySQLOK) pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, `Service with name %q already exists.`, serviceName) }) @@ -331,67 +342,73 @@ func TestAddMySQL(t *testing.T) { nodeNameAddNode := pmmapitests.TestString(t, "node-for-add-node-name") serviceName := pmmapitests.TestString(t, "service-name-for-basic-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - AddNode: &mservice.AddMySQLParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddMySQLParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + AddNode: &mservice.AddServiceParamsBodyMysqlAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEGENERICNODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + + SkipConnectionCheck: true, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - - SkipConnectionCheck: true, }, } - _, err := client.Default.ManagementService.AddMySQL(params) + _, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "add_node structure can be used only for remote nodes") - params = &mservice.AddMySQLParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - AddNode: &mservice.AddMySQLParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddMySQLParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + AddNode: &mservice.AddServiceParamsBodyMysqlAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEREMOTERDSNODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + + SkipConnectionCheck: true, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - - SkipConnectionCheck: true, }, } - _, err = client.Default.ManagementService.AddMySQL(params) + _, err = client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "add_node structure can be used only for remote nodes") - params = &mservice.AddMySQLParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - AddNode: &mservice.AddMySQLParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddMySQLParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + AddNode: &mservice.AddServiceParamsBodyMysqlAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEREMOTENODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + + SkipConnectionCheck: true, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - - SkipConnectionCheck: true, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID := addMySQLOK.Payload.Service.ServiceID + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID := addMySQLOK.Payload.Mysql.Service.ServiceID - newNodeID := addMySQLOK.Payload.Service.NodeID + newNodeID := addMySQLOK.Payload.Mysql.Service.NodeID require.NotEqual(t, nodeID, newNodeID) defer pmmapitests.RemoveNodes(t, newNodeID) defer pmmapitests.RemoveServices(t, serviceID) @@ -452,20 +469,22 @@ func TestAddMySQL(t *testing.T) { defer pmmapitests.RemoveNodes(t, remoteNodeID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: remoteNodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - PMMAgentID: pmmAgentID, - Username: "username", - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: remoteNodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + PMMAgentID: pmmAgentID, + Username: "username", + + SkipConnectionCheck: true, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "node_id or node_name can be used only for generic nodes or container nodes") assert.Nil(t, addMySQLOK) }) @@ -479,11 +498,15 @@ func TestAddMySQL(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{NodeID: nodeID}, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + }, + }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddMySQLRequest.ServiceName: value length must be at least 1 runes") assert.Nil(t, addMySQLOK) }) @@ -498,17 +521,19 @@ func TestAddMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - PMMAgentID: pmmAgentID, - Username: "username", - Password: "password", - NodeID: nodeID, - ServiceName: serviceName, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + PMMAgentID: pmmAgentID, + Username: "username", + Password: "password", + NodeID: nodeID, + ServiceName: serviceName, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Neither socket nor address passed.") assert.Nil(t, addMySQLOK) }) @@ -523,19 +548,21 @@ func TestAddMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - PMMAgentID: pmmAgentID, - Username: "username", - Password: "password", - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + PMMAgentID: pmmAgentID, + Username: "username", + Password: "password", + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port are expected to be passed with address.") + addMySQLOK, err := client.Default.ManagementService.AddService(params) + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port is expected to be passed along with the host address.") assert.Nil(t, addMySQLOK) }) @@ -549,20 +576,22 @@ func TestAddMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - PMMAgentID: pmmAgentID, - Username: "username", - Password: "password", - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Socket: "/var/run/mysqld/mysqld.sock", + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + PMMAgentID: pmmAgentID, + Username: "username", + Password: "password", + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Socket: "/var/run/mysqld/mysqld.sock", + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Socket and address cannot be specified together.") assert.Nil(t, addMySQLOK) }) @@ -577,16 +606,18 @@ func TestAddMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddMySQLRequest.PmmAgentId: value length must be at least 1 runes") assert.Nil(t, addMySQLOK) }) @@ -601,17 +632,19 @@ func TestAddMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - PMMAgentID: pmmAgentID, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + PMMAgentID: pmmAgentID, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddMySQLRequest.Username: value length must be at least 1 runes") assert.Nil(t, addMySQLOK) }) @@ -627,25 +660,27 @@ func TestAddMySQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Username: "username", - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_PUSH"), + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Username: "username", + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_PUSH"), + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID := addMySQLOK.Payload.Service.ServiceID + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID := addMySQLOK.Payload.Mysql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -700,25 +735,27 @@ func TestAddMySQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Username: "username", - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_PULL"), + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Username: "username", + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_PULL"), + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID := addMySQLOK.Payload.Service.ServiceID + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID := addMySQLOK.Payload.Mysql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -772,25 +809,27 @@ func TestAddMySQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Username: "username", - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_UNSPECIFIED"), + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Username: "username", + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_UNSPECIFIED"), + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID := addMySQLOK.Payload.Service.ServiceID + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID := addMySQLOK.Payload.Mysql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -843,28 +882,30 @@ func TestRemoveMySQL(t *testing.T) { NodeType: pointer.ToString(mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) - params := &mservice.AddMySQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddMySQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - Username: "username", - Password: "password", - QANMysqlSlowlog: withAgents, - QANMysqlPerfschema: withAgents, - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Mysql: &mservice.AddServiceParamsBodyMysql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + Username: "username", + Password: "password", + QANMysqlSlowlog: withAgents, + QANMysqlPerfschema: withAgents, + + SkipConnectionCheck: true, + }, }, } - addMySQLOK, err := client.Default.ManagementService.AddMySQL(params) + addMySQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addMySQLOK) - require.NotNil(t, addMySQLOK.Payload.Service) - serviceID = addMySQLOK.Payload.Service.ServiceID - return + require.NotNil(t, addMySQLOK.Payload.Mysql.Service) + serviceID = addMySQLOK.Payload.Mysql.Service.ServiceID + return //nolint:nakedret } t.Run("By name", func(t *testing.T) { @@ -875,11 +916,9 @@ func TestRemoveMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeMySQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -904,11 +943,9 @@ func TestRemoveMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeMySQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -925,26 +962,6 @@ func TestRemoveMySQL(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, pmmAgentID, serviceID := addMySQL(t, serviceName, nodeName, false) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -954,11 +971,9 @@ func TestRemoveMySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") @@ -966,7 +981,6 @@ func TestRemoveMySQL(t *testing.T) { t.Run("No params", func(t *testing.T) { removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{}, Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) diff --git a/api-tests/management/postgresql_test.go b/api-tests/management/postgresql_test.go index ed004853987..a5a151159c6 100644 --- a/api-tests/management/postgresql_test.go +++ b/api-tests/management/postgresql_test.go @@ -27,6 +27,7 @@ import ( inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -45,27 +46,29 @@ func TestAddPostgreSQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, - Username: "username", - - SkipConnectionCheck: true, - DisableCollectors: []string{"custom_query.ml", "custom_query.mr.directory"}, - AutoDiscoveryLimit: 0, - MaxExporterConnections: 0, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + Username: "username", + + SkipConnectionCheck: true, + DisableCollectors: []string{"custom_query.ml", "custom_query.mr.directory"}, + AutoDiscoveryLimit: 0, + MaxExporterConnections: 0, + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID := addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql.Service) + serviceID := addPostgreSQLOK.Payload.Postgresql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -122,30 +125,32 @@ func TestAddPostgreSQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-all-fields-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, - Username: "username", - Password: "password", - QANPostgresqlPgstatementsAgent: true, - QANPostgresqlPgstatmonitorAgent: true, - DisableQueryExamples: true, - - SkipConnectionCheck: true, - AutoDiscoveryLimit: 15, - MaxExporterConnections: 10, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + Username: "username", + Password: "password", + QANPostgresqlPgstatementsAgent: true, + QANPostgresqlPgstatmonitorAgent: true, + DisableQueryExamples: true, + + SkipConnectionCheck: true, + AutoDiscoveryLimit: 15, + MaxExporterConnections: 10, + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID := addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql.Service) + serviceID := addPostgreSQLOK.Payload.Postgresql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -231,26 +236,28 @@ func TestAddPostgreSQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-all-fields-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, - Username: "username", - Environment: "some-environment", - CustomLabels: map[string]string{"bar": "foo"}, - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + Username: "username", + Environment: "some-environment", + CustomLabels: map[string]string{"bar": "foo"}, + + SkipConnectionCheck: true, + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID := addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql.Service) + serviceID := addPostgreSQLOK.Payload.Postgresql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) defer removeServiceAgents(t, serviceID) @@ -286,40 +293,44 @@ func TestAddPostgreSQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-the-same-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Username: "username", - Address: "10.10.10.10", - Port: 5432, - - SkipConnectionCheck: true, - AutoDiscoveryLimit: -2, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Username: "username", + Address: "10.10.10.10", + Port: 5432, + + SkipConnectionCheck: true, + AutoDiscoveryLimit: -2, + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID := addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql.Service) + serviceID := addPostgreSQLOK.Payload.Postgresql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) defer removeServiceAgents(t, serviceID) - params = &mservice.AddPostgreSQLParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Username: "username", - Address: "11.11.11.11", - Port: 5433, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Username: "username", + Address: "11.11.11.11", + Port: 5433, + }, }, } - addPostgreSQLOK, err = client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err = client.Default.ManagementService.AddService(params) require.Nil(t, addPostgreSQLOK) pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, `Service with name %q already exists.`, serviceName) }) @@ -336,69 +347,75 @@ func TestAddPostgreSQL(t *testing.T) { nodeNameAddNode := pmmapitests.TestString(t, "node-for-add-node-name") serviceName := pmmapitests.TestString(t, "service-name-for-basic-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - AddNode: &mservice.AddPostgreSQLParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + AddNode: &mservice.AddServiceParamsBodyPostgresqlAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEGENERICNODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + + SkipConnectionCheck: true, + AutoDiscoveryLimit: -1, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - - SkipConnectionCheck: true, - AutoDiscoveryLimit: -1, }, } - _, err := client.Default.ManagementService.AddPostgreSQL(params) + _, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "add_node structure can be used only for remote nodes") - params = &mservice.AddPostgreSQLParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - AddNode: &mservice.AddPostgreSQLParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + AddNode: &mservice.AddServiceParamsBodyPostgresqlAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEREMOTERDSNODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + + SkipConnectionCheck: true, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - - SkipConnectionCheck: true, }, } - _, err = client.Default.ManagementService.AddPostgreSQL(params) + _, err = client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "add_node structure can be used only for remote nodes") - params = &mservice.AddPostgreSQLParams{ + params = &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - AddNode: &mservice.AddPostgreSQLParamsBodyAddNode{ - NodeType: pointer.ToString(mservice.AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE), - NodeName: nodeNameAddNode, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + AddNode: &mservice.AddServiceParamsBodyPostgresqlAddNode{ + NodeType: pointer.ToString(mservice.AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEREMOTENODE), + NodeName: nodeNameAddNode, + }, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 27017, + Username: "username", + + SkipConnectionCheck: true, + AutoDiscoveryLimit: 5, }, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 27017, - Username: "username", - - SkipConnectionCheck: true, - AutoDiscoveryLimit: 5, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID := addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql) + serviceID := addPostgreSQLOK.Payload.Postgresql.Service.ServiceID - newNodeID := addPostgreSQLOK.Payload.Service.NodeID + newNodeID := addPostgreSQLOK.Payload.Postgresql.Service.NodeID require.NotEqual(t, nodeID, newNodeID) defer pmmapitests.RemoveNodes(t, newNodeID) defer pmmapitests.RemoveServices(t, serviceID) @@ -460,20 +477,22 @@ func TestAddPostgreSQL(t *testing.T) { defer pmmapitests.RemoveNodes(t, remoteNodeID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: remoteNodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 3306, - PMMAgentID: pmmAgentID, - Username: "username", - - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: remoteNodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 3306, + PMMAgentID: pmmAgentID, + Username: "username", + + SkipConnectionCheck: true, + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "node_id or node_name can be used only for generic nodes or container nodes") assert.Nil(t, addPostgreSQLOK) }) @@ -487,11 +506,15 @@ func TestAddPostgreSQL(t *testing.T) { defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{NodeID: nodeID}, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + }, + }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddPostgreSQLRequest.ServiceName: value length must be at least 1 runes") assert.Nil(t, addPostgreSQLOK) }) @@ -506,16 +529,18 @@ func TestAddPostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - PMMAgentID: pmmAgentID, - NodeID: nodeID, - ServiceName: serviceName, - Username: "username", + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + PMMAgentID: pmmAgentID, + NodeID: nodeID, + ServiceName: serviceName, + Username: "username", + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Neither socket nor address passed.") assert.Nil(t, addPostgreSQLOK) }) @@ -530,18 +555,20 @@ func TestAddPostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - ServiceName: serviceName, - PMMAgentID: pmmAgentID, - Username: "username", - Address: "10.10.10.10", + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + ServiceName: serviceName, + PMMAgentID: pmmAgentID, + Username: "username", + Address: "10.10.10.10", + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port are expected to be passed with address.") + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port is expected to be passed along with the host address.") assert.Nil(t, addPostgreSQLOK) }) @@ -555,16 +582,18 @@ func TestAddPostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddPostgreSQLRequest.PmmAgentId: value length must be at least 1 runes") assert.Nil(t, addPostgreSQLOK) }) @@ -579,20 +608,22 @@ func TestAddPostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) serviceName := pmmapitests.TestString(t, "service-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - PMMAgentID: pmmAgentID, - Username: "username", - Password: "password", - NodeID: nodeID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, - Socket: "/var/run/postgresql", + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + PMMAgentID: pmmAgentID, + Username: "username", + Password: "password", + NodeID: nodeID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + Socket: "/var/run/postgresql", + }, }, } - addProxySQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addProxySQLOK, err := client.Default.ManagementService.AddService(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Socket and address cannot be specified together.") assert.Nil(t, addProxySQLOK) }) @@ -608,25 +639,27 @@ func TestAddPostgreSQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, - Username: "username", - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_PUSH"), + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + Username: "username", + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_PUSH"), + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID := addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql) + serviceID := addPostgreSQLOK.Payload.Postgresql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -682,25 +715,27 @@ func TestAddPostgreSQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, - Username: "username", - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_PULL"), + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + Username: "username", + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_PULL"), + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID := addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql) + serviceID := addPostgreSQLOK.Payload.Postgresql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -755,25 +790,27 @@ func TestAddPostgreSQL(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-for-basic-name") - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, - Username: "username", - - SkipConnectionCheck: true, - MetricsMode: pointer.ToString("METRICS_MODE_UNSPECIFIED"), + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + Username: "username", + + SkipConnectionCheck: true, + MetricsMode: pointer.ToString("METRICS_MODE_UNSPECIFIED"), + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID := addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql.Service) + serviceID := addPostgreSQLOK.Payload.Postgresql.Service.ServiceID defer pmmapitests.RemoveServices(t, serviceID) // Check that service is created and its fields. @@ -828,26 +865,28 @@ func TestRemovePostgreSQL(t *testing.T) { NodeType: pointer.ToString(mservice.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) - params := &mservice.AddPostgreSQLParams{ + params := &mservice.AddServiceParams{ Context: pmmapitests.Context, - Body: mservice.AddPostgreSQLBody{ - NodeID: nodeID, - PMMAgentID: pmmAgentID, - ServiceName: serviceName, - Address: "10.10.10.10", - Port: 5432, - Username: "username", - Password: "password", - QANPostgresqlPgstatementsAgent: withAgents, - QANPostgresqlPgstatmonitorAgent: withAgents, - SkipConnectionCheck: true, + Body: mservice.AddServiceBody{ + Postgresql: &mservice.AddServiceParamsBodyPostgresql{ + NodeID: nodeID, + PMMAgentID: pmmAgentID, + ServiceName: serviceName, + Address: "10.10.10.10", + Port: 5432, + Username: "username", + Password: "password", + QANPostgresqlPgstatementsAgent: withAgents, + QANPostgresqlPgstatmonitorAgent: withAgents, + SkipConnectionCheck: true, + }, }, } - addPostgreSQLOK, err := client.Default.ManagementService.AddPostgreSQL(params) + addPostgreSQLOK, err := client.Default.ManagementService.AddService(params) require.NoError(t, err) require.NotNil(t, addPostgreSQLOK) - require.NotNil(t, addPostgreSQLOK.Payload.Service) - serviceID = addPostgreSQLOK.Payload.Service.ServiceID + require.NotNil(t, addPostgreSQLOK.Payload.Postgresql.Service) + serviceID = addPostgreSQLOK.Payload.Postgresql.Service.ServiceID return } @@ -859,11 +898,9 @@ func TestRemovePostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -888,11 +925,9 @@ func TestRemovePostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -909,26 +944,6 @@ func TestRemovePostgreSQL(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, pmmAgentID, serviceID := addPostgreSQL(t, serviceName, nodeName, false) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -938,11 +953,9 @@ func TestRemovePostgreSQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeMySQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") diff --git a/api-tests/management/proxysql_test.go b/api-tests/management/proxysql_test.go index a4095342c00..a23783ca016 100644 --- a/api-tests/management/proxysql_test.go +++ b/api-tests/management/proxysql_test.go @@ -27,6 +27,7 @@ import ( inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client" agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" + "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/management/v1/json/client" mservice "github.com/percona/pmm/api/management/v1/json/client/management_service" ) @@ -498,7 +499,7 @@ func TestAddProxySQL(t *testing.T) { }, } addProxySQLOK, err := client.Default.ManagementService.AddProxySQL(params) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port are expected to be passed with address.") + pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "Port is expected to be passed along with the host address.") assert.Nil(t, addProxySQLOK) }) @@ -618,11 +619,9 @@ func TestRemoveProxySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceName, + ServiceType: pointer.ToString(types.ServiceTypeProxySQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -647,11 +646,9 @@ func TestRemoveProxySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypeProxySQLService), + Context: pmmapitests.Context, }) noError := assert.NoError(t, err) notNil := assert.NotNil(t, removeServiceOK) @@ -668,26 +665,6 @@ func TestRemoveProxySQL(t *testing.T) { assert.Nil(t, listAgents) }) - t.Run("Both params", func(t *testing.T) { - serviceName := pmmapitests.TestString(t, "service-remove-both-params") - nodeName := pmmapitests.TestString(t, "node-remove-both-params") - nodeID, pmmAgentID, serviceID := addProxySQL(t, serviceName, nodeName) - defer pmmapitests.RemoveNodes(t, nodeID) - defer pmmapitests.RemoveServices(t, serviceID) - defer RemovePMMAgentWithSubAgents(t, pmmAgentID) - - removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceName: serviceName, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE), - }, - Context: pmmapitests.Context, - }) - assert.Nil(t, removeServiceOK) - pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "service_id or service_name expected; not both") - }) - t.Run("Wrong type", func(t *testing.T) { serviceName := pmmapitests.TestString(t, "service-remove-wrong-type") nodeName := pmmapitests.TestString(t, "node-remove-wrong-type") @@ -697,11 +674,9 @@ func TestRemoveProxySQL(t *testing.T) { defer RemovePMMAgentWithSubAgents(t, pmmAgentID) removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{ - ServiceID: serviceID, - ServiceType: pointer.ToString(mservice.RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE), - }, - Context: pmmapitests.Context, + ServiceID: serviceID, + ServiceType: pointer.ToString(types.ServiceTypePostgreSQLService), + Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "wrong service type") @@ -709,7 +684,6 @@ func TestRemoveProxySQL(t *testing.T) { t.Run("No params", func(t *testing.T) { removeServiceOK, err := client.Default.ManagementService.RemoveService(&mservice.RemoveServiceParams{ - Body: mservice.RemoveServiceBody{}, Context: pmmapitests.Context, }) assert.Nil(t, removeServiceOK) diff --git a/api/MIGRATION_EXAMPLES.md b/api/MIGRATION_EXAMPLES.md index a253363a8b7..6ae14518187 100644 --- a/api/MIGRATION_EXAMPLES.md +++ b/api/MIGRATION_EXAMPLES.md @@ -39,12 +39,21 @@ curl -s -X GET http://admin:admin@localhost:8080/v1/inventory/nodes/32c914d1-daf ### POST /v1/inventory/Services/Get -> GET /v1/inventory/services/{service_id} curl -s -X GET http://admin:admin@localhost:8080/v1/inventory/services/d4dfdccf-c07c-48a6-a101-b119b04d880f +### POST /v1/inventory/Services/List -> GET /v1/inventory/services +curl -s -X GET http://admin:admin@localhost:8080/v1/inventory/services + ### POST /v1/inventory/Services/Change -> PUT /v1/inventory/services/{service_id} curl -s -X PUT -d '{"cluster": "test2","environment":"dev","replication_set":"main"}' http://admin:admin@localhost:8080/v1/inventory/services/d4dfdccf-c07c-48a6-a101-b119b04d880f ### add/update custom labels curl -s -X PUT -d '{"custom_labels":{"values":{"env":"foo","bar":"123"}}}' http://admin:admin@localhost:8080/v1/inventory/services/d4dfdccf-c07c-48a6-a101-b119b04d880f -### remove a standard label and all custom labels +### remove a standard label and all custom labels curl -s -X PUT -d '{"replication_set":"","custom_labels":{}}' http://admin:admin@localhost:8080/v1/inventory/services/d4dfdccf-c07c-48a6-a101-b119b04d880f ### POST /v1/inventory/Services/ListTypes -> POST /v1/inventory/services:getTypes curl -s -X POST http://admin:admin@localhost:8080/v1/inventory/services:getTypes + +### /v1/management/Service/Remove -> DELETE /v1/management/services/{service_id} +curl -s -X DELETE http://admin:admin@localhost:8080/v1/management/services/b7d3b87a-d366-4cb4-b101-03d68f73a7c0 +### pmm-admin remove mongodb mongo-svc +### pmm-admin remove mongodb mongo-svc --service-id=/service_id/ed322782-e6fd-4ad9-8ee6-a7d47b62de41 +### pmm-admin remove mongodb --service-id=/service_id/ed322782-e6fd-4ad9-8ee6-a7d47b62de41 diff --git a/api/MIGRATION_TO_V3.md b/api/MIGRATION_TO_V3.md index 1959d904c9a..42c9d1972c6 100644 --- a/api/MIGRATION_TO_V3.md +++ b/api/MIGRATION_TO_V3.md @@ -45,17 +45,17 @@ POST /v1/inventory/Services/CustomLabels/Add PUT /v1/inventory/services/{ POST /v1/inventory/Services/CustomLabels/Remove PUT /v1/inventory/services/{service_id} ✅ NOTE: merged into PUT /v1/inventory/services/{id} **ManagementService** **ManagementService** -POST /v1/management/Annotations/Add POST /v1/management/annotations -POST /v1/management/Node/Register POST /v1/management/nodes -POST /v1/management/External/Add POST /v1/management/services pass a service type in body -POST /v1/management/HAProxy/Add POST /v1/management/services pass a service type in body -POST /v1/management/MongoDB/Add POST /v1/management/services pass a service type in body -POST /v1/management/MySQL/Add POST /v1/management/services pass a service type in body -POST /v1/management/PostgreSQL/Add POST /v1/management/services pass a service type in body -POST /v1/management/ProxySQL/Add POST /v1/management/services pass a service type in body -POST /v1/management/RDS/Add POST /v1/management/services pass a service type in body -POST /v1/management/RDS/Discover POST /v1/management/services:discoverRDS -POST /v1/management/Service/Remove DELETE /v1/management/services/{id} ({service_id} or {service_name}) and optional {service_type} +POST /v1/management/Annotations/Add POST /v1/management/annotations ✅ +POST /v1/management/Node/Register POST /v1/management/nodes ✅ +POST /v1/management/External/Add POST /v1/management/services ✅ NOTE: several endpoints merged into one +POST /v1/management/HAProxy/Add POST /v1/management/services ✅ +POST /v1/management/MongoDB/Add POST /v1/management/services ✅ +POST /v1/management/MySQL/Add POST /v1/management/services ✅ +POST /v1/management/PostgreSQL/Add POST /v1/management/services ✅ +POST /v1/management/ProxySQL/Add POST /v1/management/services ✅ +POST /v1/management/RDS/Add POST /v1/management/services ✅ +POST /v1/management/RDS/Discover POST /v1/management/services:discoverRDS ✅ +POST /v1/management/Service/Remove DELETE /v1/management/services/{service_id} ✅ {service_id}, optionally ?service_type= **ActionsService** **ActionService** POST /v1/actions/Cancel POST /v1/actions:cancel @@ -77,14 +77,14 @@ POST /v1/actions/StartPTSummary POST /v1/actions:startNodeAc **AlertingService** **AlertingService** POST /v1/alerting/Rules/Create POST /v1/alerting/rules POST /v1/alerting/Templates/Create POST /v1/alerting/templates -POST /v1/alerting/Templates/Update PUT /v1/alerting/templates/{name} !!! pass yaml in body +POST /v1/alerting/Templates/Update PUT /v1/alerting/templates/{name} POST /v1/alerting/Templates/List GET /v1/alerting/templates POST /v1/alerting/Templates/Delete DELETE /v1/alerting/templates/{name} **AdvisorService** **AdvisorService** -POST /v1/advisors/Change POST /v1/advisors/checks:batchChange !!! exception: updates multiple checks +POST /v1/advisors/Change POST /v1/advisors/checks:batchChange Note: allows to update multiple checks -POST /v1/advisors/FailedChecks GET /v1/advisors/checks/failedChecks ex: ?service_id=/service_id/1234-5678-abcd-efgh&page_params.page_size=100&page_params.index=1 +POST /v1/advisors/FailedChecks GET /v1/advisors/checks/failedChecks ex: ?service_id=1234-5678-abcd-efgh&page_params.page_size=100&page_params.index=1 POST /v1/advisors/List GET /v1/advisors POST /v1/advisors/ListChecks GET /v1/advisors/checks POST /v1/advisors/StartChecks POST /v1/advisors/checks:start diff --git a/api/management/v1/agent/agent.pb.go b/api/management/v1/agent/agent.pb.go index 202e0df389e..77c0a5fc282 100644 --- a/api/management/v1/agent/agent.pb.go +++ b/api/management/v1/agent/agent.pb.go @@ -10,7 +10,6 @@ import ( 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" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -835,206 +834,204 @@ var file_management_v1_agent_agent_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xe4, 0x15, 0x0a, 0x0e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, - 0x15, 0x69, 0x73, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x73, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, - 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x24, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x41, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x15, 0x69, 0x73, 0x5f, 0x61, 0x77, 0x73, 0x5f, - 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x41, 0x77, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, - 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x41, 0x7a, - 0x75, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x61, 0x7a, 0x75, 0x72, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x54, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, - 0x65, 0x76, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, - 0x6d, 0x61, 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x2b, - 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x25, - 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, - 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x5f, 0x64, - 0x62, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, - 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0e, 0x6d, - 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4f, 0x0a, - 0x0d, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x12, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, - 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x12, - 0x20, 0x0a, 0x0c, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, - 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x11, - 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x65, 0x78, 0x65, - 0x63, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, - 0x6f, 0x63, 0x65, 0x73, 0x73, 0x45, 0x78, 0x65, 0x63, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, - 0x0c, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x18, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x12, 0x36, 0x0a, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x19, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, - 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x64, 0x73, 0x5f, 0x62, 0x61, 0x73, 0x69, - 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x72, 0x64, 0x73, 0x42, 0x61, 0x73, - 0x69, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x64, 0x73, 0x5f, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, - 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x64, 0x73, 0x45, 0x6e, 0x68, - 0x61, 0x6e, 0x63, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x44, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, - 0x75, 0x6e, 0x73, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x20, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x1e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, - 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x18, 0x23, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, - 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x61, 0x74, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x26, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x27, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, - 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x18, 0x28, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x33, 0x0a, 0x0c, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x74, 0x6c, 0x73, + 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xe4, 0x15, 0x0a, 0x0e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, + 0x31, 0x0a, 0x15, 0x69, 0x73, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, + 0x69, 0x73, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, + 0x65, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x30, 0x0a, 0x15, 0x69, 0x73, 0x5f, 0x61, 0x77, + 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x41, 0x77, 0x73, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x4f, 0x0a, 0x0d, 0x61, 0x7a, 0x75, + 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x61, 0x7a, + 0x75, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x54, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, + 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, + 0x12, 0x2b, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x6f, + 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6d, 0x61, + 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, + 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x61, 0x74, 0x68, + 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, + 0x5f, 0x64, 0x62, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, + 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x0e, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x62, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x4f, 0x0a, 0x0d, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x0c, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, + 0x74, 0x12, 0x20, 0x0a, 0x0c, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x49, 0x64, 0x12, 0x5e, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, + 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2f, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x50, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x11, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x65, + 0x78, 0x65, 0x63, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, + 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x45, 0x78, 0x65, 0x63, 0x50, 0x61, 0x74, 0x68, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, + 0x18, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x70, 0x75, 0x73, 0x68, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, + 0x70, 0x6c, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x19, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x15, 0x71, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, + 0x65, 0x73, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x64, 0x73, 0x5f, 0x62, 0x61, + 0x73, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x72, 0x64, 0x73, 0x42, + 0x61, 0x73, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x44, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x41, 0x0a, 0x1d, 0x72, 0x64, 0x73, 0x5f, 0x65, 0x6e, 0x68, 0x61, 0x6e, + 0x63, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x72, 0x64, 0x73, 0x45, + 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x44, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x73, 0x5f, 0x6f, + 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x72, 0x75, 0x6e, 0x73, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x20, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x4a, 0x0a, 0x22, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x21, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x1e, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, + 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x23, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, + 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x24, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x25, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x41, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x26, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, + 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x27, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, + 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x72, 0x18, 0x28, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x33, 0x0a, 0x0c, 0x4d, 0x79, 0x53, 0x51, + 0x4c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x74, + 0x6c, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0b, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x1a, 0xc9, 0x01, + 0x0a, 0x0c, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, + 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x69, + 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, + 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x1a, 0xa4, 0x03, 0x0a, 0x0e, 0x4d, 0x6f, + 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x1a, + 0x69, 0x73, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x16, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x54, 0x0a, 0x28, 0x69, 0x73, 0x5f, 0x74, + 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x69, 0x73, 0x54, 0x6c, + 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x46, + 0x69, 0x6c, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x12, 0x39, + 0x0a, 0x18, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12, 0x37, 0x0a, 0x17, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, + 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, + 0x1a, 0xa4, 0x01, 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x69, 0x73, 0x54, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x1a, 0xc9, 0x01, 0x0a, 0x0c, - 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x69, 0x73, 0x5f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x73, 0x65, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, - 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, - 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x1a, 0xa4, 0x03, 0x0a, 0x0e, 0x4d, 0x6f, 0x6e, 0x67, - 0x6f, 0x44, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x1a, 0x69, 0x73, - 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, - 0x69, 0x73, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x54, 0x0a, 0x28, 0x69, 0x73, 0x5f, 0x74, 0x6c, 0x73, - 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x6c, - 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x12, 0x39, 0x0a, 0x18, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, - 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, - 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12, 0x37, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, - 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, - 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x1a, 0xa4, - 0x01, 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x6b, - 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, - 0x53, 0x73, 0x6c, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x75, 0x74, - 0x6f, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x18, 0x6d, - 0x61, 0x78, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x16, 0x6d, - 0x61, 0x78, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, - 0x65, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x42, 0xb1, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x3b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x5c, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x53, 0x73, 0x6c, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x61, + 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x38, 0x0a, + 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x16, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, + 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x42, 0xb1, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, + 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x3b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/management/v1/agent/agent.proto b/api/management/v1/agent/agent.proto index b2b2c03ccb4..ca79b8735e5 100644 --- a/api/management/v1/agent/agent.proto +++ b/api/management/v1/agent/agent.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package agent.v1beta1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; message UniversalAgent { diff --git a/api/management/v1/annotation.pb.go b/api/management/v1/annotation.pb.go index cf6fb5ae8da..a6450e0e3f7 100644 --- a/api/management/v1/annotation.pb.go +++ b/api/management/v1/annotation.pb.go @@ -32,9 +32,9 @@ type AddAnnotationRequest struct { Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // Tags are used to filter annotations. Tags []string `protobuf:"bytes,2,rep,name=tags,proto3" json:"tags,omitempty"` - // Used for annotate node. + // Used for annotating a node. NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` - // Used for annotate services. + // Used for annotating services. ServiceNames []string `protobuf:"bytes,4,rep,name=service_names,json=serviceNames,proto3" json:"service_names,omitempty"` } diff --git a/api/management/v1/annotation.proto b/api/management/v1/annotation.proto index 34139f53cdc..ba64c908063 100644 --- a/api/management/v1/annotation.proto +++ b/api/management/v1/annotation.proto @@ -10,9 +10,9 @@ message AddAnnotationRequest { string text = 1 [(validate.rules).string.min_len = 1]; // Tags are used to filter annotations. repeated string tags = 2; - // Used for annotate node. + // Used for annotating a node. string node_name = 3; - // Used for annotate services. + // Used for annotating services. repeated string service_names = 4; } diff --git a/api/management/v1/azure/azure.pb.go b/api/management/v1/azure/azure.pb.go index 0c93d600ede..8ab9aea4b13 100644 --- a/api/management/v1/azure/azure.pb.go +++ b/api/management/v1/azure/azure.pb.go @@ -11,7 +11,6 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) @@ -641,154 +640,153 @@ var file_management_v1_azure_azure_proto_rawDesc = []byte{ 0x0a, 0x1f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x2f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x01, 0x0a, 0x1c, 0x44, 0x69, 0x73, 0x63, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x01, 0x0a, 0x1c, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0f, 0x61, 0x7a, + 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x61, 0x7a, + 0x75, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x13, 0x61, + 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, + 0x01, 0x52, 0x11, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x0f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x54, 0x65, 0x6e, + 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x15, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x73, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x13, 0x61, + 0x7a, 0x75, 0x72, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0xf2, 0x02, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x41, + 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x7a, 0x75, 0x72, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, + 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x85, 0x01, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0f, 0x61, 0x7a, 0x75, 0x72, - 0x65, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x61, 0x7a, 0x75, + 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x7a, 0x75, + 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x15, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, + 0x96, 0x09, 0x0a, 0x17, 0x41, 0x64, 0x64, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x72, + 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, + 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x28, 0x0a, 0x0b, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, + 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x0f, 0x61, 0x7a, 0x75, 0x72, + 0x65, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x13, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x0f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x15, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x13, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0xf2, 0x02, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x7a, 0x75, - 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x12, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, - 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x41, - 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, - 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x22, 0x85, 0x01, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x17, 0x61, 0x7a, 0x75, 0x72, 0x65, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x61, 0x7a, 0x75, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x15, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x96, 0x09, - 0x0a, 0x17, 0x41, 0x64, 0x64, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x28, 0x0a, 0x0b, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, - 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x04, 0x70, - 0x6f, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2f, 0x0a, 0x0f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x13, 0x61, 0x7a, 0x75, 0x72, 0x65, - 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x11, 0x61, - 0x7a, 0x75, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x2f, 0x0a, 0x0f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0d, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x54, 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, - 0x64, 0x12, 0x3b, 0x0a, 0x15, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x13, 0x61, 0x7a, 0x75, 0x72, 0x65, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x39, - 0x0a, 0x14, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x12, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x36, 0x0a, 0x17, 0x61, 0x7a, 0x75, - 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x61, 0x7a, 0x75, 0x72, - 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x72, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x61, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, - 0x71, 0x61, 0x6e, 0x12, 0x5d, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x61, 0x7a, 0x75, - 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x7a, - 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x14, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x15, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, - 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, - 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x19, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x41, 0x7a, - 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x41, 0x7a, 0x75, - 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2a, 0x9e, 0x01, 0x0a, 0x19, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x41, - 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x2c, 0x0a, 0x28, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x41, 0x5a, 0x55, + 0x12, 0x39, 0x0a, 0x14, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x12, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x36, 0x0a, 0x17, 0x61, + 0x7a, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x61, 0x7a, + 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x61, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x03, 0x71, 0x61, 0x6e, 0x12, 0x5d, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x61, + 0x7a, 0x75, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, + 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, + 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x16, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, + 0x65, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, + 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, + 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3c, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x41, + 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x9e, 0x01, 0x0a, 0x19, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x2c, 0x0a, 0x28, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x41, + 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x26, 0x0a, 0x22, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x26, - 0x0a, 0x22, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45, - 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, - 0x59, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x2b, 0x0a, 0x27, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, - 0x45, 0x52, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, - 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, 0x53, 0x51, - 0x4c, 0x10, 0x02, 0x42, 0xb1, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x7a, 0x75, 0x72, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x7a, 0x75, 0x72, 0x65, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, - 0x31, 0x2f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x3b, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x7a, 0x75, - 0x72, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x41, 0x7a, 0x75, - 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x41, 0x7a, 0x75, - 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x7a, 0x75, 0x72, 0x65, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5f, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x12, 0x2b, 0x0a, 0x27, 0x44, 0x49, 0x53, 0x43, + 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x42, + 0x41, 0x53, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, + 0x53, 0x51, 0x4c, 0x10, 0x02, 0x42, 0xb1, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x7a, + 0x75, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x7a, 0x75, + 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, + 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x3b, 0x61, 0x7a, 0x75, 0x72, 0x65, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, + 0x7a, 0x75, 0x72, 0x65, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x41, + 0x7a, 0x75, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x41, + 0x7a, 0x75, 0x72, 0x65, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x7a, 0x75, 0x72, 0x65, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/api/management/v1/azure/azure.proto b/api/management/v1/azure/azure.proto index 3daa8253d37..c1617d1e725 100644 --- a/api/management/v1/azure/azure.proto +++ b/api/management/v1/azure/azure.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package azure.v1beta1; -import "google/api/annotations.proto"; import "validate/validate.proto"; // DiscoverAzureDatabaseRequest discover azure databases request. diff --git a/api/management/v1/external.pb.go b/api/management/v1/external.pb.go index 3098abccffe..4a7c9308b61 100644 --- a/api/management/v1/external.pb.go +++ b/api/management/v1/external.pb.go @@ -11,7 +11,6 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,24 +24,24 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type AddExternalRequest struct { +type AddExternalServiceParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Node identifier on which an external exporter is been running. - // runs_on_node_id always should be passed with node_id. + // 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. RunsOnNodeId string `protobuf:"bytes,1,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` // Node name on which a service and node is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` // Create a new Node with those parameters. - // add_node always should be passed with address. + // add_node should always be passed with address. // Exactly one of these parameters should be present: node_id, node_name, add_node. AddNode *AddNodeParams `protobuf:"bytes,3,opt,name=add_node,json=addNode,proto3" json:"add_node,omitempty"` // Node and Exporter access address (DNS name or IP). - // address always should be passed with add_node. + // address should always be passed with add_node. Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` // Unique across all Services user-defined name. Required. ServiceName string `protobuf:"bytes,5,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` @@ -57,7 +56,7 @@ type AddExternalRequest struct { // Listen port for scraping metrics. ListenPort uint32 `protobuf:"varint,10,opt,name=listen_port,json=listenPort,proto3" json:"listen_port,omitempty"` // Node identifier on which an external service is been running. - // node_id always should be passed with runs_on_node_id. + // node_id should always be passed with runs_on_node_id. NodeId string `protobuf:"bytes,11,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // Environment name. Environment string `protobuf:"bytes,12,opt,name=environment,proto3" json:"environment,omitempty"` @@ -79,8 +78,8 @@ type AddExternalRequest struct { SkipConnectionCheck bool `protobuf:"varint,18,opt,name=skip_connection_check,json=skipConnectionCheck,proto3" json:"skip_connection_check,omitempty"` } -func (x *AddExternalRequest) Reset() { - *x = AddExternalRequest{} +func (x *AddExternalServiceParams) Reset() { + *x = AddExternalServiceParams{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_external_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -88,13 +87,13 @@ func (x *AddExternalRequest) Reset() { } } -func (x *AddExternalRequest) String() string { +func (x *AddExternalServiceParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddExternalRequest) ProtoMessage() {} +func (*AddExternalServiceParams) ProtoMessage() {} -func (x *AddExternalRequest) ProtoReflect() protoreflect.Message { +func (x *AddExternalServiceParams) ProtoReflect() protoreflect.Message { mi := &file_management_v1_external_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -106,138 +105,138 @@ func (x *AddExternalRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddExternalRequest.ProtoReflect.Descriptor instead. -func (*AddExternalRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use AddExternalServiceParams.ProtoReflect.Descriptor instead. +func (*AddExternalServiceParams) Descriptor() ([]byte, []int) { return file_management_v1_external_proto_rawDescGZIP(), []int{0} } -func (x *AddExternalRequest) GetRunsOnNodeId() string { +func (x *AddExternalServiceParams) GetRunsOnNodeId() string { if x != nil { return x.RunsOnNodeId } return "" } -func (x *AddExternalRequest) GetNodeName() string { +func (x *AddExternalServiceParams) GetNodeName() string { if x != nil { return x.NodeName } return "" } -func (x *AddExternalRequest) GetAddNode() *AddNodeParams { +func (x *AddExternalServiceParams) GetAddNode() *AddNodeParams { if x != nil { return x.AddNode } return nil } -func (x *AddExternalRequest) GetAddress() string { +func (x *AddExternalServiceParams) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *AddExternalRequest) GetServiceName() string { +func (x *AddExternalServiceParams) GetServiceName() string { if x != nil { return x.ServiceName } return "" } -func (x *AddExternalRequest) GetUsername() string { +func (x *AddExternalServiceParams) GetUsername() string { if x != nil { return x.Username } return "" } -func (x *AddExternalRequest) GetPassword() string { +func (x *AddExternalServiceParams) GetPassword() string { if x != nil { return x.Password } return "" } -func (x *AddExternalRequest) GetScheme() string { +func (x *AddExternalServiceParams) GetScheme() string { if x != nil { return x.Scheme } return "" } -func (x *AddExternalRequest) GetMetricsPath() string { +func (x *AddExternalServiceParams) GetMetricsPath() string { if x != nil { return x.MetricsPath } return "" } -func (x *AddExternalRequest) GetListenPort() uint32 { +func (x *AddExternalServiceParams) GetListenPort() uint32 { if x != nil { return x.ListenPort } return 0 } -func (x *AddExternalRequest) GetNodeId() string { +func (x *AddExternalServiceParams) GetNodeId() string { if x != nil { return x.NodeId } return "" } -func (x *AddExternalRequest) GetEnvironment() string { +func (x *AddExternalServiceParams) GetEnvironment() string { if x != nil { return x.Environment } return "" } -func (x *AddExternalRequest) GetCluster() string { +func (x *AddExternalServiceParams) GetCluster() string { if x != nil { return x.Cluster } return "" } -func (x *AddExternalRequest) GetReplicationSet() string { +func (x *AddExternalServiceParams) GetReplicationSet() string { if x != nil { return x.ReplicationSet } return "" } -func (x *AddExternalRequest) GetCustomLabels() map[string]string { +func (x *AddExternalServiceParams) GetCustomLabels() map[string]string { if x != nil { return x.CustomLabels } return nil } -func (x *AddExternalRequest) GetGroup() string { +func (x *AddExternalServiceParams) GetGroup() string { if x != nil { return x.Group } return "" } -func (x *AddExternalRequest) GetMetricsMode() MetricsMode { +func (x *AddExternalServiceParams) GetMetricsMode() MetricsMode { if x != nil { return x.MetricsMode } return MetricsMode_METRICS_MODE_UNSPECIFIED } -func (x *AddExternalRequest) GetSkipConnectionCheck() bool { +func (x *AddExternalServiceParams) GetSkipConnectionCheck() bool { if x != nil { return x.SkipConnectionCheck } return false } -type AddExternalResponse struct { +type ExternalServiceResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -246,8 +245,8 @@ type AddExternalResponse struct { ExternalExporter *v1.ExternalExporter `protobuf:"bytes,2,opt,name=external_exporter,json=externalExporter,proto3" json:"external_exporter,omitempty"` } -func (x *AddExternalResponse) Reset() { - *x = AddExternalResponse{} +func (x *ExternalServiceResult) Reset() { + *x = ExternalServiceResult{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_external_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -255,13 +254,13 @@ func (x *AddExternalResponse) Reset() { } } -func (x *AddExternalResponse) String() string { +func (x *ExternalServiceResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddExternalResponse) ProtoMessage() {} +func (*ExternalServiceResult) ProtoMessage() {} -func (x *AddExternalResponse) ProtoReflect() protoreflect.Message { +func (x *ExternalServiceResult) ProtoReflect() protoreflect.Message { mi := &file_management_v1_external_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -273,19 +272,19 @@ func (x *AddExternalResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddExternalResponse.ProtoReflect.Descriptor instead. -func (*AddExternalResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ExternalServiceResult.ProtoReflect.Descriptor instead. +func (*ExternalServiceResult) Descriptor() ([]byte, []int) { return file_management_v1_external_proto_rawDescGZIP(), []int{1} } -func (x *AddExternalResponse) GetService() *v1.ExternalService { +func (x *ExternalServiceResult) GetService() *v1.ExternalService { if x != nil { return x.Service } return nil } -func (x *AddExternalResponse) GetExternalExporter() *v1.ExternalExporter { +func (x *ExternalServiceResult) GetExternalExporter() *v1.ExternalExporter { if x != nil { return x.ExternalExporter } @@ -297,69 +296,68 @@ var File_management_v1_external_proto protoreflect.FileDescriptor var file_management_v1_external_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x18, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x06, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0f, 0x72, 0x75, - 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x75, 0x6e, 0x73, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x49, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, - 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x61, 0x74, 0x68, - 0x12, 0x2c, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x2a, 0x06, 0x10, 0x80, 0x80, 0x04, - 0x20, 0x00, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x17, - 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, - 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x58, 0x0a, 0x0d, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3d, 0x0a, 0x0c, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x11, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x73, - 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x68, 0x65, 0x63, 0x6b, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, - 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x9b, 0x01, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x18, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x06, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x0f, 0x72, 0x75, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x75, 0x6e, + 0x73, 0x4f, 0x6e, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, + 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x6e, 0x6f, + 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x50, 0x61, 0x74, 0x68, 0x12, 0x2c, 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x0b, 0xfa, + 0x42, 0x08, 0x2a, 0x06, 0x10, 0x80, 0x80, 0x04, 0x20, 0x00, 0x52, 0x0a, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, + 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x12, 0x5e, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, + 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, + 0x63, 0x6b, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x1a, 0x3f, 0x0a, + 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9d, + 0x01, 0x0a, 0x15, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, @@ -397,22 +395,22 @@ func file_management_v1_external_proto_rawDescGZIP() []byte { var ( file_management_v1_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) file_management_v1_external_proto_goTypes = []interface{}{ - (*AddExternalRequest)(nil), // 0: management.v1.AddExternalRequest - (*AddExternalResponse)(nil), // 1: management.v1.AddExternalResponse - nil, // 2: management.v1.AddExternalRequest.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 + (*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.AddExternalRequest.add_node:type_name -> management.v1.AddNodeParams - 2, // 1: management.v1.AddExternalRequest.custom_labels:type_name -> management.v1.AddExternalRequest.CustomLabelsEntry - 4, // 2: management.v1.AddExternalRequest.metrics_mode:type_name -> management.v1.MetricsMode - 5, // 3: management.v1.AddExternalResponse.service:type_name -> inventory.v1.ExternalService - 6, // 4: management.v1.AddExternalResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 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 + 4, // 2: management.v1.AddExternalServiceParams.metrics_mode:type_name -> management.v1.MetricsMode + 5, // 3: management.v1.ExternalServiceResult.service:type_name -> inventory.v1.ExternalService + 6, // 4: management.v1.ExternalServiceResult.external_exporter:type_name -> inventory.v1.ExternalExporter 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -429,7 +427,7 @@ func file_management_v1_external_proto_init() { file_management_v1_node_proto_init() if !protoimpl.UnsafeEnabled { file_management_v1_external_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddExternalRequest); i { + switch v := v.(*AddExternalServiceParams); i { case 0: return &v.state case 1: @@ -441,7 +439,7 @@ func file_management_v1_external_proto_init() { } } file_management_v1_external_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddExternalResponse); i { + switch v := v.(*ExternalServiceResult); i { case 0: return &v.state case 1: diff --git a/api/management/v1/external.pb.validate.go b/api/management/v1/external.pb.validate.go index 8fe6287f209..78f9c05d9a5 100644 --- a/api/management/v1/external.pb.validate.go +++ b/api/management/v1/external.pb.validate.go @@ -35,22 +35,22 @@ var ( _ = sort.Sort ) -// Validate checks the field values on AddExternalRequest with the rules +// Validate checks the field values on AddExternalServiceParams with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *AddExternalRequest) Validate() error { +func (m *AddExternalServiceParams) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AddExternalRequest with the rules -// defined in the proto definition for this message. If any rules are +// ValidateAll checks the field values on AddExternalServiceParams with the +// rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// AddExternalRequestMultiError, or nil if none found. -func (m *AddExternalRequest) ValidateAll() error { +// AddExternalServiceParamsMultiError, or nil if none found. +func (m *AddExternalServiceParams) ValidateAll() error { return m.validate(true) } -func (m *AddExternalRequest) validate(all bool) error { +func (m *AddExternalServiceParams) validate(all bool) error { if m == nil { return nil } @@ -65,7 +65,7 @@ func (m *AddExternalRequest) validate(all bool) error { switch v := interface{}(m.GetAddNode()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddExternalRequestValidationError{ + errors = append(errors, AddExternalServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -73,7 +73,7 @@ func (m *AddExternalRequest) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddExternalRequestValidationError{ + errors = append(errors, AddExternalServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -82,7 +82,7 @@ func (m *AddExternalRequest) validate(all bool) error { } } else if v, ok := interface{}(m.GetAddNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddExternalRequestValidationError{ + return AddExternalServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -93,7 +93,7 @@ func (m *AddExternalRequest) validate(all bool) error { // no validation rules for Address if utf8.RuneCountInString(m.GetServiceName()) < 1 { - err := AddExternalRequestValidationError{ + err := AddExternalServiceParamsValidationError{ field: "ServiceName", reason: "value length must be at least 1 runes", } @@ -112,7 +112,7 @@ func (m *AddExternalRequest) validate(all bool) error { // no validation rules for MetricsPath if val := m.GetListenPort(); val <= 0 || val >= 65536 { - err := AddExternalRequestValidationError{ + err := AddExternalServiceParamsValidationError{ field: "ListenPort", reason: "value must be inside range (0, 65536)", } @@ -139,19 +139,19 @@ func (m *AddExternalRequest) validate(all bool) error { // no validation rules for SkipConnectionCheck if len(errors) > 0 { - return AddExternalRequestMultiError(errors) + return AddExternalServiceParamsMultiError(errors) } return nil } -// AddExternalRequestMultiError is an error wrapping multiple validation errors -// returned by AddExternalRequest.ValidateAll() if the designated constraints -// aren't met. -type AddExternalRequestMultiError []error +// AddExternalServiceParamsMultiError is an error wrapping multiple validation +// errors returned by AddExternalServiceParams.ValidateAll() if the designated +// constraints aren't met. +type AddExternalServiceParamsMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AddExternalRequestMultiError) Error() string { +func (m AddExternalServiceParamsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -160,11 +160,11 @@ func (m AddExternalRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AddExternalRequestMultiError) AllErrors() []error { return m } +func (m AddExternalServiceParamsMultiError) AllErrors() []error { return m } -// AddExternalRequestValidationError is the validation error returned by -// AddExternalRequest.Validate if the designated constraints aren't met. -type AddExternalRequestValidationError struct { +// AddExternalServiceParamsValidationError is the validation error returned by +// AddExternalServiceParams.Validate if the designated constraints aren't met. +type AddExternalServiceParamsValidationError struct { field string reason string cause error @@ -172,24 +172,24 @@ type AddExternalRequestValidationError struct { } // Field function returns field value. -func (e AddExternalRequestValidationError) Field() string { return e.field } +func (e AddExternalServiceParamsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AddExternalRequestValidationError) Reason() string { return e.reason } +func (e AddExternalServiceParamsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AddExternalRequestValidationError) Cause() error { return e.cause } +func (e AddExternalServiceParamsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AddExternalRequestValidationError) Key() bool { return e.key } +func (e AddExternalServiceParamsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AddExternalRequestValidationError) ErrorName() string { - return "AddExternalRequestValidationError" +func (e AddExternalServiceParamsValidationError) ErrorName() string { + return "AddExternalServiceParamsValidationError" } // Error satisfies the builtin error interface -func (e AddExternalRequestValidationError) Error() string { +func (e AddExternalServiceParamsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -201,14 +201,14 @@ func (e AddExternalRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAddExternalRequest.%s: %s%s", + "invalid %sAddExternalServiceParams.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AddExternalRequestValidationError{} +var _ error = AddExternalServiceParamsValidationError{} var _ interface { Field() string @@ -216,24 +216,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AddExternalRequestValidationError{} +} = AddExternalServiceParamsValidationError{} -// Validate checks the field values on AddExternalResponse with the rules +// Validate checks the field values on ExternalServiceResult with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *AddExternalResponse) Validate() error { +func (m *ExternalServiceResult) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AddExternalResponse with the rules +// ValidateAll checks the field values on ExternalServiceResult with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// AddExternalResponseMultiError, or nil if none found. -func (m *AddExternalResponse) ValidateAll() error { +// ExternalServiceResultMultiError, or nil if none found. +func (m *ExternalServiceResult) ValidateAll() error { return m.validate(true) } -func (m *AddExternalResponse) validate(all bool) error { +func (m *ExternalServiceResult) validate(all bool) error { if m == nil { return nil } @@ -244,7 +244,7 @@ func (m *AddExternalResponse) validate(all bool) error { switch v := interface{}(m.GetService()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddExternalResponseValidationError{ + errors = append(errors, ExternalServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -252,7 +252,7 @@ func (m *AddExternalResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddExternalResponseValidationError{ + errors = append(errors, ExternalServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -261,7 +261,7 @@ func (m *AddExternalResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddExternalResponseValidationError{ + return ExternalServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -273,7 +273,7 @@ func (m *AddExternalResponse) validate(all bool) error { switch v := interface{}(m.GetExternalExporter()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddExternalResponseValidationError{ + errors = append(errors, ExternalServiceResultValidationError{ field: "ExternalExporter", reason: "embedded message failed validation", cause: err, @@ -281,7 +281,7 @@ func (m *AddExternalResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddExternalResponseValidationError{ + errors = append(errors, ExternalServiceResultValidationError{ field: "ExternalExporter", reason: "embedded message failed validation", cause: err, @@ -290,7 +290,7 @@ func (m *AddExternalResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetExternalExporter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddExternalResponseValidationError{ + return ExternalServiceResultValidationError{ field: "ExternalExporter", reason: "embedded message failed validation", cause: err, @@ -299,19 +299,19 @@ func (m *AddExternalResponse) validate(all bool) error { } if len(errors) > 0 { - return AddExternalResponseMultiError(errors) + return ExternalServiceResultMultiError(errors) } return nil } -// AddExternalResponseMultiError is an error wrapping multiple validation -// errors returned by AddExternalResponse.ValidateAll() if the designated +// ExternalServiceResultMultiError is an error wrapping multiple validation +// errors returned by ExternalServiceResult.ValidateAll() if the designated // constraints aren't met. -type AddExternalResponseMultiError []error +type ExternalServiceResultMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AddExternalResponseMultiError) Error() string { +func (m ExternalServiceResultMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -320,11 +320,11 @@ func (m AddExternalResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AddExternalResponseMultiError) AllErrors() []error { return m } +func (m ExternalServiceResultMultiError) AllErrors() []error { return m } -// AddExternalResponseValidationError is the validation error returned by -// AddExternalResponse.Validate if the designated constraints aren't met. -type AddExternalResponseValidationError struct { +// ExternalServiceResultValidationError is the validation error returned by +// ExternalServiceResult.Validate if the designated constraints aren't met. +type ExternalServiceResultValidationError struct { field string reason string cause error @@ -332,24 +332,24 @@ type AddExternalResponseValidationError struct { } // Field function returns field value. -func (e AddExternalResponseValidationError) Field() string { return e.field } +func (e ExternalServiceResultValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AddExternalResponseValidationError) Reason() string { return e.reason } +func (e ExternalServiceResultValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AddExternalResponseValidationError) Cause() error { return e.cause } +func (e ExternalServiceResultValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AddExternalResponseValidationError) Key() bool { return e.key } +func (e ExternalServiceResultValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AddExternalResponseValidationError) ErrorName() string { - return "AddExternalResponseValidationError" +func (e ExternalServiceResultValidationError) ErrorName() string { + return "ExternalServiceResultValidationError" } // Error satisfies the builtin error interface -func (e AddExternalResponseValidationError) Error() string { +func (e ExternalServiceResultValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -361,14 +361,14 @@ func (e AddExternalResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAddExternalResponse.%s: %s%s", + "invalid %sExternalServiceResult.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AddExternalResponseValidationError{} +var _ error = ExternalServiceResultValidationError{} var _ interface { Field() string @@ -376,4 +376,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AddExternalResponseValidationError{} +} = ExternalServiceResultValidationError{} diff --git a/api/management/v1/external.proto b/api/management/v1/external.proto index d04a6ad2617..ffd29e9ebb3 100644 --- a/api/management/v1/external.proto +++ b/api/management/v1/external.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package management.v1; -import "google/api/annotations.proto"; import "inventory/v1/agents.proto"; import "inventory/v1/services.proto"; import "management/v1/metrics.proto"; @@ -11,20 +10,20 @@ import "validate/validate.proto"; // Add External -message AddExternalRequest { +message AddExternalServiceParams { // Node identifier on which an external exporter is been running. - // runs_on_node_id always should be passed with node_id. + // 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. string runs_on_node_id = 1; // Node name on which a service and node is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. string node_name = 2; // Create a new Node with those parameters. - // add_node always should be passed with address. + // add_node should always be passed with address. // Exactly one of these parameters should be present: node_id, node_name, add_node. AddNodeParams add_node = 3; // Node and Exporter access address (DNS name or IP). - // address always should be passed with add_node. + // address should always be passed with add_node. string address = 4; // Unique across all Services user-defined name. Required. string service_name = 5 [(validate.rules).string.min_len = 1]; @@ -42,7 +41,7 @@ message AddExternalRequest { lt: 65536 }]; // Node identifier on which an external service is been running. - // node_id always should be passed with runs_on_node_id. + // node_id should always be passed with runs_on_node_id. string node_id = 11; // Environment name. string environment = 12; @@ -64,7 +63,7 @@ message AddExternalRequest { bool skip_connection_check = 18; } -message AddExternalResponse { +message ExternalServiceResult { inventory.v1.ExternalService service = 1; inventory.v1.ExternalExporter external_exporter = 2; } 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 9c9392c7a6b..d52e86eb658 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 @@ -58,7 +58,7 @@ type AddAnnotationOK struct { } func (o *AddAnnotationOK) Error() string { - return fmt.Sprintf("[POST /v1/management/Annotations/Add][%d] addAnnotationOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/management/annotations][%d] addAnnotationOk %+v", 200, o.Payload) } func (o *AddAnnotationOK) GetPayload() interface{} { @@ -98,7 +98,7 @@ func (o *AddAnnotationDefault) Code() int { } func (o *AddAnnotationDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/Annotations/Add][%d] AddAnnotation default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/management/annotations][%d] AddAnnotation default %+v", o._statusCode, o.Payload) } func (o *AddAnnotationDefault) GetPayload() *AddAnnotationDefaultBody { @@ -127,10 +127,10 @@ type AddAnnotationBody struct { // Tags are used to filter annotations. Tags []string `json:"tags"` - // Used for annotate node. + // Used for annotating a node. NodeName string `json:"node_name,omitempty"` - // Used for annotate services. + // Used for annotating services. ServiceNames []string `json:"service_names"` } diff --git a/api/management/v1/json/client/management_service/add_external_parameters.go b/api/management/v1/json/client/management_service/add_external_parameters.go deleted file mode 100644 index 7f75b8976ca..00000000000 --- a/api/management/v1/json/client/management_service/add_external_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package management_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewAddExternalParams creates a new AddExternalParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewAddExternalParams() *AddExternalParams { - return &AddExternalParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddExternalParamsWithTimeout creates a new AddExternalParams object -// with the ability to set a timeout on a request. -func NewAddExternalParamsWithTimeout(timeout time.Duration) *AddExternalParams { - return &AddExternalParams{ - timeout: timeout, - } -} - -// NewAddExternalParamsWithContext creates a new AddExternalParams object -// with the ability to set a context for a request. -func NewAddExternalParamsWithContext(ctx context.Context) *AddExternalParams { - return &AddExternalParams{ - Context: ctx, - } -} - -// NewAddExternalParamsWithHTTPClient creates a new AddExternalParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddExternalParamsWithHTTPClient(client *http.Client) *AddExternalParams { - return &AddExternalParams{ - HTTPClient: client, - } -} - -/* -AddExternalParams contains all the parameters to send to the API endpoint - - for the add external operation. - - Typically these are written to a http.Request. -*/ -type AddExternalParams struct { - // Body. - Body AddExternalBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add external params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddExternalParams) WithDefaults() *AddExternalParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add external params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddExternalParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add external params -func (o *AddExternalParams) WithTimeout(timeout time.Duration) *AddExternalParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add external params -func (o *AddExternalParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add external params -func (o *AddExternalParams) WithContext(ctx context.Context) *AddExternalParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add external params -func (o *AddExternalParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add external params -func (o *AddExternalParams) WithHTTPClient(client *http.Client) *AddExternalParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add external params -func (o *AddExternalParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add external params -func (o *AddExternalParams) WithBody(body AddExternalBody) *AddExternalParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add external params -func (o *AddExternalParams) SetBody(body AddExternalBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddExternalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/management/v1/json/client/management_service/add_external_responses.go b/api/management/v1/json/client/management_service/add_external_responses.go deleted file mode 100644 index 16c57ced147..00000000000 --- a/api/management/v1/json/client/management_service/add_external_responses.go +++ /dev/null @@ -1,847 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package management_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AddExternalReader is a Reader for the AddExternal structure. -type AddExternalReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddExternalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAddExternalOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddExternalDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewAddExternalOK creates a AddExternalOK with default headers values -func NewAddExternalOK() *AddExternalOK { - return &AddExternalOK{} -} - -/* -AddExternalOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type AddExternalOK struct { - Payload *AddExternalOKBody -} - -func (o *AddExternalOK) Error() string { - return fmt.Sprintf("[POST /v1/management/External/Add][%d] addExternalOk %+v", 200, o.Payload) -} - -func (o *AddExternalOK) GetPayload() *AddExternalOKBody { - return o.Payload -} - -func (o *AddExternalOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddExternalOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddExternalDefault creates a AddExternalDefault with default headers values -func NewAddExternalDefault(code int) *AddExternalDefault { - return &AddExternalDefault{ - _statusCode: code, - } -} - -/* -AddExternalDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type AddExternalDefault struct { - _statusCode int - - Payload *AddExternalDefaultBody -} - -// Code gets the status code for the add external default response -func (o *AddExternalDefault) Code() int { - return o._statusCode -} - -func (o *AddExternalDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/External/Add][%d] AddExternal default %+v", o._statusCode, o.Payload) -} - -func (o *AddExternalDefault) GetPayload() *AddExternalDefaultBody { - return o.Payload -} - -func (o *AddExternalDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddExternalDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -AddExternalBody add external body -swagger:model AddExternalBody -*/ -type AddExternalBody struct { - // Node identifier on which an external exporter is been running. - // runs_on_node_id always should be passed with node_id. - // Exactly one of these parameters should be present: node_id, node_name, add_node. - RunsOnNodeID string `json:"runs_on_node_id,omitempty"` - - // Node name on which a service and node is been running. - // Exactly one of these parameters should be present: node_id, node_name, add_node. - NodeName string `json:"node_name,omitempty"` - - // Node and Exporter access address (DNS name or IP). - // address always should be passed with add_node. - Address string `json:"address,omitempty"` - - // Unique across all Services user-defined name. Required. - ServiceName string `json:"service_name,omitempty"` - - // HTTP basic auth username for collecting metrics. - Username string `json:"username,omitempty"` - - // HTTP basic auth password for collecting metrics. - Password string `json:"password,omitempty"` - - // Scheme to generate URI to exporter metrics endpoints. - Scheme string `json:"scheme,omitempty"` - - // Path under which metrics are exposed, used to generate URI. - MetricsPath string `json:"metrics_path,omitempty"` - - // Listen port for scraping metrics. - ListenPort int64 `json:"listen_port,omitempty"` - - // Node identifier on which an external service is been running. - // node_id always should be passed with runs_on_node_id. - NodeID string `json:"node_id,omitempty"` - - // Environment name. - Environment string `json:"environment,omitempty"` - - // Cluster name. - Cluster string `json:"cluster,omitempty"` - - // Replication set name. - ReplicationSet string `json:"replication_set,omitempty"` - - // Custom user-assigned labels for Service. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // Group name of external service. - Group string `json:"group,omitempty"` - - // MetricsMode defines desired metrics mode for agent, - // it can be pull, push or auto mode chosen by server. - // - // - METRICS_MODE_UNSPECIFIED: Auto - // Enum: [METRICS_MODE_UNSPECIFIED METRICS_MODE_PULL METRICS_MODE_PUSH] - MetricsMode *string `json:"metrics_mode,omitempty"` - - // Skip connection check. - SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` - - // add node - AddNode *AddExternalParamsBodyAddNode `json:"add_node,omitempty"` -} - -// Validate validates this add external body -func (o *AddExternalBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMetricsMode(formats); err != nil { - res = append(res, err) - } - - if err := o.validateAddNode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addExternalBodyTypeMetricsModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["METRICS_MODE_UNSPECIFIED","METRICS_MODE_PULL","METRICS_MODE_PUSH"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addExternalBodyTypeMetricsModePropEnum = append(addExternalBodyTypeMetricsModePropEnum, v) - } -} - -const ( - - // AddExternalBodyMetricsModeMETRICSMODEUNSPECIFIED captures enum value "METRICS_MODE_UNSPECIFIED" - AddExternalBodyMetricsModeMETRICSMODEUNSPECIFIED string = "METRICS_MODE_UNSPECIFIED" - - // AddExternalBodyMetricsModeMETRICSMODEPULL captures enum value "METRICS_MODE_PULL" - AddExternalBodyMetricsModeMETRICSMODEPULL string = "METRICS_MODE_PULL" - - // AddExternalBodyMetricsModeMETRICSMODEPUSH captures enum value "METRICS_MODE_PUSH" - AddExternalBodyMetricsModeMETRICSMODEPUSH string = "METRICS_MODE_PUSH" -) - -// prop value enum -func (o *AddExternalBody) validateMetricsModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addExternalBodyTypeMetricsModePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddExternalBody) validateMetricsMode(formats strfmt.Registry) error { - if swag.IsZero(o.MetricsMode) { // not required - return nil - } - - // value enum - if err := o.validateMetricsModeEnum("body"+"."+"metrics_mode", "body", *o.MetricsMode); err != nil { - return err - } - - return nil -} - -func (o *AddExternalBody) validateAddNode(formats strfmt.Registry) error { - if swag.IsZero(o.AddNode) { // not required - return nil - } - - if o.AddNode != nil { - if err := o.AddNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "add_node") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "add_node") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add external body based on the context it is used -func (o *AddExternalBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateAddNode(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddExternalBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { - if err := o.AddNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "add_node") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "add_node") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddExternalBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddExternalBody) UnmarshalBinary(b []byte) error { - var res AddExternalBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddExternalDefaultBody add external default body -swagger:model AddExternalDefaultBody -*/ -type AddExternalDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*AddExternalDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this add external default body -func (o *AddExternalDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddExternalDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AddExternal default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AddExternal default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this add external default body based on the context it is used -func (o *AddExternalDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddExternalDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AddExternal default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AddExternal default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddExternalDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddExternalDefaultBody) UnmarshalBinary(b []byte) error { - var res AddExternalDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddExternalDefaultBodyDetailsItems0 add external default body details items0 -swagger:model AddExternalDefaultBodyDetailsItems0 -*/ -type AddExternalDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this add external default body details items0 -func (o *AddExternalDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add external default body details items0 based on context it is used -func (o *AddExternalDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddExternalDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddExternalDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res AddExternalDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddExternalOKBody add external OK body -swagger:model AddExternalOKBody -*/ -type AddExternalOKBody struct { - // external exporter - ExternalExporter *AddExternalOKBodyExternalExporter `json:"external_exporter,omitempty"` - - // service - Service *AddExternalOKBodyService `json:"service,omitempty"` -} - -// Validate validates this add external OK body -func (o *AddExternalOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateExternalExporter(formats); err != nil { - res = append(res, err) - } - - if err := o.validateService(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddExternalOKBody) validateExternalExporter(formats strfmt.Registry) error { - if swag.IsZero(o.ExternalExporter) { // not required - return nil - } - - if o.ExternalExporter != nil { - if err := o.ExternalExporter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addExternalOk" + "." + "external_exporter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addExternalOk" + "." + "external_exporter") - } - return err - } - } - - return nil -} - -func (o *AddExternalOKBody) validateService(formats strfmt.Registry) error { - if swag.IsZero(o.Service) { // not required - return nil - } - - if o.Service != nil { - if err := o.Service.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addExternalOk" + "." + "service") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addExternalOk" + "." + "service") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add external OK body based on the context it is used -func (o *AddExternalOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateExternalExporter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateService(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddExternalOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { - if o.ExternalExporter != nil { - if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addExternalOk" + "." + "external_exporter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addExternalOk" + "." + "external_exporter") - } - return err - } - } - - return nil -} - -func (o *AddExternalOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { - if err := o.Service.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addExternalOk" + "." + "service") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addExternalOk" + "." + "service") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddExternalOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddExternalOKBody) UnmarshalBinary(b []byte) error { - var res AddExternalOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddExternalOKBodyExternalExporter ExternalExporter runs on any Node type, including Remote Node. -swagger:model AddExternalOKBodyExternalExporter -*/ -type AddExternalOKBodyExternalExporter struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // Node identifier where this instance runs. - RunsOnNodeID string `json:"runs_on_node_id,omitempty"` - - // If disabled, metrics from this exporter will not be collected. - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // HTTP basic auth username for collecting metrics. - Username string `json:"username,omitempty"` - - // Scheme to generate URI to exporter metrics endpoints. - Scheme string `json:"scheme,omitempty"` - - // Path under which metrics are exposed, used to generate URI. - MetricsPath string `json:"metrics_path,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // Listen port for scraping metrics. - ListenPort int64 `json:"listen_port,omitempty"` - - // True if exporter uses push metrics mode. - PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` -} - -// Validate validates this add external OK body external exporter -func (o *AddExternalOKBodyExternalExporter) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add external OK body external exporter based on context it is used -func (o *AddExternalOKBodyExternalExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddExternalOKBodyExternalExporter) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddExternalOKBodyExternalExporter) UnmarshalBinary(b []byte) error { - var res AddExternalOKBodyExternalExporter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddExternalOKBodyService ExternalService represents a generic External service instance. -swagger:model AddExternalOKBodyService -*/ -type AddExternalOKBodyService struct { - // Unique randomly generated instance identifier. - ServiceID string `json:"service_id,omitempty"` - - // Unique across all Services user-defined name. - ServiceName string `json:"service_name,omitempty"` - - // Node identifier where this service instance runs. - NodeID string `json:"node_id,omitempty"` - - // Environment name. - Environment string `json:"environment,omitempty"` - - // Cluster name. - Cluster string `json:"cluster,omitempty"` - - // Replication set name. - ReplicationSet string `json:"replication_set,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // Group name of external service. - Group string `json:"group,omitempty"` -} - -// Validate validates this add external OK body service -func (o *AddExternalOKBodyService) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add external OK body service based on context it is used -func (o *AddExternalOKBodyService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddExternalOKBodyService) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddExternalOKBodyService) UnmarshalBinary(b []byte) error { - var res AddExternalOKBodyService - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddExternalParamsBodyAddNode AddNodeParams holds node params and is used to add new node to inventory while adding new service. -swagger:model AddExternalParamsBodyAddNode -*/ -type AddExternalParamsBodyAddNode 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"` - - // Unique across all Nodes user-defined name. - NodeName string `json:"node_name,omitempty"` - - // Linux machine-id. - MachineID string `json:"machine_id,omitempty"` - - // Linux distribution name and version. - Distro string `json:"distro,omitempty"` - - // Container identifier. If specified, must be a unique Docker container identifier. - ContainerID string `json:"container_id,omitempty"` - - // Container name. - ContainerName string `json:"container_name,omitempty"` - - // Node model. - NodeModel string `json:"node_model,omitempty"` - - // Node region. - Region string `json:"region,omitempty"` - - // Node availability zone. - Az string `json:"az,omitempty"` - - // Custom user-assigned labels for Node. - CustomLabels map[string]string `json:"custom_labels,omitempty"` -} - -// Validate validates this add external params body add node -func (o *AddExternalParamsBodyAddNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateNodeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addExternalParamsBodyAddNodeTypeNodeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addExternalParamsBodyAddNodeTypeNodeTypePropEnum = append(addExternalParamsBodyAddNodeTypeNodeTypePropEnum, v) - } -} - -const ( - - // AddExternalParamsBodyAddNodeNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" - AddExternalParamsBodyAddNodeNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" - - // AddExternalParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" - AddExternalParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" - - // AddExternalParamsBodyAddNodeNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" - AddExternalParamsBodyAddNodeNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" - - // AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" - AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" - - // AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" - AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" - - // AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - AddExternalParamsBodyAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" -) - -// prop value enum -func (o *AddExternalParamsBodyAddNode) validateNodeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addExternalParamsBodyAddNodeTypeNodeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddExternalParamsBodyAddNode) validateNodeType(formats strfmt.Registry) error { - if swag.IsZero(o.NodeType) { // not required - return nil - } - - // value enum - if err := o.validateNodeTypeEnum("body"+"."+"add_node"+"."+"node_type", "body", *o.NodeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add external params body add node based on context it is used -func (o *AddExternalParamsBodyAddNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddExternalParamsBodyAddNode) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddExternalParamsBodyAddNode) UnmarshalBinary(b []byte) error { - var res AddExternalParamsBodyAddNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/management/v1/json/client/management_service/add_mongo_db_parameters.go b/api/management/v1/json/client/management_service/add_mongo_db_parameters.go deleted file mode 100644 index 5a83154c4e3..00000000000 --- a/api/management/v1/json/client/management_service/add_mongo_db_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package management_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewAddMongoDBParams creates a new AddMongoDBParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewAddMongoDBParams() *AddMongoDBParams { - return &AddMongoDBParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddMongoDBParamsWithTimeout creates a new AddMongoDBParams object -// with the ability to set a timeout on a request. -func NewAddMongoDBParamsWithTimeout(timeout time.Duration) *AddMongoDBParams { - return &AddMongoDBParams{ - timeout: timeout, - } -} - -// NewAddMongoDBParamsWithContext creates a new AddMongoDBParams object -// with the ability to set a context for a request. -func NewAddMongoDBParamsWithContext(ctx context.Context) *AddMongoDBParams { - return &AddMongoDBParams{ - Context: ctx, - } -} - -// NewAddMongoDBParamsWithHTTPClient creates a new AddMongoDBParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddMongoDBParamsWithHTTPClient(client *http.Client) *AddMongoDBParams { - return &AddMongoDBParams{ - HTTPClient: client, - } -} - -/* -AddMongoDBParams contains all the parameters to send to the API endpoint - - for the add mongo DB operation. - - Typically these are written to a http.Request. -*/ -type AddMongoDBParams struct { - // Body. - Body AddMongoDBBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add mongo DB params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddMongoDBParams) WithDefaults() *AddMongoDBParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add mongo DB params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddMongoDBParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add mongo DB params -func (o *AddMongoDBParams) WithTimeout(timeout time.Duration) *AddMongoDBParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add mongo DB params -func (o *AddMongoDBParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add mongo DB params -func (o *AddMongoDBParams) WithContext(ctx context.Context) *AddMongoDBParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add mongo DB params -func (o *AddMongoDBParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add mongo DB params -func (o *AddMongoDBParams) WithHTTPClient(client *http.Client) *AddMongoDBParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add mongo DB params -func (o *AddMongoDBParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add mongo DB params -func (o *AddMongoDBParams) WithBody(body AddMongoDBBody) *AddMongoDBParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add mongo DB params -func (o *AddMongoDBParams) SetBody(body AddMongoDBBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddMongoDBParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/management/v1/json/client/management_service/add_mongo_db_responses.go b/api/management/v1/json/client/management_service/add_mongo_db_responses.go deleted file mode 100644 index 79ad7a3b207..00000000000 --- a/api/management/v1/json/client/management_service/add_mongo_db_responses.go +++ /dev/null @@ -1,1372 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package management_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AddMongoDBReader is a Reader for the AddMongoDB structure. -type AddMongoDBReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddMongoDBReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAddMongoDBOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddMongoDBDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewAddMongoDBOK creates a AddMongoDBOK with default headers values -func NewAddMongoDBOK() *AddMongoDBOK { - return &AddMongoDBOK{} -} - -/* -AddMongoDBOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type AddMongoDBOK struct { - Payload *AddMongoDBOKBody -} - -func (o *AddMongoDBOK) Error() string { - return fmt.Sprintf("[POST /v1/management/MongoDB/Add][%d] addMongoDbOk %+v", 200, o.Payload) -} - -func (o *AddMongoDBOK) GetPayload() *AddMongoDBOKBody { - return o.Payload -} - -func (o *AddMongoDBOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMongoDBOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddMongoDBDefault creates a AddMongoDBDefault with default headers values -func NewAddMongoDBDefault(code int) *AddMongoDBDefault { - return &AddMongoDBDefault{ - _statusCode: code, - } -} - -/* -AddMongoDBDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type AddMongoDBDefault struct { - _statusCode int - - Payload *AddMongoDBDefaultBody -} - -// Code gets the status code for the add mongo DB default response -func (o *AddMongoDBDefault) Code() int { - return o._statusCode -} - -func (o *AddMongoDBDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/MongoDB/Add][%d] AddMongoDB default %+v", o._statusCode, o.Payload) -} - -func (o *AddMongoDBDefault) GetPayload() *AddMongoDBDefaultBody { - return o.Payload -} - -func (o *AddMongoDBDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMongoDBDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -AddMongoDBBody add mongo DB body -swagger:model AddMongoDBBody -*/ -type AddMongoDBBody 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"` - - // Node name on which a service is been running. - // Exactly one of these parameters should be present: node_id, node_name, add_node. - NodeName string `json:"node_name,omitempty"` - - // Unique across all Services user-defined name. Required. - ServiceName string `json:"service_name,omitempty"` - - // Node and Service access address (DNS name or IP). - // Address (and port) or socket is required. - Address string `json:"address,omitempty"` - - // Service Access port. - // Port is required when the address present. - Port int64 `json:"port,omitempty"` - - // Service Access socket. - // Address (and port) or socket is required. - Socket string `json:"socket,omitempty"` - - // The "pmm-agent" identifier which should run agents. Required. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Environment name. - Environment string `json:"environment,omitempty"` - - // Cluster name. - Cluster string `json:"cluster,omitempty"` - - // Replication set name. - ReplicationSet string `json:"replication_set,omitempty"` - - // MongoDB username for exporter and QAN agent access. - Username string `json:"username,omitempty"` - - // MongoDB password for exporter and QAN agent access. - Password string `json:"password,omitempty"` - - // If true, adds qan-mongodb-profiler-agent for provided service. - QANMongodbProfiler bool `json:"qan_mongodb_profiler,omitempty"` - - // Custom user-assigned labels for Service. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // Skip connection check. - SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Client certificate and key. - TLSCertificateKey string `json:"tls_certificate_key,omitempty"` - - // Password for decrypting tls_certificate_key. - TLSCertificateKeyFilePassword string `json:"tls_certificate_key_file_password,omitempty"` - - // Certificate Authority certificate chain. - TLSCa string `json:"tls_ca,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit). - MaxQueryLength int32 `json:"max_query_length,omitempty"` - - // MetricsMode defines desired metrics mode for agent, - // it can be pull, push or auto mode chosen by server. - // - // - METRICS_MODE_UNSPECIFIED: Auto - // Enum: [METRICS_MODE_UNSPECIFIED METRICS_MODE_PULL METRICS_MODE_PUSH] - MetricsMode *string `json:"metrics_mode,omitempty"` - - // List of collector names to disable in this exporter. - DisableCollectors []string `json:"disable_collectors"` - - // Authentication mechanism. - // See https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism - // for details. - AuthenticationMechanism string `json:"authentication_mechanism,omitempty"` - - // Authentication database. - AuthenticationDatabase string `json:"authentication_database,omitempty"` - - // Custom password for exporter endpoint /metrics. - AgentPassword string `json:"agent_password,omitempty"` - - // List of collections to get stats from. Can use * . - StatsCollections []string `json:"stats_collections"` - - // Collections limit. Only get Databases and collection stats if the total number of collections in the server - // is less than this value. 0: no limit - CollectionsLimit int32 `json:"collections_limit,omitempty"` - - // Enable all collectors - EnableAllCollectors bool `json:"enable_all_collectors,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` - - // Optionally expose the exporter process on all public interfaces - ExposeExporter bool `json:"expose_exporter,omitempty"` - - // add node - AddNode *AddMongoDBParamsBodyAddNode `json:"add_node,omitempty"` -} - -// Validate validates this add mongo DB body -func (o *AddMongoDBBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMetricsMode(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if err := o.validateAddNode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMongoDbBodyTypeMetricsModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["METRICS_MODE_UNSPECIFIED","METRICS_MODE_PULL","METRICS_MODE_PUSH"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMongoDbBodyTypeMetricsModePropEnum = append(addMongoDbBodyTypeMetricsModePropEnum, v) - } -} - -const ( - - // AddMongoDBBodyMetricsModeMETRICSMODEUNSPECIFIED captures enum value "METRICS_MODE_UNSPECIFIED" - AddMongoDBBodyMetricsModeMETRICSMODEUNSPECIFIED string = "METRICS_MODE_UNSPECIFIED" - - // AddMongoDBBodyMetricsModeMETRICSMODEPULL captures enum value "METRICS_MODE_PULL" - AddMongoDBBodyMetricsModeMETRICSMODEPULL string = "METRICS_MODE_PULL" - - // AddMongoDBBodyMetricsModeMETRICSMODEPUSH captures enum value "METRICS_MODE_PUSH" - AddMongoDBBodyMetricsModeMETRICSMODEPUSH string = "METRICS_MODE_PUSH" -) - -// prop value enum -func (o *AddMongoDBBody) validateMetricsModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMongoDbBodyTypeMetricsModePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMongoDBBody) validateMetricsMode(formats strfmt.Registry) error { - if swag.IsZero(o.MetricsMode) { // not required - return nil - } - - // value enum - if err := o.validateMetricsModeEnum("body"+"."+"metrics_mode", "body", *o.MetricsMode); err != nil { - return err - } - - return nil -} - -var addMongoDbBodyTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMongoDbBodyTypeLogLevelPropEnum = append(addMongoDbBodyTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddMongoDBBodyLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddMongoDBBodyLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddMongoDBBodyLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddMongoDBBodyLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddMongoDBBodyLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddMongoDBBodyLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddMongoDBBodyLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddMongoDBBodyLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddMongoDBBodyLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddMongoDBBodyLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddMongoDBBodyLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddMongoDBBodyLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddMongoDBBody) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMongoDbBodyTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMongoDBBody) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("body"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -func (o *AddMongoDBBody) validateAddNode(formats strfmt.Registry) error { - if swag.IsZero(o.AddNode) { // not required - return nil - } - - if o.AddNode != nil { - if err := o.AddNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "add_node") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "add_node") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add mongo DB body based on the context it is used -func (o *AddMongoDBBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateAddNode(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMongoDBBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { - if err := o.AddNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "add_node") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "add_node") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddMongoDBBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMongoDBBody) UnmarshalBinary(b []byte) error { - var res AddMongoDBBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMongoDBDefaultBody add mongo DB default body -swagger:model AddMongoDBDefaultBody -*/ -type AddMongoDBDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*AddMongoDBDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this add mongo DB default body -func (o *AddMongoDBDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMongoDBDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AddMongoDB default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AddMongoDB default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this add mongo DB default body based on the context it is used -func (o *AddMongoDBDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMongoDBDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AddMongoDB default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AddMongoDB default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddMongoDBDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMongoDBDefaultBody) UnmarshalBinary(b []byte) error { - var res AddMongoDBDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMongoDBDefaultBodyDetailsItems0 add mongo DB default body details items0 -swagger:model AddMongoDBDefaultBodyDetailsItems0 -*/ -type AddMongoDBDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this add mongo DB default body details items0 -func (o *AddMongoDBDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add mongo DB default body details items0 based on context it is used -func (o *AddMongoDBDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMongoDBDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMongoDBDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res AddMongoDBDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMongoDBOKBody add mongo DB OK body -swagger:model AddMongoDBOKBody -*/ -type AddMongoDBOKBody struct { - // mongodb exporter - MongodbExporter *AddMongoDBOKBodyMongodbExporter `json:"mongodb_exporter,omitempty"` - - // qan mongodb profiler - QANMongodbProfiler *AddMongoDBOKBodyQANMongodbProfiler `json:"qan_mongodb_profiler,omitempty"` - - // service - Service *AddMongoDBOKBodyService `json:"service,omitempty"` -} - -// Validate validates this add mongo DB OK body -func (o *AddMongoDBOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMongodbExporter(formats); err != nil { - res = append(res, err) - } - - if err := o.validateQANMongodbProfiler(formats); err != nil { - res = append(res, err) - } - - if err := o.validateService(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMongoDBOKBody) validateMongodbExporter(formats strfmt.Registry) error { - if swag.IsZero(o.MongodbExporter) { // not required - return nil - } - - if o.MongodbExporter != nil { - if err := o.MongodbExporter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMongoDbOk" + "." + "mongodb_exporter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMongoDbOk" + "." + "mongodb_exporter") - } - return err - } - } - - return nil -} - -func (o *AddMongoDBOKBody) validateQANMongodbProfiler(formats strfmt.Registry) error { - if swag.IsZero(o.QANMongodbProfiler) { // not required - return nil - } - - if o.QANMongodbProfiler != nil { - if err := o.QANMongodbProfiler.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMongoDbOk" + "." + "qan_mongodb_profiler") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMongoDbOk" + "." + "qan_mongodb_profiler") - } - return err - } - } - - return nil -} - -func (o *AddMongoDBOKBody) validateService(formats strfmt.Registry) error { - if swag.IsZero(o.Service) { // not required - return nil - } - - if o.Service != nil { - if err := o.Service.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMongoDbOk" + "." + "service") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMongoDbOk" + "." + "service") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add mongo DB OK body based on the context it is used -func (o *AddMongoDBOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateMongodbExporter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateQANMongodbProfiler(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateService(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMongoDBOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MongodbExporter != nil { - if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMongoDbOk" + "." + "mongodb_exporter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMongoDbOk" + "." + "mongodb_exporter") - } - return err - } - } - - return nil -} - -func (o *AddMongoDBOKBody) contextValidateQANMongodbProfiler(ctx context.Context, formats strfmt.Registry) error { - if o.QANMongodbProfiler != nil { - if err := o.QANMongodbProfiler.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMongoDbOk" + "." + "qan_mongodb_profiler") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMongoDbOk" + "." + "qan_mongodb_profiler") - } - return err - } - } - - return nil -} - -func (o *AddMongoDBOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { - if err := o.Service.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMongoDbOk" + "." + "service") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMongoDbOk" + "." + "service") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddMongoDBOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMongoDBOKBody) UnmarshalBinary(b []byte) error { - var res AddMongoDBOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMongoDBOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics. -swagger:model AddMongoDBOKBodyMongodbExporter -*/ -type AddMongoDBOKBodyMongodbExporter struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // The pmm-agent identifier which runs this instance. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Desired Agent status: enabled (false) or disabled (true). - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // MongoDB username for scraping metrics. - Username string `json:"username,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // True if exporter uses push metrics mode. - PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` - - // List of disabled collector names. - DisabledCollectors []string `json:"disabled_collectors"` - - // AgentStatus represents actual Agent status. - // - // - AGENT_STATUS_STARTING: Agent is starting. - // - AGENT_STATUS_RUNNING: Agent is running. - // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. - // - AGENT_STATUS_STOPPING: Agent is stopping. - // - AGENT_STATUS_DONE: Agent finished. - // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. - // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] - Status *string `json:"status,omitempty"` - - // Listen port for scraping metrics. - ListenPort int64 `json:"listen_port,omitempty"` - - // List of colletions to get stats from. Can use * - StatsCollections []string `json:"stats_collections"` - - // Collections limit. Only get Databases and collection stats if the total number of collections in the server - // is less than this value. 0: no limit - CollectionsLimit int32 `json:"collections_limit,omitempty"` - - // Enable All collectors. - EnableAllCollectors bool `json:"enable_all_collectors,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` - - // Optionally expose the exporter process on all public interfaces - ExposeExporter bool `json:"expose_exporter,omitempty"` -} - -// Validate validates this add mongo DB OK body mongodb exporter -func (o *AddMongoDBOKBodyMongodbExporter) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMongoDbOkBodyMongodbExporterTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMongoDbOkBodyMongodbExporterTypeStatusPropEnum = append(addMongoDbOkBodyMongodbExporterTypeStatusPropEnum, v) - } -} - -const ( - - // AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - - // AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - - // AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - - // AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - - // AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - - // AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - - // AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddMongoDBOKBodyMongodbExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" -) - -// prop value enum -func (o *AddMongoDBOKBodyMongodbExporter) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMongoDbOkBodyMongodbExporterTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMongoDBOKBodyMongodbExporter) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("addMongoDbOk"+"."+"mongodb_exporter"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -var addMongoDbOkBodyMongodbExporterTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMongoDbOkBodyMongodbExporterTypeLogLevelPropEnum = append(addMongoDbOkBodyMongodbExporterTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddMongoDBOKBodyMongodbExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddMongoDBOKBodyMongodbExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMongoDbOkBodyMongodbExporterTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMongoDBOKBodyMongodbExporter) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("addMongoDbOk"+"."+"mongodb_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add mongo DB OK body mongodb exporter based on context it is used -func (o *AddMongoDBOKBodyMongodbExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMongoDBOKBodyMongodbExporter) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMongoDBOKBodyMongodbExporter) UnmarshalBinary(b []byte) error { - var res AddMongoDBOKBodyMongodbExporter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMongoDBOKBodyQANMongodbProfiler QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. -swagger:model AddMongoDBOKBodyQANMongodbProfiler -*/ -type AddMongoDBOKBodyQANMongodbProfiler struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // The pmm-agent identifier which runs this instance. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Desired Agent status: enabled (false) or disabled (true). - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // MongoDB username for getting profiler data. - Username string `json:"username,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit). - MaxQueryLength int32 `json:"max_query_length,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // AgentStatus represents actual Agent status. - // - // - AGENT_STATUS_STARTING: Agent is starting. - // - AGENT_STATUS_RUNNING: Agent is running. - // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. - // - AGENT_STATUS_STOPPING: Agent is stopping. - // - AGENT_STATUS_DONE: Agent finished. - // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. - // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] - Status *string `json:"status,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` -} - -// Validate validates this add mongo DB OK body QAN mongodb profiler -func (o *AddMongoDBOKBodyQANMongodbProfiler) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMongoDbOkBodyQanMongodbProfilerTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMongoDbOkBodyQanMongodbProfilerTypeStatusPropEnum = append(addMongoDbOkBodyQanMongodbProfilerTypeStatusPropEnum, v) - } -} - -const ( - - // AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - - // AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - - // AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - - // AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - - // AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - - // AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - - // AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddMongoDBOKBodyQANMongodbProfilerStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" -) - -// prop value enum -func (o *AddMongoDBOKBodyQANMongodbProfiler) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMongoDbOkBodyQanMongodbProfilerTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMongoDBOKBodyQANMongodbProfiler) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("addMongoDbOk"+"."+"qan_mongodb_profiler"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -var addMongoDbOkBodyQanMongodbProfilerTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMongoDbOkBodyQanMongodbProfilerTypeLogLevelPropEnum = append(addMongoDbOkBodyQanMongodbProfilerTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddMongoDBOKBodyQANMongodbProfilerLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddMongoDBOKBodyQANMongodbProfiler) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMongoDbOkBodyQanMongodbProfilerTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMongoDBOKBodyQANMongodbProfiler) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("addMongoDbOk"+"."+"qan_mongodb_profiler"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add mongo DB OK body QAN mongodb profiler based on context it is used -func (o *AddMongoDBOKBodyQANMongodbProfiler) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMongoDBOKBodyQANMongodbProfiler) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMongoDBOKBodyQANMongodbProfiler) UnmarshalBinary(b []byte) error { - var res AddMongoDBOKBodyQANMongodbProfiler - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMongoDBOKBodyService MongoDBService represents a generic MongoDB instance. -swagger:model AddMongoDBOKBodyService -*/ -type AddMongoDBOKBodyService struct { - // Unique randomly generated instance identifier. - ServiceID string `json:"service_id,omitempty"` - - // Unique across all Services user-defined name. - ServiceName string `json:"service_name,omitempty"` - - // Node identifier where this instance runs. - NodeID string `json:"node_id,omitempty"` - - // Access address (DNS name or IP). - // Address (and port) or socket is required. - Address string `json:"address,omitempty"` - - // Access port. - // Port is required when the address present. - Port int64 `json:"port,omitempty"` - - // Access unix socket. - // Address (and port) or socket is required. - Socket string `json:"socket,omitempty"` - - // Environment name. - Environment string `json:"environment,omitempty"` - - // Cluster name. - Cluster string `json:"cluster,omitempty"` - - // Replication set name. - ReplicationSet string `json:"replication_set,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // MongoDB version. - Version string `json:"version,omitempty"` -} - -// Validate validates this add mongo DB OK body service -func (o *AddMongoDBOKBodyService) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add mongo DB OK body service based on context it is used -func (o *AddMongoDBOKBodyService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMongoDBOKBodyService) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMongoDBOKBodyService) UnmarshalBinary(b []byte) error { - var res AddMongoDBOKBodyService - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMongoDBParamsBodyAddNode AddNodeParams holds node params and is used to add new node to inventory while adding new service. -swagger:model AddMongoDBParamsBodyAddNode -*/ -type AddMongoDBParamsBodyAddNode 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"` - - // Unique across all Nodes user-defined name. - NodeName string `json:"node_name,omitempty"` - - // Linux machine-id. - MachineID string `json:"machine_id,omitempty"` - - // Linux distribution name and version. - Distro string `json:"distro,omitempty"` - - // Container identifier. If specified, must be a unique Docker container identifier. - ContainerID string `json:"container_id,omitempty"` - - // Container name. - ContainerName string `json:"container_name,omitempty"` - - // Node model. - NodeModel string `json:"node_model,omitempty"` - - // Node region. - Region string `json:"region,omitempty"` - - // Node availability zone. - Az string `json:"az,omitempty"` - - // Custom user-assigned labels for Node. - CustomLabels map[string]string `json:"custom_labels,omitempty"` -} - -// Validate validates this add mongo DB params body add node -func (o *AddMongoDBParamsBodyAddNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateNodeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMongoDbParamsBodyAddNodeTypeNodeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMongoDbParamsBodyAddNodeTypeNodeTypePropEnum = append(addMongoDbParamsBodyAddNodeTypeNodeTypePropEnum, v) - } -} - -const ( - - // AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" - AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" - - // AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" - AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" - - // AddMongoDBParamsBodyAddNodeNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" - AddMongoDBParamsBodyAddNodeNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" - - // AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" - AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" - - // AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" - AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" - - // AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - AddMongoDBParamsBodyAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" -) - -// prop value enum -func (o *AddMongoDBParamsBodyAddNode) validateNodeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMongoDbParamsBodyAddNodeTypeNodeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMongoDBParamsBodyAddNode) validateNodeType(formats strfmt.Registry) error { - if swag.IsZero(o.NodeType) { // not required - return nil - } - - // value enum - if err := o.validateNodeTypeEnum("body"+"."+"add_node"+"."+"node_type", "body", *o.NodeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add mongo DB params body add node based on context it is used -func (o *AddMongoDBParamsBodyAddNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMongoDBParamsBodyAddNode) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMongoDBParamsBodyAddNode) UnmarshalBinary(b []byte) error { - var res AddMongoDBParamsBodyAddNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/management/v1/json/client/management_service/add_my_sql_parameters.go b/api/management/v1/json/client/management_service/add_my_sql_parameters.go deleted file mode 100644 index 46d895c3256..00000000000 --- a/api/management/v1/json/client/management_service/add_my_sql_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package management_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewAddMySQLParams creates a new AddMySQLParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewAddMySQLParams() *AddMySQLParams { - return &AddMySQLParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddMySQLParamsWithTimeout creates a new AddMySQLParams object -// with the ability to set a timeout on a request. -func NewAddMySQLParamsWithTimeout(timeout time.Duration) *AddMySQLParams { - return &AddMySQLParams{ - timeout: timeout, - } -} - -// NewAddMySQLParamsWithContext creates a new AddMySQLParams object -// with the ability to set a context for a request. -func NewAddMySQLParamsWithContext(ctx context.Context) *AddMySQLParams { - return &AddMySQLParams{ - Context: ctx, - } -} - -// NewAddMySQLParamsWithHTTPClient creates a new AddMySQLParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddMySQLParamsWithHTTPClient(client *http.Client) *AddMySQLParams { - return &AddMySQLParams{ - HTTPClient: client, - } -} - -/* -AddMySQLParams contains all the parameters to send to the API endpoint - - for the add my SQL operation. - - Typically these are written to a http.Request. -*/ -type AddMySQLParams struct { - // Body. - Body AddMySQLBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add my SQL params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddMySQLParams) WithDefaults() *AddMySQLParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add my SQL params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddMySQLParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add my SQL params -func (o *AddMySQLParams) WithTimeout(timeout time.Duration) *AddMySQLParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add my SQL params -func (o *AddMySQLParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add my SQL params -func (o *AddMySQLParams) WithContext(ctx context.Context) *AddMySQLParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add my SQL params -func (o *AddMySQLParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add my SQL params -func (o *AddMySQLParams) WithHTTPClient(client *http.Client) *AddMySQLParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add my SQL params -func (o *AddMySQLParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add my SQL params -func (o *AddMySQLParams) WithBody(body AddMySQLBody) *AddMySQLParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add my SQL params -func (o *AddMySQLParams) SetBody(body AddMySQLBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddMySQLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/management/v1/json/client/management_service/add_my_sql_responses.go b/api/management/v1/json/client/management_service/add_my_sql_responses.go deleted file mode 100644 index c9568511584..00000000000 --- a/api/management/v1/json/client/management_service/add_my_sql_responses.go +++ /dev/null @@ -1,1669 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package management_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AddMySQLReader is a Reader for the AddMySQL structure. -type AddMySQLReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddMySQLReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAddMySQLOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddMySQLDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewAddMySQLOK creates a AddMySQLOK with default headers values -func NewAddMySQLOK() *AddMySQLOK { - return &AddMySQLOK{} -} - -/* -AddMySQLOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type AddMySQLOK struct { - Payload *AddMySQLOKBody -} - -func (o *AddMySQLOK) Error() string { - return fmt.Sprintf("[POST /v1/management/MySQL/Add][%d] addMySqlOk %+v", 200, o.Payload) -} - -func (o *AddMySQLOK) GetPayload() *AddMySQLOKBody { - return o.Payload -} - -func (o *AddMySQLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMySQLOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddMySQLDefault creates a AddMySQLDefault with default headers values -func NewAddMySQLDefault(code int) *AddMySQLDefault { - return &AddMySQLDefault{ - _statusCode: code, - } -} - -/* -AddMySQLDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type AddMySQLDefault struct { - _statusCode int - - Payload *AddMySQLDefaultBody -} - -// Code gets the status code for the add my SQL default response -func (o *AddMySQLDefault) Code() int { - return o._statusCode -} - -func (o *AddMySQLDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/MySQL/Add][%d] AddMySQL default %+v", o._statusCode, o.Payload) -} - -func (o *AddMySQLDefault) GetPayload() *AddMySQLDefaultBody { - return o.Payload -} - -func (o *AddMySQLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddMySQLDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -AddMySQLBody add my SQL body -swagger:model AddMySQLBody -*/ -type AddMySQLBody 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"` - - // Node name on which a service is been running. - // Exactly one of these parameters should be present: node_id, node_name, add_node. - NodeName string `json:"node_name,omitempty"` - - // Unique across all Services user-defined name. Required. - ServiceName string `json:"service_name,omitempty"` - - // Node and Service access address (DNS name or IP). - // Address (and port) or socket is required. - Address string `json:"address,omitempty"` - - // Service Access port. - // Port is required when the address present. - Port int64 `json:"port,omitempty"` - - // Service Access socket. - // Address (and port) or socket is required. - Socket string `json:"socket,omitempty"` - - // The "pmm-agent" identifier which should run agents. Required. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Environment name. - Environment string `json:"environment,omitempty"` - - // Cluster name. - Cluster string `json:"cluster,omitempty"` - - // Replication set name. - ReplicationSet string `json:"replication_set,omitempty"` - - // MySQL username for scraping metrics. - Username string `json:"username,omitempty"` - - // MySQL password for scraping metrics. - Password string `json:"password,omitempty"` - - // If true, adds qan-mysql-perfschema-agent for provided service. - QANMysqlPerfschema bool `json:"qan_mysql_perfschema,omitempty"` - - // If true, adds qan-mysql-slowlog-agent for provided service. - QANMysqlSlowlog bool `json:"qan_mysql_slowlog,omitempty"` - - // Custom user-assigned labels for Service. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // Skip connection check. - SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` - - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit). - MaxQueryLength int32 `json:"max_query_length,omitempty"` - - // Disable query examples. - DisableQueryExamples bool `json:"disable_query_examples,omitempty"` - - // If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if > 0. - // If zero, server's default value is used. - // Use negative value to disable rotation. - MaxSlowlogFileSize string `json:"max_slowlog_file_size,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Certificate Authority certificate chain. - TLSCa string `json:"tls_ca,omitempty"` - - // Client certificate. - TLSCert string `json:"tls_cert,omitempty"` - - // Password for decrypting tls_cert. - TLSKey string `json:"tls_key,omitempty"` - - // Tablestats group collectors will be disabled if there are more than that number of tables. - // If zero, server's default value is used. - // Use negative value to disable them. - TablestatsGroupTableLimit int32 `json:"tablestats_group_table_limit,omitempty"` - - // MetricsMode defines desired metrics mode for agent, - // it can be pull, push or auto mode chosen by server. - // - // - METRICS_MODE_UNSPECIFIED: Auto - // Enum: [METRICS_MODE_UNSPECIFIED METRICS_MODE_PULL METRICS_MODE_PUSH] - MetricsMode *string `json:"metrics_mode,omitempty"` - - // List of collector names to disable in this exporter. - DisableCollectors []string `json:"disable_collectors"` - - // Custom password for exporter endpoint /metrics. - AgentPassword string `json:"agent_password,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` - - // Optionally expose the exporter process on all public interfaces - ExposeExporter bool `json:"expose_exporter,omitempty"` - - // add node - AddNode *AddMySQLParamsBodyAddNode `json:"add_node,omitempty"` -} - -// Validate validates this add my SQL body -func (o *AddMySQLBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMetricsMode(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if err := o.validateAddNode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMySqlBodyTypeMetricsModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["METRICS_MODE_UNSPECIFIED","METRICS_MODE_PULL","METRICS_MODE_PUSH"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlBodyTypeMetricsModePropEnum = append(addMySqlBodyTypeMetricsModePropEnum, v) - } -} - -const ( - - // AddMySQLBodyMetricsModeMETRICSMODEUNSPECIFIED captures enum value "METRICS_MODE_UNSPECIFIED" - AddMySQLBodyMetricsModeMETRICSMODEUNSPECIFIED string = "METRICS_MODE_UNSPECIFIED" - - // AddMySQLBodyMetricsModeMETRICSMODEPULL captures enum value "METRICS_MODE_PULL" - AddMySQLBodyMetricsModeMETRICSMODEPULL string = "METRICS_MODE_PULL" - - // AddMySQLBodyMetricsModeMETRICSMODEPUSH captures enum value "METRICS_MODE_PUSH" - AddMySQLBodyMetricsModeMETRICSMODEPUSH string = "METRICS_MODE_PUSH" -) - -// prop value enum -func (o *AddMySQLBody) validateMetricsModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlBodyTypeMetricsModePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLBody) validateMetricsMode(formats strfmt.Registry) error { - if swag.IsZero(o.MetricsMode) { // not required - return nil - } - - // value enum - if err := o.validateMetricsModeEnum("body"+"."+"metrics_mode", "body", *o.MetricsMode); err != nil { - return err - } - - return nil -} - -var addMySqlBodyTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlBodyTypeLogLevelPropEnum = append(addMySqlBodyTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddMySQLBodyLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddMySQLBodyLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddMySQLBodyLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddMySQLBodyLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddMySQLBodyLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddMySQLBodyLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddMySQLBodyLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddMySQLBodyLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddMySQLBodyLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddMySQLBodyLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddMySQLBodyLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddMySQLBodyLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddMySQLBody) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlBodyTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLBody) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("body"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -func (o *AddMySQLBody) validateAddNode(formats strfmt.Registry) error { - if swag.IsZero(o.AddNode) { // not required - return nil - } - - if o.AddNode != nil { - if err := o.AddNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "add_node") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "add_node") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add my SQL body based on the context it is used -func (o *AddMySQLBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateAddNode(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMySQLBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { - if err := o.AddNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "add_node") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "add_node") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLBody) UnmarshalBinary(b []byte) error { - var res AddMySQLBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMySQLDefaultBody add my SQL default body -swagger:model AddMySQLDefaultBody -*/ -type AddMySQLDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*AddMySQLDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this add my SQL default body -func (o *AddMySQLDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMySQLDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AddMySQL default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AddMySQL default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this add my SQL default body based on the context it is used -func (o *AddMySQLDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMySQLDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AddMySQL default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AddMySQL default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLDefaultBody) UnmarshalBinary(b []byte) error { - var res AddMySQLDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMySQLDefaultBodyDetailsItems0 add my SQL default body details items0 -swagger:model AddMySQLDefaultBodyDetailsItems0 -*/ -type AddMySQLDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this add my SQL default body details items0 -func (o *AddMySQLDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add my SQL default body details items0 based on context it is used -func (o *AddMySQLDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res AddMySQLDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMySQLOKBody add my SQL OK body -swagger:model AddMySQLOKBody -*/ -type AddMySQLOKBody struct { - // Actual table count at the moment of adding. - TableCount int32 `json:"table_count,omitempty"` - - // mysqld exporter - MysqldExporter *AddMySQLOKBodyMysqldExporter `json:"mysqld_exporter,omitempty"` - - // qan mysql perfschema - QANMysqlPerfschema *AddMySQLOKBodyQANMysqlPerfschema `json:"qan_mysql_perfschema,omitempty"` - - // qan mysql slowlog - QANMysqlSlowlog *AddMySQLOKBodyQANMysqlSlowlog `json:"qan_mysql_slowlog,omitempty"` - - // service - Service *AddMySQLOKBodyService `json:"service,omitempty"` -} - -// Validate validates this add my SQL OK body -func (o *AddMySQLOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMysqldExporter(formats); err != nil { - res = append(res, err) - } - - if err := o.validateQANMysqlPerfschema(formats); err != nil { - res = append(res, err) - } - - if err := o.validateQANMysqlSlowlog(formats); err != nil { - res = append(res, err) - } - - if err := o.validateService(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMySQLOKBody) validateMysqldExporter(formats strfmt.Registry) error { - if swag.IsZero(o.MysqldExporter) { // not required - return nil - } - - if o.MysqldExporter != nil { - if err := o.MysqldExporter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMySqlOk" + "." + "mysqld_exporter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMySqlOk" + "." + "mysqld_exporter") - } - return err - } - } - - return nil -} - -func (o *AddMySQLOKBody) validateQANMysqlPerfschema(formats strfmt.Registry) error { - if swag.IsZero(o.QANMysqlPerfschema) { // not required - return nil - } - - if o.QANMysqlPerfschema != nil { - if err := o.QANMysqlPerfschema.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMySqlOk" + "." + "qan_mysql_perfschema") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMySqlOk" + "." + "qan_mysql_perfschema") - } - return err - } - } - - return nil -} - -func (o *AddMySQLOKBody) validateQANMysqlSlowlog(formats strfmt.Registry) error { - if swag.IsZero(o.QANMysqlSlowlog) { // not required - return nil - } - - if o.QANMysqlSlowlog != nil { - if err := o.QANMysqlSlowlog.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMySqlOk" + "." + "qan_mysql_slowlog") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMySqlOk" + "." + "qan_mysql_slowlog") - } - return err - } - } - - return nil -} - -func (o *AddMySQLOKBody) validateService(formats strfmt.Registry) error { - if swag.IsZero(o.Service) { // not required - return nil - } - - if o.Service != nil { - if err := o.Service.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMySqlOk" + "." + "service") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMySqlOk" + "." + "service") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add my SQL OK body based on the context it is used -func (o *AddMySQLOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateMysqldExporter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateQANMysqlPerfschema(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateQANMysqlSlowlog(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateService(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddMySQLOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { - if o.MysqldExporter != nil { - if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMySqlOk" + "." + "mysqld_exporter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMySqlOk" + "." + "mysqld_exporter") - } - return err - } - } - - return nil -} - -func (o *AddMySQLOKBody) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlPerfschema != nil { - if err := o.QANMysqlPerfschema.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMySqlOk" + "." + "qan_mysql_perfschema") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMySqlOk" + "." + "qan_mysql_perfschema") - } - return err - } - } - - return nil -} - -func (o *AddMySQLOKBody) contextValidateQANMysqlSlowlog(ctx context.Context, formats strfmt.Registry) error { - if o.QANMysqlSlowlog != nil { - if err := o.QANMysqlSlowlog.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMySqlOk" + "." + "qan_mysql_slowlog") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMySqlOk" + "." + "qan_mysql_slowlog") - } - return err - } - } - - return nil -} - -func (o *AddMySQLOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { - if err := o.Service.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addMySqlOk" + "." + "service") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addMySqlOk" + "." + "service") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLOKBody) UnmarshalBinary(b []byte) error { - var res AddMySQLOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMySQLOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics. -swagger:model AddMySQLOKBodyMysqldExporter -*/ -type AddMySQLOKBodyMysqldExporter struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // The pmm-agent identifier which runs this instance. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Desired Agent status: enabled (false) or disabled (true). - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // MySQL username for scraping metrics. - Username string `json:"username,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Certificate Authority certificate chain. - TLSCa string `json:"tls_ca,omitempty"` - - // Client certificate. - TLSCert string `json:"tls_cert,omitempty"` - - // Password for decrypting tls_cert. - TLSKey string `json:"tls_key,omitempty"` - - // Tablestats group collectors are disabled if there are more than that number of tables. - // 0 means tablestats group collectors are always enabled (no limit). - // Negative value means tablestats group collectors are always disabled. - TablestatsGroupTableLimit int32 `json:"tablestats_group_table_limit,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // True if exporter uses push metrics mode. - PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` - - // List of disabled collector names. - DisabledCollectors []string `json:"disabled_collectors"` - - // Actual table count at the moment of adding. - TableCount int32 `json:"table_count,omitempty"` - - // AgentStatus represents actual Agent status. - // - // - AGENT_STATUS_STARTING: Agent is starting. - // - AGENT_STATUS_RUNNING: Agent is running. - // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. - // - AGENT_STATUS_STOPPING: Agent is stopping. - // - AGENT_STATUS_DONE: Agent finished. - // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. - // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] - Status *string `json:"status,omitempty"` - - // Listen port for scraping metrics. - ListenPort int64 `json:"listen_port,omitempty"` - - // True if tablestats group collectors are currently disabled. - TablestatsGroupDisabled bool `json:"tablestats_group_disabled,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` - - // Optionally expose the exporter process on all public interfaces - ExposeExporter bool `json:"expose_exporter,omitempty"` -} - -// Validate validates this add my SQL OK body mysqld exporter -func (o *AddMySQLOKBodyMysqldExporter) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMySqlOkBodyMysqldExporterTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlOkBodyMysqldExporterTypeStatusPropEnum = append(addMySqlOkBodyMysqldExporterTypeStatusPropEnum, v) - } -} - -const ( - - // AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - - // AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - - // AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - - // AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - - // AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - - // AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - - // AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddMySQLOKBodyMysqldExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" -) - -// prop value enum -func (o *AddMySQLOKBodyMysqldExporter) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlOkBodyMysqldExporterTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLOKBodyMysqldExporter) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("addMySqlOk"+"."+"mysqld_exporter"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -var addMySqlOkBodyMysqldExporterTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlOkBodyMysqldExporterTypeLogLevelPropEnum = append(addMySqlOkBodyMysqldExporterTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddMySQLOKBodyMysqldExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddMySQLOKBodyMysqldExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlOkBodyMysqldExporterTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLOKBodyMysqldExporter) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("addMySqlOk"+"."+"mysqld_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add my SQL OK body mysqld exporter based on context it is used -func (o *AddMySQLOKBodyMysqldExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLOKBodyMysqldExporter) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLOKBodyMysqldExporter) UnmarshalBinary(b []byte) error { - var res AddMySQLOKBodyMysqldExporter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMySQLOKBodyQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server. -swagger:model AddMySQLOKBodyQANMysqlPerfschema -*/ -type AddMySQLOKBodyQANMysqlPerfschema struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // The pmm-agent identifier which runs this instance. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Desired Agent status: enabled (false) or disabled (true). - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // MySQL username for getting performance data. - Username string `json:"username,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Certificate Authority certificate chain. - TLSCa string `json:"tls_ca,omitempty"` - - // Client certificate. - TLSCert string `json:"tls_cert,omitempty"` - - // Password for decrypting tls_cert. - TLSKey string `json:"tls_key,omitempty"` - - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit). - MaxQueryLength int32 `json:"max_query_length,omitempty"` - - // True if query examples are disabled. - QueryExamplesDisabled bool `json:"query_examples_disabled,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // AgentStatus represents actual Agent status. - // - // - AGENT_STATUS_STARTING: Agent is starting. - // - AGENT_STATUS_RUNNING: Agent is running. - // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. - // - AGENT_STATUS_STOPPING: Agent is stopping. - // - AGENT_STATUS_DONE: Agent finished. - // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. - // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] - Status *string `json:"status,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` -} - -// Validate validates this add my SQL OK body QAN mysql perfschema -func (o *AddMySQLOKBodyQANMysqlPerfschema) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMySqlOkBodyQanMysqlPerfschemaTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlOkBodyQanMysqlPerfschemaTypeStatusPropEnum = append(addMySqlOkBodyQanMysqlPerfschemaTypeStatusPropEnum, v) - } -} - -const ( - - // AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - - // AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - - // AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - - // AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - - // AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - - // AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - - // AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddMySQLOKBodyQANMysqlPerfschemaStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" -) - -// prop value enum -func (o *AddMySQLOKBodyQANMysqlPerfschema) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlOkBodyQanMysqlPerfschemaTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLOKBodyQANMysqlPerfschema) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("addMySqlOk"+"."+"qan_mysql_perfschema"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -var addMySqlOkBodyQanMysqlPerfschemaTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlOkBodyQanMysqlPerfschemaTypeLogLevelPropEnum = append(addMySqlOkBodyQanMysqlPerfschemaTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddMySQLOKBodyQANMysqlPerfschemaLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddMySQLOKBodyQANMysqlPerfschema) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlOkBodyQanMysqlPerfschemaTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLOKBodyQANMysqlPerfschema) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("addMySqlOk"+"."+"qan_mysql_perfschema"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add my SQL OK body QAN mysql perfschema based on context it is used -func (o *AddMySQLOKBodyQANMysqlPerfschema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLOKBodyQANMysqlPerfschema) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLOKBodyQANMysqlPerfschema) UnmarshalBinary(b []byte) error { - var res AddMySQLOKBodyQANMysqlPerfschema - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMySQLOKBodyQANMysqlSlowlog QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server. -swagger:model AddMySQLOKBodyQANMysqlSlowlog -*/ -type AddMySQLOKBodyQANMysqlSlowlog struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // The pmm-agent identifier which runs this instance. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Desired Agent status: enabled (false) or disabled (true). - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // MySQL username for getting performance data. - Username string `json:"username,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Certificate Authority certificate chain. - TLSCa string `json:"tls_ca,omitempty"` - - // Client certificate. - TLSCert string `json:"tls_cert,omitempty"` - - // Password for decrypting tls_cert. - TLSKey string `json:"tls_key,omitempty"` - - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit) - MaxQueryLength int32 `json:"max_query_length,omitempty"` - - // True if query examples are disabled. - QueryExamplesDisabled bool `json:"query_examples_disabled,omitempty"` - - // Slowlog file is rotated at this size if > 0. - MaxSlowlogFileSize string `json:"max_slowlog_file_size,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // AgentStatus represents actual Agent status. - // - // - AGENT_STATUS_STARTING: Agent is starting. - // - AGENT_STATUS_RUNNING: Agent is running. - // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. - // - AGENT_STATUS_STOPPING: Agent is stopping. - // - AGENT_STATUS_DONE: Agent finished. - // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. - // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] - Status *string `json:"status,omitempty"` - - // mod tidy - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` -} - -// Validate validates this add my SQL OK body QAN mysql slowlog -func (o *AddMySQLOKBodyQANMysqlSlowlog) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMySqlOkBodyQanMysqlSlowlogTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlOkBodyQanMysqlSlowlogTypeStatusPropEnum = append(addMySqlOkBodyQanMysqlSlowlogTypeStatusPropEnum, v) - } -} - -const ( - - // AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - - // AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - - // AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - - // AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - - // AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - - // AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - - // AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddMySQLOKBodyQANMysqlSlowlogStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" -) - -// prop value enum -func (o *AddMySQLOKBodyQANMysqlSlowlog) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlOkBodyQanMysqlSlowlogTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLOKBodyQANMysqlSlowlog) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("addMySqlOk"+"."+"qan_mysql_slowlog"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -var addMySqlOkBodyQanMysqlSlowlogTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlOkBodyQanMysqlSlowlogTypeLogLevelPropEnum = append(addMySqlOkBodyQanMysqlSlowlogTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddMySQLOKBodyQANMysqlSlowlogLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddMySQLOKBodyQANMysqlSlowlog) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlOkBodyQanMysqlSlowlogTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLOKBodyQANMysqlSlowlog) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("addMySqlOk"+"."+"qan_mysql_slowlog"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add my SQL OK body QAN mysql slowlog based on context it is used -func (o *AddMySQLOKBodyQANMysqlSlowlog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLOKBodyQANMysqlSlowlog) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLOKBodyQANMysqlSlowlog) UnmarshalBinary(b []byte) error { - var res AddMySQLOKBodyQANMysqlSlowlog - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMySQLOKBodyService MySQLService represents a generic MySQL instance. -swagger:model AddMySQLOKBodyService -*/ -type AddMySQLOKBodyService struct { - // Unique randomly generated instance identifier. - ServiceID string `json:"service_id,omitempty"` - - // Unique across all Services user-defined name. - ServiceName string `json:"service_name,omitempty"` - - // Node identifier where this instance runs. - NodeID string `json:"node_id,omitempty"` - - // Access address (DNS name or IP). - // Address (and port) or socket is required. - Address string `json:"address,omitempty"` - - // Access port. - // Port is required when the address present. - Port int64 `json:"port,omitempty"` - - // Access unix socket. - // Address (and port) or socket is required. - Socket string `json:"socket,omitempty"` - - // Environment name. - Environment string `json:"environment,omitempty"` - - // Cluster name. - Cluster string `json:"cluster,omitempty"` - - // Replication set name. - ReplicationSet string `json:"replication_set,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // MySQL version. - Version string `json:"version,omitempty"` -} - -// Validate validates this add my SQL OK body service -func (o *AddMySQLOKBodyService) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add my SQL OK body service based on context it is used -func (o *AddMySQLOKBodyService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLOKBodyService) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLOKBodyService) UnmarshalBinary(b []byte) error { - var res AddMySQLOKBodyService - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddMySQLParamsBodyAddNode AddNodeParams holds node params and is used to add new node to inventory while adding new service. -swagger:model AddMySQLParamsBodyAddNode -*/ -type AddMySQLParamsBodyAddNode 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"` - - // Unique across all Nodes user-defined name. - NodeName string `json:"node_name,omitempty"` - - // Linux machine-id. - MachineID string `json:"machine_id,omitempty"` - - // Linux distribution name and version. - Distro string `json:"distro,omitempty"` - - // Container identifier. If specified, must be a unique Docker container identifier. - ContainerID string `json:"container_id,omitempty"` - - // Container name. - ContainerName string `json:"container_name,omitempty"` - - // Node model. - NodeModel string `json:"node_model,omitempty"` - - // Node region. - Region string `json:"region,omitempty"` - - // Node availability zone. - Az string `json:"az,omitempty"` - - // Custom user-assigned labels for Node. - CustomLabels map[string]string `json:"custom_labels,omitempty"` -} - -// Validate validates this add my SQL params body add node -func (o *AddMySQLParamsBodyAddNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateNodeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addMySqlParamsBodyAddNodeTypeNodeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addMySqlParamsBodyAddNodeTypeNodeTypePropEnum = append(addMySqlParamsBodyAddNodeTypeNodeTypePropEnum, v) - } -} - -const ( - - // AddMySQLParamsBodyAddNodeNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" - AddMySQLParamsBodyAddNodeNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" - - // AddMySQLParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" - AddMySQLParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" - - // AddMySQLParamsBodyAddNodeNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" - AddMySQLParamsBodyAddNodeNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" - - // AddMySQLParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" - AddMySQLParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" - - // AddMySQLParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" - AddMySQLParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" - - // AddMySQLParamsBodyAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - AddMySQLParamsBodyAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" -) - -// prop value enum -func (o *AddMySQLParamsBodyAddNode) validateNodeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addMySqlParamsBodyAddNodeTypeNodeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddMySQLParamsBodyAddNode) validateNodeType(formats strfmt.Registry) error { - if swag.IsZero(o.NodeType) { // not required - return nil - } - - // value enum - if err := o.validateNodeTypeEnum("body"+"."+"add_node"+"."+"node_type", "body", *o.NodeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add my SQL params body add node based on context it is used -func (o *AddMySQLParamsBodyAddNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddMySQLParamsBodyAddNode) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddMySQLParamsBodyAddNode) UnmarshalBinary(b []byte) error { - var res AddMySQLParamsBodyAddNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/api/management/v1/json/client/management_service/add_postgre_sql_parameters.go b/api/management/v1/json/client/management_service/add_postgre_sql_parameters.go deleted file mode 100644 index 4bc775da10b..00000000000 --- a/api/management/v1/json/client/management_service/add_postgre_sql_parameters.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package management_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewAddPostgreSQLParams creates a new AddPostgreSQLParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewAddPostgreSQLParams() *AddPostgreSQLParams { - return &AddPostgreSQLParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewAddPostgreSQLParamsWithTimeout creates a new AddPostgreSQLParams object -// with the ability to set a timeout on a request. -func NewAddPostgreSQLParamsWithTimeout(timeout time.Duration) *AddPostgreSQLParams { - return &AddPostgreSQLParams{ - timeout: timeout, - } -} - -// NewAddPostgreSQLParamsWithContext creates a new AddPostgreSQLParams object -// with the ability to set a context for a request. -func NewAddPostgreSQLParamsWithContext(ctx context.Context) *AddPostgreSQLParams { - return &AddPostgreSQLParams{ - Context: ctx, - } -} - -// NewAddPostgreSQLParamsWithHTTPClient creates a new AddPostgreSQLParams object -// with the ability to set a custom HTTPClient for a request. -func NewAddPostgreSQLParamsWithHTTPClient(client *http.Client) *AddPostgreSQLParams { - return &AddPostgreSQLParams{ - HTTPClient: client, - } -} - -/* -AddPostgreSQLParams contains all the parameters to send to the API endpoint - - for the add postgre SQL operation. - - Typically these are written to a http.Request. -*/ -type AddPostgreSQLParams struct { - // Body. - Body AddPostgreSQLBody - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the add postgre SQL params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddPostgreSQLParams) WithDefaults() *AddPostgreSQLParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the add postgre SQL params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *AddPostgreSQLParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the add postgre SQL params -func (o *AddPostgreSQLParams) WithTimeout(timeout time.Duration) *AddPostgreSQLParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the add postgre SQL params -func (o *AddPostgreSQLParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the add postgre SQL params -func (o *AddPostgreSQLParams) WithContext(ctx context.Context) *AddPostgreSQLParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the add postgre SQL params -func (o *AddPostgreSQLParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the add postgre SQL params -func (o *AddPostgreSQLParams) WithHTTPClient(client *http.Client) *AddPostgreSQLParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the add postgre SQL params -func (o *AddPostgreSQLParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the add postgre SQL params -func (o *AddPostgreSQLParams) WithBody(body AddPostgreSQLBody) *AddPostgreSQLParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the add postgre SQL params -func (o *AddPostgreSQLParams) SetBody(body AddPostgreSQLBody) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *AddPostgreSQLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/management/v1/json/client/management_service/add_postgre_sql_responses.go b/api/management/v1/json/client/management_service/add_postgre_sql_responses.go deleted file mode 100644 index cb5f37f67f3..00000000000 --- a/api/management/v1/json/client/management_service/add_postgre_sql_responses.go +++ /dev/null @@ -1,1636 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package management_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// AddPostgreSQLReader is a Reader for the AddPostgreSQL structure. -type AddPostgreSQLReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *AddPostgreSQLReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewAddPostgreSQLOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewAddPostgreSQLDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewAddPostgreSQLOK creates a AddPostgreSQLOK with default headers values -func NewAddPostgreSQLOK() *AddPostgreSQLOK { - return &AddPostgreSQLOK{} -} - -/* -AddPostgreSQLOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type AddPostgreSQLOK struct { - Payload *AddPostgreSQLOKBody -} - -func (o *AddPostgreSQLOK) Error() string { - return fmt.Sprintf("[POST /v1/management/PostgreSQL/Add][%d] addPostgreSqlOk %+v", 200, o.Payload) -} - -func (o *AddPostgreSQLOK) GetPayload() *AddPostgreSQLOKBody { - return o.Payload -} - -func (o *AddPostgreSQLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPostgreSQLOKBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewAddPostgreSQLDefault creates a AddPostgreSQLDefault with default headers values -func NewAddPostgreSQLDefault(code int) *AddPostgreSQLDefault { - return &AddPostgreSQLDefault{ - _statusCode: code, - } -} - -/* -AddPostgreSQLDefault describes a response with status code -1, with default header values. - -An unexpected error response. -*/ -type AddPostgreSQLDefault struct { - _statusCode int - - Payload *AddPostgreSQLDefaultBody -} - -// Code gets the status code for the add postgre SQL default response -func (o *AddPostgreSQLDefault) Code() int { - return o._statusCode -} - -func (o *AddPostgreSQLDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/PostgreSQL/Add][%d] AddPostgreSQL default %+v", o._statusCode, o.Payload) -} - -func (o *AddPostgreSQLDefault) GetPayload() *AddPostgreSQLDefaultBody { - return o.Payload -} - -func (o *AddPostgreSQLDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(AddPostgreSQLDefaultBody) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -AddPostgreSQLBody add postgre SQL body -swagger:model AddPostgreSQLBody -*/ -type AddPostgreSQLBody 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"` - - // Node name on which a service is been running. - // Exactly one of these parameters should be present: node_id, node_name, add_node. - NodeName string `json:"node_name,omitempty"` - - // Unique across all Services user-defined name. Required. - ServiceName string `json:"service_name,omitempty"` - - // Node and Service access address (DNS name or IP). - // Address (and port) or socket is required. - Address string `json:"address,omitempty"` - - // Service Access port. - // Port is required when the address present. - Port int64 `json:"port,omitempty"` - - // Database name. - Database string `json:"database,omitempty"` - - // Service Access socket. - // Address (and port) or socket is required. - Socket string `json:"socket,omitempty"` - - // The "pmm-agent" identifier which should run agents. Required. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Environment name. - Environment string `json:"environment,omitempty"` - - // Cluster name. - Cluster string `json:"cluster,omitempty"` - - // Replication set name. - ReplicationSet string `json:"replication_set,omitempty"` - - // PostgreSQL username for scraping metrics. - Username string `json:"username,omitempty"` - - // PostgreSQL password for scraping metrics. - Password string `json:"password,omitempty"` - - // If true, adds qan-postgresql-pgstatements-agent for provided service. - QANPostgresqlPgstatementsAgent bool `json:"qan_postgresql_pgstatements_agent,omitempty"` - - // If true, adds qan-postgresql-pgstatmonitor-agent for provided service. - QANPostgresqlPgstatmonitorAgent bool `json:"qan_postgresql_pgstatmonitor_agent,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit). - MaxQueryLength int32 `json:"max_query_length,omitempty"` - - // Disable query examples. - DisableQueryExamples bool `json:"disable_query_examples,omitempty"` - - // Custom user-assigned labels for Service. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // Skip connection check. - SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` - - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // MetricsMode defines desired metrics mode for agent, - // it can be pull, push or auto mode chosen by server. - // - // - METRICS_MODE_UNSPECIFIED: Auto - // Enum: [METRICS_MODE_UNSPECIFIED METRICS_MODE_PULL METRICS_MODE_PUSH] - MetricsMode *string `json:"metrics_mode,omitempty"` - - // List of collector names to disable in this exporter. - DisableCollectors []string `json:"disable_collectors"` - - // TLS CA certificate. - TLSCa string `json:"tls_ca,omitempty"` - - // TLS Certifcate. - TLSCert string `json:"tls_cert,omitempty"` - - // TLS Certificate Key. - TLSKey string `json:"tls_key,omitempty"` - - // Custom password for exporter endpoint /metrics. - AgentPassword string `json:"agent_password,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` - - // Limit for auto discovery. - AutoDiscoveryLimit int32 `json:"auto_discovery_limit,omitempty"` - - // Optionally expose the exporter process on all public interfaces - ExposeExporter bool `json:"expose_exporter,omitempty"` - - // Maximum number of connections that exporter can open to the database instance. - MaxExporterConnections int32 `json:"max_exporter_connections,omitempty"` - - // add node - AddNode *AddPostgreSQLParamsBodyAddNode `json:"add_node,omitempty"` -} - -// Validate validates this add postgre SQL body -func (o *AddPostgreSQLBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateMetricsMode(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if err := o.validateAddNode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addPostgreSqlBodyTypeMetricsModePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["METRICS_MODE_UNSPECIFIED","METRICS_MODE_PULL","METRICS_MODE_PUSH"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlBodyTypeMetricsModePropEnum = append(addPostgreSqlBodyTypeMetricsModePropEnum, v) - } -} - -const ( - - // AddPostgreSQLBodyMetricsModeMETRICSMODEUNSPECIFIED captures enum value "METRICS_MODE_UNSPECIFIED" - AddPostgreSQLBodyMetricsModeMETRICSMODEUNSPECIFIED string = "METRICS_MODE_UNSPECIFIED" - - // AddPostgreSQLBodyMetricsModeMETRICSMODEPULL captures enum value "METRICS_MODE_PULL" - AddPostgreSQLBodyMetricsModeMETRICSMODEPULL string = "METRICS_MODE_PULL" - - // AddPostgreSQLBodyMetricsModeMETRICSMODEPUSH captures enum value "METRICS_MODE_PUSH" - AddPostgreSQLBodyMetricsModeMETRICSMODEPUSH string = "METRICS_MODE_PUSH" -) - -// prop value enum -func (o *AddPostgreSQLBody) validateMetricsModeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlBodyTypeMetricsModePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLBody) validateMetricsMode(formats strfmt.Registry) error { - if swag.IsZero(o.MetricsMode) { // not required - return nil - } - - // value enum - if err := o.validateMetricsModeEnum("body"+"."+"metrics_mode", "body", *o.MetricsMode); err != nil { - return err - } - - return nil -} - -var addPostgreSqlBodyTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlBodyTypeLogLevelPropEnum = append(addPostgreSqlBodyTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddPostgreSQLBodyLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddPostgreSQLBodyLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddPostgreSQLBodyLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddPostgreSQLBodyLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddPostgreSQLBodyLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddPostgreSQLBodyLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddPostgreSQLBodyLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddPostgreSQLBodyLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddPostgreSQLBodyLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddPostgreSQLBodyLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddPostgreSQLBodyLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddPostgreSQLBodyLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddPostgreSQLBody) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlBodyTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLBody) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("body"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -func (o *AddPostgreSQLBody) validateAddNode(formats strfmt.Registry) error { - if swag.IsZero(o.AddNode) { // not required - return nil - } - - if o.AddNode != nil { - if err := o.AddNode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "add_node") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "add_node") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add postgre SQL body based on the context it is used -func (o *AddPostgreSQLBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateAddNode(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddPostgreSQLBody) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { - if o.AddNode != nil { - if err := o.AddNode.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "add_node") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "add_node") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLBody) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddPostgreSQLDefaultBody add postgre SQL default body -swagger:model AddPostgreSQLDefaultBody -*/ -type AddPostgreSQLDefaultBody struct { - // code - Code int32 `json:"code,omitempty"` - - // message - Message string `json:"message,omitempty"` - - // details - Details []*AddPostgreSQLDefaultBodyDetailsItems0 `json:"details"` -} - -// Validate validates this add postgre SQL default body -func (o *AddPostgreSQLDefaultBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateDetails(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddPostgreSQLDefaultBody) validateDetails(formats strfmt.Registry) error { - if swag.IsZero(o.Details) { // not required - return nil - } - - for i := 0; i < len(o.Details); i++ { - if swag.IsZero(o.Details[i]) { // not required - continue - } - - if o.Details[i] != nil { - if err := o.Details[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AddPostgreSQL default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AddPostgreSQL default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// ContextValidate validate this add postgre SQL default body based on the context it is used -func (o *AddPostgreSQLDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateDetails(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddPostgreSQLDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { - for i := 0; i < len(o.Details); i++ { - if o.Details[i] != nil { - if err := o.Details[i].ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("AddPostgreSQL default" + "." + "details" + "." + strconv.Itoa(i)) - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("AddPostgreSQL default" + "." + "details" + "." + strconv.Itoa(i)) - } - return err - } - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLDefaultBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLDefaultBody) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLDefaultBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddPostgreSQLDefaultBodyDetailsItems0 add postgre SQL default body details items0 -swagger:model AddPostgreSQLDefaultBodyDetailsItems0 -*/ -type AddPostgreSQLDefaultBodyDetailsItems0 struct { - // at type - AtType string `json:"@type,omitempty"` -} - -// Validate validates this add postgre SQL default body details items0 -func (o *AddPostgreSQLDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add postgre SQL default body details items0 based on context it is used -func (o *AddPostgreSQLDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLDefaultBodyDetailsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddPostgreSQLOKBody add postgre SQL OK body -swagger:model AddPostgreSQLOKBody -*/ -type AddPostgreSQLOKBody struct { - // Warning message. - Warning string `json:"warning,omitempty"` - - // postgres exporter - PostgresExporter *AddPostgreSQLOKBodyPostgresExporter `json:"postgres_exporter,omitempty"` - - // qan postgresql pgstatements agent - QANPostgresqlPgstatementsAgent *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent `json:"qan_postgresql_pgstatements_agent,omitempty"` - - // qan postgresql pgstatmonitor agent - QANPostgresqlPgstatmonitorAgent *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent `json:"qan_postgresql_pgstatmonitor_agent,omitempty"` - - // service - Service *AddPostgreSQLOKBodyService `json:"service,omitempty"` -} - -// Validate validates this add postgre SQL OK body -func (o *AddPostgreSQLOKBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validatePostgresExporter(formats); err != nil { - res = append(res, err) - } - - if err := o.validateQANPostgresqlPgstatementsAgent(formats); err != nil { - res = append(res, err) - } - - if err := o.validateQANPostgresqlPgstatmonitorAgent(formats); err != nil { - res = append(res, err) - } - - if err := o.validateService(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddPostgreSQLOKBody) validatePostgresExporter(formats strfmt.Registry) error { - if swag.IsZero(o.PostgresExporter) { // not required - return nil - } - - if o.PostgresExporter != nil { - if err := o.PostgresExporter.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addPostgreSqlOk" + "." + "postgres_exporter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addPostgreSqlOk" + "." + "postgres_exporter") - } - return err - } - } - - return nil -} - -func (o *AddPostgreSQLOKBody) validateQANPostgresqlPgstatementsAgent(formats strfmt.Registry) error { - if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required - return nil - } - - if o.QANPostgresqlPgstatementsAgent != nil { - if err := o.QANPostgresqlPgstatementsAgent.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addPostgreSqlOk" + "." + "qan_postgresql_pgstatements_agent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addPostgreSqlOk" + "." + "qan_postgresql_pgstatements_agent") - } - return err - } - } - - return nil -} - -func (o *AddPostgreSQLOKBody) validateQANPostgresqlPgstatmonitorAgent(formats strfmt.Registry) error { - if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required - return nil - } - - if o.QANPostgresqlPgstatmonitorAgent != nil { - if err := o.QANPostgresqlPgstatmonitorAgent.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addPostgreSqlOk" + "." + "qan_postgresql_pgstatmonitor_agent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addPostgreSqlOk" + "." + "qan_postgresql_pgstatmonitor_agent") - } - return err - } - } - - return nil -} - -func (o *AddPostgreSQLOKBody) validateService(formats strfmt.Registry) error { - if swag.IsZero(o.Service) { // not required - return nil - } - - if o.Service != nil { - if err := o.Service.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addPostgreSqlOk" + "." + "service") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addPostgreSqlOk" + "." + "service") - } - return err - } - } - - return nil -} - -// ContextValidate validate this add postgre SQL OK body based on the context it is used -func (o *AddPostgreSQLOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidatePostgresExporter(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateQANPostgresqlPgstatementsAgent(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateQANPostgresqlPgstatmonitorAgent(ctx, formats); err != nil { - res = append(res, err) - } - - if err := o.contextValidateService(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *AddPostgreSQLOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { - if o.PostgresExporter != nil { - if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addPostgreSqlOk" + "." + "postgres_exporter") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addPostgreSqlOk" + "." + "postgres_exporter") - } - return err - } - } - - return nil -} - -func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatementsAgent != nil { - if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addPostgreSqlOk" + "." + "qan_postgresql_pgstatements_agent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addPostgreSqlOk" + "." + "qan_postgresql_pgstatements_agent") - } - return err - } - } - - return nil -} - -func (o *AddPostgreSQLOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { - if o.QANPostgresqlPgstatmonitorAgent != nil { - if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addPostgreSqlOk" + "." + "qan_postgresql_pgstatmonitor_agent") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addPostgreSqlOk" + "." + "qan_postgresql_pgstatmonitor_agent") - } - return err - } - } - - return nil -} - -func (o *AddPostgreSQLOKBody) contextValidateService(ctx context.Context, formats strfmt.Registry) error { - if o.Service != nil { - if err := o.Service.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("addPostgreSqlOk" + "." + "service") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("addPostgreSqlOk" + "." + "service") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLOKBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLOKBody) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLOKBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddPostgreSQLOKBodyPostgresExporter PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics. -swagger:model AddPostgreSQLOKBodyPostgresExporter -*/ -type AddPostgreSQLOKBodyPostgresExporter struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // The pmm-agent identifier which runs this instance. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Desired Agent status: enabled (false) or disabled (true). - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // PostgreSQL username for scraping metrics. - Username string `json:"username,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // True if exporter uses push metrics mode. - PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` - - // List of disabled collector names. - DisabledCollectors []string `json:"disabled_collectors"` - - // AgentStatus represents actual Agent status. - // - // - AGENT_STATUS_STARTING: Agent is starting. - // - AGENT_STATUS_RUNNING: Agent is running. - // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. - // - AGENT_STATUS_STOPPING: Agent is stopping. - // - AGENT_STATUS_DONE: Agent finished. - // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. - // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] - Status *string `json:"status,omitempty"` - - // Listen port for scraping metrics. - ListenPort int64 `json:"listen_port,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` - - // Limit of databases for auto-discovery. - AutoDiscoveryLimit int32 `json:"auto_discovery_limit,omitempty"` - - // Optionally expose the exporter process on all public interfaces - ExposeExporter bool `json:"expose_exporter,omitempty"` - - // Maximum number of connections that exporter can open to the database instance. - MaxExporterConnections int32 `json:"max_exporter_connections,omitempty"` -} - -// Validate validates this add postgre SQL OK body postgres exporter -func (o *AddPostgreSQLOKBodyPostgresExporter) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addPostgreSqlOkBodyPostgresExporterTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlOkBodyPostgresExporterTypeStatusPropEnum = append(addPostgreSqlOkBodyPostgresExporterTypeStatusPropEnum, v) - } -} - -const ( - - // AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - - // AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - - // AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - - // AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - - // AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - - // AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - - // AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddPostgreSQLOKBodyPostgresExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" -) - -// prop value enum -func (o *AddPostgreSQLOKBodyPostgresExporter) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlOkBodyPostgresExporterTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLOKBodyPostgresExporter) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("addPostgreSqlOk"+"."+"postgres_exporter"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -var addPostgreSqlOkBodyPostgresExporterTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlOkBodyPostgresExporterTypeLogLevelPropEnum = append(addPostgreSqlOkBodyPostgresExporterTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddPostgreSQLOKBodyPostgresExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddPostgreSQLOKBodyPostgresExporter) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlOkBodyPostgresExporterTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLOKBodyPostgresExporter) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("addPostgreSqlOk"+"."+"postgres_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add postgre SQL OK body postgres exporter based on context it is used -func (o *AddPostgreSQLOKBodyPostgresExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLOKBodyPostgresExporter) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLOKBodyPostgresExporter) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLOKBodyPostgresExporter - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server. -swagger:model AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent -*/ -type AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // The pmm-agent identifier which runs this instance. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Desired Agent status: enabled (false) or disabled (true). - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // PostgreSQL username for getting pg stat statements data. - Username string `json:"username,omitempty"` - - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit). - MaxQueryLength int32 `json:"max_query_length,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // AgentStatus represents actual Agent status. - // - // - AGENT_STATUS_STARTING: Agent is starting. - // - AGENT_STATUS_RUNNING: Agent is running. - // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. - // - AGENT_STATUS_STOPPING: Agent is stopping. - // - AGENT_STATUS_DONE: Agent finished. - // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. - // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] - Status *string `json:"status,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` -} - -// Validate validates this add postgre SQL OK body QAN postgresql pgstatements agent -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addPostgreSqlOkBodyQanPostgresqlPgstatementsAgentTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlOkBodyQanPostgresqlPgstatementsAgentTypeStatusPropEnum = append(addPostgreSqlOkBodyQanPostgresqlPgstatementsAgentTypeStatusPropEnum, v) - } -} - -const ( - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" -) - -// prop value enum -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlOkBodyQanPostgresqlPgstatementsAgentTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("addPostgreSqlOk"+"."+"qan_postgresql_pgstatements_agent"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -var addPostgreSqlOkBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlOkBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum = append(addPostgreSqlOkBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlOkBodyQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("addPostgreSqlOk"+"."+"qan_postgresql_pgstatements_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add postgre SQL OK body QAN postgresql pgstatements agent based on context it is used -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLOKBodyQANPostgresqlPgstatementsAgent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server. -swagger:model AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent -*/ -type AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent struct { - // Unique randomly generated instance identifier. - AgentID string `json:"agent_id,omitempty"` - - // The pmm-agent identifier which runs this instance. - PMMAgentID string `json:"pmm_agent_id,omitempty"` - - // Desired Agent status: enabled (false) or disabled (true). - Disabled bool `json:"disabled,omitempty"` - - // Service identifier. - ServiceID string `json:"service_id,omitempty"` - - // PostgreSQL username for getting pg stat monitor data. - Username string `json:"username,omitempty"` - - // Use TLS for database connections. - TLS bool `json:"tls,omitempty"` - - // Skip TLS certificate and hostname validation. - TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` - - // Disable parsing comments from queries and showing them in QAN. - DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` - - // Limit query length in QAN (default: server-defined; -1: no limit). - MaxQueryLength int32 `json:"max_query_length,omitempty"` - - // True if query examples are disabled. - QueryExamplesDisabled bool `json:"query_examples_disabled,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // AgentStatus represents actual Agent status. - // - // - AGENT_STATUS_STARTING: Agent is starting. - // - AGENT_STATUS_RUNNING: Agent is running. - // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. - // - AGENT_STATUS_STOPPING: Agent is stopping. - // - AGENT_STATUS_DONE: Agent finished. - // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. - // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] - Status *string `json:"status,omitempty"` - - // Path to exec process. - ProcessExecPath string `json:"process_exec_path,omitempty"` - - // Log level for exporters - // - // - LOG_LEVEL_UNSPECIFIED: Auto - // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] - LogLevel *string `json:"log_level,omitempty"` -} - -// Validate validates this add postgre SQL OK body QAN postgresql pgstatmonitor agent -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateStatus(formats); err != nil { - res = append(res, err) - } - - if err := o.validateLogLevel(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addPostgreSqlOkBodyQanPostgresqlPgstatmonitorAgentTypeStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlOkBodyQanPostgresqlPgstatmonitorAgentTypeStatusPropEnum = append(addPostgreSqlOkBodyQanPostgresqlPgstatmonitorAgentTypeStatusPropEnum, v) - } -} - -const ( - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" -) - -// prop value enum -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent) validateStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlOkBodyQanPostgresqlPgstatmonitorAgentTypeStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent) validateStatus(formats strfmt.Registry) error { - if swag.IsZero(o.Status) { // not required - return nil - } - - // value enum - if err := o.validateStatusEnum("addPostgreSqlOk"+"."+"qan_postgresql_pgstatmonitor_agent"+"."+"status", "body", *o.Status); err != nil { - return err - } - - return nil -} - -var addPostgreSqlOkBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlOkBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum = append(addPostgreSqlOkBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum, v) - } -} - -const ( - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" - - // AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" - AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" -) - -// prop value enum -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent) validateLogLevelEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlOkBodyQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent) validateLogLevel(formats strfmt.Registry) error { - if swag.IsZero(o.LogLevel) { // not required - return nil - } - - // value enum - if err := o.validateLogLevelEnum("addPostgreSqlOk"+"."+"qan_postgresql_pgstatmonitor_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add postgre SQL OK body QAN postgresql pgstatmonitor agent based on context it is used -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLOKBodyQANPostgresqlPgstatmonitorAgent - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddPostgreSQLOKBodyService PostgreSQLService represents a generic PostgreSQL instance. -swagger:model AddPostgreSQLOKBodyService -*/ -type AddPostgreSQLOKBodyService struct { - // Unique randomly generated instance identifier. - ServiceID string `json:"service_id,omitempty"` - - // Unique across all Services user-defined name. - ServiceName string `json:"service_name,omitempty"` - - // Database name. - DatabaseName string `json:"database_name,omitempty"` - - // Node identifier where this instance runs. - NodeID string `json:"node_id,omitempty"` - - // Access address (DNS name or IP). - // Address (and port) or socket is required. - Address string `json:"address,omitempty"` - - // Access port. - // Port is required when the address present. - Port int64 `json:"port,omitempty"` - - // Access unix socket. - // Address (and port) or socket is required. - Socket string `json:"socket,omitempty"` - - // Environment name. - Environment string `json:"environment,omitempty"` - - // Cluster name. - Cluster string `json:"cluster,omitempty"` - - // Replication set name. - ReplicationSet string `json:"replication_set,omitempty"` - - // Custom user-assigned labels. - CustomLabels map[string]string `json:"custom_labels,omitempty"` - - // PostgreSQL version. - Version string `json:"version,omitempty"` - - // Limit of databases for auto-discovery. - AutoDiscoveryLimit int32 `json:"auto_discovery_limit,omitempty"` -} - -// Validate validates this add postgre SQL OK body service -func (o *AddPostgreSQLOKBodyService) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this add postgre SQL OK body service based on context it is used -func (o *AddPostgreSQLOKBodyService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLOKBodyService) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLOKBodyService) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLOKBodyService - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - -/* -AddPostgreSQLParamsBodyAddNode AddNodeParams holds node params and is used to add new node to inventory while adding new service. -swagger:model AddPostgreSQLParamsBodyAddNode -*/ -type AddPostgreSQLParamsBodyAddNode 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"` - - // Unique across all Nodes user-defined name. - NodeName string `json:"node_name,omitempty"` - - // Linux machine-id. - MachineID string `json:"machine_id,omitempty"` - - // Linux distribution name and version. - Distro string `json:"distro,omitempty"` - - // Container identifier. If specified, must be a unique Docker container identifier. - ContainerID string `json:"container_id,omitempty"` - - // Container name. - ContainerName string `json:"container_name,omitempty"` - - // Node model. - NodeModel string `json:"node_model,omitempty"` - - // Node region. - Region string `json:"region,omitempty"` - - // Node availability zone. - Az string `json:"az,omitempty"` - - // Custom user-assigned labels for Node. - CustomLabels map[string]string `json:"custom_labels,omitempty"` -} - -// Validate validates this add postgre SQL params body add node -func (o *AddPostgreSQLParamsBodyAddNode) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateNodeType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var addPostgreSqlParamsBodyAddNodeTypeNodeTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - addPostgreSqlParamsBodyAddNodeTypeNodeTypePropEnum = append(addPostgreSqlParamsBodyAddNodeTypeNodeTypePropEnum, v) - } -} - -const ( - - // AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" - AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" - - // AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" - AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" - - // AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" - AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" - - // AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" - AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" - - // AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" - AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" - - // AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" - AddPostgreSQLParamsBodyAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" -) - -// prop value enum -func (o *AddPostgreSQLParamsBodyAddNode) validateNodeTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, addPostgreSqlParamsBodyAddNodeTypeNodeTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *AddPostgreSQLParamsBodyAddNode) validateNodeType(formats strfmt.Registry) error { - if swag.IsZero(o.NodeType) { // not required - return nil - } - - // value enum - if err := o.validateNodeTypeEnum("body"+"."+"add_node"+"."+"node_type", "body", *o.NodeType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this add postgre SQL params body add node based on context it is used -func (o *AddPostgreSQLParamsBodyAddNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *AddPostgreSQLParamsBodyAddNode) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *AddPostgreSQLParamsBodyAddNode) UnmarshalBinary(b []byte) error { - var res AddPostgreSQLParamsBodyAddNode - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} 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 new file mode 100644 index 00000000000..64e2dd78b6b --- /dev/null +++ b/api/management/v1/json/client/management_service/add_service_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package management_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewAddServiceParams creates a new AddServiceParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAddServiceParams() *AddServiceParams { + return &AddServiceParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAddServiceParamsWithTimeout creates a new AddServiceParams object +// with the ability to set a timeout on a request. +func NewAddServiceParamsWithTimeout(timeout time.Duration) *AddServiceParams { + return &AddServiceParams{ + timeout: timeout, + } +} + +// NewAddServiceParamsWithContext creates a new AddServiceParams object +// with the ability to set a context for a request. +func NewAddServiceParamsWithContext(ctx context.Context) *AddServiceParams { + return &AddServiceParams{ + Context: ctx, + } +} + +// NewAddServiceParamsWithHTTPClient creates a new AddServiceParams object +// with the ability to set a custom HTTPClient for a request. +func NewAddServiceParamsWithHTTPClient(client *http.Client) *AddServiceParams { + return &AddServiceParams{ + HTTPClient: client, + } +} + +/* +AddServiceParams contains all the parameters to send to the API endpoint + + for the add service operation. + + Typically these are written to a http.Request. +*/ +type AddServiceParams struct { + // Body. + Body AddServiceBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the add service params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddServiceParams) WithDefaults() *AddServiceParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the add service params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddServiceParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the add service params +func (o *AddServiceParams) WithTimeout(timeout time.Duration) *AddServiceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the add service params +func (o *AddServiceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the add service params +func (o *AddServiceParams) WithContext(ctx context.Context) *AddServiceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the add service params +func (o *AddServiceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the add service params +func (o *AddServiceParams) WithHTTPClient(client *http.Client) *AddServiceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the add service params +func (o *AddServiceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the add service params +func (o *AddServiceParams) WithBody(body AddServiceBody) *AddServiceParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the add service params +func (o *AddServiceParams) SetBody(body AddServiceBody) { + o.Body = body +} + +// 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 + } + var res []error + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/management/v1/json/client/management_service/add_service_responses.go b/api/management/v1/json/client/management_service/add_service_responses.go new file mode 100644 index 00000000000..f91d51a430e --- /dev/null +++ b/api/management/v1/json/client/management_service/add_service_responses.go @@ -0,0 +1,5186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package management_service + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// AddServiceReader is a Reader for the AddService structure. +type AddServiceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AddServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewAddServiceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewAddServiceDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewAddServiceOK creates a AddServiceOK with default headers values +func NewAddServiceOK() *AddServiceOK { + return &AddServiceOK{} +} + +/* +AddServiceOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type AddServiceOK struct { + Payload *AddServiceOKBody +} + +func (o *AddServiceOK) Error() string { + return fmt.Sprintf("[POST /v1/management/services][%d] addServiceOk %+v", 200, o.Payload) +} + +func (o *AddServiceOK) GetPayload() *AddServiceOKBody { + return o.Payload +} + +func (o *AddServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewAddServiceDefault creates a AddServiceDefault with default headers values +func NewAddServiceDefault(code int) *AddServiceDefault { + return &AddServiceDefault{ + _statusCode: code, + } +} + +/* +AddServiceDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type AddServiceDefault struct { + _statusCode int + + Payload *AddServiceDefaultBody +} + +// Code gets the status code for the add service default response +func (o *AddServiceDefault) Code() int { + return o._statusCode +} + +func (o *AddServiceDefault) Error() string { + return fmt.Sprintf("[POST /v1/management/services][%d] AddService default %+v", o._statusCode, o.Payload) +} + +func (o *AddServiceDefault) GetPayload() *AddServiceDefaultBody { + return o.Payload +} + +func (o *AddServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +AddServiceBody add service body +swagger:model AddServiceBody +*/ +type AddServiceBody struct { + // external + External *AddServiceParamsBodyExternal `json:"external,omitempty"` + + // mongodb + Mongodb *AddServiceParamsBodyMongodb `json:"mongodb,omitempty"` + + // mysql + Mysql *AddServiceParamsBodyMysql `json:"mysql,omitempty"` + + // postgresql + Postgresql *AddServiceParamsBodyPostgresql `json:"postgresql,omitempty"` +} + +// Validate validates this add service body +func (o *AddServiceBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateExternal(formats); err != nil { + res = append(res, err) + } + + if err := o.validateMongodb(formats); err != nil { + res = append(res, err) + } + + if err := o.validateMysql(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePostgresql(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceBody) validateExternal(formats strfmt.Registry) error { + if swag.IsZero(o.External) { // not required + return nil + } + + if o.External != nil { + if err := o.External.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "external") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "external") + } + return err + } + } + + return nil +} + +func (o *AddServiceBody) validateMongodb(formats strfmt.Registry) error { + if swag.IsZero(o.Mongodb) { // not required + return nil + } + + if o.Mongodb != nil { + if err := o.Mongodb.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "mongodb") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "mongodb") + } + return err + } + } + + return nil +} + +func (o *AddServiceBody) validateMysql(formats strfmt.Registry) error { + if swag.IsZero(o.Mysql) { // not required + return nil + } + + if o.Mysql != nil { + if err := o.Mysql.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "mysql") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "mysql") + } + return err + } + } + + return nil +} + +func (o *AddServiceBody) validatePostgresql(formats strfmt.Registry) error { + if swag.IsZero(o.Postgresql) { // not required + return nil + } + + if o.Postgresql != nil { + if err := o.Postgresql.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "postgresql") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "postgresql") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service body based on the context it is used +func (o *AddServiceBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateExternal(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateMongodb(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateMysql(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidatePostgresql(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { + if err := o.External.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "external") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "external") + } + return err + } + } + + return nil +} + +func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { + if err := o.Mongodb.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "mongodb") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "mongodb") + } + return err + } + } + + return nil +} + +func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { + if err := o.Mysql.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "mysql") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "mysql") + } + return err + } + } + + return nil +} + +func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { + if err := o.Postgresql.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "postgresql") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "postgresql") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceBody) UnmarshalBinary(b []byte) error { + var res AddServiceBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceDefaultBody add service default body +swagger:model AddServiceDefaultBody +*/ +type AddServiceDefaultBody struct { + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*AddServiceDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this add service default body +func (o *AddServiceDefaultBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceDefaultBody) validateDetails(formats strfmt.Registry) error { + if swag.IsZero(o.Details) { // not required + return nil + } + + for i := 0; i < len(o.Details); i++ { + if swag.IsZero(o.Details[i]) { // not required + continue + } + + if o.Details[i] != nil { + if err := o.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("AddService default" + "." + "details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("AddService default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this add service default body based on the context it is used +func (o *AddServiceDefaultBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateDetails(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +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 err := o.Details[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("AddService default" + "." + "details" + "." + strconv.Itoa(i)) + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("AddService default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceDefaultBody) UnmarshalBinary(b []byte) error { + var res AddServiceDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceDefaultBodyDetailsItems0 add service default body details items0 +swagger:model AddServiceDefaultBodyDetailsItems0 +*/ +type AddServiceDefaultBodyDetailsItems0 struct { + // at type + AtType string `json:"@type,omitempty"` +} + +// Validate validates this add service default body details items0 +func (o *AddServiceDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add service default body details items0 based on context it is used +func (o *AddServiceDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res AddServiceDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBody add service OK body +swagger:model AddServiceOKBody +*/ +type AddServiceOKBody struct { + // external + External *AddServiceOKBodyExternal `json:"external,omitempty"` + + // mongodb + Mongodb *AddServiceOKBodyMongodb `json:"mongodb,omitempty"` + + // mysql + Mysql *AddServiceOKBodyMysql `json:"mysql,omitempty"` + + // postgresql + Postgresql *AddServiceOKBodyPostgresql `json:"postgresql,omitempty"` +} + +// Validate validates this add service OK body +func (o *AddServiceOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateExternal(formats); err != nil { + res = append(res, err) + } + + if err := o.validateMongodb(formats); err != nil { + res = append(res, err) + } + + if err := o.validateMysql(formats); err != nil { + res = append(res, err) + } + + if err := o.validatePostgresql(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBody) validateExternal(formats strfmt.Registry) error { + if swag.IsZero(o.External) { // not required + return nil + } + + if o.External != nil { + if err := o.External.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "external") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "external") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBody) validateMongodb(formats strfmt.Registry) error { + if swag.IsZero(o.Mongodb) { // not required + return nil + } + + if o.Mongodb != nil { + if err := o.Mongodb.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBody) validateMysql(formats strfmt.Registry) error { + if swag.IsZero(o.Mysql) { // not required + return nil + } + + if o.Mysql != nil { + if err := o.Mysql.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBody) validatePostgresql(formats strfmt.Registry) error { + if swag.IsZero(o.Postgresql) { // not required + return nil + } + + if o.Postgresql != nil { + if err := o.Postgresql.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service OK body based on the context it is used +func (o *AddServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateExternal(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateMongodb(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateMysql(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidatePostgresql(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { + if err := o.External.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "external") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "external") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { + if err := o.Mongodb.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { + if err := o.Mysql.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { + if err := o.Postgresql.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBody) UnmarshalBinary(b []byte) error { + var res AddServiceOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyExternal add service OK body external +swagger:model AddServiceOKBodyExternal +*/ +type AddServiceOKBodyExternal struct { + // external exporter + ExternalExporter *AddServiceOKBodyExternalExternalExporter `json:"external_exporter,omitempty"` + + // service + Service *AddServiceOKBodyExternalService `json:"service,omitempty"` +} + +// Validate validates this add service OK body external +func (o *AddServiceOKBodyExternal) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateExternalExporter(formats); err != nil { + res = append(res, err) + } + + if err := o.validateService(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBodyExternal) validateExternalExporter(formats strfmt.Registry) error { + if swag.IsZero(o.ExternalExporter) { // not required + return nil + } + + if o.ExternalExporter != nil { + if err := o.ExternalExporter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "external" + "." + "external_exporter") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "external" + "." + "external_exporter") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyExternal) validateService(formats strfmt.Registry) error { + if swag.IsZero(o.Service) { // not required + return nil + } + + if o.Service != nil { + if err := o.Service.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "external" + "." + "service") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "external" + "." + "service") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service OK body external based on the context it is used +func (o *AddServiceOKBodyExternal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateExternalExporter(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateService(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBodyExternal) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { + if err := o.ExternalExporter.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "external" + "." + "external_exporter") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "external" + "." + "external_exporter") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyExternal) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { + if err := o.Service.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "external" + "." + "service") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "external" + "." + "service") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyExternal) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyExternal) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyExternal + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyExternalExternalExporter ExternalExporter runs on any Node type, including Remote Node. +swagger:model AddServiceOKBodyExternalExternalExporter +*/ +type AddServiceOKBodyExternalExternalExporter struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // Node identifier where this instance runs. + RunsOnNodeID string `json:"runs_on_node_id,omitempty"` + + // If disabled, metrics from this exporter will not be collected. + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // HTTP basic auth username for collecting metrics. + Username string `json:"username,omitempty"` + + // Scheme to generate URI to exporter metrics endpoints. + Scheme string `json:"scheme,omitempty"` + + // Path under which metrics are exposed, used to generate URI. + MetricsPath string `json:"metrics_path,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Listen port for scraping metrics. + ListenPort int64 `json:"listen_port,omitempty"` + + // True if exporter uses push metrics mode. + PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` +} + +// Validate validates this add service OK body external external exporter +func (o *AddServiceOKBodyExternalExternalExporter) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add service OK body external external exporter based on context it is used +func (o *AddServiceOKBodyExternalExternalExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyExternalExternalExporter) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyExternalExternalExporter) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyExternalExternalExporter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyExternalService ExternalService represents a generic External service instance. +swagger:model AddServiceOKBodyExternalService +*/ +type AddServiceOKBodyExternalService struct { + // Unique randomly generated instance identifier. + ServiceID string `json:"service_id,omitempty"` + + // Unique across all Services user-defined name. + ServiceName string `json:"service_name,omitempty"` + + // Node identifier where this service instance runs. + NodeID string `json:"node_id,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Group name of external service. + Group string `json:"group,omitempty"` +} + +// Validate validates this add service OK body external service +func (o *AddServiceOKBodyExternalService) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add service OK body external service based on context it is used +func (o *AddServiceOKBodyExternalService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyExternalService) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyExternalService) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyExternalService + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyMongodb add service OK body mongodb +swagger:model AddServiceOKBodyMongodb +*/ +type AddServiceOKBodyMongodb struct { + // mongodb exporter + MongodbExporter *AddServiceOKBodyMongodbMongodbExporter `json:"mongodb_exporter,omitempty"` + + // qan mongodb profiler + QANMongodbProfiler *AddServiceOKBodyMongodbQANMongodbProfiler `json:"qan_mongodb_profiler,omitempty"` + + // service + Service *AddServiceOKBodyMongodbService `json:"service,omitempty"` +} + +// Validate validates this add service OK body mongodb +func (o *AddServiceOKBodyMongodb) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateMongodbExporter(formats); err != nil { + res = append(res, err) + } + + if err := o.validateQANMongodbProfiler(formats); err != nil { + res = append(res, err) + } + + if err := o.validateService(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBodyMongodb) validateMongodbExporter(formats strfmt.Registry) error { + if swag.IsZero(o.MongodbExporter) { // not required + return nil + } + + if o.MongodbExporter != nil { + if err := o.MongodbExporter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb" + "." + "mongodb_exporter") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb" + "." + "mongodb_exporter") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMongodb) validateQANMongodbProfiler(formats strfmt.Registry) error { + if swag.IsZero(o.QANMongodbProfiler) { // not required + return nil + } + + if o.QANMongodbProfiler != nil { + if err := o.QANMongodbProfiler.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb" + "." + "qan_mongodb_profiler") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb" + "." + "qan_mongodb_profiler") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMongodb) validateService(formats strfmt.Registry) error { + if swag.IsZero(o.Service) { // not required + return nil + } + + if o.Service != nil { + if err := o.Service.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb" + "." + "service") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb" + "." + "service") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service OK body mongodb based on the context it is used +func (o *AddServiceOKBodyMongodb) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateMongodbExporter(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateQANMongodbProfiler(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateService(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBodyMongodb) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { + if err := o.MongodbExporter.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb" + "." + "mongodb_exporter") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb" + "." + "mongodb_exporter") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbProfiler(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfiler != nil { + if err := o.QANMongodbProfiler.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb" + "." + "qan_mongodb_profiler") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb" + "." + "qan_mongodb_profiler") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMongodb) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { + if err := o.Service.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mongodb" + "." + "service") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mongodb" + "." + "service") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMongodb) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMongodb) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMongodb + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyMongodbMongodbExporter MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics. +swagger:model AddServiceOKBodyMongodbMongodbExporter +*/ +type AddServiceOKBodyMongodbMongodbExporter struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // MongoDB username for scraping metrics. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // True if exporter uses push metrics mode. + PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` + + // List of disabled collector names. + DisabledCollectors []string `json:"disabled_collectors"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent finished. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] + Status *string `json:"status,omitempty"` + + // Listen port for scraping metrics. + ListenPort int64 `json:"listen_port,omitempty"` + + // List of colletions to get stats from. Can use * + StatsCollections []string `json:"stats_collections"` + + // Collections limit. Only get Databases and collection stats if the total number of collections in the server + // is less than this value. 0: no limit + CollectionsLimit int32 `json:"collections_limit,omitempty"` + + // Enable All collectors. + EnableAllCollectors bool `json:"enable_all_collectors,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` + + // Optionally expose the exporter process on all public interfaces + ExposeExporter bool `json:"expose_exporter,omitempty"` +} + +// Validate validates this add service OK body mongodb mongodb exporter +func (o *AddServiceOKBodyMongodbMongodbExporter) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyMongodbMongodbExporterTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMongodbMongodbExporterTypeStatusPropEnum = append(addServiceOkBodyMongodbMongodbExporterTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyMongodbMongodbExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyMongodbMongodbExporter) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMongodbMongodbExporterTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMongodbMongodbExporter) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"mongodb"+"."+"mongodb_exporter"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyMongodbMongodbExporterTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMongodbMongodbExporterTypeLogLevelPropEnum = append(addServiceOkBodyMongodbMongodbExporterTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyMongodbMongodbExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyMongodbMongodbExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMongodbMongodbExporterTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMongodbMongodbExporter) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"mongodb"+"."+"mongodb_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body mongodb mongodb exporter based on context it is used +func (o *AddServiceOKBodyMongodbMongodbExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMongodbMongodbExporter) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMongodbMongodbExporter) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMongodbMongodbExporter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyMongodbQANMongodbProfiler QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server. +swagger:model AddServiceOKBodyMongodbQANMongodbProfiler +*/ +type AddServiceOKBodyMongodbQANMongodbProfiler struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // MongoDB username for getting profiler data. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent finished. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] + Status *string `json:"status,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` +} + +// Validate validates this add service OK body mongodb QAN mongodb profiler +func (o *AddServiceOKBodyMongodbQANMongodbProfiler) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyMongodbQanMongodbProfilerTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMongodbQanMongodbProfilerTypeStatusPropEnum = append(addServiceOkBodyMongodbQanMongodbProfilerTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyMongodbQANMongodbProfilerStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyMongodbQANMongodbProfiler) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMongodbQanMongodbProfilerTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMongodbQANMongodbProfiler) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"mongodb"+"."+"qan_mongodb_profiler"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyMongodbQanMongodbProfilerTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMongodbQanMongodbProfilerTypeLogLevelPropEnum = append(addServiceOkBodyMongodbQanMongodbProfilerTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyMongodbQANMongodbProfilerLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyMongodbQANMongodbProfiler) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMongodbQanMongodbProfilerTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMongodbQANMongodbProfiler) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"mongodb"+"."+"qan_mongodb_profiler"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body mongodb QAN mongodb profiler based on context it is used +func (o *AddServiceOKBodyMongodbQANMongodbProfiler) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMongodbQANMongodbProfiler) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMongodbQANMongodbProfiler) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMongodbQANMongodbProfiler + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyMongodbService MongoDBService represents a generic MongoDB instance. +swagger:model AddServiceOKBodyMongodbService +*/ +type AddServiceOKBodyMongodbService struct { + // Unique randomly generated instance identifier. + ServiceID string `json:"service_id,omitempty"` + + // Unique across all Services user-defined name. + ServiceName string `json:"service_name,omitempty"` + + // Node identifier where this instance runs. + NodeID string `json:"node_id,omitempty"` + + // Access address (DNS name or IP). + // Address (and port) or socket is required. + Address string `json:"address,omitempty"` + + // Access port. + // Port is required when the address present. + Port int64 `json:"port,omitempty"` + + // Access unix socket. + // Address (and port) or socket is required. + Socket string `json:"socket,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // MongoDB version. + Version string `json:"version,omitempty"` +} + +// Validate validates this add service OK body mongodb service +func (o *AddServiceOKBodyMongodbService) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add service OK body mongodb service based on context it is used +func (o *AddServiceOKBodyMongodbService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMongodbService) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMongodbService) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMongodbService + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +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"` + + // mysqld exporter + MysqldExporter *AddServiceOKBodyMysqlMysqldExporter `json:"mysqld_exporter,omitempty"` + + // qan mysql perfschema + QANMysqlPerfschema *AddServiceOKBodyMysqlQANMysqlPerfschema `json:"qan_mysql_perfschema,omitempty"` + + // qan mysql slowlog + QANMysqlSlowlog *AddServiceOKBodyMysqlQANMysqlSlowlog `json:"qan_mysql_slowlog,omitempty"` + + // service + Service *AddServiceOKBodyMysqlService `json:"service,omitempty"` +} + +// Validate validates this add service OK body mysql +func (o *AddServiceOKBodyMysql) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateMysqldExporter(formats); err != nil { + res = append(res, err) + } + + if err := o.validateQANMysqlPerfschema(formats); err != nil { + res = append(res, err) + } + + if err := o.validateQANMysqlSlowlog(formats); err != nil { + res = append(res, err) + } + + if err := o.validateService(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBodyMysql) validateMysqldExporter(formats strfmt.Registry) error { + if swag.IsZero(o.MysqldExporter) { // not required + return nil + } + + if o.MysqldExporter != nil { + if err := o.MysqldExporter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql" + "." + "mysqld_exporter") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql" + "." + "mysqld_exporter") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMysql) validateQANMysqlPerfschema(formats strfmt.Registry) error { + if swag.IsZero(o.QANMysqlPerfschema) { // not required + return nil + } + + if o.QANMysqlPerfschema != nil { + if err := o.QANMysqlPerfschema.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql" + "." + "qan_mysql_perfschema") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql" + "." + "qan_mysql_perfschema") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMysql) validateQANMysqlSlowlog(formats strfmt.Registry) error { + if swag.IsZero(o.QANMysqlSlowlog) { // not required + return nil + } + + if o.QANMysqlSlowlog != nil { + if err := o.QANMysqlSlowlog.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql" + "." + "qan_mysql_slowlog") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql" + "." + "qan_mysql_slowlog") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMysql) validateService(formats strfmt.Registry) error { + if swag.IsZero(o.Service) { // not required + return nil + } + + if o.Service != nil { + if err := o.Service.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql" + "." + "service") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql" + "." + "service") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service OK body mysql based on the context it is used +func (o *AddServiceOKBodyMysql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateMysqldExporter(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateQANMysqlPerfschema(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateQANMysqlSlowlog(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateService(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBodyMysql) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { + if err := o.MysqldExporter.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql" + "." + "mysqld_exporter") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql" + "." + "mysqld_exporter") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMysql) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschema != nil { + if err := o.QANMysqlPerfschema.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql" + "." + "qan_mysql_perfschema") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql" + "." + "qan_mysql_perfschema") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMysql) contextValidateQANMysqlSlowlog(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlog != nil { + if err := o.QANMysqlSlowlog.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql" + "." + "qan_mysql_slowlog") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql" + "." + "qan_mysql_slowlog") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyMysql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { + if err := o.Service.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "mysql" + "." + "service") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "mysql" + "." + "service") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMysql) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMysql) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMysql + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyMysqlMysqldExporter MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics. +swagger:model AddServiceOKBodyMysqlMysqldExporter +*/ +type AddServiceOKBodyMysqlMysqldExporter struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // MySQL username for scraping metrics. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Certificate Authority certificate chain. + TLSCa string `json:"tls_ca,omitempty"` + + // Client certificate. + TLSCert string `json:"tls_cert,omitempty"` + + // Password for decrypting tls_cert. + TLSKey string `json:"tls_key,omitempty"` + + // Tablestats group collectors are disabled if there are more than that number of tables. + // 0 means tablestats group collectors are always enabled (no limit). + // Negative value means tablestats group collectors are always disabled. + TablestatsGroupTableLimit int32 `json:"tablestats_group_table_limit,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // True if exporter uses push metrics mode. + PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` + + // List of disabled collector names. + DisabledCollectors []string `json:"disabled_collectors"` + + // Actual table count at the moment of adding. + TableCount int32 `json:"table_count,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent finished. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] + Status *string `json:"status,omitempty"` + + // Listen port for scraping metrics. + ListenPort int64 `json:"listen_port,omitempty"` + + // True if tablestats group collectors are currently disabled. + TablestatsGroupDisabled bool `json:"tablestats_group_disabled,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` + + // Optionally expose the exporter process on all public interfaces + ExposeExporter bool `json:"expose_exporter,omitempty"` +} + +// Validate validates this add service OK body mysql mysqld exporter +func (o *AddServiceOKBodyMysqlMysqldExporter) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyMysqlMysqldExporterTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMysqlMysqldExporterTypeStatusPropEnum = append(addServiceOkBodyMysqlMysqldExporterTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyMysqlMysqldExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyMysqlMysqldExporter) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMysqlMysqldExporterTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMysqlMysqldExporter) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"mysql"+"."+"mysqld_exporter"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyMysqlMysqldExporterTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMysqlMysqldExporterTypeLogLevelPropEnum = append(addServiceOkBodyMysqlMysqldExporterTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyMysqlMysqldExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyMysqlMysqldExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMysqlMysqldExporterTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMysqlMysqldExporter) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"mysql"+"."+"mysqld_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body mysql mysqld exporter based on context it is used +func (o *AddServiceOKBodyMysqlMysqldExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMysqlMysqldExporter) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMysqlMysqldExporter) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMysqlMysqldExporter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyMysqlQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server. +swagger:model AddServiceOKBodyMysqlQANMysqlPerfschema +*/ +type AddServiceOKBodyMysqlQANMysqlPerfschema struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // MySQL username for getting performance data. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Certificate Authority certificate chain. + TLSCa string `json:"tls_ca,omitempty"` + + // Client certificate. + TLSCert string `json:"tls_cert,omitempty"` + + // Password for decrypting tls_cert. + TLSKey string `json:"tls_key,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // True if query examples are disabled. + QueryExamplesDisabled bool `json:"query_examples_disabled,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent finished. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] + Status *string `json:"status,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` +} + +// Validate validates this add service OK body mysql QAN mysql perfschema +func (o *AddServiceOKBodyMysqlQANMysqlPerfschema) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyMysqlQanMysqlPerfschemaTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMysqlQanMysqlPerfschemaTypeStatusPropEnum = append(addServiceOkBodyMysqlQanMysqlPerfschemaTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyMysqlQANMysqlPerfschemaStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyMysqlQANMysqlPerfschema) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMysqlQanMysqlPerfschemaTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMysqlQANMysqlPerfschema) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"mysql"+"."+"qan_mysql_perfschema"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyMysqlQanMysqlPerfschemaTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMysqlQanMysqlPerfschemaTypeLogLevelPropEnum = append(addServiceOkBodyMysqlQanMysqlPerfschemaTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyMysqlQANMysqlPerfschemaLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyMysqlQANMysqlPerfschema) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMysqlQanMysqlPerfschemaTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMysqlQANMysqlPerfschema) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"mysql"+"."+"qan_mysql_perfschema"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body mysql QAN mysql perfschema based on context it is used +func (o *AddServiceOKBodyMysqlQANMysqlPerfschema) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMysqlQANMysqlPerfschema) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMysqlQANMysqlPerfschema) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMysqlQANMysqlPerfschema + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyMysqlQANMysqlSlowlog QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server. +swagger:model AddServiceOKBodyMysqlQANMysqlSlowlog +*/ +type AddServiceOKBodyMysqlQANMysqlSlowlog struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // MySQL username for getting performance data. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Certificate Authority certificate chain. + TLSCa string `json:"tls_ca,omitempty"` + + // Client certificate. + TLSCert string `json:"tls_cert,omitempty"` + + // Password for decrypting tls_cert. + TLSKey string `json:"tls_key,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit) + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // True if query examples are disabled. + QueryExamplesDisabled bool `json:"query_examples_disabled,omitempty"` + + // Slowlog file is rotated at this size if > 0. + MaxSlowlogFileSize string `json:"max_slowlog_file_size,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent finished. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] + Status *string `json:"status,omitempty"` + + // mod tidy + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` +} + +// Validate validates this add service OK body mysql QAN mysql slowlog +func (o *AddServiceOKBodyMysqlQANMysqlSlowlog) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyMysqlQanMysqlSlowlogTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMysqlQanMysqlSlowlogTypeStatusPropEnum = append(addServiceOkBodyMysqlQanMysqlSlowlogTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyMysqlQANMysqlSlowlogStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyMysqlQANMysqlSlowlog) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMysqlQanMysqlSlowlogTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMysqlQANMysqlSlowlog) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"mysql"+"."+"qan_mysql_slowlog"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyMysqlQanMysqlSlowlogTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyMysqlQanMysqlSlowlogTypeLogLevelPropEnum = append(addServiceOkBodyMysqlQanMysqlSlowlogTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyMysqlQANMysqlSlowlogLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyMysqlQANMysqlSlowlog) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyMysqlQanMysqlSlowlogTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyMysqlQANMysqlSlowlog) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"mysql"+"."+"qan_mysql_slowlog"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body mysql QAN mysql slowlog based on context it is used +func (o *AddServiceOKBodyMysqlQANMysqlSlowlog) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMysqlQANMysqlSlowlog) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMysqlQANMysqlSlowlog) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMysqlQANMysqlSlowlog + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyMysqlService MySQLService represents a generic MySQL instance. +swagger:model AddServiceOKBodyMysqlService +*/ +type AddServiceOKBodyMysqlService struct { + // Unique randomly generated instance identifier. + ServiceID string `json:"service_id,omitempty"` + + // Unique across all Services user-defined name. + ServiceName string `json:"service_name,omitempty"` + + // Node identifier where this instance runs. + NodeID string `json:"node_id,omitempty"` + + // Access address (DNS name or IP). + // Address (and port) or socket is required. + Address string `json:"address,omitempty"` + + // Access port. + // Port is required when the address present. + Port int64 `json:"port,omitempty"` + + // Access unix socket. + // Address (and port) or socket is required. + Socket string `json:"socket,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // MySQL version. + Version string `json:"version,omitempty"` +} + +// Validate validates this add service OK body mysql service +func (o *AddServiceOKBodyMysqlService) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add service OK body mysql service based on context it is used +func (o *AddServiceOKBodyMysqlService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyMysqlService) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyMysqlService) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyMysqlService + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyPostgresql add service OK body postgresql +swagger:model AddServiceOKBodyPostgresql +*/ +type AddServiceOKBodyPostgresql struct { + // Warning message. + Warning string `json:"warning,omitempty"` + + // postgres exporter + PostgresExporter *AddServiceOKBodyPostgresqlPostgresExporter `json:"postgres_exporter,omitempty"` + + // qan postgresql pgstatements agent + QANPostgresqlPgstatementsAgent *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent `json:"qan_postgresql_pgstatements_agent,omitempty"` + + // qan postgresql pgstatmonitor agent + QANPostgresqlPgstatmonitorAgent *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent `json:"qan_postgresql_pgstatmonitor_agent,omitempty"` + + // service + Service *AddServiceOKBodyPostgresqlService `json:"service,omitempty"` +} + +// Validate validates this add service OK body postgresql +func (o *AddServiceOKBodyPostgresql) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validatePostgresExporter(formats); err != nil { + res = append(res, err) + } + + if err := o.validateQANPostgresqlPgstatementsAgent(formats); err != nil { + res = append(res, err) + } + + if err := o.validateQANPostgresqlPgstatmonitorAgent(formats); err != nil { + res = append(res, err) + } + + if err := o.validateService(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBodyPostgresql) validatePostgresExporter(formats strfmt.Registry) error { + if swag.IsZero(o.PostgresExporter) { // not required + return nil + } + + if o.PostgresExporter != nil { + if err := o.PostgresExporter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql" + "." + "postgres_exporter") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql" + "." + "postgres_exporter") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyPostgresql) validateQANPostgresqlPgstatementsAgent(formats strfmt.Registry) error { + if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required + return nil + } + + if o.QANPostgresqlPgstatementsAgent != nil { + if err := o.QANPostgresqlPgstatementsAgent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql" + "." + "qan_postgresql_pgstatements_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql" + "." + "qan_postgresql_pgstatements_agent") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyPostgresql) validateQANPostgresqlPgstatmonitorAgent(formats strfmt.Registry) error { + if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required + return nil + } + + if o.QANPostgresqlPgstatmonitorAgent != nil { + if err := o.QANPostgresqlPgstatmonitorAgent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql" + "." + "qan_postgresql_pgstatmonitor_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql" + "." + "qan_postgresql_pgstatmonitor_agent") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyPostgresql) validateService(formats strfmt.Registry) error { + if swag.IsZero(o.Service) { // not required + return nil + } + + if o.Service != nil { + if err := o.Service.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql" + "." + "service") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql" + "." + "service") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service OK body postgresql based on the context it is used +func (o *AddServiceOKBodyPostgresql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidatePostgresExporter(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateQANPostgresqlPgstatementsAgent(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateQANPostgresqlPgstatmonitorAgent(ctx, formats); err != nil { + res = append(res, err) + } + + if err := o.contextValidateService(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceOKBodyPostgresql) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { + if err := o.PostgresExporter.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql" + "." + "postgres_exporter") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql" + "." + "postgres_exporter") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { + if err := o.QANPostgresqlPgstatementsAgent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql" + "." + "qan_postgresql_pgstatements_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql" + "." + "qan_postgresql_pgstatements_agent") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { + if err := o.QANPostgresqlPgstatmonitorAgent.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql" + "." + "qan_postgresql_pgstatmonitor_agent") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql" + "." + "qan_postgresql_pgstatmonitor_agent") + } + return err + } + } + + return nil +} + +func (o *AddServiceOKBodyPostgresql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { + if err := o.Service.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addServiceOk" + "." + "postgresql" + "." + "service") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("addServiceOk" + "." + "postgresql" + "." + "service") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresql) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresql) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyPostgresql + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyPostgresqlPostgresExporter PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics. +swagger:model AddServiceOKBodyPostgresqlPostgresExporter +*/ +type AddServiceOKBodyPostgresqlPostgresExporter struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // PostgreSQL username for scraping metrics. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // True if exporter uses push metrics mode. + PushMetricsEnabled bool `json:"push_metrics_enabled,omitempty"` + + // List of disabled collector names. + DisabledCollectors []string `json:"disabled_collectors"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent finished. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] + Status *string `json:"status,omitempty"` + + // Listen port for scraping metrics. + ListenPort int64 `json:"listen_port,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` + + // Limit of databases for auto-discovery. + AutoDiscoveryLimit int32 `json:"auto_discovery_limit,omitempty"` + + // Optionally expose the exporter process on all public interfaces + ExposeExporter bool `json:"expose_exporter,omitempty"` + + // Maximum number of connections that exporter can open to the database instance. + MaxExporterConnections int32 `json:"max_exporter_connections,omitempty"` +} + +// Validate validates this add service OK body postgresql postgres exporter +func (o *AddServiceOKBodyPostgresqlPostgresExporter) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyPostgresqlPostgresExporterTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyPostgresqlPostgresExporterTypeStatusPropEnum = append(addServiceOkBodyPostgresqlPostgresExporterTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyPostgresqlPostgresExporterStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyPostgresqlPostgresExporter) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyPostgresqlPostgresExporterTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyPostgresqlPostgresExporter) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"postgresql"+"."+"postgres_exporter"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyPostgresqlPostgresExporterTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyPostgresqlPostgresExporterTypeLogLevelPropEnum = append(addServiceOkBodyPostgresqlPostgresExporterTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyPostgresqlPostgresExporterLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyPostgresqlPostgresExporter) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyPostgresqlPostgresExporterTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyPostgresqlPostgresExporter) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"postgresql"+"."+"postgres_exporter"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body postgresql postgres exporter based on context it is used +func (o *AddServiceOKBodyPostgresqlPostgresExporter) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresqlPostgresExporter) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresqlPostgresExporter) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyPostgresqlPostgresExporter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server. +swagger:model AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent +*/ +type AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // PostgreSQL username for getting pg stat statements data. + Username string `json:"username,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent finished. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] + Status *string `json:"status,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` +} + +// Validate validates this add service OK body postgresql QAN postgresql pgstatements agent +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyPostgresqlQanPostgresqlPgstatementsAgentTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyPostgresqlQanPostgresqlPgstatementsAgentTypeStatusPropEnum = append(addServiceOkBodyPostgresqlQanPostgresqlPgstatementsAgentTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyPostgresqlQanPostgresqlPgstatementsAgentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"postgresql"+"."+"qan_postgresql_pgstatements_agent"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyPostgresqlQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyPostgresqlQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum = append(addServiceOkBodyPostgresqlQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyPostgresqlQanPostgresqlPgstatementsAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"postgresql"+"."+"qan_postgresql_pgstatements_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body postgresql QAN postgresql pgstatements agent based on context it is used +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server. +swagger:model AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent +*/ +type AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. + AgentID string `json:"agent_id,omitempty"` + + // The pmm-agent identifier which runs this instance. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Desired Agent status: enabled (false) or disabled (true). + Disabled bool `json:"disabled,omitempty"` + + // Service identifier. + ServiceID string `json:"service_id,omitempty"` + + // PostgreSQL username for getting pg stat monitor data. + Username string `json:"username,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // True if query examples are disabled. + QueryExamplesDisabled bool `json:"query_examples_disabled,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_RUNNING: Agent is running. + // - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon. + // - AGENT_STATUS_STOPPING: Agent is stopping. + // - AGENT_STATUS_DONE: Agent finished. + // - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state. + // Enum: [AGENT_STATUS_UNSPECIFIED AGENT_STATUS_STARTING AGENT_STATUS_RUNNING AGENT_STATUS_WAITING AGENT_STATUS_STOPPING AGENT_STATUS_DONE AGENT_STATUS_UNKNOWN] + Status *string `json:"status,omitempty"` + + // Path to exec process. + ProcessExecPath string `json:"process_exec_path,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` +} + +// Validate validates this add service OK body postgresql QAN postgresql pgstatmonitor agent +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceOkBodyPostgresqlQanPostgresqlPgstatmonitorAgentTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyPostgresqlQanPostgresqlPgstatmonitorAgentTypeStatusPropEnum = append(addServiceOkBodyPostgresqlQanPostgresqlPgstatmonitorAgentTypeStatusPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyPostgresqlQanPostgresqlPgstatmonitorAgentTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addServiceOk"+"."+"postgresql"+"."+"qan_postgresql_pgstatmonitor_agent"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +var addServiceOkBodyPostgresqlQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceOkBodyPostgresqlQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum = append(addServiceOkBodyPostgresqlQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgentLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceOkBodyPostgresqlQanPostgresqlPgstatmonitorAgentTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("addServiceOk"+"."+"postgresql"+"."+"qan_postgresql_pgstatmonitor_agent"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service OK body postgresql QAN postgresql pgstatmonitor agent based on context it is used +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceOKBodyPostgresqlService PostgreSQLService represents a generic PostgreSQL instance. +swagger:model AddServiceOKBodyPostgresqlService +*/ +type AddServiceOKBodyPostgresqlService struct { + // Unique randomly generated instance identifier. + ServiceID string `json:"service_id,omitempty"` + + // Unique across all Services user-defined name. + ServiceName string `json:"service_name,omitempty"` + + // Database name. + DatabaseName string `json:"database_name,omitempty"` + + // Node identifier where this instance runs. + NodeID string `json:"node_id,omitempty"` + + // Access address (DNS name or IP). + // Address (and port) or socket is required. + Address string `json:"address,omitempty"` + + // Access port. + // Port is required when the address present. + Port int64 `json:"port,omitempty"` + + // Access unix socket. + // Address (and port) or socket is required. + Socket string `json:"socket,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // Custom user-assigned labels. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // PostgreSQL version. + Version string `json:"version,omitempty"` + + // Limit of databases for auto-discovery. + AutoDiscoveryLimit int32 `json:"auto_discovery_limit,omitempty"` +} + +// Validate validates this add service OK body postgresql service +func (o *AddServiceOKBodyPostgresqlService) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add service OK body postgresql service based on context it is used +func (o *AddServiceOKBodyPostgresqlService) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresqlService) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceOKBodyPostgresqlService) UnmarshalBinary(b []byte) error { + var res AddServiceOKBodyPostgresqlService + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +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. + RunsOnNodeID string `json:"runs_on_node_id,omitempty"` + + // Node name on which a service and node is been running. + // Exactly one of these parameters should be present: node_id, node_name, add_node. + NodeName string `json:"node_name,omitempty"` + + // Node and Exporter access address (DNS name or IP). + // address should always be passed with add_node. + Address string `json:"address,omitempty"` + + // Unique across all Services user-defined name. Required. + ServiceName string `json:"service_name,omitempty"` + + // HTTP basic auth username for collecting metrics. + Username string `json:"username,omitempty"` + + // HTTP basic auth password for collecting metrics. + Password string `json:"password,omitempty"` + + // Scheme to generate URI to exporter metrics endpoints. + Scheme string `json:"scheme,omitempty"` + + // Path under which metrics are exposed, used to generate URI. + MetricsPath string `json:"metrics_path,omitempty"` + + // Listen port for scraping metrics. + ListenPort int64 `json:"listen_port,omitempty"` + + // Node identifier on which an external service is been running. + // node_id should always be passed with runs_on_node_id. + NodeID string `json:"node_id,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // Custom user-assigned labels for Service. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Group name of external service. + Group string `json:"group,omitempty"` + + // MetricsMode defines desired metrics mode for agent, + // it can be pull, push or auto mode chosen by server. + // + // - METRICS_MODE_UNSPECIFIED: Auto + // Enum: [METRICS_MODE_UNSPECIFIED METRICS_MODE_PULL METRICS_MODE_PUSH] + MetricsMode *string `json:"metrics_mode,omitempty"` + + // Skip connection check. + SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` + + // add node + AddNode *AddServiceParamsBodyExternalAddNode `json:"add_node,omitempty"` +} + +// Validate validates this add service params body external +func (o *AddServiceParamsBodyExternal) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateMetricsMode(formats); err != nil { + res = append(res, err) + } + + if err := o.validateAddNode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceParamsBodyExternalTypeMetricsModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["METRICS_MODE_UNSPECIFIED","METRICS_MODE_PULL","METRICS_MODE_PUSH"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyExternalTypeMetricsModePropEnum = append(addServiceParamsBodyExternalTypeMetricsModePropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyExternalMetricsModeMETRICSMODEUNSPECIFIED captures enum value "METRICS_MODE_UNSPECIFIED" + AddServiceParamsBodyExternalMetricsModeMETRICSMODEUNSPECIFIED string = "METRICS_MODE_UNSPECIFIED" + + // AddServiceParamsBodyExternalMetricsModeMETRICSMODEPULL captures enum value "METRICS_MODE_PULL" + AddServiceParamsBodyExternalMetricsModeMETRICSMODEPULL string = "METRICS_MODE_PULL" + + // AddServiceParamsBodyExternalMetricsModeMETRICSMODEPUSH captures enum value "METRICS_MODE_PUSH" + AddServiceParamsBodyExternalMetricsModeMETRICSMODEPUSH string = "METRICS_MODE_PUSH" +) + +// prop value enum +func (o *AddServiceParamsBodyExternal) validateMetricsModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyExternalTypeMetricsModePropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyExternal) validateMetricsMode(formats strfmt.Registry) error { + if swag.IsZero(o.MetricsMode) { // not required + return nil + } + + // value enum + if err := o.validateMetricsModeEnum("body"+"."+"external"+"."+"metrics_mode", "body", *o.MetricsMode); err != nil { + return err + } + + return nil +} + +func (o *AddServiceParamsBodyExternal) validateAddNode(formats strfmt.Registry) error { + if swag.IsZero(o.AddNode) { // not required + return nil + } + + if o.AddNode != nil { + if err := o.AddNode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "external" + "." + "add_node") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "external" + "." + "add_node") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service params body external based on the context it is used +func (o *AddServiceParamsBodyExternal) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateAddNode(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceParamsBodyExternal) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { + if err := o.AddNode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "external" + "." + "add_node") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "external" + "." + "add_node") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceParamsBodyExternal) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceParamsBodyExternal) UnmarshalBinary(b []byte) error { + var res AddServiceParamsBodyExternal + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceParamsBodyExternalAddNode AddNodeParams holds node params and is used to add new node to inventory while adding new service. +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"` + + // Unique across all Nodes user-defined name. + NodeName string `json:"node_name,omitempty"` + + // Linux machine-id. + MachineID string `json:"machine_id,omitempty"` + + // Linux distribution name and version. + Distro string `json:"distro,omitempty"` + + // Container identifier. If specified, must be a unique Docker container identifier. + ContainerID string `json:"container_id,omitempty"` + + // Container name. + ContainerName string `json:"container_name,omitempty"` + + // Node model. + NodeModel string `json:"node_model,omitempty"` + + // Node region. + Region string `json:"region,omitempty"` + + // Node availability zone. + Az string `json:"az,omitempty"` + + // Custom user-assigned labels for Node. + CustomLabels map[string]string `json:"custom_labels,omitempty"` +} + +// Validate validates this add service params body external add node +func (o *AddServiceParamsBodyExternalAddNode) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateNodeType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceParamsBodyExternalAddNodeTypeNodeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyExternalAddNodeTypeNodeTypePropEnum = append(addServiceParamsBodyExternalAddNodeTypeNodeTypePropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" + AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" + + // AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" + AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" + + // AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" + AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" + + // AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" + AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" + + // AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" + AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" + + // AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + AddServiceParamsBodyExternalAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" +) + +// prop value enum +func (o *AddServiceParamsBodyExternalAddNode) validateNodeTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyExternalAddNodeTypeNodeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyExternalAddNode) validateNodeType(formats strfmt.Registry) error { + if swag.IsZero(o.NodeType) { // not required + return nil + } + + // value enum + if err := o.validateNodeTypeEnum("body"+"."+"external"+"."+"add_node"+"."+"node_type", "body", *o.NodeType); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service params body external add node based on context it is used +func (o *AddServiceParamsBodyExternalAddNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceParamsBodyExternalAddNode) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceParamsBodyExternalAddNode) UnmarshalBinary(b []byte) error { + var res AddServiceParamsBodyExternalAddNode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +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"` + + // Node name on which a service is been running. + // Exactly one of these parameters should be present: node_id, node_name, add_node. + NodeName string `json:"node_name,omitempty"` + + // Unique across all Services user-defined name. Required. + ServiceName string `json:"service_name,omitempty"` + + // Node and Service access address (DNS name or IP). + // Address (and port) or socket is required. + Address string `json:"address,omitempty"` + + // Service Access port. + // Port is required when the address present. + Port int64 `json:"port,omitempty"` + + // Service Access socket. + // Address (and port) or socket is required. + Socket string `json:"socket,omitempty"` + + // The "pmm-agent" identifier which should run agents. Required. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // MongoDB username for exporter and QAN agent access. + Username string `json:"username,omitempty"` + + // MongoDB password for exporter and QAN agent access. + Password string `json:"password,omitempty"` + + // If true, adds qan-mongodb-profiler-agent for provided service. + QANMongodbProfiler bool `json:"qan_mongodb_profiler,omitempty"` + + // Custom user-assigned labels for Service. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Skip connection check. + SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Client certificate and key. + TLSCertificateKey string `json:"tls_certificate_key,omitempty"` + + // Password for decrypting tls_certificate_key. + TLSCertificateKeyFilePassword string `json:"tls_certificate_key_file_password,omitempty"` + + // Certificate Authority certificate chain. + TLSCa string `json:"tls_ca,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // MetricsMode defines desired metrics mode for agent, + // it can be pull, push or auto mode chosen by server. + // + // - METRICS_MODE_UNSPECIFIED: Auto + // Enum: [METRICS_MODE_UNSPECIFIED METRICS_MODE_PULL METRICS_MODE_PUSH] + MetricsMode *string `json:"metrics_mode,omitempty"` + + // List of collector names to disable in this exporter. + DisableCollectors []string `json:"disable_collectors"` + + // Authentication mechanism. + // See https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism + // for details. + AuthenticationMechanism string `json:"authentication_mechanism,omitempty"` + + // Authentication database. + AuthenticationDatabase string `json:"authentication_database,omitempty"` + + // Custom password for exporter endpoint /metrics. + AgentPassword string `json:"agent_password,omitempty"` + + // List of collections to get stats from. Can use * . + StatsCollections []string `json:"stats_collections"` + + // Collections limit. Only get Databases and collection stats if the total number of collections in the server + // is less than this value. 0: no limit + CollectionsLimit int32 `json:"collections_limit,omitempty"` + + // Enable all collectors + EnableAllCollectors bool `json:"enable_all_collectors,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` + + // Optionally expose the exporter process on all public interfaces + ExposeExporter bool `json:"expose_exporter,omitempty"` + + // add node + AddNode *AddServiceParamsBodyMongodbAddNode `json:"add_node,omitempty"` +} + +// Validate validates this add service params body mongodb +func (o *AddServiceParamsBodyMongodb) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateMetricsMode(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateAddNode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceParamsBodyMongodbTypeMetricsModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["METRICS_MODE_UNSPECIFIED","METRICS_MODE_PULL","METRICS_MODE_PUSH"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyMongodbTypeMetricsModePropEnum = append(addServiceParamsBodyMongodbTypeMetricsModePropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyMongodbMetricsModeMETRICSMODEUNSPECIFIED captures enum value "METRICS_MODE_UNSPECIFIED" + AddServiceParamsBodyMongodbMetricsModeMETRICSMODEUNSPECIFIED string = "METRICS_MODE_UNSPECIFIED" + + // AddServiceParamsBodyMongodbMetricsModeMETRICSMODEPULL captures enum value "METRICS_MODE_PULL" + AddServiceParamsBodyMongodbMetricsModeMETRICSMODEPULL string = "METRICS_MODE_PULL" + + // AddServiceParamsBodyMongodbMetricsModeMETRICSMODEPUSH captures enum value "METRICS_MODE_PUSH" + AddServiceParamsBodyMongodbMetricsModeMETRICSMODEPUSH string = "METRICS_MODE_PUSH" +) + +// prop value enum +func (o *AddServiceParamsBodyMongodb) validateMetricsModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyMongodbTypeMetricsModePropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyMongodb) validateMetricsMode(formats strfmt.Registry) error { + if swag.IsZero(o.MetricsMode) { // not required + return nil + } + + // value enum + if err := o.validateMetricsModeEnum("body"+"."+"mongodb"+"."+"metrics_mode", "body", *o.MetricsMode); err != nil { + return err + } + + return nil +} + +var addServiceParamsBodyMongodbTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyMongodbTypeLogLevelPropEnum = append(addServiceParamsBodyMongodbTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyMongodbLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceParamsBodyMongodbLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceParamsBodyMongodbLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceParamsBodyMongodbLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceParamsBodyMongodbLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceParamsBodyMongodbLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceParamsBodyMongodbLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceParamsBodyMongodbLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceParamsBodyMongodbLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceParamsBodyMongodbLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceParamsBodyMongodbLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceParamsBodyMongodbLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceParamsBodyMongodb) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyMongodbTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyMongodb) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("body"+"."+"mongodb"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *AddServiceParamsBodyMongodb) validateAddNode(formats strfmt.Registry) error { + if swag.IsZero(o.AddNode) { // not required + return nil + } + + if o.AddNode != nil { + if err := o.AddNode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "mongodb" + "." + "add_node") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "mongodb" + "." + "add_node") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service params body mongodb based on the context it is used +func (o *AddServiceParamsBodyMongodb) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateAddNode(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceParamsBodyMongodb) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { + if err := o.AddNode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "mongodb" + "." + "add_node") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "mongodb" + "." + "add_node") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceParamsBodyMongodb) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceParamsBodyMongodb) UnmarshalBinary(b []byte) error { + var res AddServiceParamsBodyMongodb + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceParamsBodyMongodbAddNode AddNodeParams holds node params and is used to add new node to inventory while adding new service. +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"` + + // Unique across all Nodes user-defined name. + NodeName string `json:"node_name,omitempty"` + + // Linux machine-id. + MachineID string `json:"machine_id,omitempty"` + + // Linux distribution name and version. + Distro string `json:"distro,omitempty"` + + // Container identifier. If specified, must be a unique Docker container identifier. + ContainerID string `json:"container_id,omitempty"` + + // Container name. + ContainerName string `json:"container_name,omitempty"` + + // Node model. + NodeModel string `json:"node_model,omitempty"` + + // Node region. + Region string `json:"region,omitempty"` + + // Node availability zone. + Az string `json:"az,omitempty"` + + // Custom user-assigned labels for Node. + CustomLabels map[string]string `json:"custom_labels,omitempty"` +} + +// Validate validates this add service params body mongodb add node +func (o *AddServiceParamsBodyMongodbAddNode) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateNodeType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceParamsBodyMongodbAddNodeTypeNodeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyMongodbAddNodeTypeNodeTypePropEnum = append(addServiceParamsBodyMongodbAddNodeTypeNodeTypePropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" + AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" + + // AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" + AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" + + // AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" + AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" + + // AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" + AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" + + // AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" + AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" + + // AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + AddServiceParamsBodyMongodbAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" +) + +// prop value enum +func (o *AddServiceParamsBodyMongodbAddNode) validateNodeTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyMongodbAddNodeTypeNodeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyMongodbAddNode) validateNodeType(formats strfmt.Registry) error { + if swag.IsZero(o.NodeType) { // not required + return nil + } + + // value enum + if err := o.validateNodeTypeEnum("body"+"."+"mongodb"+"."+"add_node"+"."+"node_type", "body", *o.NodeType); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service params body mongodb add node based on context it is used +func (o *AddServiceParamsBodyMongodbAddNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceParamsBodyMongodbAddNode) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceParamsBodyMongodbAddNode) UnmarshalBinary(b []byte) error { + var res AddServiceParamsBodyMongodbAddNode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +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"` + + // Node name on which a service is been running. + // Exactly one of these parameters should be present: node_id, node_name, add_node. + NodeName string `json:"node_name,omitempty"` + + // Unique across all Services user-defined name. Required. + ServiceName string `json:"service_name,omitempty"` + + // Node and Service access address (DNS name or IP). + // Address (and port) or socket is required. + Address string `json:"address,omitempty"` + + // Service Access port. + // Port is required when the address present. + Port int64 `json:"port,omitempty"` + + // Service Access socket. + // Address (and port) or socket is required. + Socket string `json:"socket,omitempty"` + + // The "pmm-agent" identifier which should run agents. Required. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // MySQL username for scraping metrics. + Username string `json:"username,omitempty"` + + // MySQL password for scraping metrics. + Password string `json:"password,omitempty"` + + // If true, adds qan-mysql-perfschema-agent for provided service. + QANMysqlPerfschema bool `json:"qan_mysql_perfschema,omitempty"` + + // If true, adds qan-mysql-slowlog-agent for provided service. + QANMysqlSlowlog bool `json:"qan_mysql_slowlog,omitempty"` + + // Custom user-assigned labels for Service. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Skip connection check. + SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // Disable query examples. + DisableQueryExamples bool `json:"disable_query_examples,omitempty"` + + // If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if > 0. + // If zero, server's default value is used. + // Use negative value to disable rotation. + MaxSlowlogFileSize string `json:"max_slowlog_file_size,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // Certificate Authority certificate chain. + TLSCa string `json:"tls_ca,omitempty"` + + // Client certificate. + TLSCert string `json:"tls_cert,omitempty"` + + // Password for decrypting tls_cert. + TLSKey string `json:"tls_key,omitempty"` + + // Tablestats group collectors will be disabled if there are more than that number of tables. + // If zero, server's default value is used. + // Use negative value to disable them. + TablestatsGroupTableLimit int32 `json:"tablestats_group_table_limit,omitempty"` + + // MetricsMode defines desired metrics mode for agent, + // it can be pull, push or auto mode chosen by server. + // + // - METRICS_MODE_UNSPECIFIED: Auto + // Enum: [METRICS_MODE_UNSPECIFIED METRICS_MODE_PULL METRICS_MODE_PUSH] + MetricsMode *string `json:"metrics_mode,omitempty"` + + // List of collector names to disable in this exporter. + DisableCollectors []string `json:"disable_collectors"` + + // Custom password for exporter endpoint /metrics. + AgentPassword string `json:"agent_password,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` + + // Optionally expose the exporter process on all public interfaces + ExposeExporter bool `json:"expose_exporter,omitempty"` + + // add node + AddNode *AddServiceParamsBodyMysqlAddNode `json:"add_node,omitempty"` +} + +// Validate validates this add service params body mysql +func (o *AddServiceParamsBodyMysql) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateMetricsMode(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateAddNode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceParamsBodyMysqlTypeMetricsModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["METRICS_MODE_UNSPECIFIED","METRICS_MODE_PULL","METRICS_MODE_PUSH"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyMysqlTypeMetricsModePropEnum = append(addServiceParamsBodyMysqlTypeMetricsModePropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyMysqlMetricsModeMETRICSMODEUNSPECIFIED captures enum value "METRICS_MODE_UNSPECIFIED" + AddServiceParamsBodyMysqlMetricsModeMETRICSMODEUNSPECIFIED string = "METRICS_MODE_UNSPECIFIED" + + // AddServiceParamsBodyMysqlMetricsModeMETRICSMODEPULL captures enum value "METRICS_MODE_PULL" + AddServiceParamsBodyMysqlMetricsModeMETRICSMODEPULL string = "METRICS_MODE_PULL" + + // AddServiceParamsBodyMysqlMetricsModeMETRICSMODEPUSH captures enum value "METRICS_MODE_PUSH" + AddServiceParamsBodyMysqlMetricsModeMETRICSMODEPUSH string = "METRICS_MODE_PUSH" +) + +// prop value enum +func (o *AddServiceParamsBodyMysql) validateMetricsModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyMysqlTypeMetricsModePropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyMysql) validateMetricsMode(formats strfmt.Registry) error { + if swag.IsZero(o.MetricsMode) { // not required + return nil + } + + // value enum + if err := o.validateMetricsModeEnum("body"+"."+"mysql"+"."+"metrics_mode", "body", *o.MetricsMode); err != nil { + return err + } + + return nil +} + +var addServiceParamsBodyMysqlTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyMysqlTypeLogLevelPropEnum = append(addServiceParamsBodyMysqlTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyMysqlLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceParamsBodyMysqlLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceParamsBodyMysqlLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceParamsBodyMysqlLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceParamsBodyMysqlLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceParamsBodyMysqlLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceParamsBodyMysqlLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceParamsBodyMysqlLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceParamsBodyMysqlLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceParamsBodyMysqlLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceParamsBodyMysqlLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceParamsBodyMysqlLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceParamsBodyMysql) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyMysqlTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyMysql) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("body"+"."+"mysql"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *AddServiceParamsBodyMysql) validateAddNode(formats strfmt.Registry) error { + if swag.IsZero(o.AddNode) { // not required + return nil + } + + if o.AddNode != nil { + if err := o.AddNode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "mysql" + "." + "add_node") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "mysql" + "." + "add_node") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service params body mysql based on the context it is used +func (o *AddServiceParamsBodyMysql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateAddNode(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceParamsBodyMysql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { + if err := o.AddNode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "mysql" + "." + "add_node") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "mysql" + "." + "add_node") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceParamsBodyMysql) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceParamsBodyMysql) UnmarshalBinary(b []byte) error { + var res AddServiceParamsBodyMysql + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceParamsBodyMysqlAddNode AddNodeParams holds node params and is used to add new node to inventory while adding new service. +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"` + + // Unique across all Nodes user-defined name. + NodeName string `json:"node_name,omitempty"` + + // Linux machine-id. + MachineID string `json:"machine_id,omitempty"` + + // Linux distribution name and version. + Distro string `json:"distro,omitempty"` + + // Container identifier. If specified, must be a unique Docker container identifier. + ContainerID string `json:"container_id,omitempty"` + + // Container name. + ContainerName string `json:"container_name,omitempty"` + + // Node model. + NodeModel string `json:"node_model,omitempty"` + + // Node region. + Region string `json:"region,omitempty"` + + // Node availability zone. + Az string `json:"az,omitempty"` + + // Custom user-assigned labels for Node. + CustomLabels map[string]string `json:"custom_labels,omitempty"` +} + +// Validate validates this add service params body mysql add node +func (o *AddServiceParamsBodyMysqlAddNode) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateNodeType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceParamsBodyMysqlAddNodeTypeNodeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyMysqlAddNodeTypeNodeTypePropEnum = append(addServiceParamsBodyMysqlAddNodeTypeNodeTypePropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" + AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" + + // AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" + AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" + + // AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" + AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" + + // AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" + AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" + + // AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" + AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" + + // AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + AddServiceParamsBodyMysqlAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" +) + +// prop value enum +func (o *AddServiceParamsBodyMysqlAddNode) validateNodeTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyMysqlAddNodeTypeNodeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyMysqlAddNode) validateNodeType(formats strfmt.Registry) error { + if swag.IsZero(o.NodeType) { // not required + return nil + } + + // value enum + if err := o.validateNodeTypeEnum("body"+"."+"mysql"+"."+"add_node"+"."+"node_type", "body", *o.NodeType); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service params body mysql add node based on context it is used +func (o *AddServiceParamsBodyMysqlAddNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceParamsBodyMysqlAddNode) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceParamsBodyMysqlAddNode) UnmarshalBinary(b []byte) error { + var res AddServiceParamsBodyMysqlAddNode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +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"` + + // Node name on which a service is been running. + // Exactly one of these parameters should be present: node_id, node_name, add_node. + NodeName string `json:"node_name,omitempty"` + + // Unique across all Services user-defined name. Required. + ServiceName string `json:"service_name,omitempty"` + + // Node and Service access address (DNS name or IP). + // Address (and port) or socket is required. + Address string `json:"address,omitempty"` + + // Service Access port. + // Port is required when the address present. + Port int64 `json:"port,omitempty"` + + // Database name. + Database string `json:"database,omitempty"` + + // Service Access socket. + // Address (and port) or socket is required. + Socket string `json:"socket,omitempty"` + + // The "pmm-agent" identifier which should run agents. Required. + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // Environment name. + Environment string `json:"environment,omitempty"` + + // Cluster name. + Cluster string `json:"cluster,omitempty"` + + // Replication set name. + ReplicationSet string `json:"replication_set,omitempty"` + + // PostgreSQL username for scraping metrics. + Username string `json:"username,omitempty"` + + // PostgreSQL password for scraping metrics. + Password string `json:"password,omitempty"` + + // If true, adds qan-postgresql-pgstatements-agent for provided service. + QANPostgresqlPgstatementsAgent bool `json:"qan_postgresql_pgstatements_agent,omitempty"` + + // If true, adds qan-postgresql-pgstatmonitor-agent for provided service. + QANPostgresqlPgstatmonitorAgent bool `json:"qan_postgresql_pgstatmonitor_agent,omitempty"` + + // Limit query length in QAN (default: server-defined; -1: no limit). + MaxQueryLength int32 `json:"max_query_length,omitempty"` + + // Disable query examples. + DisableQueryExamples bool `json:"disable_query_examples,omitempty"` + + // Custom user-assigned labels for Service. + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Skip connection check. + SkipConnectionCheck bool `json:"skip_connection_check,omitempty"` + + // Disable parsing comments from queries and showing them in QAN. + DisableCommentsParsing bool `json:"disable_comments_parsing,omitempty"` + + // Use TLS for database connections. + TLS bool `json:"tls,omitempty"` + + // Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full. + TLSSkipVerify bool `json:"tls_skip_verify,omitempty"` + + // MetricsMode defines desired metrics mode for agent, + // it can be pull, push or auto mode chosen by server. + // + // - METRICS_MODE_UNSPECIFIED: Auto + // Enum: [METRICS_MODE_UNSPECIFIED METRICS_MODE_PULL METRICS_MODE_PUSH] + MetricsMode *string `json:"metrics_mode,omitempty"` + + // List of collector names to disable in this exporter. + DisableCollectors []string `json:"disable_collectors"` + + // TLS CA certificate. + TLSCa string `json:"tls_ca,omitempty"` + + // TLS Certifcate. + TLSCert string `json:"tls_cert,omitempty"` + + // TLS Certificate Key. + TLSKey string `json:"tls_key,omitempty"` + + // Custom password for exporter endpoint /metrics. + AgentPassword string `json:"agent_password,omitempty"` + + // Log level for exporters + // + // - LOG_LEVEL_UNSPECIFIED: Auto + // Enum: [LOG_LEVEL_UNSPECIFIED LOG_LEVEL_FATAL LOG_LEVEL_ERROR LOG_LEVEL_WARN LOG_LEVEL_INFO LOG_LEVEL_DEBUG] + LogLevel *string `json:"log_level,omitempty"` + + // Limit for auto discovery. + AutoDiscoveryLimit int32 `json:"auto_discovery_limit,omitempty"` + + // Optionally expose the exporter process on all public interfaces + ExposeExporter bool `json:"expose_exporter,omitempty"` + + // Maximum number of connections that exporter can open to the database instance. + MaxExporterConnections int32 `json:"max_exporter_connections,omitempty"` + + // add node + AddNode *AddServiceParamsBodyPostgresqlAddNode `json:"add_node,omitempty"` +} + +// Validate validates this add service params body postgresql +func (o *AddServiceParamsBodyPostgresql) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateMetricsMode(formats); err != nil { + res = append(res, err) + } + + if err := o.validateLogLevel(formats); err != nil { + res = append(res, err) + } + + if err := o.validateAddNode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceParamsBodyPostgresqlTypeMetricsModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["METRICS_MODE_UNSPECIFIED","METRICS_MODE_PULL","METRICS_MODE_PUSH"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyPostgresqlTypeMetricsModePropEnum = append(addServiceParamsBodyPostgresqlTypeMetricsModePropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyPostgresqlMetricsModeMETRICSMODEUNSPECIFIED captures enum value "METRICS_MODE_UNSPECIFIED" + AddServiceParamsBodyPostgresqlMetricsModeMETRICSMODEUNSPECIFIED string = "METRICS_MODE_UNSPECIFIED" + + // AddServiceParamsBodyPostgresqlMetricsModeMETRICSMODEPULL captures enum value "METRICS_MODE_PULL" + AddServiceParamsBodyPostgresqlMetricsModeMETRICSMODEPULL string = "METRICS_MODE_PULL" + + // AddServiceParamsBodyPostgresqlMetricsModeMETRICSMODEPUSH captures enum value "METRICS_MODE_PUSH" + AddServiceParamsBodyPostgresqlMetricsModeMETRICSMODEPUSH string = "METRICS_MODE_PUSH" +) + +// prop value enum +func (o *AddServiceParamsBodyPostgresql) validateMetricsModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyPostgresqlTypeMetricsModePropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyPostgresql) validateMetricsMode(formats strfmt.Registry) error { + if swag.IsZero(o.MetricsMode) { // not required + return nil + } + + // value enum + if err := o.validateMetricsModeEnum("body"+"."+"postgresql"+"."+"metrics_mode", "body", *o.MetricsMode); err != nil { + return err + } + + return nil +} + +var addServiceParamsBodyPostgresqlTypeLogLevelPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["LOG_LEVEL_UNSPECIFIED","LOG_LEVEL_FATAL","LOG_LEVEL_ERROR","LOG_LEVEL_WARN","LOG_LEVEL_INFO","LOG_LEVEL_DEBUG"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyPostgresqlTypeLogLevelPropEnum = append(addServiceParamsBodyPostgresqlTypeLogLevelPropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyPostgresqlLogLevelLOGLEVELUNSPECIFIED captures enum value "LOG_LEVEL_UNSPECIFIED" + AddServiceParamsBodyPostgresqlLogLevelLOGLEVELUNSPECIFIED string = "LOG_LEVEL_UNSPECIFIED" + + // AddServiceParamsBodyPostgresqlLogLevelLOGLEVELFATAL captures enum value "LOG_LEVEL_FATAL" + AddServiceParamsBodyPostgresqlLogLevelLOGLEVELFATAL string = "LOG_LEVEL_FATAL" + + // AddServiceParamsBodyPostgresqlLogLevelLOGLEVELERROR captures enum value "LOG_LEVEL_ERROR" + AddServiceParamsBodyPostgresqlLogLevelLOGLEVELERROR string = "LOG_LEVEL_ERROR" + + // AddServiceParamsBodyPostgresqlLogLevelLOGLEVELWARN captures enum value "LOG_LEVEL_WARN" + AddServiceParamsBodyPostgresqlLogLevelLOGLEVELWARN string = "LOG_LEVEL_WARN" + + // AddServiceParamsBodyPostgresqlLogLevelLOGLEVELINFO captures enum value "LOG_LEVEL_INFO" + AddServiceParamsBodyPostgresqlLogLevelLOGLEVELINFO string = "LOG_LEVEL_INFO" + + // AddServiceParamsBodyPostgresqlLogLevelLOGLEVELDEBUG captures enum value "LOG_LEVEL_DEBUG" + AddServiceParamsBodyPostgresqlLogLevelLOGLEVELDEBUG string = "LOG_LEVEL_DEBUG" +) + +// prop value enum +func (o *AddServiceParamsBodyPostgresql) validateLogLevelEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyPostgresqlTypeLogLevelPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyPostgresql) validateLogLevel(formats strfmt.Registry) error { + if swag.IsZero(o.LogLevel) { // not required + return nil + } + + // value enum + if err := o.validateLogLevelEnum("body"+"."+"postgresql"+"."+"log_level", "body", *o.LogLevel); err != nil { + return err + } + + return nil +} + +func (o *AddServiceParamsBodyPostgresql) validateAddNode(formats strfmt.Registry) error { + if swag.IsZero(o.AddNode) { // not required + return nil + } + + if o.AddNode != nil { + if err := o.AddNode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "postgresql" + "." + "add_node") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "postgresql" + "." + "add_node") + } + return err + } + } + + return nil +} + +// ContextValidate validate this add service params body postgresql based on the context it is used +func (o *AddServiceParamsBodyPostgresql) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateAddNode(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddServiceParamsBodyPostgresql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { + if err := o.AddNode.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "postgresql" + "." + "add_node") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "postgresql" + "." + "add_node") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceParamsBodyPostgresql) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceParamsBodyPostgresql) UnmarshalBinary(b []byte) error { + var res AddServiceParamsBodyPostgresql + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddServiceParamsBodyPostgresqlAddNode AddNodeParams holds node params and is used to add new node to inventory while adding new service. +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"` + + // Unique across all Nodes user-defined name. + NodeName string `json:"node_name,omitempty"` + + // Linux machine-id. + MachineID string `json:"machine_id,omitempty"` + + // Linux distribution name and version. + Distro string `json:"distro,omitempty"` + + // Container identifier. If specified, must be a unique Docker container identifier. + ContainerID string `json:"container_id,omitempty"` + + // Container name. + ContainerName string `json:"container_name,omitempty"` + + // Node model. + NodeModel string `json:"node_model,omitempty"` + + // Node region. + Region string `json:"region,omitempty"` + + // Node availability zone. + Az string `json:"az,omitempty"` + + // Custom user-assigned labels for Node. + CustomLabels map[string]string `json:"custom_labels,omitempty"` +} + +// Validate validates this add service params body postgresql add node +func (o *AddServiceParamsBodyPostgresqlAddNode) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateNodeType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addServiceParamsBodyPostgresqlAddNodeTypeNodeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["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"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addServiceParamsBodyPostgresqlAddNodeTypeNodeTypePropEnum = append(addServiceParamsBodyPostgresqlAddNodeTypeNodeTypePropEnum, v) + } +} + +const ( + + // AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEUNSPECIFIED captures enum value "NODE_TYPE_UNSPECIFIED" + AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEUNSPECIFIED string = "NODE_TYPE_UNSPECIFIED" + + // AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEGENERICNODE captures enum value "NODE_TYPE_GENERIC_NODE" + AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEGENERICNODE string = "NODE_TYPE_GENERIC_NODE" + + // AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPECONTAINERNODE captures enum value "NODE_TYPE_CONTAINER_NODE" + AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPECONTAINERNODE string = "NODE_TYPE_CONTAINER_NODE" + + // AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEREMOTENODE captures enum value "NODE_TYPE_REMOTE_NODE" + AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEREMOTENODE string = "NODE_TYPE_REMOTE_NODE" + + // AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEREMOTERDSNODE captures enum value "NODE_TYPE_REMOTE_RDS_NODE" + AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEREMOTERDSNODE string = "NODE_TYPE_REMOTE_RDS_NODE" + + // AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE captures enum value "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" + AddServiceParamsBodyPostgresqlAddNodeNodeTypeNODETYPEREMOTEAZUREDATABASENODE string = "NODE_TYPE_REMOTE_AZURE_DATABASE_NODE" +) + +// prop value enum +func (o *AddServiceParamsBodyPostgresqlAddNode) validateNodeTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addServiceParamsBodyPostgresqlAddNodeTypeNodeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddServiceParamsBodyPostgresqlAddNode) validateNodeType(formats strfmt.Registry) error { + if swag.IsZero(o.NodeType) { // not required + return nil + } + + // value enum + if err := o.validateNodeTypeEnum("body"+"."+"postgresql"+"."+"add_node"+"."+"node_type", "body", *o.NodeType); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add service params body postgresql add node based on context it is used +func (o *AddServiceParamsBodyPostgresqlAddNode) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddServiceParamsBodyPostgresqlAddNode) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddServiceParamsBodyPostgresqlAddNode) UnmarshalBinary(b []byte) error { + var res AddServiceParamsBodyPostgresqlAddNode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} 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 eb1c2578b2e..1484718b1f3 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 @@ -60,7 +60,7 @@ type DiscoverRDSOK struct { } func (o *DiscoverRDSOK) Error() string { - return fmt.Sprintf("[POST /v1/management/RDS/Discover][%d] discoverRdsOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/management/services:discoverRDS][%d] discoverRdsOk %+v", 200, o.Payload) } func (o *DiscoverRDSOK) GetPayload() *DiscoverRDSOKBody { @@ -102,7 +102,7 @@ func (o *DiscoverRDSDefault) Code() int { } func (o *DiscoverRDSDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/RDS/Discover][%d] DiscoverRDS default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/management/services:discoverRDS][%d] DiscoverRDS default %+v", o._statusCode, o.Payload) } func (o *DiscoverRDSDefault) GetPayload() *DiscoverRDSDefaultBody { diff --git a/api/management/v1/json/client/management_service/management_service_client.go b/api/management/v1/json/client/management_service/management_service_client.go index 5c5b343a26c..1695d75d03c 100644 --- a/api/management/v1/json/client/management_service/management_service_client.go +++ b/api/management/v1/json/client/management_service/management_service_client.go @@ -30,20 +30,14 @@ type ClientOption func(*runtime.ClientOperation) type ClientService interface { AddAnnotation(params *AddAnnotationParams, opts ...ClientOption) (*AddAnnotationOK, error) - AddExternal(params *AddExternalParams, opts ...ClientOption) (*AddExternalOK, error) - AddHAProxy(params *AddHAProxyParams, opts ...ClientOption) (*AddHAProxyOK, error) - AddMongoDB(params *AddMongoDBParams, opts ...ClientOption) (*AddMongoDBOK, error) - - AddMySQL(params *AddMySQLParams, opts ...ClientOption) (*AddMySQLOK, error) - - AddPostgreSQL(params *AddPostgreSQLParams, opts ...ClientOption) (*AddPostgreSQLOK, error) - AddProxySQL(params *AddProxySQLParams, opts ...ClientOption) (*AddProxySQLOK, error) AddRDS(params *AddRDSParams, opts ...ClientOption) (*AddRDSOK, error) + AddService(params *AddServiceParams, opts ...ClientOption) (*AddServiceOK, error) + DiscoverRDS(params *DiscoverRDSParams, opts ...ClientOption) (*DiscoverRDSOK, error) RegisterNode(params *RegisterNodeParams, opts ...ClientOption) (*RegisterNodeOK, error) @@ -66,7 +60,7 @@ func (a *Client) AddAnnotation(params *AddAnnotationParams, opts ...ClientOption op := &runtime.ClientOperation{ ID: "AddAnnotation", Method: "POST", - PathPattern: "/v1/management/Annotations/Add", + PathPattern: "/v1/management/annotations", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -92,45 +86,6 @@ func (a *Client) AddAnnotation(params *AddAnnotationParams, opts ...ClientOption return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -AddExternal adds external service - -Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided "node_id", then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". -*/ -func (a *Client) AddExternal(params *AddExternalParams, opts ...ClientOption) (*AddExternalOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddExternalParams() - } - op := &runtime.ClientOperation{ - ID: "AddExternal", - Method: "POST", - PathPattern: "/v1/management/External/Add", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &AddExternalReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*AddExternalOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddExternalDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* AddHAProxy adds HA proxy @@ -171,102 +126,24 @@ func (a *Client) AddHAProxy(params *AddHAProxyParams, opts ...ClientOption) (*Ad } /* -AddMongoDB adds mongo DB - -Adds MongoDB Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided "node_id", then adds "mongodb_exporter", and "qan_mongodb_profiler" agents with the provided "pmm_agent_id" and other parameters. -*/ -func (a *Client) AddMongoDB(params *AddMongoDBParams, opts ...ClientOption) (*AddMongoDBOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddMongoDBParams() - } - op := &runtime.ClientOperation{ - ID: "AddMongoDB", - Method: "POST", - PathPattern: "/v1/management/MongoDB/Add", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &AddMongoDBReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*AddMongoDBOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddMongoDBDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -AddMySQL adds my SQL - -Adds MySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided "node_id", then adds "mysqld_exporter", and "qan_mysql_perfschema" agents with the provided "pmm_agent_id" and other parameters. -*/ -func (a *Client) AddMySQL(params *AddMySQLParams, opts ...ClientOption) (*AddMySQLOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddMySQLParams() - } - op := &runtime.ClientOperation{ - ID: "AddMySQL", - Method: "POST", - PathPattern: "/v1/management/MySQL/Add", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &AddMySQLReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*AddMySQLOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddMySQLDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -AddPostgreSQL adds postgre SQL +AddProxySQL adds proxy SQL -Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided "node_id", then adds "postgres_exporter" with provided "pmm_agent_id" and other parameters. +Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided "node_id", then adds "proxysql_exporter" with provided "pmm_agent_id" and other parameters. */ -func (a *Client) AddPostgreSQL(params *AddPostgreSQLParams, opts ...ClientOption) (*AddPostgreSQLOK, error) { +func (a *Client) AddProxySQL(params *AddProxySQLParams, opts ...ClientOption) (*AddProxySQLOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewAddPostgreSQLParams() + params = NewAddProxySQLParams() } op := &runtime.ClientOperation{ - ID: "AddPostgreSQL", + ID: "AddProxySQL", Method: "POST", - PathPattern: "/v1/management/PostgreSQL/Add", + PathPattern: "/v1/management/ProxySQL/Add", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, - Reader: &AddPostgreSQLReader{formats: a.formats}, + Reader: &AddProxySQLReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -278,34 +155,34 @@ func (a *Client) AddPostgreSQL(params *AddPostgreSQLParams, opts ...ClientOption if err != nil { return nil, err } - success, ok := result.(*AddPostgreSQLOK) + success, ok := result.(*AddProxySQLOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*AddPostgreSQLDefault) + unexpectedSuccess := result.(*AddProxySQLDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -AddProxySQL adds proxy SQL +AddRDS adds RDS -Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided "node_id", then adds "proxysql_exporter" with provided "pmm_agent_id" and other parameters. +Adds RDS instance. */ -func (a *Client) AddProxySQL(params *AddProxySQLParams, opts ...ClientOption) (*AddProxySQLOK, error) { +func (a *Client) AddRDS(params *AddRDSParams, opts ...ClientOption) (*AddRDSOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewAddProxySQLParams() + params = NewAddRDSParams() } op := &runtime.ClientOperation{ - ID: "AddProxySQL", + ID: "AddRDS", Method: "POST", - PathPattern: "/v1/management/ProxySQL/Add", + PathPattern: "/v1/management/RDS/Add", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, - Reader: &AddProxySQLReader{formats: a.formats}, + Reader: &AddRDSReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -317,34 +194,34 @@ func (a *Client) AddProxySQL(params *AddProxySQLParams, opts ...ClientOption) (* if err != nil { return nil, err } - success, ok := result.(*AddProxySQLOK) + success, ok := result.(*AddRDSOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*AddProxySQLDefault) + unexpectedSuccess := result.(*AddRDSDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* -AddRDS adds RDS +AddService adds a service -Adds RDS instance. +Adds a service and starts several agents. */ -func (a *Client) AddRDS(params *AddRDSParams, opts ...ClientOption) (*AddRDSOK, error) { +func (a *Client) AddService(params *AddServiceParams, opts ...ClientOption) (*AddServiceOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewAddRDSParams() + params = NewAddServiceParams() } op := &runtime.ClientOperation{ - ID: "AddRDS", + ID: "AddService", Method: "POST", - PathPattern: "/v1/management/RDS/Add", + PathPattern: "/v1/management/services", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, Params: params, - Reader: &AddRDSReader{formats: a.formats}, + Reader: &AddServiceReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -356,12 +233,12 @@ func (a *Client) AddRDS(params *AddRDSParams, opts ...ClientOption) (*AddRDSOK, if err != nil { return nil, err } - success, ok := result.(*AddRDSOK) + success, ok := result.(*AddServiceOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*AddRDSDefault) + unexpectedSuccess := result.(*AddServiceDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -378,7 +255,7 @@ func (a *Client) DiscoverRDS(params *DiscoverRDSParams, opts ...ClientOption) (* op := &runtime.ClientOperation{ ID: "DiscoverRDS", Method: "POST", - PathPattern: "/v1/management/RDS/Discover", + PathPattern: "/v1/management/services:discoverRDS", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -407,7 +284,7 @@ func (a *Client) DiscoverRDS(params *DiscoverRDSParams, opts ...ClientOption) (* /* RegisterNode registers node -Registers a new Node and pmm-agent. +Registers a new Node and a pmm-agent. */ func (a *Client) RegisterNode(params *RegisterNodeParams, opts ...ClientOption) (*RegisterNodeOK, error) { // TODO: Validate the params before sending @@ -417,7 +294,7 @@ func (a *Client) RegisterNode(params *RegisterNodeParams, opts ...ClientOption) op := &runtime.ClientOperation{ ID: "RegisterNode", Method: "POST", - PathPattern: "/v1/management/Node/Register", + PathPattern: "/v1/management/nodes", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, @@ -446,7 +323,7 @@ func (a *Client) RegisterNode(params *RegisterNodeParams, opts ...ClientOption) /* RemoveService removes service -Removes a Service along with Agents. +Removes a Service along with its Agents. */ func (a *Client) RemoveService(params *RemoveServiceParams, opts ...ClientOption) (*RemoveServiceOK, error) { // TODO: Validate the params before sending @@ -455,8 +332,8 @@ func (a *Client) RemoveService(params *RemoveServiceParams, opts ...ClientOption } op := &runtime.ClientOperation{ ID: "RemoveService", - Method: "POST", - PathPattern: "/v1/management/Service/Remove", + Method: "DELETE", + PathPattern: "/v1/management/services/{service_id}", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http", "https"}, 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 f850e8353fe..07804a91ab8 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 @@ -60,7 +60,7 @@ type RegisterNodeOK struct { } func (o *RegisterNodeOK) Error() string { - return fmt.Sprintf("[POST /v1/management/Node/Register][%d] registerNodeOk %+v", 200, o.Payload) + return fmt.Sprintf("[POST /v1/management/nodes][%d] registerNodeOk %+v", 200, o.Payload) } func (o *RegisterNodeOK) GetPayload() *RegisterNodeOKBody { @@ -102,7 +102,7 @@ func (o *RegisterNodeDefault) Code() int { } func (o *RegisterNodeDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/Node/Register][%d] RegisterNode default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /v1/management/nodes][%d] RegisterNode default %+v", o._statusCode, o.Payload) } func (o *RegisterNodeDefault) GetPayload() *RegisterNodeDefaultBody { 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 238862f4b54..16511c1b2e4 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,8 +60,19 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { - // Body. - Body RemoveServiceBody + /* ServiceID. + + Either a Service ID or a Service Name. + */ + ServiceID string + + /* ServiceType. + + Service type. + + Default: "SERVICE_TYPE_UNSPECIFIED" + */ + ServiceType *string timeout time.Duration Context context.Context @@ -80,7 +91,16 @@ func (o *RemoveServiceParams) WithDefaults() *RemoveServiceParams { // // All values with no default are reset to their zero value. func (o *RemoveServiceParams) SetDefaults() { - // no default values defined for this parameter + serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + + val := RemoveServiceParams{ + ServiceType: &serviceTypeDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val } // WithTimeout adds the timeout to the remove service params @@ -116,15 +136,26 @@ func (o *RemoveServiceParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithBody adds the body to the remove service params -func (o *RemoveServiceParams) WithBody(body RemoveServiceBody) *RemoveServiceParams { - o.SetBody(body) +// WithServiceID adds the serviceID to the remove service params +func (o *RemoveServiceParams) WithServiceID(serviceID string) *RemoveServiceParams { + o.SetServiceID(serviceID) return o } -// SetBody adds the body to the remove service params -func (o *RemoveServiceParams) SetBody(body RemoveServiceBody) { - o.Body = body +// SetServiceID adds the serviceId to the remove service params +func (o *RemoveServiceParams) SetServiceID(serviceID string) { + o.ServiceID = serviceID +} + +// WithServiceType adds the serviceType to the remove service params +func (o *RemoveServiceParams) WithServiceType(serviceType *string) *RemoveServiceParams { + o.SetServiceType(serviceType) + return o +} + +// SetServiceType adds the serviceType to the remove service params +func (o *RemoveServiceParams) SetServiceType(serviceType *string) { + o.ServiceType = serviceType } // WriteToRequest writes these params to a swagger request @@ -133,10 +164,28 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt return err } var res []error - if err := r.SetBodyParam(o.Body); err != nil { + + // path param service_id + if err := r.SetPathParam("service_id", o.ServiceID); err != nil { return err } + if o.ServiceType != nil { + + // query param service_type + var qrServiceType string + + if o.ServiceType != nil { + qrServiceType = *o.ServiceType + } + qServiceType := qrServiceType + if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { + return err + } + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } 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 55cd38fd3ff..c5dbf4c32a3 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 @@ -7,7 +7,6 @@ package management_service import ( "context" - "encoding/json" "fmt" "io" "strconv" @@ -16,7 +15,6 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // RemoveServiceReader is a Reader for the RemoveService structure. @@ -60,7 +58,7 @@ type RemoveServiceOK struct { } func (o *RemoveServiceOK) Error() string { - return fmt.Sprintf("[POST /v1/management/Service/Remove][%d] removeServiceOk %+v", 200, o.Payload) + return fmt.Sprintf("[DELETE /v1/management/services/{service_id}][%d] removeServiceOk %+v", 200, o.Payload) } func (o *RemoveServiceOK) GetPayload() interface{} { @@ -100,7 +98,7 @@ func (o *RemoveServiceDefault) Code() int { } func (o *RemoveServiceDefault) Error() string { - return fmt.Sprintf("[POST /v1/management/Service/Remove][%d] RemoveService default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[DELETE /v1/management/services/{service_id}][%d] RemoveService default %+v", o._statusCode, o.Payload) } func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { @@ -118,117 +116,6 @@ func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, con return nil } -/* -RemoveServiceBody remove service body -swagger:model RemoveServiceBody -*/ -type RemoveServiceBody struct { - // ServiceType describes supported Service types. - // Enum: [SERVICE_TYPE_UNSPECIFIED SERVICE_TYPE_MYSQL_SERVICE SERVICE_TYPE_MONGODB_SERVICE SERVICE_TYPE_POSTGRESQL_SERVICE SERVICE_TYPE_PROXYSQL_SERVICE SERVICE_TYPE_HAPROXY_SERVICE SERVICE_TYPE_EXTERNAL_SERVICE] - ServiceType *string `json:"service_type,omitempty"` - - // Service ID or Service Name is required. - // Unique randomly generated instance identifier. - ServiceID string `json:"service_id,omitempty"` - - // Unique across all Services user-defined name. - ServiceName string `json:"service_name,omitempty"` -} - -// Validate validates this remove service body -func (o *RemoveServiceBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateServiceType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var removeServiceBodyTypeServiceTypePropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["SERVICE_TYPE_UNSPECIFIED","SERVICE_TYPE_MYSQL_SERVICE","SERVICE_TYPE_MONGODB_SERVICE","SERVICE_TYPE_POSTGRESQL_SERVICE","SERVICE_TYPE_PROXYSQL_SERVICE","SERVICE_TYPE_HAPROXY_SERVICE","SERVICE_TYPE_EXTERNAL_SERVICE"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - removeServiceBodyTypeServiceTypePropEnum = append(removeServiceBodyTypeServiceTypePropEnum, v) - } -} - -const ( - - // RemoveServiceBodyServiceTypeSERVICETYPEUNSPECIFIED captures enum value "SERVICE_TYPE_UNSPECIFIED" - RemoveServiceBodyServiceTypeSERVICETYPEUNSPECIFIED string = "SERVICE_TYPE_UNSPECIFIED" - - // RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE captures enum value "SERVICE_TYPE_MYSQL_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEMYSQLSERVICE string = "SERVICE_TYPE_MYSQL_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE captures enum value "SERVICE_TYPE_MONGODB_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEMONGODBSERVICE string = "SERVICE_TYPE_MONGODB_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE captures enum value "SERVICE_TYPE_POSTGRESQL_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEPOSTGRESQLSERVICE string = "SERVICE_TYPE_POSTGRESQL_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE captures enum value "SERVICE_TYPE_PROXYSQL_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEPROXYSQLSERVICE string = "SERVICE_TYPE_PROXYSQL_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE captures enum value "SERVICE_TYPE_HAPROXY_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEHAPROXYSERVICE string = "SERVICE_TYPE_HAPROXY_SERVICE" - - // RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE captures enum value "SERVICE_TYPE_EXTERNAL_SERVICE" - RemoveServiceBodyServiceTypeSERVICETYPEEXTERNALSERVICE string = "SERVICE_TYPE_EXTERNAL_SERVICE" -) - -// prop value enum -func (o *RemoveServiceBody) validateServiceTypeEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, removeServiceBodyTypeServiceTypePropEnum, true); err != nil { - return err - } - return nil -} - -func (o *RemoveServiceBody) validateServiceType(formats strfmt.Registry) error { - if swag.IsZero(o.ServiceType) { // not required - return nil - } - - // value enum - if err := o.validateServiceTypeEnum("body"+"."+"service_type", "body", *o.ServiceType); err != nil { - return err - } - - return nil -} - -// ContextValidate validates this remove service body based on context it is used -func (o *RemoveServiceBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (o *RemoveServiceBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *RemoveServiceBody) UnmarshalBinary(b []byte) error { - var res RemoveServiceBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} - /* RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody diff --git a/api/management/v1/json/v1.json b/api/management/v1/json/v1.json index e468fcac6da..f65114470a1 100644 --- a/api/management/v1/json/v1.json +++ b/api/management/v1/json/v1.json @@ -15,103 +15,14 @@ "version": "v1" }, "paths": { - "/v1/management/Annotations/Add": { - "post": { - "description": "Adds an annotation.", - "tags": [ - "ManagementService" - ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", - "parameters": [ - { - "description": "AddAnnotationRequest is a params to add new annotation.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", - "type": "object", - "properties": { - "node_name": { - "description": "Used for annotate node.", - "type": "string", - "x-order": 2 - }, - "service_names": { - "description": "Used for annotate services.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 3 - }, - "tags": { - "description": "Tags are used to filter annotations.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - }, - "text": { - "description": "An annotation description. Required.", - "type": "string", - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/External/Add": { + "/v1/management/HAProxy/Add": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory.", "tags": [ "ManagementService" ], - "summary": "Add External Service", - "operationId": "AddExternal", + "summary": "Add HAProxy", + "operationId": "AddHAProxy", "parameters": [ { "name": "body", @@ -197,7 +108,7 @@ "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 12 + "x-order": 11 }, "custom_labels": { "description": "Custom user-assigned labels for Service.", @@ -205,17 +116,12 @@ "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 13 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 11 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 15 + "x-order": 10 }, "listen_port": { "description": "Listen port for scraping metrics.", @@ -232,7 +138,7 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 16 + "x-order": 14 }, "metrics_path": { "description": "Path under which metrics are exposed, used to generate URI.", @@ -240,9 +146,9 @@ "x-order": 8 }, "node_id": { - "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id.", + "description": "Node identifier on which an external exporter is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", - "x-order": 10 + "x-order": 0 }, "node_name": { "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", @@ -257,12 +163,7 @@ "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 13 - }, - "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 + "x-order": 12 }, "scheme": { "description": "Scheme to generate URI to exporter metrics endpoints.", @@ -277,7 +178,7 @@ "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 17 + "x-order": 15 }, "username": { "description": "HTTP basic auth username for collecting metrics.", @@ -361,7 +262,7 @@ "x-order": 1 }, "service": { - "description": "ExternalService represents a generic External service instance.", + "description": "HAProxyService represents a generic HAProxy service instance.", "type": "object", "properties": { "cluster": { @@ -382,11 +283,6 @@ "type": "string", "x-order": 3 }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 7 - }, "node_id": { "description": "Node identifier where this service instance runs.", "type": "string", @@ -447,14 +343,14 @@ } } }, - "/v1/management/HAProxy/Add": { + "/v1/management/ProxySQL/Add": { "post": { - "description": "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory.", + "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", "tags": [ "ManagementService" ], - "summary": "Add HAProxy", - "operationId": "AddHAProxy", + "summary": "Add ProxySQL", + "operationId": "AddProxySQL", "parameters": [ { "name": "body", @@ -533,14 +429,19 @@ "x-order": 2 }, "address": { - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 3 + "x-order": 4 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 19 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 11 + "x-order": 9 }, "custom_labels": { "description": "Custom user-assigned labels for Service.", @@ -550,16 +451,38 @@ }, "x-order": 13 }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 18 + }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 10 + "x-order": 8 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 9 + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 21 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 20 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -570,52 +493,68 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 14 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 8 + "x-order": 17 }, "node_id": { - "description": "Node identifier on which an external exporter is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, "node_name": { - "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, "password": { - "description": "HTTP basic auth password for collecting metrics.", - "type": "string", - "x-order": 6 - }, - "replication_set": { - "description": "Replication set name.", + "description": "ProxySQL password for scraping metrics.", "type": "string", "x-order": 12 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", "type": "string", "x-order": 7 }, + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 10 + }, "service_name": { "description": "Unique across all Services user-defined name. Required.", "type": "string", - "x-order": 4 + "x-order": 3 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", + "x-order": 14 + }, + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 6 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 15 }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 16 + }, "username": { - "description": "HTTP basic auth username for collecting metrics.", + "description": "ProxySQL username for scraping metrics.", "type": "string", - "x-order": 5 + "x-order": 11 } } } @@ -627,8 +566,8 @@ "schema": { "type": "object", "properties": { - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", + "proxysql_exporter": { + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", "type": "object", "properties": { "agent_id": { @@ -645,48 +584,91 @@ "x-order": 7 }, "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 14 + }, "listen_port": { "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 8 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 6 + "x-order": 11 }, - "process_exec_path": { - "description": "Path to exec process.", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", - "x-order": 10 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 9 + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "x-order": 5 + "x-order": 12 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 }, "service_id": { "description": "Service identifier.", "type": "string", "x-order": 3 }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, "username": { - "description": "HTTP basic auth username for collecting metrics.", + "description": "ProxySQL username for scraping metrics.", "type": "string", "x-order": 4 } @@ -694,13 +676,18 @@ "x-order": 1 }, "service": { - "description": "HAProxyService represents a generic HAProxy service instance.", + "description": "ProxySQLService represents a generic ProxySQL instance.", "type": "object", "properties": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 4 + "x-order": 7 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -708,22 +695,28 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 + "x-order": 9 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 3 + "x-order": 6 }, "node_id": { - "description": "Node identifier where this service instance runs.", + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 2 }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 5 + "x-order": 8 }, "service_id": { "description": "Unique randomly generated instance identifier.", @@ -734,6 +727,16 @@ "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "version": { + "description": "ProxySQL version.", + "type": "string", + "x-order": 10 } }, "x-order": 0 @@ -775,14 +778,14 @@ } } }, - "/v1/management/MongoDB/Add": { + "/v1/management/RDS/Add": { "post": { - "description": "Adds MongoDB Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mongodb_exporter\", and \"qan_mongodb_profiler\" agents with the provided \"pmm_agent_id\" and other parameters.", + "description": "Adds RDS instance.", "tags": [ "ManagementService" ], - "summary": "Add MongoDB", - "operationId": "AddMongoDB", + "summary": "Add RDS", + "operationId": "AddRDS", "parameters": [ { "name": "body", @@ -791,160 +794,104 @@ "schema": { "type": "object", "properties": { - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 2 - }, "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", + "description": "Address used to connect to it.", "type": "string", "x-order": 4 }, "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 26 + "x-order": 28 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 30 }, - "authentication_database": { - "description": "Authentication database.", + "aws_access_key": { + "description": "AWS Access key.", "type": "string", - "x-order": 25 + "x-order": 14 }, - "authentication_mechanism": { - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "aws_secret_key": { + "description": "AWS Secret key.", "type": "string", - "x-order": 24 + "x-order": 15 + }, + "az": { + "description": "AWS availability zone.", + "type": "string", + "x-order": 1 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 9 - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 28 + "x-order": 10 }, "custom_labels": { - "description": "Custom user-assigned labels for Service.", + "description": "Custom user-assigned labels for Node and Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 23 + "x-order": 18 }, - "enable_all_collectors": { - "type": "boolean", - "title": "Enable all collectors", + "database": { + "description": "Database name.", + "type": "string", "x-order": 29 }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 8 + "disable_basic_metrics": { + "description": "Disable basic metrics.", + "type": "boolean", + "x-order": 24 }, - "expose_exporter": { + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", "x-order": 31 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "disable_enhanced_metrics": { + "description": "Disable enhanced metrics.", + "type": "boolean", + "x-order": 25 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 22 + }, + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" ], - "x-order": 30 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 21 + "x-order": 6 }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 9 + }, + "instance_id": { + "description": "AWS instance ID.", + "type": "string", + "x-order": 2 + }, + "max_postgresql_exporter_connections": { + "description": "Maximum number of exporter connections to PostgreSQL instance.", + "type": "integer", + "format": "int32", + "x-order": 32 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", "type": "string", "default": "METRICS_MODE_UNSPECIFIED", "enum": [ @@ -952,96 +899,84 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 22 + "x-order": 26 }, - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "node_model": { + "description": "AWS instance class.", "type": "string", - "x-order": 0 + "x-order": 3 }, "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID.", "type": "string", - "x-order": 1 + "x-order": 7 }, "password": { - "description": "MongoDB password for exporter and QAN agent access.", - "type": "string", - "x-order": 12 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "description": "Password for scraping metrics.", "type": "string", - "x-order": 7 + "x-order": 13 }, "port": { - "description": "Service Access port.\nPort is required when the address present.", + "description": "Access port.", "type": "integer", "format": "int64", "x-order": 5 }, - "qan_mongodb_profiler": { - "description": "If true, adds qan-mongodb-profiler-agent for provided service.", + "qan_mysql_perfschema": { + "description": "If true, adds qan-mysql-perfschema-agent.", + "type": "boolean", + "x-order": 17 + }, + "qan_postgresql_pgstatements": { "type": "boolean", - "x-order": 13 + "title": "If true, add qan-pgstatements", + "x-order": 27 + }, + "rds_exporter": { + "description": "If true, adds rds_exporter.", + "type": "boolean", + "x-order": 16 + }, + "region": { + "description": "AWS region.", + "type": "string", + "x-order": 0 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 10 + "x-order": 11 }, "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "description": "Unique across all Services user-defined name. Defaults to AWS instance ID.", "type": "string", - "x-order": 3 + "x-order": 8 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 15 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 + "x-order": 19 }, - "stats_collections": { - "description": "List of collections to get stats from. Can use * .", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 27 + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", + "type": "integer", + "format": "int32", + "x-order": 23 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 16 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", "x-order": 20 }, - "tls_certificate_key": { - "description": "Client certificate and key.", - "type": "string", - "x-order": 18 - }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", - "type": "string", - "x-order": 19 - }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 17 + "x-order": 21 }, "username": { - "description": "MongoDB username for exporter and QAN agent access.", + "description": "Username for scraping metrics.", "type": "string", - "x-order": 11 + "x-order": 12 } } } @@ -1053,20 +988,80 @@ "schema": { "type": "object", "properties": { - "mongodb_exporter": { - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "mysql": { + "description": "MySQLService represents a generic MySQL instance.", "type": "object", "properties": { - "agent_id": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 13 + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 2 + }, + "mysqld_exporter": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -1074,7 +1069,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 7 + "x-order": 11 }, "disabled": { "description": "Desired Agent status: enabled (false) or disabled (true).", @@ -1087,23 +1082,18 @@ "items": { "type": "string" }, - "x-order": 9 - }, - "enable_all_collectors": { - "description": "Enable All collectors.", - "type": "boolean", - "x-order": 14 + "x-order": 13 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 17 + "x-order": 20 }, "listen_port": { "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 11 + "x-order": 16 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -1118,7 +1108,7 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 19 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -1128,26 +1118,18 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 + "x-order": 18 }, "push_metrics_enabled": { "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 8 + "x-order": 12 }, "service_id": { "description": "Service identifier.", "type": "string", "x-order": 3 }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 12 - }, "status": { "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", "type": "string", @@ -1161,6 +1143,23 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], + "x-order": 15 + }, + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", "x-order": 10 }, "tls": { @@ -1168,27 +1167,47 @@ "type": "boolean", "x-order": 5 }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", "x-order": 6 }, "username": { - "description": "MongoDB username for scraping metrics.", + "description": "MySQL username for scraping metrics.", "type": "string", "x-order": 4 } }, - "x-order": 1 + "x-order": 3 }, - "qan_mongodb_profiler": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "node": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "address": { + "description": "DB instance identifier.", "type": "string", - "x-order": 0 + "x-order": 2 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 5 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -1196,95 +1215,50 @@ "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 6 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 + "node_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 11 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 7 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - }, - "service_id": { - "description": "Service identifier.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 9 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 + "x-order": 1 }, - "username": { - "description": "MongoDB username for getting profiler data.", + "region": { + "description": "Node region.", "type": "string", "x-order": 4 } }, - "x-order": 2 + "x-order": 0 }, - "service": { - "description": "MongoDBService represents a generic MongoDB instance.", + "postgresql": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", "type": "object", "properties": { "address": { "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 3 + "x-order": 4 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 7 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -1292,28 +1266,33 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 10 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 6 + "x-order": 7 }, "node_id": { "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 2 + "x-order": 3 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 4 + "x-order": 5 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 8 + "x-order": 9 }, "service_id": { "description": "Unique randomly generated instance identifier.", @@ -1328,331 +1307,139 @@ "socket": { "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 5 + "x-order": 6 }, "version": { - "description": "MongoDB version.", + "description": "PostgreSQL version.", "type": "string", - "x-order": 10 + "x-order": 11 } }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 + "x-order": 5 }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/MySQL/Add": { - "post": { - "description": "Adds MySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mysqld_exporter\", and \"qan_mysql_perfschema\" agents with the provided \"pmm_agent_id\" and other parameters.", - "tags": [ - "ManagementService" - ], - "summary": "Add MySQL", - "operationId": "AddMySQL", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "postgresql_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", "type": "object", "properties": { - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "x-order": 4 + "x-order": 0 }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 }, "custom_labels": { - "description": "Custom user-assigned labels for Node.", + "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, + "x-order": 7 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, "x-order": 9 }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 }, - "node_model": { - "description": "Node model.", + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", - "x-order": 6 + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "node_type": { - "description": "NodeType describes supported Node types.", + "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 + "x-order": 12 }, - "region": { - "description": "Node region.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "service_id": { + "description": "Service identifier.", "type": "string", - "x-order": 7 - } - }, - "x-order": 2 - }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 29 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 9 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 15 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 + } }, - "x-order": 28 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 17 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 19 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 8 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 30 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 18 - }, - "max_slowlog_file_size": { - "description": "If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if \u003e 0.\nIf zero, server's default value is used.\nUse negative value to disable rotation.", - "type": "string", - "format": "int64", - "x-order": 20 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 27 - }, - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "password": { - "description": "MySQL password for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", - "type": "string", - "x-order": 7 - }, - "port": { - "description": "Service Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "qan_mysql_perfschema": { - "description": "If true, adds qan-mysql-perfschema-agent for provided service.", - "type": "boolean", - "x-order": 13 - }, - "qan_mysql_slowlog": { - "description": "If true, adds qan-mysql-slowlog-agent for provided service.", - "type": "boolean", - "x-order": 14 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 10 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 3 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 16 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", "x-order": 6 }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", - "type": "integer", - "format": "int32", - "x-order": 26 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 21 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 23 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 24 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 25 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 22 - }, - "username": { - "description": "MySQL username for scraping metrics.", - "type": "string", - "x-order": 11 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "qan_mysql_perfschema": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -1666,32 +1453,18 @@ "additionalProperties": { "type": "string" }, - "x-order": 11 + "x-order": 13 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 }, "disabled": { "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -1705,7 +1478,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 19 + "x-order": 16 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 11 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -1715,10 +1494,10 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 18 + "x-order": 15 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", + "query_examples_disabled": { + "description": "True if query examples are disabled.", "type": "boolean", "x-order": 12 }, @@ -1740,25 +1519,8 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 15 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", "x-order": 14 }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 10 - }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", @@ -1785,15 +1547,15 @@ "x-order": 6 }, "username": { - "description": "MySQL username for scraping metrics.", + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 } }, - "x-order": 1 + "x-order": 4 }, - "qan_mysql_perfschema": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "qan_postgresql_pgstatements": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -1807,12 +1569,12 @@ "additionalProperties": { "type": "string" }, - "x-order": 13 + "x-order": 9 }, "disable_comments_parsing": { "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 10 + "x-order": 5 }, "disabled": { "description": "Desired Agent status: enabled (false) or disabled (true).", @@ -1832,13 +1594,13 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 12 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 11 + "x-order": 6 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -1848,12 +1610,7 @@ "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 + "x-order": 11 }, "service_id": { "description": "Service identifier.", @@ -1873,43 +1630,28 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 14 + "x-order": 10 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 5 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", "x-order": 7 }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 6 + "x-order": 8 }, "username": { - "description": "MySQL username for getting performance data.", + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 } }, - "x-order": 2 + "x-order": 7 }, - "qan_mysql_slowlog": { - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { "agent_id": { @@ -1917,24 +1659,46 @@ "type": "string", "x-order": 0 }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 13 + }, + "aws_access_key": { + "description": "AWS Access Key.", + "type": "string", + "x-order": 4 + }, + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", + "x-order": 8 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 + "x-order": 5 }, "disabled": { "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", + "type": "boolean", + "x-order": 9 + }, + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", + "x-order": 7 + }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", "type": "string", @@ -1948,19 +1712,12 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 17 - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 + "x-order": 12 }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", + "node_id": { + "description": "Node identifier.", "type": "string", - "format": "int64", - "x-order": 13 + "x-order": 3 }, "pmm_agent_id": { "description": "The pmm-agent identifier which runs this instance.", @@ -1968,19 +1725,14 @@ "x-order": 1 }, "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "title": "mod tidy", - "x-order": 16 + "x-order": 11 }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 12 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 + "x-order": 10 }, "status": { "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -1995,112 +1747,10 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 15 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 3 - }, - "service": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", "x-order": 6 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 } }, - "x-order": 0 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 4 + "x-order": 1 } } } @@ -2139,39 +1789,128 @@ } } }, - "/v1/management/Node/Register": { + "/v1/management/annotations": { "post": { - "description": "Registers a new Node and pmm-agent.", + "description": "Adds an annotation.", "tags": [ "ManagementService" ], - "summary": "Register Node", - "operationId": "RegisterNode", + "summary": "Add Annotation", + "operationId": "AddAnnotation", "parameters": [ { + "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", "type": "object", "properties": { - "address": { - "description": "Node address (DNS name or IP).", + "node_name": { + "description": "Used for annotating a node.", "type": "string", "x-order": 2 }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 14 + "service_names": { + "description": "Used for annotating services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 9 + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "text": { + "description": "An annotation description. Required.", + "type": "string", + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", + "x-order": 1 + } + } + } + } + } + } + }, + "/v1/management/nodes": { + "post": { + "description": "Registers a new Node and a pmm-agent.", + "tags": [ + "ManagementService" + ], + "summary": "Register Node", + "operationId": "RegisterNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 14 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 9 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", "type": "string", "x-order": 5 }, @@ -2463,1744 +2202,325 @@ } } }, - "/v1/management/PostgreSQL/Add": { + "/v1/management/services": { "post": { - "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", + "description": "Adds a service and starts several agents.", "tags": [ "ManagementService" ], - "summary": "Add PostgreSQL", - "operationId": "AddPostgreSQL", + "summary": "Add a Service", + "operationId": "AddService", "parameters": [ { "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 2 - }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 28 - }, - "auto_discovery_limit": { - "description": "Limit for auto discovery.", - "type": "integer", - "format": "int32", - "x-order": 30 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 10 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 18 - }, - "database": { - "description": "Database name.", - "type": "string", - "x-order": 6 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 24 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 20 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 17 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 9 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 29 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 32 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 16 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 23 - }, - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "password": { - "description": "PostgreSQL password for scraping metrics.", - "type": "string", - "x-order": 13 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", - "type": "string", - "x-order": 8 - }, - "port": { - "description": "Service Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "qan_postgresql_pgstatements_agent": { - "description": "If true, adds qan-postgresql-pgstatements-agent for provided service.", - "type": "boolean", - "x-order": 14 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service.", - "type": "boolean", - "x-order": 15 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 11 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 3 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 19 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 7 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 21 - }, - "tls_ca": { - "description": "TLS CA certificate.", - "type": "string", - "x-order": 25 - }, - "tls_cert": { - "description": "TLS Certifcate.", - "type": "string", - "x-order": 26 - }, - "tls_key": { - "description": "TLS Certificate Key.", - "type": "string", - "x-order": 27 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", - "type": "boolean", - "x-order": 22 - }, - "username": { - "description": "PostgreSQL username for scraping metrics.", - "type": "string", - "x-order": 12 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "postgres_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 13 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", - "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "PostgreSQL username for scraping metrics.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 5 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 6 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 7 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 - }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 2 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 7 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 13 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 8 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 9 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 11 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 3 - }, - "service": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", - "type": "object", - "properties": { - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 12 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 - }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "version": { - "description": "PostgreSQL version.", - "type": "string", - "x-order": 11 - } - }, - "x-order": 0 - }, - "warning": { - "description": "Warning message.", - "type": "string", - "x-order": 4 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/ProxySQL/Add": { - "post": { - "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", - "tags": [ - "ManagementService" - ], - "summary": "Add ProxySQL", - "operationId": "AddProxySQL", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - } - }, - "x-order": 2 - }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 19 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 9 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 18 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 8 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 21 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 20 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 17 - }, - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "password": { - "description": "ProxySQL password for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", - "type": "string", - "x-order": 7 - }, - "port": { - "description": "Service Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 10 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 3 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 14 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 15 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 16 - }, - "username": { - "description": "ProxySQL username for scraping metrics.", - "type": "string", - "x-order": 11 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "proxysql_exporter": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 14 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 13 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "ProxySQL username for scraping metrics.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 1 - }, - "service": { - "description": "ProxySQLService represents a generic ProxySQL instance.", - "type": "object", - "properties": { - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "version": { - "description": "ProxySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } - }, - "/v1/management/RDS/Add": { - "post": { - "description": "Adds RDS instance.", - "tags": [ - "ManagementService" - ], - "summary": "Add RDS", - "operationId": "AddRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 28 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 30 - }, - "aws_access_key": { - "description": "AWS Access key.", - "type": "string", - "x-order": 14 - }, - "aws_secret_key": { - "description": "AWS Secret key.", - "type": "string", - "x-order": 15 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 10 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node and Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 18 - }, - "database": { - "description": "Database name.", - "type": "string", - "x-order": 29 - }, - "disable_basic_metrics": { - "description": "Disable basic metrics.", - "type": "boolean", - "x-order": 24 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 31 - }, - "disable_enhanced_metrics": { - "description": "Disable enhanced metrics.", - "type": "boolean", - "x-order": 25 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 22 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 9 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "max_postgresql_exporter_connections": { - "description": "Maximum number of exporter connections to PostgreSQL instance.", - "type": "integer", - "format": "int32", - "x-order": 32 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 26 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID.", - "type": "string", - "x-order": 7 - }, - "password": { - "description": "Password for scraping metrics.", - "type": "string", - "x-order": 13 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "qan_mysql_perfschema": { - "description": "If true, adds qan-mysql-perfschema-agent.", - "type": "boolean", - "x-order": 17 - }, - "qan_postgresql_pgstatements": { - "type": "boolean", - "title": "If true, add qan-pgstatements", - "x-order": 27 - }, - "rds_exporter": { - "description": "If true, adds rds_exporter.", - "type": "boolean", - "x-order": 16 - }, - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 11 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Defaults to AWS instance ID.", - "type": "string", - "x-order": 8 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 19 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", - "type": "integer", - "format": "int32", - "x-order": 23 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 20 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 21 - }, - "username": { - "description": "Username for scraping metrics.", - "type": "string", - "x-order": 12 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "mysql": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 2 - }, - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 11 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 19 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 18 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 12 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 15 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 10 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "username": { - "description": "MySQL username for scraping metrics.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 3 - }, - "node": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", - "type": "object", - "properties": { - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - }, - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 0 - }, - "postgresql": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "external": { "type": "object", "properties": { + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + } + }, + "x-order": 2 + }, "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "description": "Node and Exporter access address (DNS name or IP).\naddress should always be passed with add_node.", "type": "string", - "x-order": 4 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 12 + "x-order": 3 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 8 + "x-order": 12 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 10 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 + "x-order": 14 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 7 + "x-order": 11 }, - "node_id": { - "description": "Node identifier where this instance runs.", + "group": { + "description": "Group name of external service.", "type": "string", - "x-order": 3 + "x-order": 15 }, - "port": { - "description": "Access port.\nPort is required when the address present.", + "listen_port": { + "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 5 + "x-order": 9 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 16 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 8 + }, + "node_id": { + "description": "Node identifier on which an external service is been running.\nnode_id should always be passed with runs_on_node_id.", + "type": "string", + "x-order": 10 + }, + "node_name": { + "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 1 + }, + "password": { + "description": "HTTP basic auth password for collecting metrics.", + "type": "string", + "x-order": 6 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 9 + "x-order": 13 }, - "service_id": { - "description": "Unique randomly generated instance identifier.", + "runs_on_node_id": { + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id should always be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", "type": "string", - "x-order": 1 + "x-order": 7 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", - "x-order": 6 + "x-order": 4 }, - "version": { - "description": "PostgreSQL version.", + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 17 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", "type": "string", - "x-order": 11 + "x-order": 5 } }, - "x-order": 5 + "x-order": 3 }, - "postgresql_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "mongodb": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + } + }, + "x-order": 2 + }, + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 0 + "x-order": 4 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 26 + }, + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 25 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 24 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 9 + }, + "collections_limit": { "type": "integer", "format": "int32", - "x-order": 14 + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 28 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 + "x-order": 14 }, - "disabled_collectors": { - "description": "List of disabled collector names.", + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", "type": "array", "items": { "type": "string" }, - "x-order": 9 + "x-order": 23 + }, + "enable_all_collectors": { + "type": "boolean", + "title": "Enable all collectors", + "x-order": 29 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 8 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 + "x-order": 31 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -4215,93 +2535,239 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 30 }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 16 + "x-order": 21 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 22 + }, + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 0 + }, + "node_name": { + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", + "password": { + "description": "MongoDB password for exporter and QAN agent access.", "type": "string", "x-order": 12 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "type": "string", + "x-order": 7 + }, + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "qan_mongodb_profiler": { + "description": "If true, adds qan-mongodb-profiler-agent for provided service.", "type": "boolean", - "x-order": 8 + "x-order": 13 }, - "service_id": { - "description": "Service identifier.", + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 10 + }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 15 + }, + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 + "x-order": 6 + }, + "stats_collections": { + "description": "List of collections to get stats from. Can use * .", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 27 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 5 + "x-order": 16 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 20 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 18 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 19 }, "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 6 + "x-order": 17 }, "username": { - "description": "PostgreSQL username for scraping metrics.", + "description": "MongoDB username for exporter and QAN agent access.", "type": "string", - "x-order": 4 + "x-order": 11 } }, - "x-order": 6 + "x-order": 1 }, - "qan_mysql_perfschema": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "mysql": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + } + }, + "x-order": 2 + }, + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 0 + "x-order": 4 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 29 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 9 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 13 + "x-order": 15 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 28 }, "disable_comments_parsing": { "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 10 + "x-order": 17 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "disable_query_examples": { + "description": "Disable query examples.", "type": "boolean", - "x-order": 2 + "x-order": 19 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 8 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 31 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -4316,108 +2782,259 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 30 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 11 + "x-order": 18 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "max_slowlog_file_size": { + "description": "If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if \u003e 0.\nIf zero, server's default value is used.\nUse negative value to disable rotation.", + "type": "string", + "format": "int64", + "x-order": 20 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 27 + }, + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 0 + }, + "node_name": { + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", + "password": { + "description": "MySQL password for scraping metrics.", "type": "string", - "x-order": 15 + "x-order": 12 }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "type": "string", + "x-order": 7 + }, + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "qan_mysql_perfschema": { + "description": "If true, adds qan-mysql-perfschema-agent for provided service.", "type": "boolean", - "x-order": 12 + "x-order": 13 }, - "service_id": { - "description": "Service identifier.", + "qan_mysql_slowlog": { + "description": "If true, adds qan-mysql-slowlog-agent for provided service.", + "type": "boolean", + "x-order": 14 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 10 + }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 16 + }, + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 14 + "x-order": 6 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", + "type": "integer", + "format": "int32", + "x-order": 26 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 5 + "x-order": 21 }, "tls_ca": { "description": "Certificate Authority certificate chain.", "type": "string", - "x-order": 7 + "x-order": 23 }, "tls_cert": { "description": "Client certificate.", "type": "string", - "x-order": 8 + "x-order": 24 }, "tls_key": { "description": "Password for decrypting tls_cert.", "type": "string", - "x-order": 9 + "x-order": 25 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 6 + "x-order": 22 }, "username": { - "description": "MySQL username for getting performance data.", + "description": "MySQL username for scraping metrics.", "type": "string", - "x-order": 4 + "x-order": 11 } }, - "x-order": 4 + "x-order": 0 }, - "qan_postgresql_pgstatements": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "postgresql": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + } + }, + "x-order": 2 + }, + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 0 + "x-order": 4 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 28 + }, + "auto_discovery_limit": { + "description": "Limit for auto discovery.", + "type": "integer", + "format": "int32", + "x-order": 30 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 10 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 18 + }, + "database": { + "description": "Database name.", + "type": "string", + "x-order": 6 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 24 }, "disable_comments_parsing": { "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 5 + "x-order": 20 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "disable_query_examples": { + "description": "Disable query examples.", "type": "boolean", - "x-order": 2 + "x-order": 17 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 9 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 31 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -4432,166 +3049,1482 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 12 + "x-order": 29 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 32 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 6 + "x-order": 16 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 23 + }, + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 0 + }, + "node_name": { + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", + "password": { + "description": "PostgreSQL password for scraping metrics.", + "type": "string", + "x-order": 13 + }, + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "type": "string", + "x-order": 8 + }, + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "qan_postgresql_pgstatements_agent": { + "description": "If true, adds qan-postgresql-pgstatements-agent for provided service.", + "type": "boolean", + "x-order": 14 + }, + "qan_postgresql_pgstatmonitor_agent": { + "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service.", + "type": "boolean", + "x-order": 15 + }, + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 11 }, - "service_id": { - "description": "Service identifier.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 19 + }, + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 + "x-order": 7 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 7 + "x-order": 21 + }, + "tls_ca": { + "description": "TLS CA certificate.", + "type": "string", + "x-order": 25 + }, + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 26 + }, + "tls_key": { + "description": "TLS Certificate Key.", + "type": "string", + "x-order": 27 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 22 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 12 + } + }, + "x-order": 2 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "external": { + "type": "object", + "properties": { + "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", + "type": "boolean", + "x-order": 2 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 6 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 5 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 1 + }, + "service": { + "description": "ExternalService represents a generic External service instance.", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 7 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + } + }, + "x-order": 0 + } + }, + "x-order": 3 + }, + "mongodb": { + "type": "object", + "properties": { + "mongodb_exporter": { + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 13 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "enable_all_collectors": { + "description": "Enable All collectors.", + "type": "boolean", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 17 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 16 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" + }, + "x-order": 12 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "MongoDB username for scraping metrics.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 1 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 + "qan_mongodb_profiler": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 2 }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", - "type": "string", - "x-order": 4 + "service": { + "description": "MongoDBService represents a generic MongoDB instance.", + "type": "object", + "properties": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "version": { + "description": "MongoDB version.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 0 } }, - "x-order": 7 + "x-order": 1 }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", + "mysql": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "mysqld_exporter": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 20 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 16 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 19 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 18 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 12 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 15 + }, + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", + "x-order": 10 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 1 + }, + "qan_mysql_perfschema": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 13 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 16 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 11 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 14 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "MySQL username for getting performance data.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 2 + }, + "qan_mysql_slowlog": { + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 14 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 17 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 + }, + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "type": "string", + "title": "mod tidy", + "x-order": 16 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 15 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "MySQL username for getting performance data.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 3 + }, + "service": { + "description": "MySQLService represents a generic MySQL instance.", + "type": "object", + "properties": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 + } + }, "x-order": 0 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", + "table_count": { + "description": "Actual table count at the moment of adding.", "type": "integer", "format": "int32", - "x-order": 13 - }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", "x-order": 4 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", + } + }, + "x-order": 0 + }, + "postgresql": { + "type": "object", + "properties": { + "postgres_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 + } }, - "x-order": 5 + "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "qan_postgresql_pgstatements_agent": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", + "type": "string", + "x-order": 4 + } + }, "x-order": 2 }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", - "x-order": 9 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", + "qan_postgresql_pgstatmonitor_agent": { + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 7 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 8 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 9 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 11 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "username": { + "description": "PostgreSQL username for getting pg stat monitor data.", + "type": "string", + "x-order": 4 + } + }, "x-order": 3 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 + "service": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "type": "object", + "properties": { + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 4 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 7 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 9 + }, + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 6 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 + } + }, + "x-order": 0 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "warning": { + "description": "Warning message.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 6 + "x-order": 4 } }, + "x-order": 2 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + }, + "message": { + "type": "string", "x-order": 1 } } } + } + } + } + }, + "/v1/management/services/{service_id}": { + "delete": { + "description": "Removes a Service along with its Agents.", + "tags": [ + "ManagementService" + ], + "summary": "Remove Service", + "operationId": "RemoveService", + "parameters": [ + { + "type": "string", + "description": "Either a Service ID or a Service Name.", + "name": "service_id", + "in": "path", + "required": true + }, + { + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "type": "string", + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "Service type.", + "name": "service_type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", @@ -4627,7 +4560,7 @@ } } }, - "/v1/management/RDS/Discover": { + "/v1/management/services:discoverRDS": { "post": { "description": "Discovers RDS instances.", "tags": [ @@ -4756,92 +4689,6 @@ } } } - }, - "/v1/management/Service/Remove": { - "post": { - "description": "Removes a Service along with Agents.", - "tags": [ - "ManagementService" - ], - "summary": "Remove Service", - "operationId": "RemoveService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_id": { - "description": "Service ID or Service Name is required.\nUnique randomly generated instance identifier.", - "type": "string", - "x-order": 1 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 2 - }, - "service_type": { - "description": "ServiceType describes supported Service types.", - "type": "string", - "default": "SERVICE_TYPE_UNSPECIFIED", - "enum": [ - "SERVICE_TYPE_UNSPECIFIED", - "SERVICE_TYPE_MYSQL_SERVICE", - "SERVICE_TYPE_MONGODB_SERVICE", - "SERVICE_TYPE_POSTGRESQL_SERVICE", - "SERVICE_TYPE_PROXYSQL_SERVICE", - "SERVICE_TYPE_HAPROXY_SERVICE", - "SERVICE_TYPE_EXTERNAL_SERVICE" - ], - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - }, - "message": { - "type": "string", - "x-order": 1 - } - } - } - } - } - } } }, "tags": [ diff --git a/api/management/v1/mongodb.pb.go b/api/management/v1/mongodb.pb.go index aab4a100715..097eaf28d9d 100644 --- a/api/management/v1/mongodb.pb.go +++ b/api/management/v1/mongodb.pb.go @@ -11,7 +11,6 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,7 +24,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type AddMongoDBRequest struct { +type AddMongoDBServiceParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -107,8 +106,8 @@ type AddMongoDBRequest struct { ExposeExporter bool `protobuf:"varint,34,opt,name=expose_exporter,json=exposeExporter,proto3" json:"expose_exporter,omitempty"` } -func (x *AddMongoDBRequest) Reset() { - *x = AddMongoDBRequest{} +func (x *AddMongoDBServiceParams) Reset() { + *x = AddMongoDBServiceParams{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_mongodb_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -116,13 +115,13 @@ func (x *AddMongoDBRequest) Reset() { } } -func (x *AddMongoDBRequest) String() string { +func (x *AddMongoDBServiceParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddMongoDBRequest) ProtoMessage() {} +func (*AddMongoDBServiceParams) ProtoMessage() {} -func (x *AddMongoDBRequest) ProtoReflect() protoreflect.Message { +func (x *AddMongoDBServiceParams) ProtoReflect() protoreflect.Message { mi := &file_management_v1_mongodb_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -134,236 +133,236 @@ func (x *AddMongoDBRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddMongoDBRequest.ProtoReflect.Descriptor instead. -func (*AddMongoDBRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use AddMongoDBServiceParams.ProtoReflect.Descriptor instead. +func (*AddMongoDBServiceParams) Descriptor() ([]byte, []int) { return file_management_v1_mongodb_proto_rawDescGZIP(), []int{0} } -func (x *AddMongoDBRequest) GetNodeId() string { +func (x *AddMongoDBServiceParams) GetNodeId() string { if x != nil { return x.NodeId } return "" } -func (x *AddMongoDBRequest) GetNodeName() string { +func (x *AddMongoDBServiceParams) GetNodeName() string { if x != nil { return x.NodeName } return "" } -func (x *AddMongoDBRequest) GetAddNode() *AddNodeParams { +func (x *AddMongoDBServiceParams) GetAddNode() *AddNodeParams { if x != nil { return x.AddNode } return nil } -func (x *AddMongoDBRequest) GetServiceName() string { +func (x *AddMongoDBServiceParams) GetServiceName() string { if x != nil { return x.ServiceName } return "" } -func (x *AddMongoDBRequest) GetAddress() string { +func (x *AddMongoDBServiceParams) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *AddMongoDBRequest) GetPort() uint32 { +func (x *AddMongoDBServiceParams) GetPort() uint32 { if x != nil { return x.Port } return 0 } -func (x *AddMongoDBRequest) GetSocket() string { +func (x *AddMongoDBServiceParams) GetSocket() string { if x != nil { return x.Socket } return "" } -func (x *AddMongoDBRequest) GetPmmAgentId() string { +func (x *AddMongoDBServiceParams) GetPmmAgentId() string { if x != nil { return x.PmmAgentId } return "" } -func (x *AddMongoDBRequest) GetEnvironment() string { +func (x *AddMongoDBServiceParams) GetEnvironment() string { if x != nil { return x.Environment } return "" } -func (x *AddMongoDBRequest) GetCluster() string { +func (x *AddMongoDBServiceParams) GetCluster() string { if x != nil { return x.Cluster } return "" } -func (x *AddMongoDBRequest) GetReplicationSet() string { +func (x *AddMongoDBServiceParams) GetReplicationSet() string { if x != nil { return x.ReplicationSet } return "" } -func (x *AddMongoDBRequest) GetUsername() string { +func (x *AddMongoDBServiceParams) GetUsername() string { if x != nil { return x.Username } return "" } -func (x *AddMongoDBRequest) GetPassword() string { +func (x *AddMongoDBServiceParams) GetPassword() string { if x != nil { return x.Password } return "" } -func (x *AddMongoDBRequest) GetQanMongodbProfiler() bool { +func (x *AddMongoDBServiceParams) GetQanMongodbProfiler() bool { if x != nil { return x.QanMongodbProfiler } return false } -func (x *AddMongoDBRequest) GetCustomLabels() map[string]string { +func (x *AddMongoDBServiceParams) GetCustomLabels() map[string]string { if x != nil { return x.CustomLabels } return nil } -func (x *AddMongoDBRequest) GetSkipConnectionCheck() bool { +func (x *AddMongoDBServiceParams) GetSkipConnectionCheck() bool { if x != nil { return x.SkipConnectionCheck } return false } -func (x *AddMongoDBRequest) GetTls() bool { +func (x *AddMongoDBServiceParams) GetTls() bool { if x != nil { return x.Tls } return false } -func (x *AddMongoDBRequest) GetTlsSkipVerify() bool { +func (x *AddMongoDBServiceParams) GetTlsSkipVerify() bool { if x != nil { return x.TlsSkipVerify } return false } -func (x *AddMongoDBRequest) GetTlsCertificateKey() string { +func (x *AddMongoDBServiceParams) GetTlsCertificateKey() string { if x != nil { return x.TlsCertificateKey } return "" } -func (x *AddMongoDBRequest) GetTlsCertificateKeyFilePassword() string { +func (x *AddMongoDBServiceParams) GetTlsCertificateKeyFilePassword() string { if x != nil { return x.TlsCertificateKeyFilePassword } return "" } -func (x *AddMongoDBRequest) GetTlsCa() string { +func (x *AddMongoDBServiceParams) GetTlsCa() string { if x != nil { return x.TlsCa } return "" } -func (x *AddMongoDBRequest) GetMaxQueryLength() int32 { +func (x *AddMongoDBServiceParams) GetMaxQueryLength() int32 { if x != nil { return x.MaxQueryLength } return 0 } -func (x *AddMongoDBRequest) GetMetricsMode() MetricsMode { +func (x *AddMongoDBServiceParams) GetMetricsMode() MetricsMode { if x != nil { return x.MetricsMode } return MetricsMode_METRICS_MODE_UNSPECIFIED } -func (x *AddMongoDBRequest) GetDisableCollectors() []string { +func (x *AddMongoDBServiceParams) GetDisableCollectors() []string { if x != nil { return x.DisableCollectors } return nil } -func (x *AddMongoDBRequest) GetAuthenticationMechanism() string { +func (x *AddMongoDBServiceParams) GetAuthenticationMechanism() string { if x != nil { return x.AuthenticationMechanism } return "" } -func (x *AddMongoDBRequest) GetAuthenticationDatabase() string { +func (x *AddMongoDBServiceParams) GetAuthenticationDatabase() string { if x != nil { return x.AuthenticationDatabase } return "" } -func (x *AddMongoDBRequest) GetAgentPassword() string { +func (x *AddMongoDBServiceParams) GetAgentPassword() string { if x != nil { return x.AgentPassword } return "" } -func (x *AddMongoDBRequest) GetStatsCollections() []string { +func (x *AddMongoDBServiceParams) GetStatsCollections() []string { if x != nil { return x.StatsCollections } return nil } -func (x *AddMongoDBRequest) GetCollectionsLimit() int32 { +func (x *AddMongoDBServiceParams) GetCollectionsLimit() int32 { if x != nil { return x.CollectionsLimit } return 0 } -func (x *AddMongoDBRequest) GetEnableAllCollectors() bool { +func (x *AddMongoDBServiceParams) GetEnableAllCollectors() bool { if x != nil { return x.EnableAllCollectors } return false } -func (x *AddMongoDBRequest) GetLogLevel() v1.LogLevel { +func (x *AddMongoDBServiceParams) GetLogLevel() v1.LogLevel { if x != nil { return x.LogLevel } return v1.LogLevel(0) } -func (x *AddMongoDBRequest) GetExposeExporter() bool { +func (x *AddMongoDBServiceParams) GetExposeExporter() bool { if x != nil { return x.ExposeExporter } return false } -type AddMongoDBResponse struct { +type MongoDBServiceResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -373,8 +372,8 @@ type AddMongoDBResponse struct { QanMongodbProfiler *v1.QANMongoDBProfilerAgent `protobuf:"bytes,3,opt,name=qan_mongodb_profiler,json=qanMongodbProfiler,proto3" json:"qan_mongodb_profiler,omitempty"` } -func (x *AddMongoDBResponse) Reset() { - *x = AddMongoDBResponse{} +func (x *MongoDBServiceResult) Reset() { + *x = MongoDBServiceResult{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_mongodb_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -382,13 +381,13 @@ func (x *AddMongoDBResponse) Reset() { } } -func (x *AddMongoDBResponse) String() string { +func (x *MongoDBServiceResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddMongoDBResponse) ProtoMessage() {} +func (*MongoDBServiceResult) ProtoMessage() {} -func (x *AddMongoDBResponse) ProtoReflect() protoreflect.Message { +func (x *MongoDBServiceResult) ProtoReflect() protoreflect.Message { mi := &file_management_v1_mongodb_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -400,26 +399,26 @@ func (x *AddMongoDBResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddMongoDBResponse.ProtoReflect.Descriptor instead. -func (*AddMongoDBResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MongoDBServiceResult.ProtoReflect.Descriptor instead. +func (*MongoDBServiceResult) Descriptor() ([]byte, []int) { return file_management_v1_mongodb_proto_rawDescGZIP(), []int{1} } -func (x *AddMongoDBResponse) GetService() *v1.MongoDBService { +func (x *MongoDBServiceResult) GetService() *v1.MongoDBService { if x != nil { return x.Service } return nil } -func (x *AddMongoDBResponse) GetMongodbExporter() *v1.MongoDBExporter { +func (x *MongoDBServiceResult) GetMongodbExporter() *v1.MongoDBExporter { if x != nil { return x.MongodbExporter } return nil } -func (x *AddMongoDBResponse) GetQanMongodbProfiler() *v1.QANMongoDBProfilerAgent { +func (x *MongoDBServiceResult) GetQanMongodbProfiler() *v1.QANMongoDBProfilerAgent { if x != nil { return x.QanMongodbProfiler } @@ -431,113 +430,112 @@ var File_management_v1_mongodb_proto protoreflect.FileDescriptor var file_management_v1_mongodb_proto_rawDesc = []byte{ 0x0a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x6e, 0x76, 0x65, - 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, - 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xc5, 0x0b, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, - 0x61, 0x64, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x70, 0x6d, 0x6d, 0x5f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, - 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, - 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, - 0x30, 0x0a, 0x14, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x71, - 0x61, 0x6e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x72, 0x12, 0x57, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, - 0x6f, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, - 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, - 0x65, 0x63, 0x6b, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, - 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, - 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, - 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6c, 0x73, 0x5f, - 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x21, 0x74, 0x6c, 0x73, 0x5f, - 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, - 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x16, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x1d, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x74, 0x6c, 0x73, 0x43, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, - 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x18, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x6e, - 0x67, 0x74, 0x68, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, - 0x6f, 0x64, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, - 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x73, 0x12, 0x39, 0x0a, 0x18, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x1b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12, 0x37, 0x0a, 0x17, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, - 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2b, 0x0a, 0x11, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x1e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x1f, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, - 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x6c, - 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, - 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, - 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, - 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, - 0x17, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x5f, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xef, 0x01, 0x0a, 0x12, 0x41, 0x64, 0x64, - 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x69, 0x6e, + 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x18, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xd1, 0x0b, 0x0a, 0x17, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, + 0x42, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, + 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, + 0x29, 0x0a, 0x0c, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, + 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x71, 0x61, 0x6e, 0x5f, 0x6d, + 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x71, 0x61, 0x6e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, + 0x62, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0d, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x38, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, + 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, + 0x6b, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, + 0x74, 0x6c, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, + 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x2e, 0x0a, 0x13, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x48, 0x0a, 0x21, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, + 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x1d, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x18, 0x17, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x74, 0x6c, 0x73, 0x43, 0x61, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x18, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, + 0x68, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, + 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, + 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, + 0x39, 0x0a, 0x18, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x1b, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12, 0x37, 0x0a, 0x17, 0x61, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, + 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x1e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x1f, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, + 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x20, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x6c, 0x43, 0x6f, + 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, + 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x21, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, + 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x27, 0x0a, + 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x18, 0x22, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x52, 0x17, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x5f, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0xf1, 0x01, 0x0a, 0x14, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, + 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, @@ -581,9 +579,9 @@ func file_management_v1_mongodb_proto_rawDescGZIP() []byte { var ( file_management_v1_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) file_management_v1_mongodb_proto_goTypes = []interface{}{ - (*AddMongoDBRequest)(nil), // 0: management.v1.AddMongoDBRequest - (*AddMongoDBResponse)(nil), // 1: management.v1.AddMongoDBResponse - nil, // 2: management.v1.AddMongoDBRequest.CustomLabelsEntry + (*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 @@ -594,13 +592,13 @@ var ( ) var file_management_v1_mongodb_proto_depIdxs = []int32{ - 3, // 0: management.v1.AddMongoDBRequest.add_node:type_name -> management.v1.AddNodeParams - 2, // 1: management.v1.AddMongoDBRequest.custom_labels:type_name -> management.v1.AddMongoDBRequest.CustomLabelsEntry - 4, // 2: management.v1.AddMongoDBRequest.metrics_mode:type_name -> management.v1.MetricsMode - 5, // 3: management.v1.AddMongoDBRequest.log_level:type_name -> inventory.v1.LogLevel - 6, // 4: management.v1.AddMongoDBResponse.service:type_name -> inventory.v1.MongoDBService - 7, // 5: management.v1.AddMongoDBResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 8, // 6: management.v1.AddMongoDBResponse.qan_mongodb_profiler:type_name -> inventory.v1.QANMongoDBProfilerAgent + 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 + 4, // 2: management.v1.AddMongoDBServiceParams.metrics_mode:type_name -> management.v1.MetricsMode + 5, // 3: management.v1.AddMongoDBServiceParams.log_level:type_name -> inventory.v1.LogLevel + 6, // 4: management.v1.MongoDBServiceResult.service:type_name -> inventory.v1.MongoDBService + 7, // 5: management.v1.MongoDBServiceResult.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 8, // 6: management.v1.MongoDBServiceResult.qan_mongodb_profiler:type_name -> inventory.v1.QANMongoDBProfilerAgent 7, // [7:7] is the sub-list for method output_type 7, // [7:7] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name @@ -617,7 +615,7 @@ func file_management_v1_mongodb_proto_init() { file_management_v1_node_proto_init() if !protoimpl.UnsafeEnabled { file_management_v1_mongodb_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddMongoDBRequest); i { + switch v := v.(*AddMongoDBServiceParams); i { case 0: return &v.state case 1: @@ -629,7 +627,7 @@ func file_management_v1_mongodb_proto_init() { } } file_management_v1_mongodb_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddMongoDBResponse); i { + switch v := v.(*MongoDBServiceResult); i { case 0: return &v.state case 1: diff --git a/api/management/v1/mongodb.pb.validate.go b/api/management/v1/mongodb.pb.validate.go index bd152d91703..59fed4e4aea 100644 --- a/api/management/v1/mongodb.pb.validate.go +++ b/api/management/v1/mongodb.pb.validate.go @@ -39,22 +39,22 @@ var ( _ = inventoryv1.LogLevel(0) ) -// Validate checks the field values on AddMongoDBRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *AddMongoDBRequest) Validate() error { +// Validate checks the field values on AddMongoDBServiceParams with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AddMongoDBServiceParams) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AddMongoDBRequest with the rules -// defined in the proto definition for this message. If any rules are +// ValidateAll checks the field values on AddMongoDBServiceParams with the +// rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// AddMongoDBRequestMultiError, or nil if none found. -func (m *AddMongoDBRequest) ValidateAll() error { +// AddMongoDBServiceParamsMultiError, or nil if none found. +func (m *AddMongoDBServiceParams) ValidateAll() error { return m.validate(true) } -func (m *AddMongoDBRequest) validate(all bool) error { +func (m *AddMongoDBServiceParams) validate(all bool) error { if m == nil { return nil } @@ -69,7 +69,7 @@ func (m *AddMongoDBRequest) validate(all bool) error { switch v := interface{}(m.GetAddNode()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMongoDBRequestValidationError{ + errors = append(errors, AddMongoDBServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -77,7 +77,7 @@ func (m *AddMongoDBRequest) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMongoDBRequestValidationError{ + errors = append(errors, AddMongoDBServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -86,7 +86,7 @@ func (m *AddMongoDBRequest) validate(all bool) error { } } else if v, ok := interface{}(m.GetAddNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMongoDBRequestValidationError{ + return AddMongoDBServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -95,7 +95,7 @@ func (m *AddMongoDBRequest) validate(all bool) error { } if utf8.RuneCountInString(m.GetServiceName()) < 1 { - err := AddMongoDBRequestValidationError{ + err := AddMongoDBServiceParamsValidationError{ field: "ServiceName", reason: "value length must be at least 1 runes", } @@ -112,7 +112,7 @@ func (m *AddMongoDBRequest) validate(all bool) error { // no validation rules for Socket if utf8.RuneCountInString(m.GetPmmAgentId()) < 1 { - err := AddMongoDBRequestValidationError{ + err := AddMongoDBServiceParamsValidationError{ field: "PmmAgentId", reason: "value length must be at least 1 runes", } @@ -167,19 +167,19 @@ func (m *AddMongoDBRequest) validate(all bool) error { // no validation rules for ExposeExporter if len(errors) > 0 { - return AddMongoDBRequestMultiError(errors) + return AddMongoDBServiceParamsMultiError(errors) } return nil } -// AddMongoDBRequestMultiError is an error wrapping multiple validation errors -// returned by AddMongoDBRequest.ValidateAll() if the designated constraints -// aren't met. -type AddMongoDBRequestMultiError []error +// AddMongoDBServiceParamsMultiError is an error wrapping multiple validation +// errors returned by AddMongoDBServiceParams.ValidateAll() if the designated +// constraints aren't met. +type AddMongoDBServiceParamsMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AddMongoDBRequestMultiError) Error() string { +func (m AddMongoDBServiceParamsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -188,11 +188,11 @@ func (m AddMongoDBRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AddMongoDBRequestMultiError) AllErrors() []error { return m } +func (m AddMongoDBServiceParamsMultiError) AllErrors() []error { return m } -// AddMongoDBRequestValidationError is the validation error returned by -// AddMongoDBRequest.Validate if the designated constraints aren't met. -type AddMongoDBRequestValidationError struct { +// AddMongoDBServiceParamsValidationError is the validation error returned by +// AddMongoDBServiceParams.Validate if the designated constraints aren't met. +type AddMongoDBServiceParamsValidationError struct { field string reason string cause error @@ -200,24 +200,24 @@ type AddMongoDBRequestValidationError struct { } // Field function returns field value. -func (e AddMongoDBRequestValidationError) Field() string { return e.field } +func (e AddMongoDBServiceParamsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AddMongoDBRequestValidationError) Reason() string { return e.reason } +func (e AddMongoDBServiceParamsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AddMongoDBRequestValidationError) Cause() error { return e.cause } +func (e AddMongoDBServiceParamsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AddMongoDBRequestValidationError) Key() bool { return e.key } +func (e AddMongoDBServiceParamsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AddMongoDBRequestValidationError) ErrorName() string { - return "AddMongoDBRequestValidationError" +func (e AddMongoDBServiceParamsValidationError) ErrorName() string { + return "AddMongoDBServiceParamsValidationError" } // Error satisfies the builtin error interface -func (e AddMongoDBRequestValidationError) Error() string { +func (e AddMongoDBServiceParamsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -229,14 +229,14 @@ func (e AddMongoDBRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAddMongoDBRequest.%s: %s%s", + "invalid %sAddMongoDBServiceParams.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AddMongoDBRequestValidationError{} +var _ error = AddMongoDBServiceParamsValidationError{} var _ interface { Field() string @@ -244,24 +244,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AddMongoDBRequestValidationError{} +} = AddMongoDBServiceParamsValidationError{} -// Validate checks the field values on AddMongoDBResponse with the rules +// Validate checks the field values on MongoDBServiceResult with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *AddMongoDBResponse) Validate() error { +func (m *MongoDBServiceResult) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AddMongoDBResponse with the rules +// ValidateAll checks the field values on MongoDBServiceResult with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// AddMongoDBResponseMultiError, or nil if none found. -func (m *AddMongoDBResponse) ValidateAll() error { +// MongoDBServiceResultMultiError, or nil if none found. +func (m *MongoDBServiceResult) ValidateAll() error { return m.validate(true) } -func (m *AddMongoDBResponse) validate(all bool) error { +func (m *MongoDBServiceResult) validate(all bool) error { if m == nil { return nil } @@ -272,7 +272,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { switch v := interface{}(m.GetService()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMongoDBResponseValidationError{ + errors = append(errors, MongoDBServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -280,7 +280,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMongoDBResponseValidationError{ + errors = append(errors, MongoDBServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -289,7 +289,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMongoDBResponseValidationError{ + return MongoDBServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -301,7 +301,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { switch v := interface{}(m.GetMongodbExporter()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMongoDBResponseValidationError{ + errors = append(errors, MongoDBServiceResultValidationError{ field: "MongodbExporter", reason: "embedded message failed validation", cause: err, @@ -309,7 +309,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMongoDBResponseValidationError{ + errors = append(errors, MongoDBServiceResultValidationError{ field: "MongodbExporter", reason: "embedded message failed validation", cause: err, @@ -318,7 +318,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetMongodbExporter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMongoDBResponseValidationError{ + return MongoDBServiceResultValidationError{ field: "MongodbExporter", reason: "embedded message failed validation", cause: err, @@ -330,7 +330,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { switch v := interface{}(m.GetQanMongodbProfiler()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMongoDBResponseValidationError{ + errors = append(errors, MongoDBServiceResultValidationError{ field: "QanMongodbProfiler", reason: "embedded message failed validation", cause: err, @@ -338,7 +338,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMongoDBResponseValidationError{ + errors = append(errors, MongoDBServiceResultValidationError{ field: "QanMongodbProfiler", reason: "embedded message failed validation", cause: err, @@ -347,7 +347,7 @@ func (m *AddMongoDBResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetQanMongodbProfiler()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMongoDBResponseValidationError{ + return MongoDBServiceResultValidationError{ field: "QanMongodbProfiler", reason: "embedded message failed validation", cause: err, @@ -356,19 +356,19 @@ func (m *AddMongoDBResponse) validate(all bool) error { } if len(errors) > 0 { - return AddMongoDBResponseMultiError(errors) + return MongoDBServiceResultMultiError(errors) } return nil } -// AddMongoDBResponseMultiError is an error wrapping multiple validation errors -// returned by AddMongoDBResponse.ValidateAll() if the designated constraints -// aren't met. -type AddMongoDBResponseMultiError []error +// MongoDBServiceResultMultiError is an error wrapping multiple validation +// errors returned by MongoDBServiceResult.ValidateAll() if the designated +// constraints aren't met. +type MongoDBServiceResultMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AddMongoDBResponseMultiError) Error() string { +func (m MongoDBServiceResultMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -377,11 +377,11 @@ func (m AddMongoDBResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AddMongoDBResponseMultiError) AllErrors() []error { return m } +func (m MongoDBServiceResultMultiError) AllErrors() []error { return m } -// AddMongoDBResponseValidationError is the validation error returned by -// AddMongoDBResponse.Validate if the designated constraints aren't met. -type AddMongoDBResponseValidationError struct { +// MongoDBServiceResultValidationError is the validation error returned by +// MongoDBServiceResult.Validate if the designated constraints aren't met. +type MongoDBServiceResultValidationError struct { field string reason string cause error @@ -389,24 +389,24 @@ type AddMongoDBResponseValidationError struct { } // Field function returns field value. -func (e AddMongoDBResponseValidationError) Field() string { return e.field } +func (e MongoDBServiceResultValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AddMongoDBResponseValidationError) Reason() string { return e.reason } +func (e MongoDBServiceResultValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AddMongoDBResponseValidationError) Cause() error { return e.cause } +func (e MongoDBServiceResultValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AddMongoDBResponseValidationError) Key() bool { return e.key } +func (e MongoDBServiceResultValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AddMongoDBResponseValidationError) ErrorName() string { - return "AddMongoDBResponseValidationError" +func (e MongoDBServiceResultValidationError) ErrorName() string { + return "MongoDBServiceResultValidationError" } // Error satisfies the builtin error interface -func (e AddMongoDBResponseValidationError) Error() string { +func (e MongoDBServiceResultValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -418,14 +418,14 @@ func (e AddMongoDBResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAddMongoDBResponse.%s: %s%s", + "invalid %sMongoDBServiceResult.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AddMongoDBResponseValidationError{} +var _ error = MongoDBServiceResultValidationError{} var _ interface { Field() string @@ -433,4 +433,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AddMongoDBResponseValidationError{} +} = MongoDBServiceResultValidationError{} diff --git a/api/management/v1/mongodb.proto b/api/management/v1/mongodb.proto index 7f578dfca5e..ae8967368dd 100644 --- a/api/management/v1/mongodb.proto +++ b/api/management/v1/mongodb.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package management.v1; -import "google/api/annotations.proto"; import "inventory/v1/agents.proto"; import "inventory/v1/log_level.proto"; import "inventory/v1/services.proto"; @@ -12,7 +11,7 @@ import "validate/validate.proto"; // Add MongoDB -message AddMongoDBRequest { +message AddMongoDBServiceParams { reserved 8; // TODO https://jira.percona.com/browse/PMM-4650 reserved "query_examples_disabled"; @@ -93,7 +92,7 @@ message AddMongoDBRequest { bool expose_exporter = 34; } -message AddMongoDBResponse { +message MongoDBServiceResult { inventory.v1.MongoDBService service = 1; inventory.v1.MongoDBExporter mongodb_exporter = 2; inventory.v1.QANMongoDBProfilerAgent qan_mongodb_profiler = 3; diff --git a/api/management/v1/mysql.pb.go b/api/management/v1/mysql.pb.go index 2d656eb994f..95fa665c710 100644 --- a/api/management/v1/mysql.pb.go +++ b/api/management/v1/mysql.pb.go @@ -11,7 +11,6 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,7 +24,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type AddMySQLRequest struct { +type AddMySQLServiceParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -108,8 +107,8 @@ type AddMySQLRequest struct { ExposeExporter bool `protobuf:"varint,32,opt,name=expose_exporter,json=exposeExporter,proto3" json:"expose_exporter,omitempty"` } -func (x *AddMySQLRequest) Reset() { - *x = AddMySQLRequest{} +func (x *AddMySQLServiceParams) Reset() { + *x = AddMySQLServiceParams{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_mysql_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -117,13 +116,13 @@ func (x *AddMySQLRequest) Reset() { } } -func (x *AddMySQLRequest) String() string { +func (x *AddMySQLServiceParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddMySQLRequest) ProtoMessage() {} +func (*AddMySQLServiceParams) ProtoMessage() {} -func (x *AddMySQLRequest) ProtoReflect() protoreflect.Message { +func (x *AddMySQLServiceParams) ProtoReflect() protoreflect.Message { mi := &file_management_v1_mysql_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -135,236 +134,236 @@ func (x *AddMySQLRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddMySQLRequest.ProtoReflect.Descriptor instead. -func (*AddMySQLRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use AddMySQLServiceParams.ProtoReflect.Descriptor instead. +func (*AddMySQLServiceParams) Descriptor() ([]byte, []int) { return file_management_v1_mysql_proto_rawDescGZIP(), []int{0} } -func (x *AddMySQLRequest) GetNodeId() string { +func (x *AddMySQLServiceParams) GetNodeId() string { if x != nil { return x.NodeId } return "" } -func (x *AddMySQLRequest) GetNodeName() string { +func (x *AddMySQLServiceParams) GetNodeName() string { if x != nil { return x.NodeName } return "" } -func (x *AddMySQLRequest) GetAddNode() *AddNodeParams { +func (x *AddMySQLServiceParams) GetAddNode() *AddNodeParams { if x != nil { return x.AddNode } return nil } -func (x *AddMySQLRequest) GetServiceName() string { +func (x *AddMySQLServiceParams) GetServiceName() string { if x != nil { return x.ServiceName } return "" } -func (x *AddMySQLRequest) GetAddress() string { +func (x *AddMySQLServiceParams) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *AddMySQLRequest) GetPort() uint32 { +func (x *AddMySQLServiceParams) GetPort() uint32 { if x != nil { return x.Port } return 0 } -func (x *AddMySQLRequest) GetSocket() string { +func (x *AddMySQLServiceParams) GetSocket() string { if x != nil { return x.Socket } return "" } -func (x *AddMySQLRequest) GetPmmAgentId() string { +func (x *AddMySQLServiceParams) GetPmmAgentId() string { if x != nil { return x.PmmAgentId } return "" } -func (x *AddMySQLRequest) GetEnvironment() string { +func (x *AddMySQLServiceParams) GetEnvironment() string { if x != nil { return x.Environment } return "" } -func (x *AddMySQLRequest) GetCluster() string { +func (x *AddMySQLServiceParams) GetCluster() string { if x != nil { return x.Cluster } return "" } -func (x *AddMySQLRequest) GetReplicationSet() string { +func (x *AddMySQLServiceParams) GetReplicationSet() string { if x != nil { return x.ReplicationSet } return "" } -func (x *AddMySQLRequest) GetUsername() string { +func (x *AddMySQLServiceParams) GetUsername() string { if x != nil { return x.Username } return "" } -func (x *AddMySQLRequest) GetPassword() string { +func (x *AddMySQLServiceParams) GetPassword() string { if x != nil { return x.Password } return "" } -func (x *AddMySQLRequest) GetQanMysqlPerfschema() bool { +func (x *AddMySQLServiceParams) GetQanMysqlPerfschema() bool { if x != nil { return x.QanMysqlPerfschema } return false } -func (x *AddMySQLRequest) GetQanMysqlSlowlog() bool { +func (x *AddMySQLServiceParams) GetQanMysqlSlowlog() bool { if x != nil { return x.QanMysqlSlowlog } return false } -func (x *AddMySQLRequest) GetCustomLabels() map[string]string { +func (x *AddMySQLServiceParams) GetCustomLabels() map[string]string { if x != nil { return x.CustomLabels } return nil } -func (x *AddMySQLRequest) GetSkipConnectionCheck() bool { +func (x *AddMySQLServiceParams) GetSkipConnectionCheck() bool { if x != nil { return x.SkipConnectionCheck } return false } -func (x *AddMySQLRequest) GetDisableCommentsParsing() bool { +func (x *AddMySQLServiceParams) GetDisableCommentsParsing() bool { if x != nil { return x.DisableCommentsParsing } return false } -func (x *AddMySQLRequest) GetMaxQueryLength() int32 { +func (x *AddMySQLServiceParams) GetMaxQueryLength() int32 { if x != nil { return x.MaxQueryLength } return 0 } -func (x *AddMySQLRequest) GetDisableQueryExamples() bool { +func (x *AddMySQLServiceParams) GetDisableQueryExamples() bool { if x != nil { return x.DisableQueryExamples } return false } -func (x *AddMySQLRequest) GetMaxSlowlogFileSize() int64 { +func (x *AddMySQLServiceParams) GetMaxSlowlogFileSize() int64 { if x != nil { return x.MaxSlowlogFileSize } return 0 } -func (x *AddMySQLRequest) GetTls() bool { +func (x *AddMySQLServiceParams) GetTls() bool { if x != nil { return x.Tls } return false } -func (x *AddMySQLRequest) GetTlsSkipVerify() bool { +func (x *AddMySQLServiceParams) GetTlsSkipVerify() bool { if x != nil { return x.TlsSkipVerify } return false } -func (x *AddMySQLRequest) GetTlsCa() string { +func (x *AddMySQLServiceParams) GetTlsCa() string { if x != nil { return x.TlsCa } return "" } -func (x *AddMySQLRequest) GetTlsCert() string { +func (x *AddMySQLServiceParams) GetTlsCert() string { if x != nil { return x.TlsCert } return "" } -func (x *AddMySQLRequest) GetTlsKey() string { +func (x *AddMySQLServiceParams) GetTlsKey() string { if x != nil { return x.TlsKey } return "" } -func (x *AddMySQLRequest) GetTablestatsGroupTableLimit() int32 { +func (x *AddMySQLServiceParams) GetTablestatsGroupTableLimit() int32 { if x != nil { return x.TablestatsGroupTableLimit } return 0 } -func (x *AddMySQLRequest) GetMetricsMode() MetricsMode { +func (x *AddMySQLServiceParams) GetMetricsMode() MetricsMode { if x != nil { return x.MetricsMode } return MetricsMode_METRICS_MODE_UNSPECIFIED } -func (x *AddMySQLRequest) GetDisableCollectors() []string { +func (x *AddMySQLServiceParams) GetDisableCollectors() []string { if x != nil { return x.DisableCollectors } return nil } -func (x *AddMySQLRequest) GetAgentPassword() string { +func (x *AddMySQLServiceParams) GetAgentPassword() string { if x != nil { return x.AgentPassword } return "" } -func (x *AddMySQLRequest) GetLogLevel() v1.LogLevel { +func (x *AddMySQLServiceParams) GetLogLevel() v1.LogLevel { if x != nil { return x.LogLevel } return v1.LogLevel(0) } -func (x *AddMySQLRequest) GetExposeExporter() bool { +func (x *AddMySQLServiceParams) GetExposeExporter() bool { if x != nil { return x.ExposeExporter } return false } -type AddMySQLResponse struct { +type MySQLServiceResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -377,8 +376,8 @@ type AddMySQLResponse struct { TableCount int32 `protobuf:"varint,5,opt,name=table_count,json=tableCount,proto3" json:"table_count,omitempty"` } -func (x *AddMySQLResponse) Reset() { - *x = AddMySQLResponse{} +func (x *MySQLServiceResult) Reset() { + *x = MySQLServiceResult{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_mysql_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -386,13 +385,13 @@ func (x *AddMySQLResponse) Reset() { } } -func (x *AddMySQLResponse) String() string { +func (x *MySQLServiceResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddMySQLResponse) ProtoMessage() {} +func (*MySQLServiceResult) ProtoMessage() {} -func (x *AddMySQLResponse) ProtoReflect() protoreflect.Message { +func (x *MySQLServiceResult) ProtoReflect() protoreflect.Message { mi := &file_management_v1_mysql_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -404,40 +403,40 @@ func (x *AddMySQLResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddMySQLResponse.ProtoReflect.Descriptor instead. -func (*AddMySQLResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MySQLServiceResult.ProtoReflect.Descriptor instead. +func (*MySQLServiceResult) Descriptor() ([]byte, []int) { return file_management_v1_mysql_proto_rawDescGZIP(), []int{1} } -func (x *AddMySQLResponse) GetService() *v1.MySQLService { +func (x *MySQLServiceResult) GetService() *v1.MySQLService { if x != nil { return x.Service } return nil } -func (x *AddMySQLResponse) GetMysqldExporter() *v1.MySQLdExporter { +func (x *MySQLServiceResult) GetMysqldExporter() *v1.MySQLdExporter { if x != nil { return x.MysqldExporter } return nil } -func (x *AddMySQLResponse) GetQanMysqlPerfschema() *v1.QANMySQLPerfSchemaAgent { +func (x *MySQLServiceResult) GetQanMysqlPerfschema() *v1.QANMySQLPerfSchemaAgent { if x != nil { return x.QanMysqlPerfschema } return nil } -func (x *AddMySQLResponse) GetQanMysqlSlowlog() *v1.QANMySQLSlowlogAgent { +func (x *MySQLServiceResult) GetQanMysqlSlowlog() *v1.QANMySQLSlowlogAgent { if x != nil { return x.QanMysqlSlowlog } return nil } -func (x *AddMySQLResponse) GetTableCount() int32 { +func (x *MySQLServiceResult) GetTableCount() int32 { if x != nil { return x.TableCount } @@ -449,108 +448,107 @@ var File_management_v1_mysql_proto protoreflect.FileDescriptor var file_management_v1_mysql_proto_rawDesc = []byte{ 0x0a, 0x19, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, - 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, - 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf3, - 0x0a, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, - 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x4e, 0x6f, 0x64, - 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, - 0x10, 0x01, 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, - 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, - 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, - 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x12, 0x71, 0x61, 0x6e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x65, 0x72, 0x66, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2a, 0x0a, 0x11, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, - 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x6c, 0x6f, 0x77, 0x6c, 0x6f, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0f, 0x71, 0x61, 0x6e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x53, 0x6c, 0x6f, 0x77, 0x6c, - 0x6f, 0x67, 0x12, 0x55, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, - 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, - 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, - 0x63, 0x6b, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x38, 0x0a, - 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x71, - 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x13, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x73, - 0x6c, 0x6f, 0x77, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x15, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x6c, 0x6f, 0x77, 0x6c, - 0x6f, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, - 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, - 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, - 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x18, 0x18, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6c, 0x73, 0x43, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x74, - 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, - 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x12, - 0x3f, 0x0a, 0x1c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, - 0x1b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, - 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, - 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, - 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x69, 0x73, - 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x25, - 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, - 0x65, 0x6c, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, - 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, - 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, - 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x20, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x65, 0x72, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd9, 0x02, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, - 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x65, 0x72, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x69, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xff, 0x0a, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x37, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x70, + 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x30, 0x0a, 0x14, + 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x71, 0x61, 0x6e, 0x4d, + 0x79, 0x73, 0x71, 0x6c, 0x50, 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2a, + 0x0a, 0x11, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x73, 0x6c, 0x6f, 0x77, + 0x6c, 0x6f, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x71, 0x61, 0x6e, 0x4d, 0x79, + 0x73, 0x71, 0x6c, 0x53, 0x6c, 0x6f, 0x77, 0x6c, 0x6f, 0x67, 0x12, 0x5b, 0x0a, 0x0d, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x36, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x18, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, + 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, + 0x72, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0e, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, + 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, + 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x61, + 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x6c, 0x6f, + 0x77, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x6c, 0x6f, 0x77, 0x6c, 0x6f, 0x67, + 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, + 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x17, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x18, 0x18, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x6c, 0x73, 0x43, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6c, 0x73, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6c, 0x73, + 0x43, 0x65, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x3f, 0x0a, + 0x1c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x1b, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x3d, + 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x1c, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, + 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x1e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, + 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x08, + 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, + 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x20, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x22, 0xdb, 0x02, 0x0a, 0x12, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, @@ -600,9 +598,9 @@ func file_management_v1_mysql_proto_rawDescGZIP() []byte { var ( file_management_v1_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) file_management_v1_mysql_proto_goTypes = []interface{}{ - (*AddMySQLRequest)(nil), // 0: management.v1.AddMySQLRequest - (*AddMySQLResponse)(nil), // 1: management.v1.AddMySQLResponse - nil, // 2: management.v1.AddMySQLRequest.CustomLabelsEntry + (*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 @@ -614,14 +612,14 @@ var ( ) var file_management_v1_mysql_proto_depIdxs = []int32{ - 3, // 0: management.v1.AddMySQLRequest.add_node:type_name -> management.v1.AddNodeParams - 2, // 1: management.v1.AddMySQLRequest.custom_labels:type_name -> management.v1.AddMySQLRequest.CustomLabelsEntry - 4, // 2: management.v1.AddMySQLRequest.metrics_mode:type_name -> management.v1.MetricsMode - 5, // 3: management.v1.AddMySQLRequest.log_level:type_name -> inventory.v1.LogLevel - 6, // 4: management.v1.AddMySQLResponse.service:type_name -> inventory.v1.MySQLService - 7, // 5: management.v1.AddMySQLResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 8, // 6: management.v1.AddMySQLResponse.qan_mysql_perfschema:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 9, // 7: management.v1.AddMySQLResponse.qan_mysql_slowlog:type_name -> inventory.v1.QANMySQLSlowlogAgent + 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 + 4, // 2: management.v1.AddMySQLServiceParams.metrics_mode:type_name -> management.v1.MetricsMode + 5, // 3: management.v1.AddMySQLServiceParams.log_level:type_name -> inventory.v1.LogLevel + 6, // 4: management.v1.MySQLServiceResult.service:type_name -> inventory.v1.MySQLService + 7, // 5: management.v1.MySQLServiceResult.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 8, // 6: management.v1.MySQLServiceResult.qan_mysql_perfschema:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 9, // 7: management.v1.MySQLServiceResult.qan_mysql_slowlog:type_name -> inventory.v1.QANMySQLSlowlogAgent 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -638,7 +636,7 @@ func file_management_v1_mysql_proto_init() { file_management_v1_node_proto_init() if !protoimpl.UnsafeEnabled { file_management_v1_mysql_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddMySQLRequest); i { + switch v := v.(*AddMySQLServiceParams); i { case 0: return &v.state case 1: @@ -650,7 +648,7 @@ func file_management_v1_mysql_proto_init() { } } file_management_v1_mysql_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddMySQLResponse); i { + switch v := v.(*MySQLServiceResult); i { case 0: return &v.state case 1: diff --git a/api/management/v1/mysql.pb.validate.go b/api/management/v1/mysql.pb.validate.go index abcb8523714..a4ed3375d4a 100644 --- a/api/management/v1/mysql.pb.validate.go +++ b/api/management/v1/mysql.pb.validate.go @@ -39,22 +39,22 @@ var ( _ = inventoryv1.LogLevel(0) ) -// Validate checks the field values on AddMySQLRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *AddMySQLRequest) Validate() error { +// Validate checks the field values on AddMySQLServiceParams with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AddMySQLServiceParams) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AddMySQLRequest with the rules +// ValidateAll checks the field values on AddMySQLServiceParams with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// AddMySQLRequestMultiError, or nil if none found. -func (m *AddMySQLRequest) ValidateAll() error { +// AddMySQLServiceParamsMultiError, or nil if none found. +func (m *AddMySQLServiceParams) ValidateAll() error { return m.validate(true) } -func (m *AddMySQLRequest) validate(all bool) error { +func (m *AddMySQLServiceParams) validate(all bool) error { if m == nil { return nil } @@ -69,7 +69,7 @@ func (m *AddMySQLRequest) validate(all bool) error { switch v := interface{}(m.GetAddNode()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMySQLRequestValidationError{ + errors = append(errors, AddMySQLServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -77,7 +77,7 @@ func (m *AddMySQLRequest) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMySQLRequestValidationError{ + errors = append(errors, AddMySQLServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -86,7 +86,7 @@ func (m *AddMySQLRequest) validate(all bool) error { } } else if v, ok := interface{}(m.GetAddNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMySQLRequestValidationError{ + return AddMySQLServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -95,7 +95,7 @@ func (m *AddMySQLRequest) validate(all bool) error { } if utf8.RuneCountInString(m.GetServiceName()) < 1 { - err := AddMySQLRequestValidationError{ + err := AddMySQLServiceParamsValidationError{ field: "ServiceName", reason: "value length must be at least 1 runes", } @@ -112,7 +112,7 @@ func (m *AddMySQLRequest) validate(all bool) error { // no validation rules for Socket if utf8.RuneCountInString(m.GetPmmAgentId()) < 1 { - err := AddMySQLRequestValidationError{ + err := AddMySQLServiceParamsValidationError{ field: "PmmAgentId", reason: "value length must be at least 1 runes", } @@ -129,7 +129,7 @@ func (m *AddMySQLRequest) validate(all bool) error { // no validation rules for ReplicationSet if utf8.RuneCountInString(m.GetUsername()) < 1 { - err := AddMySQLRequestValidationError{ + err := AddMySQLServiceParamsValidationError{ field: "Username", reason: "value length must be at least 1 runes", } @@ -178,19 +178,19 @@ func (m *AddMySQLRequest) validate(all bool) error { // no validation rules for ExposeExporter if len(errors) > 0 { - return AddMySQLRequestMultiError(errors) + return AddMySQLServiceParamsMultiError(errors) } return nil } -// AddMySQLRequestMultiError is an error wrapping multiple validation errors -// returned by AddMySQLRequest.ValidateAll() if the designated constraints -// aren't met. -type AddMySQLRequestMultiError []error +// AddMySQLServiceParamsMultiError is an error wrapping multiple validation +// errors returned by AddMySQLServiceParams.ValidateAll() if the designated +// constraints aren't met. +type AddMySQLServiceParamsMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AddMySQLRequestMultiError) Error() string { +func (m AddMySQLServiceParamsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -199,11 +199,11 @@ func (m AddMySQLRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AddMySQLRequestMultiError) AllErrors() []error { return m } +func (m AddMySQLServiceParamsMultiError) AllErrors() []error { return m } -// AddMySQLRequestValidationError is the validation error returned by -// AddMySQLRequest.Validate if the designated constraints aren't met. -type AddMySQLRequestValidationError struct { +// AddMySQLServiceParamsValidationError is the validation error returned by +// AddMySQLServiceParams.Validate if the designated constraints aren't met. +type AddMySQLServiceParamsValidationError struct { field string reason string cause error @@ -211,22 +211,24 @@ type AddMySQLRequestValidationError struct { } // Field function returns field value. -func (e AddMySQLRequestValidationError) Field() string { return e.field } +func (e AddMySQLServiceParamsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AddMySQLRequestValidationError) Reason() string { return e.reason } +func (e AddMySQLServiceParamsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AddMySQLRequestValidationError) Cause() error { return e.cause } +func (e AddMySQLServiceParamsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AddMySQLRequestValidationError) Key() bool { return e.key } +func (e AddMySQLServiceParamsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AddMySQLRequestValidationError) ErrorName() string { return "AddMySQLRequestValidationError" } +func (e AddMySQLServiceParamsValidationError) ErrorName() string { + return "AddMySQLServiceParamsValidationError" +} // Error satisfies the builtin error interface -func (e AddMySQLRequestValidationError) Error() string { +func (e AddMySQLServiceParamsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -238,14 +240,14 @@ func (e AddMySQLRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAddMySQLRequest.%s: %s%s", + "invalid %sAddMySQLServiceParams.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AddMySQLRequestValidationError{} +var _ error = AddMySQLServiceParamsValidationError{} var _ interface { Field() string @@ -253,24 +255,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AddMySQLRequestValidationError{} +} = AddMySQLServiceParamsValidationError{} -// Validate checks the field values on AddMySQLResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *AddMySQLResponse) Validate() error { +// Validate checks the field values on MySQLServiceResult with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *MySQLServiceResult) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AddMySQLResponse with the rules +// ValidateAll checks the field values on MySQLServiceResult with the rules // defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// AddMySQLResponseMultiError, or nil if none found. -func (m *AddMySQLResponse) ValidateAll() error { +// MySQLServiceResultMultiError, or nil if none found. +func (m *MySQLServiceResult) ValidateAll() error { return m.validate(true) } -func (m *AddMySQLResponse) validate(all bool) error { +func (m *MySQLServiceResult) validate(all bool) error { if m == nil { return nil } @@ -281,7 +283,7 @@ func (m *AddMySQLResponse) validate(all bool) error { switch v := interface{}(m.GetService()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMySQLResponseValidationError{ + errors = append(errors, MySQLServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -289,7 +291,7 @@ func (m *AddMySQLResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMySQLResponseValidationError{ + errors = append(errors, MySQLServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -298,7 +300,7 @@ func (m *AddMySQLResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMySQLResponseValidationError{ + return MySQLServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -310,7 +312,7 @@ func (m *AddMySQLResponse) validate(all bool) error { switch v := interface{}(m.GetMysqldExporter()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMySQLResponseValidationError{ + errors = append(errors, MySQLServiceResultValidationError{ field: "MysqldExporter", reason: "embedded message failed validation", cause: err, @@ -318,7 +320,7 @@ func (m *AddMySQLResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMySQLResponseValidationError{ + errors = append(errors, MySQLServiceResultValidationError{ field: "MysqldExporter", reason: "embedded message failed validation", cause: err, @@ -327,7 +329,7 @@ func (m *AddMySQLResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetMysqldExporter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMySQLResponseValidationError{ + return MySQLServiceResultValidationError{ field: "MysqldExporter", reason: "embedded message failed validation", cause: err, @@ -339,7 +341,7 @@ func (m *AddMySQLResponse) validate(all bool) error { switch v := interface{}(m.GetQanMysqlPerfschema()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMySQLResponseValidationError{ + errors = append(errors, MySQLServiceResultValidationError{ field: "QanMysqlPerfschema", reason: "embedded message failed validation", cause: err, @@ -347,7 +349,7 @@ func (m *AddMySQLResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMySQLResponseValidationError{ + errors = append(errors, MySQLServiceResultValidationError{ field: "QanMysqlPerfschema", reason: "embedded message failed validation", cause: err, @@ -356,7 +358,7 @@ func (m *AddMySQLResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetQanMysqlPerfschema()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMySQLResponseValidationError{ + return MySQLServiceResultValidationError{ field: "QanMysqlPerfschema", reason: "embedded message failed validation", cause: err, @@ -368,7 +370,7 @@ func (m *AddMySQLResponse) validate(all bool) error { switch v := interface{}(m.GetQanMysqlSlowlog()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddMySQLResponseValidationError{ + errors = append(errors, MySQLServiceResultValidationError{ field: "QanMysqlSlowlog", reason: "embedded message failed validation", cause: err, @@ -376,7 +378,7 @@ func (m *AddMySQLResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddMySQLResponseValidationError{ + errors = append(errors, MySQLServiceResultValidationError{ field: "QanMysqlSlowlog", reason: "embedded message failed validation", cause: err, @@ -385,7 +387,7 @@ func (m *AddMySQLResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetQanMysqlSlowlog()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddMySQLResponseValidationError{ + return MySQLServiceResultValidationError{ field: "QanMysqlSlowlog", reason: "embedded message failed validation", cause: err, @@ -396,19 +398,19 @@ func (m *AddMySQLResponse) validate(all bool) error { // no validation rules for TableCount if len(errors) > 0 { - return AddMySQLResponseMultiError(errors) + return MySQLServiceResultMultiError(errors) } return nil } -// AddMySQLResponseMultiError is an error wrapping multiple validation errors -// returned by AddMySQLResponse.ValidateAll() if the designated constraints +// MySQLServiceResultMultiError is an error wrapping multiple validation errors +// returned by MySQLServiceResult.ValidateAll() if the designated constraints // aren't met. -type AddMySQLResponseMultiError []error +type MySQLServiceResultMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AddMySQLResponseMultiError) Error() string { +func (m MySQLServiceResultMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -417,11 +419,11 @@ func (m AddMySQLResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AddMySQLResponseMultiError) AllErrors() []error { return m } +func (m MySQLServiceResultMultiError) AllErrors() []error { return m } -// AddMySQLResponseValidationError is the validation error returned by -// AddMySQLResponse.Validate if the designated constraints aren't met. -type AddMySQLResponseValidationError struct { +// MySQLServiceResultValidationError is the validation error returned by +// MySQLServiceResult.Validate if the designated constraints aren't met. +type MySQLServiceResultValidationError struct { field string reason string cause error @@ -429,22 +431,24 @@ type AddMySQLResponseValidationError struct { } // Field function returns field value. -func (e AddMySQLResponseValidationError) Field() string { return e.field } +func (e MySQLServiceResultValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AddMySQLResponseValidationError) Reason() string { return e.reason } +func (e MySQLServiceResultValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AddMySQLResponseValidationError) Cause() error { return e.cause } +func (e MySQLServiceResultValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AddMySQLResponseValidationError) Key() bool { return e.key } +func (e MySQLServiceResultValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AddMySQLResponseValidationError) ErrorName() string { return "AddMySQLResponseValidationError" } +func (e MySQLServiceResultValidationError) ErrorName() string { + return "MySQLServiceResultValidationError" +} // Error satisfies the builtin error interface -func (e AddMySQLResponseValidationError) Error() string { +func (e MySQLServiceResultValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -456,14 +460,14 @@ func (e AddMySQLResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAddMySQLResponse.%s: %s%s", + "invalid %sMySQLServiceResult.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AddMySQLResponseValidationError{} +var _ error = MySQLServiceResultValidationError{} var _ interface { Field() string @@ -471,4 +475,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AddMySQLResponseValidationError{} +} = MySQLServiceResultValidationError{} diff --git a/api/management/v1/mysql.proto b/api/management/v1/mysql.proto index 0c1b939b5b9..80d694541ff 100644 --- a/api/management/v1/mysql.proto +++ b/api/management/v1/mysql.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package management.v1; -import "google/api/annotations.proto"; import "inventory/v1/agents.proto"; import "inventory/v1/log_level.proto"; import "inventory/v1/services.proto"; @@ -12,7 +11,7 @@ import "validate/validate.proto"; // Add MySQL -message AddMySQLRequest { +message AddMySQLServiceParams { // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. string node_id = 1; @@ -91,7 +90,7 @@ message AddMySQLRequest { bool expose_exporter = 32; } -message AddMySQLResponse { +message MySQLServiceResult { inventory.v1.MySQLService service = 1; inventory.v1.MySQLdExporter mysqld_exporter = 2; inventory.v1.QANMySQLPerfSchemaAgent qan_mysql_perfschema = 3; diff --git a/api/management/v1/node.pb.go b/api/management/v1/node.pb.go index 0d9502d354d..ce0ac9ea7d4 100644 --- a/api/management/v1/node.pb.go +++ b/api/management/v1/node.pb.go @@ -11,7 +11,6 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -426,117 +425,115 @@ var File_management_v1_node_proto protoreflect.FileDescriptor var file_management_v1_node_proto_rawDesc = []byte{ 0x0a, 0x18, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, - 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x18, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, - 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xc8, 0x03, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, - 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x16, - 0x0a, 0x06, 0x64, 0x69, 0x73, 0x74, 0x72, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x64, 0x69, 0x73, 0x74, 0x72, 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, - 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x53, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f, 0x0a, 0x11, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcc, 0x05, - 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, - 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x73, - 0x74, 0x72, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x73, 0x74, 0x72, - 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, - 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x61, 0x7a, 0x12, 0x59, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x0a, - 0x0a, 0x72, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x72, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3d, 0x0a, - 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x0d, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, - 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, - 0x6f, 0x73, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x3f, 0x0a, 0x11, 0x43, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x69, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, + 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x03, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x73, 0x74, 0x72, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x64, 0x69, 0x73, 0x74, 0x72, 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x53, 0x0a, 0x0d, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xfd, 0x01, 0x0a, - 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, - 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, - 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x70, 0x6d, 0x6d, 0x5f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x4d, 0x4d, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x52, 0x08, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0xaa, 0x01, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, - 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3f, + 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0xcc, 0x05, 0x0a, 0x13, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x09, + 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, + 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, + 0x69, 0x73, 0x74, 0x72, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x73, + 0x74, 0x72, 0x6f, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x61, 0x7a, 0x12, 0x59, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, + 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, + 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, + 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, + 0x0a, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, + 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x3f, 0x0a, + 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xfd, + 0x01, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x69, 0x63, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, + 0x65, 0x72, 0x69, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, + 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x42, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x70, 0x6d, 0x6d, + 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x4d, 0x4d, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0xaa, + 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, + 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, + 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, + 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/api/management/v1/node.proto b/api/management/v1/node.proto index d52d44d3023..913415a2041 100644 --- a/api/management/v1/node.proto +++ b/api/management/v1/node.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package management.v1; -import "google/api/annotations.proto"; import "inventory/v1/agents.proto"; import "inventory/v1/nodes.proto"; import "management/v1/metrics.proto"; diff --git a/api/management/v1/node/node.pb.go b/api/management/v1/node/node.pb.go index 30ef9d15a12..a26f83b8a4d 100644 --- a/api/management/v1/node/node.pb.go +++ b/api/management/v1/node/node.pb.go @@ -10,7 +10,6 @@ import ( 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" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -611,109 +610,107 @@ var File_management_v1_node_node_proto protoreflect.FileDescriptor var file_management_v1_node_node_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x08, 0x0a, 0x0d, 0x55, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, - 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, - 0x73, 0x74, 0x72, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x73, 0x74, - 0x72, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, - 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, - 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, - 0x02, 0x61, 0x7a, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x52, 0x0a, - 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0c, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, - 0x65, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x10, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, + 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x08, 0x0a, 0x0d, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x64, 0x69, 0x73, 0x74, 0x72, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, + 0x73, 0x74, 0x72, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, + 0x64, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, + 0x52, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, + 0x6f, 0x64, 0x65, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, + 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x3a, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, + 0x64, 0x65, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, + 0x12, 0x3f, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x1a, 0x6e, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x1a, 0x7c, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, + 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x1a, + 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x54, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x10, + 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x4f, 0x57, 0x4e, + 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x22, 0x47, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, + 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, + 0x46, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, - 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x3f, - 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, - 0x6e, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, - 0x7c, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0b, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x1a, 0x3f, 0x0a, - 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x54, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50, 0x10, 0x01, 0x12, - 0x0f, 0x0a, 0x0b, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x02, - 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x03, 0x22, 0x47, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x46, 0x0a, - 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, - 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x29, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, - 0x22, 0x42, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, - 0x6e, 0x6f, 0x64, 0x65, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3b, 0x6e, 0x6f, 0x64, 0x65, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x18, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x22, 0x29, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x22, 0x42, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x42, 0xa9, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x09, 0x4e, 0x6f, 0x64, + 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, + 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x3b, 0x6e, 0x6f, 0x64, 0x65, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x4e, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x4e, 0x6f, 0x64, 0x65, + 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0c, 0x4e, 0x6f, 0x64, 0x65, 0x5c, + 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x18, 0x4e, 0x6f, 0x64, 0x65, 0x5c, 0x56, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0d, 0x4e, 0x6f, 0x64, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/management/v1/node/node.proto b/api/management/v1/node/node.proto index 4f63ea76477..4778399b903 100644 --- a/api/management/v1/node/node.proto +++ b/api/management/v1/node/node.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package node.v1beta1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "inventory/v1/nodes.proto"; diff --git a/api/management/v1/postgresql.pb.go b/api/management/v1/postgresql.pb.go index 86e675227af..30d580a5229 100644 --- a/api/management/v1/postgresql.pb.go +++ b/api/management/v1/postgresql.pb.go @@ -11,7 +11,6 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -25,7 +24,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type AddPostgreSQLRequest struct { +type AddPostgreSQLServiceParams struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -106,8 +105,8 @@ type AddPostgreSQLRequest struct { MaxExporterConnections int32 `protobuf:"varint,33,opt,name=max_exporter_connections,json=maxExporterConnections,proto3" json:"max_exporter_connections,omitempty"` } -func (x *AddPostgreSQLRequest) Reset() { - *x = AddPostgreSQLRequest{} +func (x *AddPostgreSQLServiceParams) Reset() { + *x = AddPostgreSQLServiceParams{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_postgresql_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -115,13 +114,13 @@ func (x *AddPostgreSQLRequest) Reset() { } } -func (x *AddPostgreSQLRequest) String() string { +func (x *AddPostgreSQLServiceParams) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddPostgreSQLRequest) ProtoMessage() {} +func (*AddPostgreSQLServiceParams) ProtoMessage() {} -func (x *AddPostgreSQLRequest) ProtoReflect() protoreflect.Message { +func (x *AddPostgreSQLServiceParams) ProtoReflect() protoreflect.Message { mi := &file_management_v1_postgresql_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -133,243 +132,243 @@ func (x *AddPostgreSQLRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddPostgreSQLRequest.ProtoReflect.Descriptor instead. -func (*AddPostgreSQLRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use AddPostgreSQLServiceParams.ProtoReflect.Descriptor instead. +func (*AddPostgreSQLServiceParams) Descriptor() ([]byte, []int) { return file_management_v1_postgresql_proto_rawDescGZIP(), []int{0} } -func (x *AddPostgreSQLRequest) GetNodeId() string { +func (x *AddPostgreSQLServiceParams) GetNodeId() string { if x != nil { return x.NodeId } return "" } -func (x *AddPostgreSQLRequest) GetNodeName() string { +func (x *AddPostgreSQLServiceParams) GetNodeName() string { if x != nil { return x.NodeName } return "" } -func (x *AddPostgreSQLRequest) GetAddNode() *AddNodeParams { +func (x *AddPostgreSQLServiceParams) GetAddNode() *AddNodeParams { if x != nil { return x.AddNode } return nil } -func (x *AddPostgreSQLRequest) GetServiceName() string { +func (x *AddPostgreSQLServiceParams) GetServiceName() string { if x != nil { return x.ServiceName } return "" } -func (x *AddPostgreSQLRequest) GetAddress() string { +func (x *AddPostgreSQLServiceParams) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *AddPostgreSQLRequest) GetPort() uint32 { +func (x *AddPostgreSQLServiceParams) GetPort() uint32 { if x != nil { return x.Port } return 0 } -func (x *AddPostgreSQLRequest) GetDatabase() string { +func (x *AddPostgreSQLServiceParams) GetDatabase() string { if x != nil { return x.Database } return "" } -func (x *AddPostgreSQLRequest) GetSocket() string { +func (x *AddPostgreSQLServiceParams) GetSocket() string { if x != nil { return x.Socket } return "" } -func (x *AddPostgreSQLRequest) GetPmmAgentId() string { +func (x *AddPostgreSQLServiceParams) GetPmmAgentId() string { if x != nil { return x.PmmAgentId } return "" } -func (x *AddPostgreSQLRequest) GetEnvironment() string { +func (x *AddPostgreSQLServiceParams) GetEnvironment() string { if x != nil { return x.Environment } return "" } -func (x *AddPostgreSQLRequest) GetCluster() string { +func (x *AddPostgreSQLServiceParams) GetCluster() string { if x != nil { return x.Cluster } return "" } -func (x *AddPostgreSQLRequest) GetReplicationSet() string { +func (x *AddPostgreSQLServiceParams) GetReplicationSet() string { if x != nil { return x.ReplicationSet } return "" } -func (x *AddPostgreSQLRequest) GetUsername() string { +func (x *AddPostgreSQLServiceParams) GetUsername() string { if x != nil { return x.Username } return "" } -func (x *AddPostgreSQLRequest) GetPassword() string { +func (x *AddPostgreSQLServiceParams) GetPassword() string { if x != nil { return x.Password } return "" } -func (x *AddPostgreSQLRequest) GetQanPostgresqlPgstatementsAgent() bool { +func (x *AddPostgreSQLServiceParams) GetQanPostgresqlPgstatementsAgent() bool { if x != nil { return x.QanPostgresqlPgstatementsAgent } return false } -func (x *AddPostgreSQLRequest) GetQanPostgresqlPgstatmonitorAgent() bool { +func (x *AddPostgreSQLServiceParams) GetQanPostgresqlPgstatmonitorAgent() bool { if x != nil { return x.QanPostgresqlPgstatmonitorAgent } return false } -func (x *AddPostgreSQLRequest) GetMaxQueryLength() int32 { +func (x *AddPostgreSQLServiceParams) GetMaxQueryLength() int32 { if x != nil { return x.MaxQueryLength } return 0 } -func (x *AddPostgreSQLRequest) GetDisableQueryExamples() bool { +func (x *AddPostgreSQLServiceParams) GetDisableQueryExamples() bool { if x != nil { return x.DisableQueryExamples } return false } -func (x *AddPostgreSQLRequest) GetCustomLabels() map[string]string { +func (x *AddPostgreSQLServiceParams) GetCustomLabels() map[string]string { if x != nil { return x.CustomLabels } return nil } -func (x *AddPostgreSQLRequest) GetSkipConnectionCheck() bool { +func (x *AddPostgreSQLServiceParams) GetSkipConnectionCheck() bool { if x != nil { return x.SkipConnectionCheck } return false } -func (x *AddPostgreSQLRequest) GetDisableCommentsParsing() bool { +func (x *AddPostgreSQLServiceParams) GetDisableCommentsParsing() bool { if x != nil { return x.DisableCommentsParsing } return false } -func (x *AddPostgreSQLRequest) GetTls() bool { +func (x *AddPostgreSQLServiceParams) GetTls() bool { if x != nil { return x.Tls } return false } -func (x *AddPostgreSQLRequest) GetTlsSkipVerify() bool { +func (x *AddPostgreSQLServiceParams) GetTlsSkipVerify() bool { if x != nil { return x.TlsSkipVerify } return false } -func (x *AddPostgreSQLRequest) GetMetricsMode() MetricsMode { +func (x *AddPostgreSQLServiceParams) GetMetricsMode() MetricsMode { if x != nil { return x.MetricsMode } return MetricsMode_METRICS_MODE_UNSPECIFIED } -func (x *AddPostgreSQLRequest) GetDisableCollectors() []string { +func (x *AddPostgreSQLServiceParams) GetDisableCollectors() []string { if x != nil { return x.DisableCollectors } return nil } -func (x *AddPostgreSQLRequest) GetTlsCa() string { +func (x *AddPostgreSQLServiceParams) GetTlsCa() string { if x != nil { return x.TlsCa } return "" } -func (x *AddPostgreSQLRequest) GetTlsCert() string { +func (x *AddPostgreSQLServiceParams) GetTlsCert() string { if x != nil { return x.TlsCert } return "" } -func (x *AddPostgreSQLRequest) GetTlsKey() string { +func (x *AddPostgreSQLServiceParams) GetTlsKey() string { if x != nil { return x.TlsKey } return "" } -func (x *AddPostgreSQLRequest) GetAgentPassword() string { +func (x *AddPostgreSQLServiceParams) GetAgentPassword() string { if x != nil { return x.AgentPassword } return "" } -func (x *AddPostgreSQLRequest) GetLogLevel() v1.LogLevel { +func (x *AddPostgreSQLServiceParams) GetLogLevel() v1.LogLevel { if x != nil { return x.LogLevel } return v1.LogLevel(0) } -func (x *AddPostgreSQLRequest) GetAutoDiscoveryLimit() int32 { +func (x *AddPostgreSQLServiceParams) GetAutoDiscoveryLimit() int32 { if x != nil { return x.AutoDiscoveryLimit } return 0 } -func (x *AddPostgreSQLRequest) GetExposeExporter() bool { +func (x *AddPostgreSQLServiceParams) GetExposeExporter() bool { if x != nil { return x.ExposeExporter } return false } -func (x *AddPostgreSQLRequest) GetMaxExporterConnections() int32 { +func (x *AddPostgreSQLServiceParams) GetMaxExporterConnections() int32 { if x != nil { return x.MaxExporterConnections } return 0 } -type AddPostgreSQLResponse struct { +type PostgreSQLServiceResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -382,8 +381,8 @@ type AddPostgreSQLResponse struct { Warning string `protobuf:"bytes,5,opt,name=warning,proto3" json:"warning,omitempty"` } -func (x *AddPostgreSQLResponse) Reset() { - *x = AddPostgreSQLResponse{} +func (x *PostgreSQLServiceResult) Reset() { + *x = PostgreSQLServiceResult{} if protoimpl.UnsafeEnabled { mi := &file_management_v1_postgresql_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -391,13 +390,13 @@ func (x *AddPostgreSQLResponse) Reset() { } } -func (x *AddPostgreSQLResponse) String() string { +func (x *PostgreSQLServiceResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddPostgreSQLResponse) ProtoMessage() {} +func (*PostgreSQLServiceResult) ProtoMessage() {} -func (x *AddPostgreSQLResponse) ProtoReflect() protoreflect.Message { +func (x *PostgreSQLServiceResult) ProtoReflect() protoreflect.Message { mi := &file_management_v1_postgresql_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -409,40 +408,40 @@ func (x *AddPostgreSQLResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddPostgreSQLResponse.ProtoReflect.Descriptor instead. -func (*AddPostgreSQLResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use PostgreSQLServiceResult.ProtoReflect.Descriptor instead. +func (*PostgreSQLServiceResult) Descriptor() ([]byte, []int) { return file_management_v1_postgresql_proto_rawDescGZIP(), []int{1} } -func (x *AddPostgreSQLResponse) GetService() *v1.PostgreSQLService { +func (x *PostgreSQLServiceResult) GetService() *v1.PostgreSQLService { if x != nil { return x.Service } return nil } -func (x *AddPostgreSQLResponse) GetPostgresExporter() *v1.PostgresExporter { +func (x *PostgreSQLServiceResult) GetPostgresExporter() *v1.PostgresExporter { if x != nil { return x.PostgresExporter } return nil } -func (x *AddPostgreSQLResponse) GetQanPostgresqlPgstatementsAgent() *v1.QANPostgreSQLPgStatementsAgent { +func (x *PostgreSQLServiceResult) GetQanPostgresqlPgstatementsAgent() *v1.QANPostgreSQLPgStatementsAgent { if x != nil { return x.QanPostgresqlPgstatementsAgent } return nil } -func (x *AddPostgreSQLResponse) GetQanPostgresqlPgstatmonitorAgent() *v1.QANPostgreSQLPgStatMonitorAgent { +func (x *PostgreSQLServiceResult) GetQanPostgresqlPgstatmonitorAgent() *v1.QANPostgreSQLPgStatMonitorAgent { if x != nil { return x.QanPostgresqlPgstatmonitorAgent } return nil } -func (x *AddPostgreSQLResponse) GetWarning() string { +func (x *PostgreSQLServiceResult) GetWarning() string { if x != nil { return x.Warning } @@ -455,113 +454,112 @@ var file_management_v1_postgresql_proto_rawDesc = []byte{ 0x0a, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, - 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, - 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x18, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x0b, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, - 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x70, 0x6d, 0x6d, - 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x49, 0x0a, 0x21, 0x71, 0x61, - 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x67, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, - 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x71, 0x61, 0x6e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x22, 0x71, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x67, 0x73, 0x74, 0x61, 0x74, 0x6d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x1f, 0x71, 0x61, 0x6e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, - 0x50, 0x67, 0x73, 0x74, 0x61, 0x74, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, - 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6d, 0x61, - 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x34, 0x0a, 0x16, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x65, 0x78, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x73, 0x12, 0x5a, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, - 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, - 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x15, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, - 0x74, 0x6c, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, - 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x18, 0x1a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6c, 0x73, 0x43, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x74, - 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, - 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x5f, 0x6b, 0x65, - 0x79, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x12, - 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, - 0x76, 0x65, 0x6c, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, - 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, - 0x6c, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x61, - 0x75, 0x74, 0x6f, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, - 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x05, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0xae, 0x03, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, - 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x73, + 0x19, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x6e, 0x76, 0x65, + 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, + 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x18, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd7, 0x0b, 0x0a, 0x1a, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x61, 0x64, + 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, + 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, + 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x75, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x12, 0x49, 0x0a, 0x21, 0x71, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x71, + 0x61, 0x6e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x4b, 0x0a, + 0x22, 0x71, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, + 0x70, 0x67, 0x73, 0x74, 0x61, 0x74, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x71, 0x61, 0x6e, 0x50, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, 0x74, 0x61, 0x74, 0x6d, 0x6f, + 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, + 0x78, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x11, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x65, + 0x6e, 0x67, 0x74, 0x68, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x12, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x0d, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x3b, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, + 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, + 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x12, 0x38, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x15, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, + 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, + 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x61, 0x18, 0x1a, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x74, 0x6c, 0x73, 0x43, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x6c, 0x73, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x6c, 0x73, + 0x43, 0x65, 0x72, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x6c, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x1c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, + 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, + 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x75, 0x74, + 0x6f, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, + 0x74, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x65, + 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x20, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x72, 0x12, 0x38, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x21, 0x20, 0x01, 0x28, 0x05, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x3f, + 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0xb0, 0x03, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, @@ -616,9 +614,9 @@ func file_management_v1_postgresql_proto_rawDescGZIP() []byte { var ( file_management_v1_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) file_management_v1_postgresql_proto_goTypes = []interface{}{ - (*AddPostgreSQLRequest)(nil), // 0: management.v1.AddPostgreSQLRequest - (*AddPostgreSQLResponse)(nil), // 1: management.v1.AddPostgreSQLResponse - nil, // 2: management.v1.AddPostgreSQLRequest.CustomLabelsEntry + (*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 @@ -630,14 +628,14 @@ var ( ) var file_management_v1_postgresql_proto_depIdxs = []int32{ - 3, // 0: management.v1.AddPostgreSQLRequest.add_node:type_name -> management.v1.AddNodeParams - 2, // 1: management.v1.AddPostgreSQLRequest.custom_labels:type_name -> management.v1.AddPostgreSQLRequest.CustomLabelsEntry - 4, // 2: management.v1.AddPostgreSQLRequest.metrics_mode:type_name -> management.v1.MetricsMode - 5, // 3: management.v1.AddPostgreSQLRequest.log_level:type_name -> inventory.v1.LogLevel - 6, // 4: management.v1.AddPostgreSQLResponse.service:type_name -> inventory.v1.PostgreSQLService - 7, // 5: management.v1.AddPostgreSQLResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 6: management.v1.AddPostgreSQLResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 9, // 7: management.v1.AddPostgreSQLResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 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 + 4, // 2: management.v1.AddPostgreSQLServiceParams.metrics_mode:type_name -> management.v1.MetricsMode + 5, // 3: management.v1.AddPostgreSQLServiceParams.log_level:type_name -> inventory.v1.LogLevel + 6, // 4: management.v1.PostgreSQLServiceResult.service:type_name -> inventory.v1.PostgreSQLService + 7, // 5: management.v1.PostgreSQLServiceResult.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 8, // 6: management.v1.PostgreSQLServiceResult.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 9, // 7: management.v1.PostgreSQLServiceResult.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent 8, // [8:8] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name @@ -654,7 +652,7 @@ func file_management_v1_postgresql_proto_init() { file_management_v1_node_proto_init() if !protoimpl.UnsafeEnabled { file_management_v1_postgresql_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddPostgreSQLRequest); i { + switch v := v.(*AddPostgreSQLServiceParams); i { case 0: return &v.state case 1: @@ -666,7 +664,7 @@ func file_management_v1_postgresql_proto_init() { } } file_management_v1_postgresql_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddPostgreSQLResponse); i { + switch v := v.(*PostgreSQLServiceResult); i { case 0: return &v.state case 1: diff --git a/api/management/v1/postgresql.pb.validate.go b/api/management/v1/postgresql.pb.validate.go index 3ba0baadfa3..79da043015a 100644 --- a/api/management/v1/postgresql.pb.validate.go +++ b/api/management/v1/postgresql.pb.validate.go @@ -39,22 +39,22 @@ var ( _ = inventoryv1.LogLevel(0) ) -// Validate checks the field values on AddPostgreSQLRequest with the rules -// defined in the proto definition for this message. If any rules are +// Validate checks the field values on AddPostgreSQLServiceParams with the +// rules defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *AddPostgreSQLRequest) Validate() error { +func (m *AddPostgreSQLServiceParams) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AddPostgreSQLRequest with the rules -// defined in the proto definition for this message. If any rules are +// ValidateAll checks the field values on AddPostgreSQLServiceParams with the +// rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// AddPostgreSQLRequestMultiError, or nil if none found. -func (m *AddPostgreSQLRequest) ValidateAll() error { +// AddPostgreSQLServiceParamsMultiError, or nil if none found. +func (m *AddPostgreSQLServiceParams) ValidateAll() error { return m.validate(true) } -func (m *AddPostgreSQLRequest) validate(all bool) error { +func (m *AddPostgreSQLServiceParams) validate(all bool) error { if m == nil { return nil } @@ -69,7 +69,7 @@ func (m *AddPostgreSQLRequest) validate(all bool) error { switch v := interface{}(m.GetAddNode()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddPostgreSQLRequestValidationError{ + errors = append(errors, AddPostgreSQLServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -77,7 +77,7 @@ func (m *AddPostgreSQLRequest) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddPostgreSQLRequestValidationError{ + errors = append(errors, AddPostgreSQLServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -86,7 +86,7 @@ func (m *AddPostgreSQLRequest) validate(all bool) error { } } else if v, ok := interface{}(m.GetAddNode()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddPostgreSQLRequestValidationError{ + return AddPostgreSQLServiceParamsValidationError{ field: "AddNode", reason: "embedded message failed validation", cause: err, @@ -95,7 +95,7 @@ func (m *AddPostgreSQLRequest) validate(all bool) error { } if utf8.RuneCountInString(m.GetServiceName()) < 1 { - err := AddPostgreSQLRequestValidationError{ + err := AddPostgreSQLServiceParamsValidationError{ field: "ServiceName", reason: "value length must be at least 1 runes", } @@ -114,7 +114,7 @@ func (m *AddPostgreSQLRequest) validate(all bool) error { // no validation rules for Socket if utf8.RuneCountInString(m.GetPmmAgentId()) < 1 { - err := AddPostgreSQLRequestValidationError{ + err := AddPostgreSQLServiceParamsValidationError{ field: "PmmAgentId", reason: "value length must be at least 1 runes", } @@ -131,7 +131,7 @@ func (m *AddPostgreSQLRequest) validate(all bool) error { // no validation rules for ReplicationSet if utf8.RuneCountInString(m.GetUsername()) < 1 { - err := AddPostgreSQLRequestValidationError{ + err := AddPostgreSQLServiceParamsValidationError{ field: "Username", reason: "value length must be at least 1 runes", } @@ -180,19 +180,19 @@ func (m *AddPostgreSQLRequest) validate(all bool) error { // no validation rules for MaxExporterConnections if len(errors) > 0 { - return AddPostgreSQLRequestMultiError(errors) + return AddPostgreSQLServiceParamsMultiError(errors) } return nil } -// AddPostgreSQLRequestMultiError is an error wrapping multiple validation -// errors returned by AddPostgreSQLRequest.ValidateAll() if the designated -// constraints aren't met. -type AddPostgreSQLRequestMultiError []error +// AddPostgreSQLServiceParamsMultiError is an error wrapping multiple +// validation errors returned by AddPostgreSQLServiceParams.ValidateAll() if +// the designated constraints aren't met. +type AddPostgreSQLServiceParamsMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AddPostgreSQLRequestMultiError) Error() string { +func (m AddPostgreSQLServiceParamsMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -201,11 +201,11 @@ func (m AddPostgreSQLRequestMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AddPostgreSQLRequestMultiError) AllErrors() []error { return m } +func (m AddPostgreSQLServiceParamsMultiError) AllErrors() []error { return m } -// AddPostgreSQLRequestValidationError is the validation error returned by -// AddPostgreSQLRequest.Validate if the designated constraints aren't met. -type AddPostgreSQLRequestValidationError struct { +// AddPostgreSQLServiceParamsValidationError is the validation error returned +// by AddPostgreSQLServiceParams.Validate if the designated constraints aren't met. +type AddPostgreSQLServiceParamsValidationError struct { field string reason string cause error @@ -213,24 +213,24 @@ type AddPostgreSQLRequestValidationError struct { } // Field function returns field value. -func (e AddPostgreSQLRequestValidationError) Field() string { return e.field } +func (e AddPostgreSQLServiceParamsValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AddPostgreSQLRequestValidationError) Reason() string { return e.reason } +func (e AddPostgreSQLServiceParamsValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AddPostgreSQLRequestValidationError) Cause() error { return e.cause } +func (e AddPostgreSQLServiceParamsValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AddPostgreSQLRequestValidationError) Key() bool { return e.key } +func (e AddPostgreSQLServiceParamsValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AddPostgreSQLRequestValidationError) ErrorName() string { - return "AddPostgreSQLRequestValidationError" +func (e AddPostgreSQLServiceParamsValidationError) ErrorName() string { + return "AddPostgreSQLServiceParamsValidationError" } // Error satisfies the builtin error interface -func (e AddPostgreSQLRequestValidationError) Error() string { +func (e AddPostgreSQLServiceParamsValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -242,14 +242,14 @@ func (e AddPostgreSQLRequestValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAddPostgreSQLRequest.%s: %s%s", + "invalid %sAddPostgreSQLServiceParams.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AddPostgreSQLRequestValidationError{} +var _ error = AddPostgreSQLServiceParamsValidationError{} var _ interface { Field() string @@ -257,24 +257,24 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AddPostgreSQLRequestValidationError{} +} = AddPostgreSQLServiceParamsValidationError{} -// Validate checks the field values on AddPostgreSQLResponse with the rules +// Validate checks the field values on PostgreSQLServiceResult with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. -func (m *AddPostgreSQLResponse) Validate() error { +func (m *PostgreSQLServiceResult) Validate() error { return m.validate(false) } -// ValidateAll checks the field values on AddPostgreSQLResponse with the rules -// defined in the proto definition for this message. If any rules are +// ValidateAll checks the field values on PostgreSQLServiceResult with the +// rules defined in the proto definition for this message. If any rules are // violated, the result is a list of violation errors wrapped in -// AddPostgreSQLResponseMultiError, or nil if none found. -func (m *AddPostgreSQLResponse) ValidateAll() error { +// PostgreSQLServiceResultMultiError, or nil if none found. +func (m *PostgreSQLServiceResult) ValidateAll() error { return m.validate(true) } -func (m *AddPostgreSQLResponse) validate(all bool) error { +func (m *PostgreSQLServiceResult) validate(all bool) error { if m == nil { return nil } @@ -285,7 +285,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { switch v := interface{}(m.GetService()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddPostgreSQLResponseValidationError{ + errors = append(errors, PostgreSQLServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -293,7 +293,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddPostgreSQLResponseValidationError{ + errors = append(errors, PostgreSQLServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -302,7 +302,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetService()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddPostgreSQLResponseValidationError{ + return PostgreSQLServiceResultValidationError{ field: "Service", reason: "embedded message failed validation", cause: err, @@ -314,7 +314,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { switch v := interface{}(m.GetPostgresExporter()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddPostgreSQLResponseValidationError{ + errors = append(errors, PostgreSQLServiceResultValidationError{ field: "PostgresExporter", reason: "embedded message failed validation", cause: err, @@ -322,7 +322,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddPostgreSQLResponseValidationError{ + errors = append(errors, PostgreSQLServiceResultValidationError{ field: "PostgresExporter", reason: "embedded message failed validation", cause: err, @@ -331,7 +331,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetPostgresExporter()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddPostgreSQLResponseValidationError{ + return PostgreSQLServiceResultValidationError{ field: "PostgresExporter", reason: "embedded message failed validation", cause: err, @@ -343,7 +343,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { switch v := interface{}(m.GetQanPostgresqlPgstatementsAgent()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddPostgreSQLResponseValidationError{ + errors = append(errors, PostgreSQLServiceResultValidationError{ field: "QanPostgresqlPgstatementsAgent", reason: "embedded message failed validation", cause: err, @@ -351,7 +351,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddPostgreSQLResponseValidationError{ + errors = append(errors, PostgreSQLServiceResultValidationError{ field: "QanPostgresqlPgstatementsAgent", reason: "embedded message failed validation", cause: err, @@ -360,7 +360,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetQanPostgresqlPgstatementsAgent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddPostgreSQLResponseValidationError{ + return PostgreSQLServiceResultValidationError{ field: "QanPostgresqlPgstatementsAgent", reason: "embedded message failed validation", cause: err, @@ -372,7 +372,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { switch v := interface{}(m.GetQanPostgresqlPgstatmonitorAgent()).(type) { case interface{ ValidateAll() error }: if err := v.ValidateAll(); err != nil { - errors = append(errors, AddPostgreSQLResponseValidationError{ + errors = append(errors, PostgreSQLServiceResultValidationError{ field: "QanPostgresqlPgstatmonitorAgent", reason: "embedded message failed validation", cause: err, @@ -380,7 +380,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { } case interface{ Validate() error }: if err := v.Validate(); err != nil { - errors = append(errors, AddPostgreSQLResponseValidationError{ + errors = append(errors, PostgreSQLServiceResultValidationError{ field: "QanPostgresqlPgstatmonitorAgent", reason: "embedded message failed validation", cause: err, @@ -389,7 +389,7 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { } } else if v, ok := interface{}(m.GetQanPostgresqlPgstatmonitorAgent()).(interface{ Validate() error }); ok { if err := v.Validate(); err != nil { - return AddPostgreSQLResponseValidationError{ + return PostgreSQLServiceResultValidationError{ field: "QanPostgresqlPgstatmonitorAgent", reason: "embedded message failed validation", cause: err, @@ -400,19 +400,19 @@ func (m *AddPostgreSQLResponse) validate(all bool) error { // no validation rules for Warning if len(errors) > 0 { - return AddPostgreSQLResponseMultiError(errors) + return PostgreSQLServiceResultMultiError(errors) } return nil } -// AddPostgreSQLResponseMultiError is an error wrapping multiple validation -// errors returned by AddPostgreSQLResponse.ValidateAll() if the designated +// PostgreSQLServiceResultMultiError is an error wrapping multiple validation +// errors returned by PostgreSQLServiceResult.ValidateAll() if the designated // constraints aren't met. -type AddPostgreSQLResponseMultiError []error +type PostgreSQLServiceResultMultiError []error // Error returns a concatenation of all the error messages it wraps. -func (m AddPostgreSQLResponseMultiError) Error() string { +func (m PostgreSQLServiceResultMultiError) Error() string { var msgs []string for _, err := range m { msgs = append(msgs, err.Error()) @@ -421,11 +421,11 @@ func (m AddPostgreSQLResponseMultiError) Error() string { } // AllErrors returns a list of validation violation errors. -func (m AddPostgreSQLResponseMultiError) AllErrors() []error { return m } +func (m PostgreSQLServiceResultMultiError) AllErrors() []error { return m } -// AddPostgreSQLResponseValidationError is the validation error returned by -// AddPostgreSQLResponse.Validate if the designated constraints aren't met. -type AddPostgreSQLResponseValidationError struct { +// PostgreSQLServiceResultValidationError is the validation error returned by +// PostgreSQLServiceResult.Validate if the designated constraints aren't met. +type PostgreSQLServiceResultValidationError struct { field string reason string cause error @@ -433,24 +433,24 @@ type AddPostgreSQLResponseValidationError struct { } // Field function returns field value. -func (e AddPostgreSQLResponseValidationError) Field() string { return e.field } +func (e PostgreSQLServiceResultValidationError) Field() string { return e.field } // Reason function returns reason value. -func (e AddPostgreSQLResponseValidationError) Reason() string { return e.reason } +func (e PostgreSQLServiceResultValidationError) Reason() string { return e.reason } // Cause function returns cause value. -func (e AddPostgreSQLResponseValidationError) Cause() error { return e.cause } +func (e PostgreSQLServiceResultValidationError) Cause() error { return e.cause } // Key function returns key value. -func (e AddPostgreSQLResponseValidationError) Key() bool { return e.key } +func (e PostgreSQLServiceResultValidationError) Key() bool { return e.key } // ErrorName returns error name. -func (e AddPostgreSQLResponseValidationError) ErrorName() string { - return "AddPostgreSQLResponseValidationError" +func (e PostgreSQLServiceResultValidationError) ErrorName() string { + return "PostgreSQLServiceResultValidationError" } // Error satisfies the builtin error interface -func (e AddPostgreSQLResponseValidationError) Error() string { +func (e PostgreSQLServiceResultValidationError) Error() string { cause := "" if e.cause != nil { cause = fmt.Sprintf(" | caused by: %v", e.cause) @@ -462,14 +462,14 @@ func (e AddPostgreSQLResponseValidationError) Error() string { } return fmt.Sprintf( - "invalid %sAddPostgreSQLResponse.%s: %s%s", + "invalid %sPostgreSQLServiceResult.%s: %s%s", key, e.field, e.reason, cause) } -var _ error = AddPostgreSQLResponseValidationError{} +var _ error = PostgreSQLServiceResultValidationError{} var _ interface { Field() string @@ -477,4 +477,4 @@ var _ interface { Key() bool Cause() error ErrorName() string -} = AddPostgreSQLResponseValidationError{} +} = PostgreSQLServiceResultValidationError{} diff --git a/api/management/v1/postgresql.proto b/api/management/v1/postgresql.proto index 20a3ffa427e..c81d9966800 100644 --- a/api/management/v1/postgresql.proto +++ b/api/management/v1/postgresql.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package management.v1; -import "google/api/annotations.proto"; import "inventory/v1/agents.proto"; import "inventory/v1/log_level.proto"; import "inventory/v1/services.proto"; @@ -12,7 +11,7 @@ import "validate/validate.proto"; // Add PostgreSQL -message AddPostgreSQLRequest { +message AddPostgreSQLServiceParams { // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. string node_id = 1; @@ -89,7 +88,7 @@ message AddPostgreSQLRequest { int32 max_exporter_connections = 33; } -message AddPostgreSQLResponse { +message PostgreSQLServiceResult { inventory.v1.PostgreSQLService service = 1; inventory.v1.PostgresExporter postgres_exporter = 2; inventory.v1.QANPostgreSQLPgStatementsAgent qan_postgresql_pgstatements_agent = 3; diff --git a/api/management/v1/proxysql.pb.go b/api/management/v1/proxysql.pb.go index 50029608700..728cf171ae6 100644 --- a/api/management/v1/proxysql.pb.go +++ b/api/management/v1/proxysql.pb.go @@ -11,7 +11,6 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -330,101 +329,99 @@ var File_management_v1_proxysql_proto protoreflect.FileDescriptor var file_management_v1_proxysql_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, - 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xc2, 0x07, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, - 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, - 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, - 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, - 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x70, 0x6d, 0x6d, - 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, - 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, - 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x58, 0x0a, 0x0d, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, - 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, - 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6d, 0x6f, - 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, - 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x50, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, - 0x65, 0x6c, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x27, 0x0a, 0x0f, - 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, - 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x01, 0x0a, 0x13, 0x41, 0x64, 0x64, 0x50, 0x72, - 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, - 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x42, 0xae, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x71, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, - 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, + 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x18, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x07, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, + 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, + 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x37, 0x0a, 0x08, 0x61, 0x64, 0x64, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2a, 0x0a, 0x0c, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x70, + 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x70, 0x6d, 0x6d, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, + 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x58, 0x0a, 0x0d, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0e, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, + 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, + 0x74, 0x6c, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, + 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x79, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, + 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, + 0x6f, 0x64, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, + 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, + 0x72, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, + 0x77, 0x6f, 0x72, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x33, 0x0a, 0x09, 0x6c, 0x6f, 0x67, + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, + 0x65, 0x76, 0x65, 0x6c, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x27, + 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x01, 0x0a, 0x13, 0x41, 0x64, 0x64, + 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x37, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x65, 0x72, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x42, 0xae, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, + 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/management/v1/proxysql.proto b/api/management/v1/proxysql.proto index 81e39dc24ab..a34e9c4c451 100644 --- a/api/management/v1/proxysql.proto +++ b/api/management/v1/proxysql.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package management.v1; -import "google/api/annotations.proto"; import "inventory/v1/agents.proto"; import "inventory/v1/log_level.proto"; import "inventory/v1/services.proto"; diff --git a/api/management/v1/rds.pb.go b/api/management/v1/rds.pb.go index 533d6e9ccf8..34032f31775 100644 --- a/api/management/v1/rds.pb.go +++ b/api/management/v1/rds.pb.go @@ -11,7 +11,6 @@ import ( sync "sync" _ "github.com/envoyproxy/protoc-gen-validate/validate" - _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -738,198 +737,196 @@ var File_management_v1_rds_proto protoreflect.FileDescriptor var file_management_v1_rds_proto_rawDesc = []byte{ 0x0a, 0x17, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, - 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x18, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, - 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, - 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, - 0x02, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, - 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, 0x12, 0x1f, - 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x18, - 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x38, 0x0a, 0x06, - 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, - 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, - 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x60, 0x0a, - 0x12, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x77, 0x73, - 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x22, - 0x5e, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x72, 0x64, 0x73, 0x5f, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, + 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, + 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x8c, 0x02, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, + 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x61, 0x7a, + 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x38, + 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, + 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x67, 0x69, + 0x6e, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0x60, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, + 0x77, 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x61, + 0x77, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x22, 0x5e, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x72, 0x64, 0x73, 0x5f, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x73, 0x22, 0xf0, 0x0b, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, + 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x61, 0x7a, 0x12, 0x28, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, + 0x10, 0x01, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x1b, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x38, 0x0a, + 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x52, 0x0c, 0x72, 0x64, 0x73, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x22, - 0xf0, 0x0b, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, - 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x61, 0x7a, 0x12, 0x28, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, - 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, - 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x38, 0x0a, 0x06, 0x65, - 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, - 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, - 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x61, - 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0f, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4b, 0x65, - 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x64, 0x73, 0x5f, 0x65, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x72, - 0x64, 0x73, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x71, 0x61, - 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x71, 0x61, 0x6e, 0x4d, 0x79, 0x73, - 0x71, 0x6c, 0x50, 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x53, 0x0a, 0x0d, - 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x13, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x14, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x73, - 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x16, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, - 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, - 0x61, 0x74, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, - 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x61, - 0x73, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x64, 0x69, - 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x4d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, - 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, - 0x6f, 0x64, 0x65, 0x12, 0x3e, 0x0a, 0x1b, 0x71, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x71, 0x61, 0x6e, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, - 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, - 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x64, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x1f, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x70, 0x61, 0x72, - 0x73, 0x69, 0x6e, 0x67, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x64, 0x69, 0x73, 0x61, - 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, 0x73, 0x69, - 0x6e, 0x67, 0x12, 0x4d, 0x0a, 0x23, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x20, 0x6d, 0x61, 0x78, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x45, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0xd1, 0x04, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x64, 0x73, 0x5f, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, - 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x44, 0x53, 0x45, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x72, 0x64, 0x73, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x64, - 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x79, 0x53, 0x51, 0x4c, 0x64, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x0e, 0x6d, - 0x79, 0x73, 0x71, 0x6c, 0x64, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x57, 0x0a, - 0x14, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x41, 0x4e, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x50, 0x65, 0x72, 0x66, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x52, 0x12, 0x71, 0x61, 0x6e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x65, 0x72, 0x66, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3f, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x73, 0x71, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x70, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x12, 0x4f, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x52, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, - 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x6c, 0x0a, 0x1b, 0x71, 0x61, 0x6e, 0x5f, - 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x67, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x52, + 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x6e, + 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, + 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x0e, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x24, 0x0a, + 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x77, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x77, 0x73, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x64, 0x73, + 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0b, 0x72, 0x64, 0x73, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, + 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x18, 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x71, 0x61, 0x6e, 0x4d, + 0x79, 0x73, 0x71, 0x6c, 0x50, 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x53, + 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, + 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x18, 0x14, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x13, 0x73, 0x6b, 0x69, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x6c, 0x73, 0x18, 0x15, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x74, 0x6c, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x6c, 0x73, + 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0d, 0x74, 0x6c, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x12, 0x34, 0x0a, 0x16, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x5f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x18, 0x17, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, + 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x73, 0x74, 0x61, 0x74, 0x73, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, + 0x42, 0x61, 0x73, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x38, 0x0a, 0x18, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, + 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x64, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x3d, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, + 0x73, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x3e, 0x0a, 0x1b, 0x71, 0x61, 0x6e, 0x5f, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x71, 0x61, 0x6e, 0x50, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, + 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x6f, + 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x1f, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x38, 0x0a, 0x18, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x70, + 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x50, 0x61, 0x72, + 0x73, 0x69, 0x6e, 0x67, 0x12, 0x4d, 0x0a, 0x23, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x5f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x21, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x20, 0x6d, 0x61, 0x78, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd1, 0x04, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x52, 0x44, 0x53, 0x4e, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x64, 0x73, 0x5f, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x44, + 0x53, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x72, 0x64, 0x73, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, 0x45, 0x0a, 0x0f, 0x6d, 0x79, 0x73, 0x71, + 0x6c, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x64, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, + 0x0e, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x64, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, + 0x57, 0x0a, 0x14, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, + 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x41, 0x4e, - 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x50, 0x67, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x19, 0x71, 0x61, 0x6e, - 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x7b, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x52, 0x44, 0x53, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x44, - 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x45, 0x4e, 0x47, 0x49, - 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, 0x53, - 0x5f, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x12, - 0x22, 0x0a, 0x1e, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, 0x53, 0x5f, - 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, 0x53, 0x51, - 0x4c, 0x10, 0x02, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x52, 0x64, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, - 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x50, 0x65, 0x72, 0x66, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x71, 0x61, 0x6e, 0x4d, 0x79, 0x73, 0x71, 0x6c, 0x50, 0x65, + 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x3f, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x0a, 0x70, + 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x12, 0x4f, 0x0a, 0x13, 0x70, 0x6f, 0x73, + 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x52, 0x12, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, + 0x71, 0x6c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x12, 0x6c, 0x0a, 0x1b, 0x71, 0x61, + 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x67, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2c, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x41, 0x4e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x50, 0x67, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x19, 0x71, + 0x61, 0x6e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x50, 0x67, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2a, 0x7b, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x23, 0x0a, + 0x1f, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, 0x53, 0x5f, 0x45, 0x4e, + 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, + 0x44, 0x53, 0x5f, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, + 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x44, 0x49, 0x53, 0x43, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x44, + 0x53, 0x5f, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, + 0x53, 0x51, 0x4c, 0x10, 0x02, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x52, 0x64, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, + 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/management/v1/rds.proto b/api/management/v1/rds.proto index ebf81d2dc14..36be53c7cba 100644 --- a/api/management/v1/rds.proto +++ b/api/management/v1/rds.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package management.v1; -import "google/api/annotations.proto"; import "inventory/v1/agents.proto"; import "inventory/v1/nodes.proto"; import "inventory/v1/services.proto"; diff --git a/api/management/v1/service.pb.go b/api/management/v1/service.pb.go index b69638d3bea..462671b4511 100644 --- a/api/management/v1/service.pb.go +++ b/api/management/v1/service.pb.go @@ -25,24 +25,243 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type AddServiceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Service: + // + // *AddServiceRequest_Mysql + // *AddServiceRequest_Mongodb + // *AddServiceRequest_Postgresql + // *AddServiceRequest_External + Service isAddServiceRequest_Service `protobuf_oneof:"service"` +} + +func (x *AddServiceRequest) Reset() { + *x = AddServiceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_management_v1_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddServiceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddServiceRequest) ProtoMessage() {} + +func (x *AddServiceRequest) ProtoReflect() protoreflect.Message { + mi := &file_management_v1_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddServiceRequest.ProtoReflect.Descriptor instead. +func (*AddServiceRequest) Descriptor() ([]byte, []int) { + return file_management_v1_service_proto_rawDescGZIP(), []int{0} +} + +func (m *AddServiceRequest) GetService() isAddServiceRequest_Service { + if m != nil { + return m.Service + } + return nil +} + +func (x *AddServiceRequest) GetMysql() *AddMySQLServiceParams { + if x, ok := x.GetService().(*AddServiceRequest_Mysql); ok { + return x.Mysql + } + return nil +} + +func (x *AddServiceRequest) GetMongodb() *AddMongoDBServiceParams { + if x, ok := x.GetService().(*AddServiceRequest_Mongodb); ok { + return x.Mongodb + } + return nil +} + +func (x *AddServiceRequest) GetPostgresql() *AddPostgreSQLServiceParams { + if x, ok := x.GetService().(*AddServiceRequest_Postgresql); ok { + return x.Postgresql + } + return nil +} + +func (x *AddServiceRequest) GetExternal() *AddExternalServiceParams { + if x, ok := x.GetService().(*AddServiceRequest_External); ok { + return x.External + } + return nil +} + +type isAddServiceRequest_Service interface { + isAddServiceRequest_Service() +} + +type AddServiceRequest_Mysql struct { + Mysql *AddMySQLServiceParams `protobuf:"bytes,1,opt,name=mysql,proto3,oneof"` +} + +type AddServiceRequest_Mongodb struct { + Mongodb *AddMongoDBServiceParams `protobuf:"bytes,2,opt,name=mongodb,proto3,oneof"` +} + +type AddServiceRequest_Postgresql struct { + Postgresql *AddPostgreSQLServiceParams `protobuf:"bytes,3,opt,name=postgresql,proto3,oneof"` +} + +type AddServiceRequest_External struct { + // AddProxySQLServiceParams proxysql = 4; + // AddHAProxyServiceParams haproxy = 5; + External *AddExternalServiceParams `protobuf:"bytes,6,opt,name=external,proto3,oneof"` +} + +func (*AddServiceRequest_Mysql) isAddServiceRequest_Service() {} + +func (*AddServiceRequest_Mongodb) isAddServiceRequest_Service() {} + +func (*AddServiceRequest_Postgresql) isAddServiceRequest_Service() {} + +func (*AddServiceRequest_External) isAddServiceRequest_Service() {} + +type AddServiceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Service: + // + // *AddServiceResponse_Mysql + // *AddServiceResponse_Mongodb + // *AddServiceResponse_Postgresql + // *AddServiceResponse_External + Service isAddServiceResponse_Service `protobuf_oneof:"service"` +} + +func (x *AddServiceResponse) Reset() { + *x = AddServiceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_management_v1_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddServiceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddServiceResponse) ProtoMessage() {} + +func (x *AddServiceResponse) ProtoReflect() protoreflect.Message { + mi := &file_management_v1_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddServiceResponse.ProtoReflect.Descriptor instead. +func (*AddServiceResponse) Descriptor() ([]byte, []int) { + return file_management_v1_service_proto_rawDescGZIP(), []int{1} +} + +func (m *AddServiceResponse) GetService() isAddServiceResponse_Service { + if m != nil { + return m.Service + } + return nil +} + +func (x *AddServiceResponse) GetMysql() *MySQLServiceResult { + if x, ok := x.GetService().(*AddServiceResponse_Mysql); ok { + return x.Mysql + } + return nil +} + +func (x *AddServiceResponse) GetMongodb() *MongoDBServiceResult { + if x, ok := x.GetService().(*AddServiceResponse_Mongodb); ok { + return x.Mongodb + } + return nil +} + +func (x *AddServiceResponse) GetPostgresql() *PostgreSQLServiceResult { + if x, ok := x.GetService().(*AddServiceResponse_Postgresql); ok { + return x.Postgresql + } + return nil +} + +func (x *AddServiceResponse) GetExternal() *ExternalServiceResult { + if x, ok := x.GetService().(*AddServiceResponse_External); ok { + return x.External + } + return nil +} + +type isAddServiceResponse_Service interface { + isAddServiceResponse_Service() +} + +type AddServiceResponse_Mysql struct { + Mysql *MySQLServiceResult `protobuf:"bytes,1,opt,name=mysql,proto3,oneof"` +} + +type AddServiceResponse_Mongodb struct { + Mongodb *MongoDBServiceResult `protobuf:"bytes,2,opt,name=mongodb,proto3,oneof"` +} + +type AddServiceResponse_Postgresql struct { + Postgresql *PostgreSQLServiceResult `protobuf:"bytes,3,opt,name=postgresql,proto3,oneof"` +} + +type AddServiceResponse_External struct { + // ProxySQLService proxysql = 4; + // HAProxyService haproxy = 5; + External *ExternalServiceResult `protobuf:"bytes,6,opt,name=external,proto3,oneof"` +} + +func (*AddServiceResponse_Mysql) isAddServiceResponse_Service() {} + +func (*AddServiceResponse_Mongodb) isAddServiceResponse_Service() {} + +func (*AddServiceResponse_Postgresql) isAddServiceResponse_Service() {} + +func (*AddServiceResponse_External) isAddServiceResponse_Service() {} + type RemoveServiceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Either a Service ID or a Service Name. + ServiceId string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` // Service type. - ServiceType v1.ServiceType `protobuf:"varint,1,opt,name=service_type,json=serviceType,proto3,enum=inventory.v1.ServiceType" json:"service_type,omitempty"` - // Service ID or Service Name is required. - // Unique randomly generated instance identifier. - ServiceId string `protobuf:"bytes,2,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` - // Unique across all Services user-defined name. - ServiceName string `protobuf:"bytes,3,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` + ServiceType v1.ServiceType `protobuf:"varint,2,opt,name=service_type,json=serviceType,proto3,enum=inventory.v1.ServiceType" json:"service_type,omitempty"` } func (x *RemoveServiceRequest) Reset() { *x = RemoveServiceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_management_v1_service_proto_msgTypes[0] + mi := &file_management_v1_service_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -55,7 +274,7 @@ func (x *RemoveServiceRequest) String() string { func (*RemoveServiceRequest) ProtoMessage() {} func (x *RemoveServiceRequest) ProtoReflect() protoreflect.Message { - mi := &file_management_v1_service_proto_msgTypes[0] + mi := &file_management_v1_service_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -68,14 +287,7 @@ func (x *RemoveServiceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveServiceRequest.ProtoReflect.Descriptor instead. func (*RemoveServiceRequest) Descriptor() ([]byte, []int) { - return file_management_v1_service_proto_rawDescGZIP(), []int{0} -} - -func (x *RemoveServiceRequest) GetServiceType() v1.ServiceType { - if x != nil { - return x.ServiceType - } - return v1.ServiceType(0) + return file_management_v1_service_proto_rawDescGZIP(), []int{2} } func (x *RemoveServiceRequest) GetServiceId() string { @@ -85,11 +297,11 @@ func (x *RemoveServiceRequest) GetServiceId() string { return "" } -func (x *RemoveServiceRequest) GetServiceName() string { +func (x *RemoveServiceRequest) GetServiceType() v1.ServiceType { if x != nil { - return x.ServiceName + return x.ServiceType } - return "" + return v1.ServiceType(0) } type RemoveServiceResponse struct { @@ -101,7 +313,7 @@ type RemoveServiceResponse struct { func (x *RemoveServiceResponse) Reset() { *x = RemoveServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_management_v1_service_proto_msgTypes[1] + mi := &file_management_v1_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -114,7 +326,7 @@ func (x *RemoveServiceResponse) String() string { func (*RemoveServiceResponse) ProtoMessage() {} func (x *RemoveServiceResponse) ProtoReflect() protoreflect.Message { - mi := &file_management_v1_service_proto_msgTypes[1] + mi := &file_management_v1_service_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -127,7 +339,7 @@ func (x *RemoveServiceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveServiceResponse.ProtoReflect.Descriptor instead. func (*RemoveServiceResponse) Descriptor() ([]byte, []int) { - return file_management_v1_service_proto_rawDescGZIP(), []int{1} + return file_management_v1_service_proto_rawDescGZIP(), []int{3} } var File_management_v1_service_proto protoreflect.FileDescriptor @@ -158,226 +370,176 @@ var file_management_v1_service_proto_rawDesc = []byte{ 0x31, 0x2f, 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x14, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x76, - 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc3, 0x18, - 0x0a, 0x11, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0xad, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, - 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x51, 0x92, 0x41, 0x25, 0x12, 0x0e, 0x41, 0x64, 0x64, 0x20, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x13, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x41, 0x64, 0x64, 0x12, 0xb7, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x92, - 0x41, 0x34, 0x12, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4e, 0x6f, 0x64, - 0x65, 0x1a, 0x23, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x73, 0x20, 0x61, 0x20, 0x6e, - 0x65, 0x77, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6d, 0x6d, 0x2d, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, - 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, - 0x4e, 0x6f, 0x64, 0x65, 0x2f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x86, 0x03, - 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x21, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, - 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x02, 0x92, 0x41, 0x85, 0x02, 0x12, 0x14, 0x41, 0x64, 0x64, - 0x20, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x1a, 0xec, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x64, - 0x64, 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, - 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, - 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, - 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, - 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, - 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x72, - 0x75, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xcb, 0x02, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x48, 0x41, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, - 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x01, 0x92, 0x41, 0xce, - 0x01, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x1a, 0xbe, - 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, - 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, - 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, - 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, - 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, - 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x41, 0x64, 0x64, 0x12, 0x80, 0x03, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, - 0x4c, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xb2, 0x02, 0x92, 0x41, 0x8b, 0x02, 0x12, 0x09, 0x41, 0x64, 0x64, 0x20, 0x4d, - 0x79, 0x53, 0x51, 0x4c, 0x1a, 0xfd, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, 0x79, 0x53, 0x51, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x02, 0x0a, 0x11, + 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3c, 0x0a, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x05, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x12, + 0x42, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x6f, 0x6e, 0x67, + 0x6f, 0x64, 0x62, 0x12, 0x4b, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, + 0x12, 0x45, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x08, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x22, 0xa9, 0x02, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x6d, 0x79, 0x73, + 0x71, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x05, 0x6d, + 0x79, 0x73, 0x71, 0x6c, 0x12, 0x3f, 0x0a, 0x07, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x6f, + 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x12, 0x48, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, + 0x73, 0x71, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, + 0x65, 0x53, 0x51, 0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x48, 0x00, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x12, + 0x42, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x73, + 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6e, + 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe7, 0x0d, 0x0a, + 0x11, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0xa9, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x4d, 0x92, 0x41, 0x25, 0x12, 0x0e, 0x41, 0x64, 0x64, 0x20, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x13, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, + 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xb1, + 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, 0x41, 0x36, 0x12, 0x0d, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x25, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x4e, 0x6f, + 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x70, 0x6d, 0x6d, 0x2d, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x01, 0x2a, 0x22, 0x14, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x12, 0xb2, 0x01, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5f, 0x92, 0x41, 0x3a, 0x12, 0x0d, 0x41, 0x64, 0x64, + 0x20, 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x29, 0x41, 0x64, 0x64, 0x73, + 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0xcb, 0x02, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x48, + 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, + 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x01, 0x92, 0x41, + 0xce, 0x01, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x1a, + 0xbe, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, + 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, + 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, + 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, + 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, + 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, + 0x73, 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x74, + 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xe9, 0x02, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, + 0x78, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, + 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x02, 0x92, + 0x41, 0xe8, 0x01, 0x12, 0x0c, 0x41, 0x64, 0x64, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, + 0x4c, 0x1a, 0xd7, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, - 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, - 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x64, - 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, - 0x22, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, - 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, - 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, - 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0x8d, 0x03, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x4d, - 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, - 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, - 0x6f, 0x44, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb9, 0x02, 0x92, 0x41, - 0x90, 0x02, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x1a, - 0x80, 0x02, 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x20, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, - 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, - 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, - 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, - 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, - 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x65, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x71, - 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, - 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, - 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, 0x6f, 0x6e, 0x67, - 0x6f, 0x44, 0x42, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xf8, 0x02, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x50, - 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, + 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, + 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x65, + 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, + 0x64, 0x12, 0xaf, 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, + 0x53, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x59, 0x92, 0x41, 0x28, 0x12, 0x0c, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x18, 0x44, 0x69, 0x73, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x01, 0x2a, 0x22, 0x23, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, + 0x52, 0x44, 0x53, 0x12, 0x88, 0x01, 0x0a, 0x06, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x02, 0x92, 0x41, 0xef, 0x01, 0x12, 0x0e, 0x41, 0x64, 0x64, - 0x20, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x1a, 0xdc, 0x01, 0x41, 0x64, - 0x64, 0x73, 0x20, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, - 0x20, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, - 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, - 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, - 0x64, 0x64, 0x73, 0x20, 0x22, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x65, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, - 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2f, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x2f, 0x41, - 0x64, 0x64, 0x12, 0xe9, 0x02, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, - 0x51, 0x4c, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, - 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x02, 0x92, 0x41, 0xe8, 0x01, - 0x12, 0x0c, 0x41, 0x64, 0x64, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x1a, 0xd7, - 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x20, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, - 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, - 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, - 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, - 0x73, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, - 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xa7, - 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x12, 0x21, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, - 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x92, 0x41, 0x28, 0x12, 0x0c, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x18, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, - 0x65, 0x72, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, - 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x06, 0x41, 0x64, 0x64, - 0x52, 0x44, 0x53, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x41, 0x92, 0x41, 0x1d, 0x12, 0x07, 0x41, 0x64, 0x64, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x12, - 0x41, 0x64, 0x64, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, - 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, - 0x41, 0x64, 0x64, 0x12, 0xbd, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x92, 0x41, 0x1d, + 0x12, 0x07, 0x41, 0x64, 0x64, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x12, 0x41, 0x64, 0x64, 0x73, 0x20, + 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xc5, + 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x61, 0x92, 0x41, 0x36, 0x12, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x24, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x61, - 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, - 0x69, 0x74, 0x68, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x42, 0xad, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, - 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x92, 0x41, 0x3a, + 0x12, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x1a, 0x28, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x69, + 0x74, 0x73, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, + 0x2a, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x42, 0xad, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, + 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -393,63 +555,67 @@ func file_management_v1_service_proto_rawDescGZIP() []byte { } var ( - file_management_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2) + file_management_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4) file_management_v1_service_proto_goTypes = []interface{}{ - (*RemoveServiceRequest)(nil), // 0: management.v1.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 1: management.v1.RemoveServiceResponse - (v1.ServiceType)(0), // 2: inventory.v1.ServiceType - (*AddAnnotationRequest)(nil), // 3: management.v1.AddAnnotationRequest - (*RegisterNodeRequest)(nil), // 4: management.v1.RegisterNodeRequest - (*AddExternalRequest)(nil), // 5: management.v1.AddExternalRequest - (*AddHAProxyRequest)(nil), // 6: management.v1.AddHAProxyRequest - (*AddMySQLRequest)(nil), // 7: management.v1.AddMySQLRequest - (*AddMongoDBRequest)(nil), // 8: management.v1.AddMongoDBRequest - (*AddPostgreSQLRequest)(nil), // 9: management.v1.AddPostgreSQLRequest - (*AddProxySQLRequest)(nil), // 10: management.v1.AddProxySQLRequest - (*DiscoverRDSRequest)(nil), // 11: management.v1.DiscoverRDSRequest - (*AddRDSRequest)(nil), // 12: management.v1.AddRDSRequest - (*AddAnnotationResponse)(nil), // 13: management.v1.AddAnnotationResponse - (*RegisterNodeResponse)(nil), // 14: management.v1.RegisterNodeResponse - (*AddExternalResponse)(nil), // 15: management.v1.AddExternalResponse - (*AddHAProxyResponse)(nil), // 16: management.v1.AddHAProxyResponse - (*AddMySQLResponse)(nil), // 17: management.v1.AddMySQLResponse - (*AddMongoDBResponse)(nil), // 18: management.v1.AddMongoDBResponse - (*AddPostgreSQLResponse)(nil), // 19: management.v1.AddPostgreSQLResponse - (*AddProxySQLResponse)(nil), // 20: management.v1.AddProxySQLResponse - (*DiscoverRDSResponse)(nil), // 21: management.v1.DiscoverRDSResponse - (*AddRDSResponse)(nil), // 22: management.v1.AddRDSResponse + (*AddServiceRequest)(nil), // 0: management.v1.AddServiceRequest + (*AddServiceResponse)(nil), // 1: management.v1.AddServiceResponse + (*RemoveServiceRequest)(nil), // 2: management.v1.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 3: management.v1.RemoveServiceResponse + (*AddMySQLServiceParams)(nil), // 4: management.v1.AddMySQLServiceParams + (*AddMongoDBServiceParams)(nil), // 5: management.v1.AddMongoDBServiceParams + (*AddPostgreSQLServiceParams)(nil), // 6: management.v1.AddPostgreSQLServiceParams + (*AddExternalServiceParams)(nil), // 7: management.v1.AddExternalServiceParams + (*MySQLServiceResult)(nil), // 8: management.v1.MySQLServiceResult + (*MongoDBServiceResult)(nil), // 9: management.v1.MongoDBServiceResult + (*PostgreSQLServiceResult)(nil), // 10: management.v1.PostgreSQLServiceResult + (*ExternalServiceResult)(nil), // 11: management.v1.ExternalServiceResult + (v1.ServiceType)(0), // 12: inventory.v1.ServiceType + (*AddAnnotationRequest)(nil), // 13: management.v1.AddAnnotationRequest + (*RegisterNodeRequest)(nil), // 14: management.v1.RegisterNodeRequest + (*AddHAProxyRequest)(nil), // 15: management.v1.AddHAProxyRequest + (*AddProxySQLRequest)(nil), // 16: management.v1.AddProxySQLRequest + (*DiscoverRDSRequest)(nil), // 17: management.v1.DiscoverRDSRequest + (*AddRDSRequest)(nil), // 18: management.v1.AddRDSRequest + (*AddAnnotationResponse)(nil), // 19: management.v1.AddAnnotationResponse + (*RegisterNodeResponse)(nil), // 20: management.v1.RegisterNodeResponse + (*AddHAProxyResponse)(nil), // 21: management.v1.AddHAProxyResponse + (*AddProxySQLResponse)(nil), // 22: management.v1.AddProxySQLResponse + (*DiscoverRDSResponse)(nil), // 23: management.v1.DiscoverRDSResponse + (*AddRDSResponse)(nil), // 24: management.v1.AddRDSResponse } ) var file_management_v1_service_proto_depIdxs = []int32{ - 2, // 0: management.v1.RemoveServiceRequest.service_type:type_name -> inventory.v1.ServiceType - 3, // 1: management.v1.ManagementService.AddAnnotation:input_type -> management.v1.AddAnnotationRequest - 4, // 2: management.v1.ManagementService.RegisterNode:input_type -> management.v1.RegisterNodeRequest - 5, // 3: management.v1.ManagementService.AddExternal:input_type -> management.v1.AddExternalRequest - 6, // 4: management.v1.ManagementService.AddHAProxy:input_type -> management.v1.AddHAProxyRequest - 7, // 5: management.v1.ManagementService.AddMySQL:input_type -> management.v1.AddMySQLRequest - 8, // 6: management.v1.ManagementService.AddMongoDB:input_type -> management.v1.AddMongoDBRequest - 9, // 7: management.v1.ManagementService.AddPostgreSQL:input_type -> management.v1.AddPostgreSQLRequest - 10, // 8: management.v1.ManagementService.AddProxySQL:input_type -> management.v1.AddProxySQLRequest - 11, // 9: management.v1.ManagementService.DiscoverRDS:input_type -> management.v1.DiscoverRDSRequest - 12, // 10: management.v1.ManagementService.AddRDS:input_type -> management.v1.AddRDSRequest - 0, // 11: management.v1.ManagementService.RemoveService:input_type -> management.v1.RemoveServiceRequest - 13, // 12: management.v1.ManagementService.AddAnnotation:output_type -> management.v1.AddAnnotationResponse - 14, // 13: management.v1.ManagementService.RegisterNode:output_type -> management.v1.RegisterNodeResponse - 15, // 14: management.v1.ManagementService.AddExternal:output_type -> management.v1.AddExternalResponse - 16, // 15: management.v1.ManagementService.AddHAProxy:output_type -> management.v1.AddHAProxyResponse - 17, // 16: management.v1.ManagementService.AddMySQL:output_type -> management.v1.AddMySQLResponse - 18, // 17: management.v1.ManagementService.AddMongoDB:output_type -> management.v1.AddMongoDBResponse - 19, // 18: management.v1.ManagementService.AddPostgreSQL:output_type -> management.v1.AddPostgreSQLResponse - 20, // 19: management.v1.ManagementService.AddProxySQL:output_type -> management.v1.AddProxySQLResponse - 21, // 20: management.v1.ManagementService.DiscoverRDS:output_type -> management.v1.DiscoverRDSResponse - 22, // 21: management.v1.ManagementService.AddRDS:output_type -> management.v1.AddRDSResponse - 1, // 22: management.v1.ManagementService.RemoveService:output_type -> management.v1.RemoveServiceResponse - 12, // [12:23] is the sub-list for method output_type - 1, // [1:12] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 4, // 0: management.v1.AddServiceRequest.mysql:type_name -> management.v1.AddMySQLServiceParams + 5, // 1: management.v1.AddServiceRequest.mongodb:type_name -> management.v1.AddMongoDBServiceParams + 6, // 2: management.v1.AddServiceRequest.postgresql:type_name -> management.v1.AddPostgreSQLServiceParams + 7, // 3: management.v1.AddServiceRequest.external:type_name -> management.v1.AddExternalServiceParams + 8, // 4: management.v1.AddServiceResponse.mysql:type_name -> management.v1.MySQLServiceResult + 9, // 5: management.v1.AddServiceResponse.mongodb:type_name -> management.v1.MongoDBServiceResult + 10, // 6: management.v1.AddServiceResponse.postgresql:type_name -> management.v1.PostgreSQLServiceResult + 11, // 7: management.v1.AddServiceResponse.external:type_name -> management.v1.ExternalServiceResult + 12, // 8: management.v1.RemoveServiceRequest.service_type:type_name -> inventory.v1.ServiceType + 13, // 9: management.v1.ManagementService.AddAnnotation:input_type -> management.v1.AddAnnotationRequest + 14, // 10: management.v1.ManagementService.RegisterNode:input_type -> management.v1.RegisterNodeRequest + 0, // 11: management.v1.ManagementService.AddService:input_type -> management.v1.AddServiceRequest + 15, // 12: management.v1.ManagementService.AddHAProxy:input_type -> management.v1.AddHAProxyRequest + 16, // 13: management.v1.ManagementService.AddProxySQL:input_type -> management.v1.AddProxySQLRequest + 17, // 14: management.v1.ManagementService.DiscoverRDS:input_type -> management.v1.DiscoverRDSRequest + 18, // 15: management.v1.ManagementService.AddRDS:input_type -> management.v1.AddRDSRequest + 2, // 16: management.v1.ManagementService.RemoveService:input_type -> management.v1.RemoveServiceRequest + 19, // 17: management.v1.ManagementService.AddAnnotation:output_type -> management.v1.AddAnnotationResponse + 20, // 18: management.v1.ManagementService.RegisterNode:output_type -> management.v1.RegisterNodeResponse + 1, // 19: management.v1.ManagementService.AddService:output_type -> management.v1.AddServiceResponse + 21, // 20: management.v1.ManagementService.AddHAProxy:output_type -> management.v1.AddHAProxyResponse + 22, // 21: management.v1.ManagementService.AddProxySQL:output_type -> management.v1.AddProxySQLResponse + 23, // 22: management.v1.ManagementService.DiscoverRDS:output_type -> management.v1.DiscoverRDSResponse + 24, // 23: management.v1.ManagementService.AddRDS:output_type -> management.v1.AddRDSResponse + 3, // 24: management.v1.ManagementService.RemoveService:output_type -> management.v1.RemoveServiceResponse + 17, // [17:25] is the sub-list for method output_type + 9, // [9:17] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_management_v1_service_proto_init() } @@ -468,7 +634,7 @@ func file_management_v1_service_proto_init() { file_management_v1_rds_proto_init() if !protoimpl.UnsafeEnabled { file_management_v1_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveServiceRequest); i { + switch v := v.(*AddServiceRequest); i { case 0: return &v.state case 1: @@ -480,6 +646,30 @@ func file_management_v1_service_proto_init() { } } file_management_v1_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddServiceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_management_v1_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveServiceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_management_v1_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RemoveServiceResponse); i { case 0: return &v.state @@ -492,13 +682,25 @@ func file_management_v1_service_proto_init() { } } } + file_management_v1_service_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AddServiceRequest_Mysql)(nil), + (*AddServiceRequest_Mongodb)(nil), + (*AddServiceRequest_Postgresql)(nil), + (*AddServiceRequest_External)(nil), + } + file_management_v1_service_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*AddServiceResponse_Mysql)(nil), + (*AddServiceResponse_Mongodb)(nil), + (*AddServiceResponse_Postgresql)(nil), + (*AddServiceResponse_External)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_management_v1_service_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/management/v1/service.pb.gw.go b/api/management/v1/service.pb.gw.go index 032b873580e..e40a0cfeda8 100644 --- a/api/management/v1/service.pb.gw.go +++ b/api/management/v1/service.pb.gw.go @@ -81,27 +81,27 @@ func local_request_ManagementService_RegisterNode_0(ctx context.Context, marshal return msg, metadata, err } -func request_ManagementService_AddExternal_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddExternalRequest +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) { + var protoReq AddServiceRequest var metadata runtime.ServerMetadata if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.AddExternal(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.AddService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_ManagementService_AddExternal_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddExternalRequest +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) { + var protoReq AddServiceRequest var metadata runtime.ServerMetadata if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.AddExternal(ctx, &protoReq) + msg, err := server.AddService(ctx, &protoReq) return msg, metadata, err } @@ -129,78 +129,6 @@ func local_request_ManagementService_AddHAProxy_0(ctx context.Context, marshaler return msg, metadata, err } -func request_ManagementService_AddMySQL_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddMySQLRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AddMySQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_ManagementService_AddMySQL_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddMySQLRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AddMySQL(ctx, &protoReq) - return msg, metadata, err -} - -func request_ManagementService_AddMongoDB_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddMongoDBRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AddMongoDB(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_ManagementService_AddMongoDB_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddMongoDBRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AddMongoDB(ctx, &protoReq) - return msg, metadata, err -} - -func request_ManagementService_AddPostgreSQL_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddPostgreSQLRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AddPostgreSQL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_ManagementService_AddPostgreSQL_0(ctx context.Context, marshaler runtime.Marshaler, server ManagementServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddPostgreSQLRequest - var metadata runtime.ServerMetadata - - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AddPostgreSQL(ctx, &protoReq) - return msg, metadata, err -} - func request_ManagementService_AddProxySQL_0(ctx context.Context, marshaler runtime.Marshaler, client ManagementServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddProxySQLRequest var metadata runtime.ServerMetadata @@ -273,11 +201,33 @@ func local_request_ManagementService_AddRDS_0(ctx context.Context, marshaler run 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}} + 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 var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["service_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "service_id") + } + + protoReq.ServiceId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "service_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ManagementService_RemoveService_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -289,7 +239,27 @@ func local_request_ManagementService_RemoveService_0(ctx context.Context, marsha var protoReq RemoveServiceRequest var metadata runtime.ServerMetadata - if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["service_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "service_id") + } + + protoReq.ServiceId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "service_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ManagementService_RemoveService_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -310,7 +280,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/Annotations/Add")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/annotations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -334,7 +304,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/Node/Register")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -350,7 +320,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se forward_ManagementService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_ManagementService_AddExternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ManagementService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -358,12 +328,12 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddExternal", runtime.WithHTTPPathPattern("/v1/management/External/Add")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddService", runtime.WithHTTPPathPattern("/v1/management/services")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ManagementService_AddExternal_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ManagementService_AddService_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -371,7 +341,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_ManagementService_AddExternal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ManagementService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("POST", pattern_ManagementService_AddHAProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -398,78 +368,6 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se forward_ManagementService_AddHAProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_ManagementService_AddMySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddMySQL", runtime.WithHTTPPathPattern("/v1/management/MySQL/Add")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ManagementService_AddMySQL_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ManagementService_AddMySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_ManagementService_AddMongoDB_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddMongoDB", runtime.WithHTTPPathPattern("/v1/management/MongoDB/Add")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ManagementService_AddMongoDB_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ManagementService_AddMongoDB_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_ManagementService_AddPostgreSQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/AddPostgreSQL", runtime.WithHTTPPathPattern("/v1/management/PostgreSQL/Add")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ManagementService_AddPostgreSQL_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ManagementService_AddPostgreSQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle("POST", pattern_ManagementService_AddProxySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -502,7 +400,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/DiscoverRDS", runtime.WithHTTPPathPattern("/v1/management/RDS/Discover")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/DiscoverRDS", runtime.WithHTTPPathPattern("/v1/management/services:discoverRDS")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -542,7 +440,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se forward_ManagementService_AddRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -550,7 +448,7 @@ func RegisterManagementServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/RemoveService", runtime.WithHTTPPathPattern("/v1/management/Service/Remove")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.ManagementService/RemoveService", runtime.WithHTTPPathPattern("/v1/management/services/{service_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -612,7 +510,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/Annotations/Add")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/annotations")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -633,7 +531,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/Node/Register")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/nodes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -648,25 +546,25 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se forward_ManagementService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_ManagementService_AddExternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ManagementService_AddService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddExternal", runtime.WithHTTPPathPattern("/v1/management/External/Add")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddService", runtime.WithHTTPPathPattern("/v1/management/services")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ManagementService_AddExternal_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ManagementService_AddService_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ManagementService_AddExternal_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ManagementService_AddService_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("POST", pattern_ManagementService_AddHAProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -690,69 +588,6 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se forward_ManagementService_AddHAProxy_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_ManagementService_AddMySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddMySQL", runtime.WithHTTPPathPattern("/v1/management/MySQL/Add")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ManagementService_AddMySQL_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ManagementService_AddMySQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_ManagementService_AddMongoDB_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddMongoDB", runtime.WithHTTPPathPattern("/v1/management/MongoDB/Add")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ManagementService_AddMongoDB_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ManagementService_AddMongoDB_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - mux.Handle("POST", pattern_ManagementService_AddPostgreSQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/AddPostgreSQL", runtime.WithHTTPPathPattern("/v1/management/PostgreSQL/Add")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ManagementService_AddPostgreSQL_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ManagementService_AddPostgreSQL_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - mux.Handle("POST", pattern_ManagementService_AddProxySQL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -780,7 +615,7 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/DiscoverRDS", runtime.WithHTTPPathPattern("/v1/management/RDS/Discover")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/DiscoverRDS", runtime.WithHTTPPathPattern("/v1/management/services:discoverRDS")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -816,13 +651,13 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se forward_ManagementService_AddRDS_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ManagementService_RemoveService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/RemoveService", runtime.WithHTTPPathPattern("/v1/management/Service/Remove")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.ManagementService/RemoveService", runtime.WithHTTPPathPattern("/v1/management/services/{service_id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -841,27 +676,21 @@ func RegisterManagementServiceHandlerClient(ctx context.Context, mux *runtime.Se } var ( - pattern_ManagementService_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Annotations", "Add"}, "")) + pattern_ManagementService_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "management", "annotations"}, "")) - pattern_ManagementService_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Node", "Register"}, "")) + pattern_ManagementService_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "management", "nodes"}, "")) - pattern_ManagementService_AddExternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "External", "Add"}, "")) + pattern_ManagementService_AddService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "management", "services"}, "")) pattern_ManagementService_AddHAProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "HAProxy", "Add"}, "")) - pattern_ManagementService_AddMySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MySQL", "Add"}, "")) - - pattern_ManagementService_AddMongoDB_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "MongoDB", "Add"}, "")) - - pattern_ManagementService_AddPostgreSQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "PostgreSQL", "Add"}, "")) - pattern_ManagementService_AddProxySQL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "ProxySQL", "Add"}, "")) - pattern_ManagementService_DiscoverRDS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "RDS", "Discover"}, "")) + pattern_ManagementService_DiscoverRDS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "management", "services"}, "discoverRDS")) pattern_ManagementService_AddRDS_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "RDS", "Add"}, "")) - pattern_ManagementService_RemoveService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Service", "Remove"}, "")) + pattern_ManagementService_RemoveService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "management", "services", "service_id"}, "")) ) var ( @@ -869,16 +698,10 @@ var ( forward_ManagementService_RegisterNode_0 = runtime.ForwardResponseMessage - forward_ManagementService_AddExternal_0 = runtime.ForwardResponseMessage + forward_ManagementService_AddService_0 = runtime.ForwardResponseMessage forward_ManagementService_AddHAProxy_0 = runtime.ForwardResponseMessage - forward_ManagementService_AddMySQL_0 = runtime.ForwardResponseMessage - - forward_ManagementService_AddMongoDB_0 = runtime.ForwardResponseMessage - - forward_ManagementService_AddPostgreSQL_0 = runtime.ForwardResponseMessage - forward_ManagementService_AddProxySQL_0 = runtime.ForwardResponseMessage forward_ManagementService_DiscoverRDS_0 = runtime.ForwardResponseMessage diff --git a/api/management/v1/service.pb.validate.go b/api/management/v1/service.pb.validate.go index f39b95e18b3..fcb2a090ed7 100644 --- a/api/management/v1/service.pb.validate.go +++ b/api/management/v1/service.pb.validate.go @@ -39,6 +39,548 @@ var ( _ = inventoryv1.ServiceType(0) ) +// Validate checks the field values on AddServiceRequest with the rules defined +// in the proto definition for this message. If any rules are violated, the +// first error encountered is returned, or nil if there are no violations. +func (m *AddServiceRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddServiceRequest with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AddServiceRequestMultiError, or nil if none found. +func (m *AddServiceRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *AddServiceRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch v := m.Service.(type) { + case *AddServiceRequest_Mysql: + if v == nil { + err := AddServiceRequestValidationError{ + field: "Service", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMysql()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddServiceRequestValidationError{ + field: "Mysql", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddServiceRequestValidationError{ + field: "Mysql", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMysql()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddServiceRequestValidationError{ + field: "Mysql", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *AddServiceRequest_Mongodb: + if v == nil { + err := AddServiceRequestValidationError{ + field: "Service", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMongodb()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddServiceRequestValidationError{ + field: "Mongodb", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddServiceRequestValidationError{ + field: "Mongodb", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMongodb()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddServiceRequestValidationError{ + field: "Mongodb", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *AddServiceRequest_Postgresql: + if v == nil { + err := AddServiceRequestValidationError{ + field: "Service", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetPostgresql()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddServiceRequestValidationError{ + field: "Postgresql", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddServiceRequestValidationError{ + field: "Postgresql", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPostgresql()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddServiceRequestValidationError{ + field: "Postgresql", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *AddServiceRequest_External: + if v == nil { + err := AddServiceRequestValidationError{ + field: "Service", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetExternal()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddServiceRequestValidationError{ + field: "External", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddServiceRequestValidationError{ + field: "External", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExternal()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddServiceRequestValidationError{ + field: "External", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return AddServiceRequestMultiError(errors) + } + + return nil +} + +// AddServiceRequestMultiError is an error wrapping multiple validation errors +// returned by AddServiceRequest.ValidateAll() if the designated constraints +// aren't met. +type AddServiceRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddServiceRequestMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddServiceRequestMultiError) AllErrors() []error { return m } + +// AddServiceRequestValidationError is the validation error returned by +// AddServiceRequest.Validate if the designated constraints aren't met. +type AddServiceRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddServiceRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddServiceRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddServiceRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddServiceRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddServiceRequestValidationError) ErrorName() string { + return "AddServiceRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e AddServiceRequestValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAddServiceRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddServiceRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddServiceRequestValidationError{} + +// Validate checks the field values on AddServiceResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *AddServiceResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddServiceResponse with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// AddServiceResponseMultiError, or nil if none found. +func (m *AddServiceResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *AddServiceResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + switch v := m.Service.(type) { + case *AddServiceResponse_Mysql: + if v == nil { + err := AddServiceResponseValidationError{ + field: "Service", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMysql()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddServiceResponseValidationError{ + field: "Mysql", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddServiceResponseValidationError{ + field: "Mysql", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMysql()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddServiceResponseValidationError{ + field: "Mysql", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *AddServiceResponse_Mongodb: + if v == nil { + err := AddServiceResponseValidationError{ + field: "Service", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetMongodb()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddServiceResponseValidationError{ + field: "Mongodb", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddServiceResponseValidationError{ + field: "Mongodb", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetMongodb()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddServiceResponseValidationError{ + field: "Mongodb", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *AddServiceResponse_Postgresql: + if v == nil { + err := AddServiceResponseValidationError{ + field: "Service", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetPostgresql()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddServiceResponseValidationError{ + field: "Postgresql", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddServiceResponseValidationError{ + field: "Postgresql", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPostgresql()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddServiceResponseValidationError{ + field: "Postgresql", + reason: "embedded message failed validation", + cause: err, + } + } + } + + case *AddServiceResponse_External: + if v == nil { + err := AddServiceResponseValidationError{ + field: "Service", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetExternal()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddServiceResponseValidationError{ + field: "External", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddServiceResponseValidationError{ + field: "External", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetExternal()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddServiceResponseValidationError{ + field: "External", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return AddServiceResponseMultiError(errors) + } + + return nil +} + +// AddServiceResponseMultiError is an error wrapping multiple validation errors +// returned by AddServiceResponse.ValidateAll() if the designated constraints +// aren't met. +type AddServiceResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddServiceResponseMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddServiceResponseMultiError) AllErrors() []error { return m } + +// AddServiceResponseValidationError is the validation error returned by +// AddServiceResponse.Validate if the designated constraints aren't met. +type AddServiceResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddServiceResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddServiceResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddServiceResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddServiceResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddServiceResponseValidationError) ErrorName() string { + return "AddServiceResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e AddServiceResponseValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sAddServiceResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddServiceResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddServiceResponseValidationError{} + // Validate checks the field values on RemoveServiceRequest with the rules // defined in the proto definition for this message. If any rules are // violated, the first error encountered is returned, or nil if there are no violations. @@ -61,11 +603,9 @@ func (m *RemoveServiceRequest) validate(all bool) error { var errors []error - // no validation rules for ServiceType - // no validation rules for ServiceId - // no validation rules for ServiceName + // no validation rules for ServiceType if len(errors) > 0 { return RemoveServiceRequestMultiError(errors) diff --git a/api/management/v1/service.proto b/api/management/v1/service.proto index a949f176269..3179293eecf 100644 --- a/api/management/v1/service.proto +++ b/api/management/v1/service.proto @@ -15,14 +15,33 @@ import "management/v1/proxysql.proto"; import "management/v1/rds.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; +message AddServiceRequest { + oneof service { + AddMySQLServiceParams mysql = 1; + AddMongoDBServiceParams mongodb = 2; + AddPostgreSQLServiceParams postgresql = 3; + // AddProxySQLServiceParams proxysql = 4; + // AddHAProxyServiceParams haproxy = 5; + AddExternalServiceParams external = 6; + } +} + +message AddServiceResponse { + oneof service { + MySQLServiceResult mysql = 1; + MongoDBServiceResult mongodb = 2; + PostgreSQLServiceResult postgresql = 3; + // ProxySQLService proxysql = 4; + // HAProxyService haproxy = 5; + ExternalServiceResult external = 6; + } +} + message RemoveServiceRequest { + // Either a Service ID or a Service Name. + string service_id = 1; // Service type. - inventory.v1.ServiceType service_type = 1; - // Service ID or Service Name is required. - // Unique randomly generated instance identifier. - string service_id = 2; - // Unique across all Services user-defined name. - string service_name = 3; + inventory.v1.ServiceType service_type = 2; } message RemoveServiceResponse {} @@ -32,7 +51,7 @@ service ManagementService { // AddAnnotation adds an annotation. rpc AddAnnotation(AddAnnotationRequest) returns (AddAnnotationResponse) { option (google.api.http) = { - post: "/v1/management/Annotations/Add" + post: "/v1/management/annotations" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -40,82 +59,58 @@ service ManagementService { description: "Adds an annotation." }; } - // RegisterNode registers a new Node and pmm-agent. + // RegisterNode registers a new Node and a pmm-agent. rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) { option (google.api.http) = { - post: "/v1/management/Node/Register" + post: "/v1/management/nodes" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "Register Node" - description: "Registers a new Node and pmm-agent." + description: "Registers a new Node and a pmm-agent." }; } + // AddExternal adds external service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". - rpc AddExternal(AddExternalRequest) returns (AddExternalResponse) { - option (google.api.http) = { - post: "/v1/management/External/Add" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Add External Service" - description: "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\"." - }; - } - // AddHAProxy adds HAProxy service and adds external exporter. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds an "external exporter" agent to inventory. - rpc AddHAProxy(AddHAProxyRequest) returns (AddHAProxyResponse) { - option (google.api.http) = { - post: "/v1/management/HAProxy/Add" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Add HAProxy" - description: "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory." - }; - } + // AddMySQL adds MySQL Service and starts several Agents. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds "mysqld_exporter", and "qan_mysql_perfschema" agents // with provided "pmm_agent_id" and other parameters. - rpc AddMySQL(AddMySQLRequest) returns (AddMySQLResponse) { - option (google.api.http) = { - post: "/v1/management/MySQL/Add" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Add MySQL" - description: "Adds MySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mysqld_exporter\", and \"qan_mysql_perfschema\" agents with the provided \"pmm_agent_id\" and other parameters." - }; - } + // AddMongoDB adds MongoDB Service and starts several Agents. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds "mongodb_exporter", and "qan_mongodb_profiler" agents // with provided "pmm_agent_id" and other parameters. - rpc AddMongoDB(AddMongoDBRequest) returns (AddMongoDBResponse) { + + // AddPostgreSQL adds PostgreSQL Service and starts postgres exporter. + // It automatically adds a service to inventory, which is running on provided "node_id", + // then adds "postgres_exporter" with provided "pmm_agent_id" and other parameters. + + // AddService adds a Service and starts several Agents. + rpc AddService(AddServiceRequest) returns (AddServiceResponse) { option (google.api.http) = { - post: "/v1/management/MongoDB/Add" + post: "/v1/management/services" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Add MongoDB" - description: "Adds MongoDB Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mongodb_exporter\", and \"qan_mongodb_profiler\" agents with the provided \"pmm_agent_id\" and other parameters." + summary: "Add a Service" + description: "Adds a service and starts several agents." }; } - // AddPostgreSQL adds PostgreSQL Service and starts postgres exporter. + // AddHAProxy adds HAProxy service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds "postgres_exporter" with provided "pmm_agent_id" and other parameters. - rpc AddPostgreSQL(AddPostgreSQLRequest) returns (AddPostgreSQLResponse) { + // then adds an "external exporter" agent to inventory. + rpc AddHAProxy(AddHAProxyRequest) returns (AddHAProxyResponse) { option (google.api.http) = { - post: "/v1/management/PostgreSQL/Add" + post: "/v1/management/HAProxy/Add" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Add PostgreSQL" - description: "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters." + summary: "Add HAProxy" + description: "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory." }; } // AddProxySQL adds ProxySQL Service and starts several Agents. @@ -134,7 +129,7 @@ service ManagementService { // DiscoverRDS discovers RDS instances. rpc DiscoverRDS(DiscoverRDSRequest) returns (DiscoverRDSResponse) { option (google.api.http) = { - post: "/v1/management/RDS/Discover" + post: "/v1/management/services:discoverRDS" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { @@ -142,7 +137,7 @@ service ManagementService { description: "Discovers RDS instances." }; } - // AddRDS adds RDS instance. + // AddRDS adds an RDS instance. rpc AddRDS(AddRDSRequest) returns (AddRDSResponse) { option (google.api.http) = { post: "/v1/management/RDS/Add" @@ -153,15 +148,12 @@ service ManagementService { description: "Adds RDS instance." }; } - // RemoveService removes Service with Agents. + // RemoveService removes a Service along with its Agents. rpc RemoveService(RemoveServiceRequest) returns (RemoveServiceResponse) { - option (google.api.http) = { - post: "/v1/management/Service/Remove" - body: "*" - }; + option (google.api.http) = {delete: "/v1/management/services/{service_id}"}; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { summary: "Remove Service" - description: "Removes a Service along with Agents." + description: "Removes a Service along with its Agents." }; } } diff --git a/api/management/v1/service_grpc.pb.go b/api/management/v1/service_grpc.pb.go index 79405bfee46..e1175da48ee 100644 --- a/api/management/v1/service_grpc.pb.go +++ b/api/management/v1/service_grpc.pb.go @@ -22,11 +22,8 @@ const _ = grpc.SupportPackageIsVersion7 const ( ManagementService_AddAnnotation_FullMethodName = "/management.v1.ManagementService/AddAnnotation" ManagementService_RegisterNode_FullMethodName = "/management.v1.ManagementService/RegisterNode" - ManagementService_AddExternal_FullMethodName = "/management.v1.ManagementService/AddExternal" + ManagementService_AddService_FullMethodName = "/management.v1.ManagementService/AddService" ManagementService_AddHAProxy_FullMethodName = "/management.v1.ManagementService/AddHAProxy" - ManagementService_AddMySQL_FullMethodName = "/management.v1.ManagementService/AddMySQL" - ManagementService_AddMongoDB_FullMethodName = "/management.v1.ManagementService/AddMongoDB" - ManagementService_AddPostgreSQL_FullMethodName = "/management.v1.ManagementService/AddPostgreSQL" ManagementService_AddProxySQL_FullMethodName = "/management.v1.ManagementService/AddProxySQL" ManagementService_DiscoverRDS_FullMethodName = "/management.v1.ManagementService/DiscoverRDS" ManagementService_AddRDS_FullMethodName = "/management.v1.ManagementService/AddRDS" @@ -39,39 +36,23 @@ const ( type ManagementServiceClient interface { // AddAnnotation adds an annotation. AddAnnotation(ctx context.Context, in *AddAnnotationRequest, opts ...grpc.CallOption) (*AddAnnotationResponse, error) - // RegisterNode registers a new Node and pmm-agent. + // RegisterNode registers a new Node and a pmm-agent. RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) - // AddExternal adds external service and adds external exporter. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". - AddExternal(ctx context.Context, in *AddExternalRequest, opts ...grpc.CallOption) (*AddExternalResponse, error) + // AddService adds a Service and starts several Agents. + AddService(ctx context.Context, in *AddServiceRequest, opts ...grpc.CallOption) (*AddServiceResponse, error) // AddHAProxy adds HAProxy service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds an "external exporter" agent to inventory. AddHAProxy(ctx context.Context, in *AddHAProxyRequest, opts ...grpc.CallOption) (*AddHAProxyResponse, error) - // AddMySQL adds MySQL Service and starts several Agents. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds "mysqld_exporter", and "qan_mysql_perfschema" agents - // with provided "pmm_agent_id" and other parameters. - AddMySQL(ctx context.Context, in *AddMySQLRequest, opts ...grpc.CallOption) (*AddMySQLResponse, error) - // AddMongoDB adds MongoDB Service and starts several Agents. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds "mongodb_exporter", and "qan_mongodb_profiler" agents - // with provided "pmm_agent_id" and other parameters. - AddMongoDB(ctx context.Context, in *AddMongoDBRequest, opts ...grpc.CallOption) (*AddMongoDBResponse, error) - // AddPostgreSQL adds PostgreSQL Service and starts postgres exporter. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds "postgres_exporter" with provided "pmm_agent_id" and other parameters. - AddPostgreSQL(ctx context.Context, in *AddPostgreSQLRequest, opts ...grpc.CallOption) (*AddPostgreSQLResponse, error) // AddProxySQL adds ProxySQL Service and starts several Agents. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds "proxysql_exporter" with provided "pmm_agent_id" and other parameters. AddProxySQL(ctx context.Context, in *AddProxySQLRequest, opts ...grpc.CallOption) (*AddProxySQLResponse, error) // DiscoverRDS discovers RDS instances. DiscoverRDS(ctx context.Context, in *DiscoverRDSRequest, opts ...grpc.CallOption) (*DiscoverRDSResponse, error) - // AddRDS adds RDS instance. + // AddRDS adds an RDS instance. AddRDS(ctx context.Context, in *AddRDSRequest, opts ...grpc.CallOption) (*AddRDSResponse, error) - // RemoveService removes Service with Agents. + // RemoveService removes a Service along with its Agents. RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) } @@ -101,9 +82,9 @@ func (c *managementServiceClient) RegisterNode(ctx context.Context, in *Register return out, nil } -func (c *managementServiceClient) AddExternal(ctx context.Context, in *AddExternalRequest, opts ...grpc.CallOption) (*AddExternalResponse, error) { - out := new(AddExternalResponse) - err := c.cc.Invoke(ctx, ManagementService_AddExternal_FullMethodName, in, out, opts...) +func (c *managementServiceClient) AddService(ctx context.Context, in *AddServiceRequest, opts ...grpc.CallOption) (*AddServiceResponse, error) { + out := new(AddServiceResponse) + err := c.cc.Invoke(ctx, ManagementService_AddService_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -119,33 +100,6 @@ func (c *managementServiceClient) AddHAProxy(ctx context.Context, in *AddHAProxy return out, nil } -func (c *managementServiceClient) AddMySQL(ctx context.Context, in *AddMySQLRequest, opts ...grpc.CallOption) (*AddMySQLResponse, error) { - out := new(AddMySQLResponse) - err := c.cc.Invoke(ctx, ManagementService_AddMySQL_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *managementServiceClient) AddMongoDB(ctx context.Context, in *AddMongoDBRequest, opts ...grpc.CallOption) (*AddMongoDBResponse, error) { - out := new(AddMongoDBResponse) - err := c.cc.Invoke(ctx, ManagementService_AddMongoDB_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *managementServiceClient) AddPostgreSQL(ctx context.Context, in *AddPostgreSQLRequest, opts ...grpc.CallOption) (*AddPostgreSQLResponse, error) { - out := new(AddPostgreSQLResponse) - err := c.cc.Invoke(ctx, ManagementService_AddPostgreSQL_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *managementServiceClient) AddProxySQL(ctx context.Context, in *AddProxySQLRequest, opts ...grpc.CallOption) (*AddProxySQLResponse, error) { out := new(AddProxySQLResponse) err := c.cc.Invoke(ctx, ManagementService_AddProxySQL_FullMethodName, in, out, opts...) @@ -188,39 +142,23 @@ func (c *managementServiceClient) RemoveService(ctx context.Context, in *RemoveS type ManagementServiceServer interface { // AddAnnotation adds an annotation. AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) - // RegisterNode registers a new Node and pmm-agent. + // RegisterNode registers a new Node and a pmm-agent. RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) - // AddExternal adds external service and adds external exporter. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". - AddExternal(context.Context, *AddExternalRequest) (*AddExternalResponse, error) + // AddService adds a Service and starts several Agents. + AddService(context.Context, *AddServiceRequest) (*AddServiceResponse, error) // AddHAProxy adds HAProxy service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds an "external exporter" agent to inventory. AddHAProxy(context.Context, *AddHAProxyRequest) (*AddHAProxyResponse, error) - // AddMySQL adds MySQL Service and starts several Agents. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds "mysqld_exporter", and "qan_mysql_perfschema" agents - // with provided "pmm_agent_id" and other parameters. - AddMySQL(context.Context, *AddMySQLRequest) (*AddMySQLResponse, error) - // AddMongoDB adds MongoDB Service and starts several Agents. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds "mongodb_exporter", and "qan_mongodb_profiler" agents - // with provided "pmm_agent_id" and other parameters. - AddMongoDB(context.Context, *AddMongoDBRequest) (*AddMongoDBResponse, error) - // AddPostgreSQL adds PostgreSQL Service and starts postgres exporter. - // It automatically adds a service to inventory, which is running on provided "node_id", - // then adds "postgres_exporter" with provided "pmm_agent_id" and other parameters. - AddPostgreSQL(context.Context, *AddPostgreSQLRequest) (*AddPostgreSQLResponse, error) // AddProxySQL adds ProxySQL Service and starts several Agents. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds "proxysql_exporter" with provided "pmm_agent_id" and other parameters. AddProxySQL(context.Context, *AddProxySQLRequest) (*AddProxySQLResponse, error) // DiscoverRDS discovers RDS instances. DiscoverRDS(context.Context, *DiscoverRDSRequest) (*DiscoverRDSResponse, error) - // AddRDS adds RDS instance. + // AddRDS adds an RDS instance. AddRDS(context.Context, *AddRDSRequest) (*AddRDSResponse, error) - // RemoveService removes Service with Agents. + // RemoveService removes a Service along with its Agents. RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) mustEmbedUnimplementedManagementServiceServer() } @@ -236,26 +174,14 @@ func (UnimplementedManagementServiceServer) RegisterNode(context.Context, *Regis return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented") } -func (UnimplementedManagementServiceServer) AddExternal(context.Context, *AddExternalRequest) (*AddExternalResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddExternal not implemented") +func (UnimplementedManagementServiceServer) AddService(context.Context, *AddServiceRequest) (*AddServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented") } func (UnimplementedManagementServiceServer) AddHAProxy(context.Context, *AddHAProxyRequest) (*AddHAProxyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddHAProxy not implemented") } -func (UnimplementedManagementServiceServer) AddMySQL(context.Context, *AddMySQLRequest) (*AddMySQLResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddMySQL not implemented") -} - -func (UnimplementedManagementServiceServer) AddMongoDB(context.Context, *AddMongoDBRequest) (*AddMongoDBResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddMongoDB not implemented") -} - -func (UnimplementedManagementServiceServer) AddPostgreSQL(context.Context, *AddPostgreSQLRequest) (*AddPostgreSQLResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddPostgreSQL not implemented") -} - func (UnimplementedManagementServiceServer) AddProxySQL(context.Context, *AddProxySQLRequest) (*AddProxySQLResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddProxySQL not implemented") } @@ -320,20 +246,20 @@ func _ManagementService_RegisterNode_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _ManagementService_AddExternal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddExternalRequest) +func _ManagementService_AddService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddServiceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ManagementServiceServer).AddExternal(ctx, in) + return srv.(ManagementServiceServer).AddService(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: ManagementService_AddExternal_FullMethodName, + FullMethod: ManagementService_AddService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ManagementServiceServer).AddExternal(ctx, req.(*AddExternalRequest)) + return srv.(ManagementServiceServer).AddService(ctx, req.(*AddServiceRequest)) } return interceptor(ctx, in, info, handler) } @@ -356,60 +282,6 @@ func _ManagementService_AddHAProxy_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _ManagementService_AddMySQL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddMySQLRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ManagementServiceServer).AddMySQL(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ManagementService_AddMySQL_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ManagementServiceServer).AddMySQL(ctx, req.(*AddMySQLRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ManagementService_AddMongoDB_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddMongoDBRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ManagementServiceServer).AddMongoDB(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ManagementService_AddMongoDB_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ManagementServiceServer).AddMongoDB(ctx, req.(*AddMongoDBRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ManagementService_AddPostgreSQL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddPostgreSQLRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ManagementServiceServer).AddPostgreSQL(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ManagementService_AddPostgreSQL_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ManagementServiceServer).AddPostgreSQL(ctx, req.(*AddPostgreSQLRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _ManagementService_AddProxySQL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddProxySQLRequest) if err := dec(in); err != nil { @@ -498,25 +370,13 @@ var ManagementService_ServiceDesc = grpc.ServiceDesc{ Handler: _ManagementService_RegisterNode_Handler, }, { - MethodName: "AddExternal", - Handler: _ManagementService_AddExternal_Handler, + MethodName: "AddService", + Handler: _ManagementService_AddService_Handler, }, { MethodName: "AddHAProxy", Handler: _ManagementService_AddHAProxy_Handler, }, - { - MethodName: "AddMySQL", - Handler: _ManagementService_AddMySQL_Handler, - }, - { - MethodName: "AddMongoDB", - Handler: _ManagementService_AddMongoDB_Handler, - }, - { - MethodName: "AddPostgreSQL", - Handler: _ManagementService_AddPostgreSQL_Handler, - }, { MethodName: "AddProxySQL", Handler: _ManagementService_AddProxySQL_Handler, diff --git a/api/qan/v1/filters.pb.go b/api/qan/v1/filters.pb.go index 252eca88a22..51a8229a384 100644 --- a/api/qan/v1/filters.pb.go +++ b/api/qan/v1/filters.pb.go @@ -10,7 +10,6 @@ import ( 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" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -260,60 +259,58 @@ var File_qan_v1_filters_proto protoreflect.FileDescriptor var file_qan_v1_filters_proto_rawDesc = []byte{ 0x0a, 0x14, 0x71, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x71, - 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x85, 0x02, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x70, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x42, 0x0a, 0x0f, 0x70, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x6f, 0x12, 0x28, - 0x0a, 0x10, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x46, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x71, 0x61, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, - 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x4d, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, - 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, - 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x30, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7d, 0x0a, 0x06, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6d, 0x61, 0x69, - 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6d, 0x61, 0x69, - 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x63, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, - 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x71, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x61, 0x6e, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x51, 0x61, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x06, 0x51, 0x61, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x51, 0x61, 0x6e, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x51, - 0x61, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x10, 0x71, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x85, 0x02, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, + 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x70, 0x65, 0x72, + 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x42, 0x0a, 0x0f, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x6f, + 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x61, 0x69, 0x6e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x71, 0x61, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x1f, 0x47, 0x65, + 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, + 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x4d, 0x0a, 0x0b, 0x4c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x28, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x71, 0x61, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x30, 0x0a, 0x0a, 0x4c, 0x69, 0x73, + 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x22, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7d, 0x0a, 0x06, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x6d, + 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, + 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6d, + 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, + 0x65, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, + 0x6d, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x71, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x61, 0x6e, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x51, 0x61, 0x6e, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x06, 0x51, 0x61, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x51, 0x61, 0x6e, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x07, 0x51, 0x61, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/qan/v1/filters.proto b/api/qan/v1/filters.proto index 24a83d0c4d7..c5bad973450 100644 --- a/api/qan/v1/filters.proto +++ b/api/qan/v1/filters.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package qan.v1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "qan/v1/qan.proto"; diff --git a/api/qan/v1/profile.pb.go b/api/qan/v1/profile.pb.go index 989452bf54d..813ae86d2ad 100644 --- a/api/qan/v1/profile.pb.go +++ b/api/qan/v1/profile.pb.go @@ -10,7 +10,6 @@ import ( 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" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -539,94 +538,92 @@ var File_qan_v1_profile_proto protoreflect.FileDescriptor var file_qan_v1_profile_proto_rawDesc = []byte{ 0x0a, 0x14, 0x71, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x71, - 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x8a, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x70, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x42, 0x0a, 0x0f, - 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x6f, - 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12, 0x33, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x71, 0x61, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x70, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, - 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x3d, 0x0a, 0x13, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, - 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x71, - 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x22, - 0xe9, 0x02, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x64, - 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x6f, 0x77, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x73, 0x70, 0x61, - 0x72, 0x6b, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x71, - 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x73, 0x70, 0x61, - 0x72, 0x6b, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, - 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x6e, - 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, - 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6e, - 0x75, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x70, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x71, 0x70, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6c, - 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x04, 0x6c, 0x6f, 0x61, 0x64, 0x1a, - 0x4a, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0e, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2c, 0x0a, 0x06, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x22, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x04, 0x53, 0x74, - 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, - 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x02, 0x52, 0x03, 0x63, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, 0x6d, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x73, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, - 0x6d, 0x61, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x12, 0x10, - 0x0a, 0x03, 0x70, 0x39, 0x39, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x70, 0x39, 0x39, - 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x61, - 0x76, 0x67, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x73, 0x65, - 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x73, 0x75, 0x6d, 0x50, 0x65, 0x72, 0x53, - 0x65, 0x63, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, - 0x42, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, - 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x71, 0x61, 0x6e, - 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x61, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, 0x58, 0xaa, - 0x02, 0x06, 0x51, 0x61, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x51, 0x61, 0x6e, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x12, 0x51, 0x61, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x51, 0x61, 0x6e, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x1f, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x10, 0x71, 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x61, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x8a, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, + 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x42, + 0x0a, 0x0f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x54, 0x6f, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12, 0x33, 0x0a, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x70, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x61, 0x69, 0x6e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x22, 0x3d, + 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x81, 0x01, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, + 0x77, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x1f, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, + 0x73, 0x22, 0xe9, 0x02, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x1c, 0x0a, + 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2b, 0x0a, 0x09, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x73, + 0x70, 0x61, 0x72, 0x6b, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, + 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, + 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, + 0x6d, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0a, 0x6e, 0x75, 0x6d, 0x51, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x71, + 0x70, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x71, 0x70, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x04, 0x6c, 0x6f, 0x61, + 0x64, 0x1a, 0x4a, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2c, 0x0a, + 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x22, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x71, 0x61, 0x6e, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x04, + 0x53, 0x74, 0x61, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x02, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x63, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x75, + 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x73, 0x75, 0x6d, 0x12, 0x10, 0x0a, 0x03, + 0x6d, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, + 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x6d, 0x61, 0x78, + 0x12, 0x10, 0x0a, 0x03, 0x70, 0x39, 0x39, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x70, + 0x39, 0x39, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x76, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x03, 0x61, 0x76, 0x67, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x73, 0x65, 0x63, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x73, 0x75, 0x6d, 0x50, 0x65, + 0x72, 0x53, 0x65, 0x63, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x71, 0x61, 0x6e, 0x2e, + 0x76, 0x31, 0x42, 0x0c, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, + 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x71, + 0x61, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x71, 0x61, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x51, 0x58, + 0x58, 0xaa, 0x02, 0x06, 0x51, 0x61, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x51, 0x61, 0x6e, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x51, 0x61, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x51, 0x61, 0x6e, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/qan/v1/profile.proto b/api/qan/v1/profile.proto index c6f366da2f6..68debd09fdd 100644 --- a/api/qan/v1/profile.proto +++ b/api/qan/v1/profile.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package qan.v1; -import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; import "qan/v1/qan.proto"; diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index fab705f4823..b53ad51ba87 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -16919,95 +16919,6 @@ } } }, - "/v1/management/Annotations/Add": { - "post": { - "description": "Adds an annotation.", - "tags": [ - "ManagementService" - ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", - "parameters": [ - { - "description": "AddAnnotationRequest is a params to add new annotation.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", - "type": "object", - "properties": { - "text": { - "description": "An annotation description. Required.", - "type": "string", - "x-order": 0 - }, - "tags": { - "description": "Tags are used to filter annotations.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - }, - "node_name": { - "description": "Used for annotate node.", - "type": "string", - "x-order": 2 - }, - "service_names": { - "description": "Used for annotate services.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, "/v1/management/AzureDatabase/Add": { "post": { "description": "Adds an Azure Database instance.", @@ -17357,14 +17268,14 @@ } } }, - "/v1/management/External/Add": { + "/v1/management/HAProxy/Add": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory.", "tags": [ "ManagementService" ], - "summary": "Add External Service", - "operationId": "AddExternal", + "summary": "Add HAProxy", + "operationId": "AddHAProxy", "parameters": [ { "name": "body", @@ -17373,8 +17284,8 @@ "schema": { "type": "object", "properties": { - "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "node_id": { + "description": "Node identifier on which an external exporter is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, @@ -17488,25 +17399,20 @@ "format": "int64", "x-order": 9 }, - "node_id": { - "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id.", - "type": "string", - "x-order": 10 - }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 11 + "x-order": 10 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 12 + "x-order": 11 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 13 + "x-order": 12 }, "custom_labels": { "description": "Custom user-assigned labels for Service.", @@ -17514,12 +17420,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 14 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 15 + "x-order": 13 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -17530,12 +17431,12 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 16 + "x-order": 14 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 17 + "x-order": 15 } } } @@ -17548,7 +17449,7 @@ "type": "object", "properties": { "service": { - "description": "ExternalService represents a generic External service instance.", + "description": "HAProxyService represents a generic HAProxy service instance.", "type": "object", "properties": { "service_id": { @@ -17588,11 +17489,6 @@ "type": "string" }, "x-order": 6 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 7 } }, "x-order": 0 @@ -17700,14 +17596,14 @@ } } }, - "/v1/management/HAProxy/Add": { + "/v1/management/Node/Get": { "post": { - "description": "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory.", + "description": "Returns a single Node by ID.", "tags": [ - "ManagementService" + "ManagementV1Beta1Service" ], - "summary": "Add HAProxy", - "operationId": "AddHAProxy", + "summary": "Get Node", + "operationId": "GetNodeMixin6", "parameters": [ { "name": "body", @@ -17717,72 +17613,77 @@ "type": "object", "properties": { "node_id": { - "description": "Node identifier on which an external exporter is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Unique Node identifier.", "type": "string", "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "node": { "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "node_id": { + "description": "Unique Node identifier.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "node_type": { + "description": "Node type.", "type": "string", "x-order": 1 }, + "node_name": { + "description": "User-defined node name.", + "type": "string", + "x-order": 2 + }, "machine_id": { "description": "Linux machine-id.", "type": "string", - "x-order": 2 + "x-order": 3 }, "distro": { "description": "Linux distribution name and version.", "type": "string", - "x-order": 3 + "x-order": 4 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 5 }, "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "description": "A node's unique docker container identifier.", "type": "string", - "x-order": 4 + "x-order": 6 }, "container_name": { "description": "Container name.", "type": "string", - "x-order": 5 + "x-order": 7 }, - "node_model": { - "description": "Node model.", + "address": { + "description": "Node address (DNS name or IP).", "type": "string", - "x-order": 6 + "x-order": 8 }, "region": { "description": "Node region.", "type": "string", - "x-order": 7 + "x-order": 9 }, "az": { "description": "Node availability zone.", "type": "string", - "x-order": 8 + "x-order": 10 }, "custom_labels": { "description": "Custom user-assigned labels for Node.", @@ -17790,206 +17691,90 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 - } - }, - "x-order": 2 - }, - "address": { - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", - "type": "string", - "x-order": 3 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 4 - }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", - "x-order": 5 - }, - "password": { - "description": "HTTP basic auth password for collecting metrics.", - "type": "string", - "x-order": 6 - }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", - "x-order": 7 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 8 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 9 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 10 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 11 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 12 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 14 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 15 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "service": { - "description": "HAProxyService represents a generic HAProxy service instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_id": { - "description": "Node identifier where this service instance runs.", - "type": "string", - "x-order": 2 + "x-order": 11 }, - "environment": { - "description": "Environment name.", + "created_at": { + "description": "Creation timestamp.", "type": "string", - "x-order": 3 + "format": "date-time", + "x-order": 12 }, - "cluster": { - "description": "Cluster name.", + "updated_at": { + "description": "Last update timestamp.", "type": "string", - "x-order": 4 + "format": "date-time", + "x-order": 13 }, - "replication_set": { - "description": "Replication set name.", + "status": { + "description": "Node status.\n\n - STATUS_UNSPECIFIED: Invalid status.\n - STATUS_UP: The node is up.\n - STATUS_DOWN: The node is down.\n - STATUS_UNKNOWN: The node's status cannot be known (e.g. there are no metrics yet).", "type": "string", - "x-order": 5 + "default": "STATUS_UNSPECIFIED", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_UP", + "STATUS_DOWN", + "STATUS_UNKNOWN" + ], + "x-order": 14 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "agents": { + "description": "List of agents related to this node.", + "type": "array", + "items": { + "type": "object", + "properties": { + "agent_id": { + "description": "Unique Agent identifier.", + "type": "string", + "x-order": 0 + }, + "agent_type": { + "description": "Agent type.", + "type": "string", + "x-order": 1 + }, + "status": { + "description": "Actual Agent status.", + "type": "string", + "x-order": 2 + }, + "is_connected": { + "description": "True if Agent is running and connected to pmm-managed.", + "type": "boolean", + "x-order": 3 + } + } }, - "x-order": 6 - } - }, - "x-order": 0 - }, - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", - "x-order": 4 - }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", - "x-order": 5 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 6 + "x-order": 15 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" + "services": { + "description": "List of services running on this node.", + "type": "array", + "items": { + "description": "Service represents a service running on a node.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique Service identifier.", + "type": "string", + "x-order": 0 + }, + "service_type": { + "description": "Service type.", + "type": "string", + "x-order": 1 + }, + "service_name": { + "description": "Service name.", + "type": "string", + "x-order": 2 + } + } }, - "x-order": 7 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 8 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 9 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 + "x-order": 16 } }, - "x-order": 1 + "x-order": 0 } } } @@ -18028,14 +17813,14 @@ } } }, - "/v1/management/MongoDB/Add": { + "/v1/management/Node/List": { "post": { - "description": "Adds MongoDB Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mongodb_exporter\", and \"qan_mongodb_profiler\" agents with the provided \"pmm_agent_id\" and other parameters.", + "description": "Returns a filtered list of Nodes.", "tags": [ - "ManagementService" + "ManagementV1Beta1Service" ], - "summary": "Add MongoDB", - "operationId": "AddMongoDB", + "summary": "List Nodes", + "operationId": "ListNodesMixin6", "parameters": [ { "name": "body", @@ -18044,45 +17829,274 @@ "schema": { "type": "object", "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "node_type": { + "description": "NodeType describes supported Node types.", "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "distro": { + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "node_id": { + "description": "Unique Node identifier.", + "type": "string", + "x-order": 0 + }, + "node_type": { + "description": "Node type.", + "type": "string", + "x-order": 1 + }, + "node_name": { + "description": "User-defined node name.", + "type": "string", + "x-order": 2 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 3 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 4 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 5 + }, + "container_id": { + "description": "A node's unique docker container identifier.", + "type": "string", + "x-order": 6 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 7 + }, + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 8 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 9 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 10 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + }, + "created_at": { + "description": "Creation timestamp.", + "type": "string", + "format": "date-time", + "x-order": 12 + }, + "updated_at": { + "description": "Last update timestamp.", + "type": "string", + "format": "date-time", + "x-order": 13 + }, + "status": { + "description": "Node status.\n\n - STATUS_UNSPECIFIED: Invalid status.\n - STATUS_UP: The node is up.\n - STATUS_DOWN: The node is down.\n - STATUS_UNKNOWN: The node's status cannot be known (e.g. there are no metrics yet).", + "type": "string", + "default": "STATUS_UNSPECIFIED", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_UP", + "STATUS_DOWN", + "STATUS_UNKNOWN" + ], + "x-order": 14 + }, + "agents": { + "description": "List of agents related to this node.", + "type": "array", + "items": { + "type": "object", + "properties": { + "agent_id": { + "description": "Unique Agent identifier.", + "type": "string", + "x-order": 0 + }, + "agent_type": { + "description": "Agent type.", + "type": "string", + "x-order": 1 + }, + "status": { + "description": "Actual Agent status.", + "type": "string", + "x-order": 2 + }, + "is_connected": { + "description": "True if Agent is running and connected to pmm-managed.", + "type": "boolean", + "x-order": 3 + } + } + }, + "x-order": 15 + }, + "services": { + "description": "List of services running on this node.", + "type": "array", + "items": { + "description": "Service represents a service running on a node.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique Service identifier.", + "type": "string", + "x-order": 0 + }, + "service_type": { + "description": "Service type.", + "type": "string", + "x-order": 1 + }, + "service_name": { + "description": "Service name.", + "type": "string", + "x-order": 2 + } + } + }, + "x-order": 16 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/ProxySQL/Add": { + "post": { + "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", + "tags": [ + "ManagementService" + ], + "summary": "Add ProxySQL", + "operationId": "AddProxySQL", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 0 + }, + "node_name": { + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 1 + }, + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { "description": "Linux distribution name and version.", "type": "string", "x-order": 3 @@ -18165,63 +18179,37 @@ "x-order": 10 }, "username": { - "description": "MongoDB username for exporter and QAN agent access.", + "description": "ProxySQL username for scraping metrics.", "type": "string", "x-order": 11 }, "password": { - "description": "MongoDB password for exporter and QAN agent access.", + "description": "ProxySQL password for scraping metrics.", "type": "string", "x-order": 12 }, - "qan_mongodb_profiler": { - "description": "If true, adds qan-mongodb-profiler-agent for provided service.", - "type": "boolean", - "x-order": 13 - }, "custom_labels": { "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 13 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 15 + "x-order": 14 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 16 + "x-order": 15 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 17 - }, - "tls_certificate_key": { - "description": "Client certificate and key.", - "type": "string", - "x-order": 18 - }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", - "type": "string", - "x-order": 19 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 20 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 21 + "x-order": 16 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -18232,7 +18220,7 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 22 + "x-order": 17 }, "disable_collectors": { "description": "List of collector names to disable in this exporter.", @@ -18240,41 +18228,12 @@ "items": { "type": "string" }, - "x-order": 23 - }, - "authentication_mechanism": { - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", - "type": "string", - "x-order": 24 - }, - "authentication_database": { - "description": "Authentication database.", - "type": "string", - "x-order": 25 + "x-order": 18 }, "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 26 - }, - "stats_collections": { - "description": "List of collections to get stats from. Can use * .", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 27 - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 28 - }, - "enable_all_collectors": { - "type": "boolean", - "title": "Enable all collectors", - "x-order": 29 + "x-order": 19 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -18289,12 +18248,12 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 30 + "x-order": 20 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 + "x-order": 21 } } } @@ -18307,7 +18266,7 @@ "type": "object", "properties": { "service": { - "description": "MongoDBService represents a generic MongoDB instance.", + "description": "ProxySQLService represents a generic ProxySQL instance.", "type": "object", "properties": { "service_id": { @@ -18365,15 +18324,15 @@ "x-order": 9 }, "version": { - "description": "MongoDB version.", + "description": "ProxySQL version.", "type": "string", "x-order": 10 } }, "x-order": 0 }, - "mongodb_exporter": { - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "proxysql_exporter": { + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", "type": "object", "properties": { "agent_id": { @@ -18397,7 +18356,7 @@ "x-order": 3 }, "username": { - "description": "MongoDB username for scraping metrics.", + "description": "ProxySQL username for scraping metrics.", "type": "string", "x-order": 4 }, @@ -18453,29 +18412,10 @@ "format": "int64", "x-order": 11 }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 12 - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 13 - }, - "enable_all_collectors": { - "description": "Enable All collectors.", - "type": "boolean", - "x-order": 14 - }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 + "x-order": 12 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -18490,106 +18430,15 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 13 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 17 + "x-order": 14 } }, "x-order": 1 - }, - "qan_mongodb_profiler": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MongoDB username for getting profiler data.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 7 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 8 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 9 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 10 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 11 - } - }, - "x-order": 2 } } } @@ -18628,14 +18477,14 @@ } } }, - "/v1/management/MySQL/Add": { + "/v1/management/RDS/Add": { "post": { - "description": "Adds MySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mysqld_exporter\", and \"qan_mysql_perfschema\" agents with the provided \"pmm_agent_id\" and other parameters.", + "description": "Adds RDS instance.", "tags": [ "ManagementService" ], - "summary": "Add MySQL", - "operationId": "AddMySQL", + "summary": "Add RDS", + "operationId": "AddRDS", "parameters": [ { "name": "body", @@ -18644,212 +18493,147 @@ "schema": { "type": "object", "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "region": { + "description": "AWS region.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "az": { + "description": "AWS availability zone.", "type": "string", "x-order": 1 }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - }, + "instance_id": { + "description": "AWS instance ID.", + "type": "string", "x-order": 2 }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "node_model": { + "description": "AWS instance class.", "type": "string", "x-order": 3 }, "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", + "description": "Address used to connect to it.", "type": "string", "x-order": 4 }, "port": { - "description": "Service Access port.\nPort is required when the address present.", + "description": "Access port.", "type": "integer", "format": "int64", "x-order": 5 }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", "type": "string", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], "x-order": 6 }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "node_name": { + "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID.", "type": "string", "x-order": 7 }, + "service_name": { + "description": "Unique across all Services user-defined name. Defaults to AWS instance ID.", + "type": "string", + "x-order": 8 + }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 8 + "x-order": 9 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 9 + "x-order": 10 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 10 + "x-order": 11 }, "username": { - "description": "MySQL username for scraping metrics.", + "description": "Username for scraping metrics.", "type": "string", - "x-order": 11 + "x-order": 12 }, "password": { - "description": "MySQL password for scraping metrics.", + "description": "Password for scraping metrics.", "type": "string", - "x-order": 12 - }, - "qan_mysql_perfschema": { - "description": "If true, adds qan-mysql-perfschema-agent for provided service.", - "type": "boolean", "x-order": 13 }, - "qan_mysql_slowlog": { - "description": "If true, adds qan-mysql-slowlog-agent for provided service.", - "type": "boolean", + "aws_access_key": { + "description": "AWS Access key.", + "type": "string", "x-order": 14 }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "aws_secret_key": { + "description": "AWS Secret key.", + "type": "string", "x-order": 15 }, - "skip_connection_check": { - "description": "Skip connection check.", + "rds_exporter": { + "description": "If true, adds rds_exporter.", "type": "boolean", "x-order": 16 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", + "qan_mysql_perfschema": { + "description": "If true, adds qan-mysql-perfschema-agent.", "type": "boolean", "x-order": 17 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", + "custom_labels": { + "description": "Custom user-assigned labels for Node and Service.", + "type": "object", + "additionalProperties": { + "type": "string" + }, "x-order": 18 }, - "disable_query_examples": { - "description": "Disable query examples.", + "skip_connection_check": { + "description": "Skip connection check.", "type": "boolean", "x-order": 19 }, - "max_slowlog_file_size": { - "description": "If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if \u003e 0.\nIf zero, server's default value is used.\nUse negative value to disable rotation.", - "type": "string", - "format": "int64", - "x-order": 20 - }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 21 + "x-order": 20 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", + "x-order": 21 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", "x-order": 22 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", + "type": "integer", + "format": "int32", "x-order": 23 }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", + "disable_basic_metrics": { + "description": "Disable basic metrics.", + "type": "boolean", "x-order": 24 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", + "disable_enhanced_metrics": { + "description": "Disable enhanced metrics.", + "type": "boolean", "x-order": 25 }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", - "type": "integer", - "format": "int32", - "x-order": 26 - }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", "type": "string", @@ -18859,40 +18643,39 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 27 + "x-order": 26 }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 28 + "qan_postgresql_pgstatements": { + "type": "boolean", + "title": "If true, add qan-pgstatements", + "x-order": 27 }, "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 29 + "x-order": 28 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "database": { + "description": "Database name.", "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], + "x-order": 29 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", "x-order": 30 }, - "expose_exporter": { + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", "x-order": 31 + }, + "max_postgresql_exporter_connections": { + "description": "Maximum number of exporter connections to PostgreSQL instance.", + "type": "integer", + "format": "int32", + "x-order": 32 } } } @@ -18904,74 +18687,53 @@ "schema": { "type": "object", "properties": { - "service": { - "description": "MySQLService represents a generic MySQL instance.", + "node": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", "type": "object", "properties": { - "service_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "node_id": { - "description": "Node identifier where this instance runs.", + "address": { + "description": "DB instance identifier.", "type": "string", "x-order": 2 }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", + "region": { + "description": "Node region.", + "type": "string", "x-order": 4 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", + "az": { + "description": "Node availability zone.", "type": "string", "x-order": 5 }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 + "x-order": 6 } }, "x-order": 0 }, - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { "agent_id": { @@ -18989,37 +18751,205 @@ "type": "boolean", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_id": { + "description": "Node identifier.", "type": "string", "x-order": 3 }, - "username": { - "description": "MySQL username for scraping metrics.", + "aws_access_key": { + "description": "AWS Access Key.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], "x-order": 6 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", + "listen_port": { + "description": "Listen port for scraping metrics (the same for several configurations).", + "type": "integer", + "format": "int64", "x-order": 7 }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", "x-order": 8 }, - "tls_key": { + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", + "type": "boolean", + "x-order": 9 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 10 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 13 + } + }, + "x-order": 1 + }, + "mysql": { + "description": "MySQLService represents a generic MySQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 2 + }, + "mysqld_exporter": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { "description": "Password for decrypting tls_cert.", "type": "string", "x-order": 9 @@ -19109,7 +19039,7 @@ "x-order": 20 } }, - "x-order": 1 + "x-order": 3 }, "qan_mysql_perfschema": { "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", @@ -19225,116 +19155,175 @@ "x-order": 16 } }, - "x-order": 2 + "x-order": 4 }, - "qan_mysql_slowlog": { - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "postgresql": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", "type": "object", "properties": { - "agent_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "database_name": { + "description": "Database name.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 3 }, - "username": { - "description": "MySQL username for getting performance data.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", "x-order": 6 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 7 }, - "tls_cert": { - "description": "Client certificate.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 8 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 9 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", - "type": "string", - "format": "int64", - "x-order": 13 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 15 + "x-order": 10 }, - "process_exec_path": { + "version": { + "description": "PostgreSQL version.", "type": "string", - "title": "mod tidy", - "x-order": 16 + "x-order": 11 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 + } + }, + "x-order": 5 + }, + "postgresql_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", "default": "LOG_LEVEL_UNSPECIFIED", "enum": [ "LOG_LEVEL_UNSPECIFIED", @@ -19344,16 +19333,123 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 17 + "x-order": 13 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 } }, - "x-order": 3 + "x-order": 6 }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 4 + "qan_postgresql_pgstatements": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", + "type": "string", + "x-order": 4 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + } + }, + "x-order": 7 } } } @@ -19392,14 +19488,14 @@ } } }, - "/v1/management/Node/Get": { + "/v1/management/Service/List": { "post": { - "description": "Returns a single Node by ID.", + "description": "Returns a filtered list of Services.", "tags": [ "ManagementV1Beta1Service" ], - "summary": "Get Node", - "operationId": "GetNodeMixin6", + "summary": "List Services", + "operationId": "ListServicesMixin6", "parameters": [ { "name": "body", @@ -19409,9 +19505,29 @@ "type": "object", "properties": { "node_id": { - "description": "Unique Node identifier.", + "description": "Return only Services running on that Node.", "type": "string", "x-order": 0 + }, + "service_type": { + "description": "ServiceType describes supported Service types.", + "type": "string", + "default": "SERVICE_TYPE_UNSPECIFIED", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "x-order": 1 + }, + "external_group": { + "description": "Return only services in this external group.", + "type": "string", + "x-order": 2 } } } @@ -19423,483 +19539,620 @@ "schema": { "type": "object", "properties": { - "node": { - "type": "object", - "properties": { - "node_id": { - "description": "Unique Node identifier.", - "type": "string", - "x-order": 0 - }, - "node_type": { - "description": "Node type.", - "type": "string", - "x-order": 1 - }, - "node_name": { - "description": "User-defined node name.", - "type": "string", - "x-order": 2 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 3 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 4 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 5 - }, - "container_id": { - "description": "A node's unique docker container identifier.", - "type": "string", - "x-order": 6 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 7 - }, - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 8 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 9 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 10 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 11 - }, - "created_at": { - "description": "Creation timestamp.", - "type": "string", - "format": "date-time", - "x-order": 12 - }, - "updated_at": { - "description": "Last update timestamp.", - "type": "string", - "format": "date-time", - "x-order": 13 - }, - "status": { - "description": "Node status.\n\n - STATUS_UNSPECIFIED: Invalid status.\n - STATUS_UP: The node is up.\n - STATUS_DOWN: The node is down.\n - STATUS_UNKNOWN: The node's status cannot be known (e.g. there are no metrics yet).", - "type": "string", - "default": "STATUS_UNSPECIFIED", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_UP", - "STATUS_DOWN", - "STATUS_UNKNOWN" - ], - "x-order": 14 - }, - "agents": { - "description": "List of agents related to this node.", - "type": "array", - "items": { - "type": "object", - "properties": { - "agent_id": { - "description": "Unique Agent identifier.", - "type": "string", - "x-order": 0 - }, - "agent_type": { - "description": "Agent type.", - "type": "string", - "x-order": 1 - }, - "status": { - "description": "Actual Agent status.", - "type": "string", - "x-order": 2 - }, - "is_connected": { - "description": "True if Agent is running and connected to pmm-managed.", - "type": "boolean", - "x-order": 3 - } - } - }, - "x-order": 15 - }, - "services": { - "description": "List of services running on this node.", - "type": "array", - "items": { - "description": "Service represents a service running on a node.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique Service identifier.", - "type": "string", - "x-order": 0 - }, - "service_type": { - "description": "Service type.", - "type": "string", - "x-order": 1 - }, - "service_name": { - "description": "Service name.", - "type": "string", - "x-order": 2 - } - } - }, - "x-order": 16 - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/Node/List": { - "post": { - "description": "Returns a filtered list of Nodes.", - "tags": [ - "ManagementV1Beta1Service" - ], - "summary": "List Nodes", - "operationId": "ListNodesMixin6", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "nodes": { + "services": { + "description": "List of Services.", "type": "array", "items": { "type": "object", "properties": { - "node_id": { - "description": "Unique Node identifier.", + "service_id": { + "description": "Unique service identifier.", "type": "string", "x-order": 0 }, - "node_type": { - "description": "Node type.", + "service_type": { + "description": "Service type.", "type": "string", "x-order": 1 }, - "node_name": { - "description": "User-defined node name.", + "service_name": { + "description": "User-defined name unique across all Services.", "type": "string", "x-order": 2 }, - "machine_id": { - "description": "Linux machine-id.", + "database_name": { + "description": "Database name.", "type": "string", "x-order": 3 }, - "distro": { - "description": "Linux distribution name and version.", + "node_id": { + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 4 }, - "node_model": { - "description": "Node model.", + "node_name": { + "description": "Node name where this instance runs.", "type": "string", "x-order": 5 }, - "container_id": { - "description": "A node's unique docker container identifier.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 6 }, - "container_name": { - "description": "Container name.", + "cluster": { + "description": "Cluster name.", "type": "string", "x-order": 7 }, - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 8 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 9 - }, - "az": { - "description": "Node availability zone.", + "replication_set": { + "description": "Replication set name.", "type": "string", - "x-order": 10 + "x-order": 8 }, "custom_labels": { - "description": "Custom user-assigned labels for Node.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, + "x-order": 9 + }, + "external_group": { + "description": "External group name.", + "type": "string", + "x-order": 10 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", "x-order": 11 }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 12 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 13 + }, "created_at": { "description": "Creation timestamp.", "type": "string", "format": "date-time", - "x-order": 12 + "x-order": 14 }, "updated_at": { "description": "Last update timestamp.", "type": "string", "format": "date-time", - "x-order": 13 - }, - "status": { - "description": "Node status.\n\n - STATUS_UNSPECIFIED: Invalid status.\n - STATUS_UP: The node is up.\n - STATUS_DOWN: The node is down.\n - STATUS_UNKNOWN: The node's status cannot be known (e.g. there are no metrics yet).", - "type": "string", - "default": "STATUS_UNSPECIFIED", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_UP", - "STATUS_DOWN", - "STATUS_UNKNOWN" - ], - "x-order": 14 + "x-order": 15 }, "agents": { - "description": "List of agents related to this node.", + "description": "List of agents related to this service.", "type": "array", "items": { "type": "object", "properties": { "agent_id": { - "description": "Unique Agent identifier.", + "description": "Unique agent identifier.", "type": "string", "x-order": 0 }, + "is_agent_password_set": { + "description": "True if the agent password is set.", + "type": "boolean", + "x-order": 1 + }, "agent_type": { "description": "Agent type.", "type": "string", - "x-order": 1 + "x-order": 2 }, - "status": { - "description": "Actual Agent status.", + "aws_access_key": { + "description": "AWS Access Key.", "type": "string", - "x-order": 2 + "x-order": 3 }, - "is_connected": { - "description": "True if Agent is running and connected to pmm-managed.", + "is_aws_secret_key_set": { + "description": "True if AWS Secret Key is set.", "type": "boolean", - "x-order": 3 - } - } - }, - "x-order": 15 - }, - "services": { - "description": "List of services running on this node.", - "type": "array", - "items": { - "description": "Service represents a service running on a node.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique Service identifier.", + "x-order": 4 + }, + "azure_options": { + "type": "object", + "properties": { + "client_id": { + "description": "Azure client ID.", + "type": "string", + "x-order": 0 + }, + "is_client_secret_set": { + "description": "True if Azure client secret is set.", + "type": "boolean", + "x-order": 1 + }, + "resource_group": { + "description": "Azure resource group.", + "type": "string", + "x-order": 2 + }, + "subscription_id": { + "description": "Azure subscription ID.", + "type": "string", + "x-order": 3 + }, + "tenant_id": { + "description": "Azure tenant ID.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 5 + }, + "created_at": { + "description": "Creation timestamp.", "type": "string", - "x-order": 0 + "format": "date-time", + "x-order": 6 }, - "service_type": { - "description": "Service type.", + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 10 + }, + "log_level": { + "description": "Log level for exporter.", "type": "string", - "x-order": 1 + "x-order": 11 }, - "service_name": { - "description": "Service name.", + "max_query_length": { + "description": "Limit query length in QAN.", + "type": "integer", + "format": "int32", + "x-order": 12 + }, + "max_query_log_size": { + "description": "Limit query log size in QAN.", "type": "string", - "x-order": 2 - } - } - }, - "x-order": 16 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/Node/Register": { - "post": { - "description": "Registers a new Node and pmm-agent.", - "tags": [ - "ManagementService" - ], - "summary": "Register Node", - "operationId": "RegisterNode", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "Node address (DNS name or IP).", - "type": "string", - "x-order": 2 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 3 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 4 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 5 + "format": "int64", + "x-order": 13 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 14 + }, + "metrics_scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 15 + }, + "mongo_db_options": { + "type": "object", + "properties": { + "is_tls_certificate_key_set": { + "description": "True if TLS certificate is set.", + "type": "boolean", + "x-order": 0 + }, + "is_tls_certificate_key_file_password_set": { + "description": "True if TLS certificate file password is set.", + "type": "boolean", + "x-order": 1 + }, + "authentication_mechanism": { + "description": "MongoDB auth mechanism.", + "type": "string", + "x-order": 2 + }, + "authentication_database": { + "description": "MongoDB auth database.", + "type": "string", + "x-order": 3 + }, + "stats_collections": { + "description": "MongoDB stats collections.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 4 + }, + "collections_limit": { + "description": "MongoDB collections limit.", + "type": "integer", + "format": "int32", + "x-order": 5 + }, + "enable_all_collectors": { + "description": "True if all collectors are enabled.", + "type": "boolean", + "x-order": 6 + } + }, + "x-order": 16 + }, + "mysql_options": { + "type": "object", + "properties": { + "is_tls_key_set": { + "description": "True if TLS key is set.", + "type": "boolean", + "x-order": 0 + } + }, + "x-order": 17 + }, + "node_id": { + "description": "A unique node identifier.", + "type": "string", + "x-order": 18 + }, + "is_password_set": { + "description": "True if password for connecting the agent to the database is set.", + "type": "boolean", + "x-order": 19 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier.", + "type": "string", + "x-order": 20 + }, + "postgresql_options": { + "type": "object", + "properties": { + "is_ssl_key_set": { + "description": "True if TLS key is set.", + "type": "boolean", + "x-order": 0 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 1 + }, + "max_exporter_connections": { + "description": "Maximum number of connections from exporter to PostgreSQL instance.", + "type": "integer", + "format": "int32", + "x-order": 2 + } + }, + "x-order": 21 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 22 + }, + "push_metrics": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 23 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 24 + }, + "comments_parsing_disabled": { + "description": "True if query comments parsing is disabled.", + "type": "boolean", + "x-order": 25 + }, + "rds_basic_metrics_disabled": { + "description": "True if RDS basic metrics are disdabled.", + "type": "boolean", + "x-order": 26 + }, + "rds_enhanced_metrics_disabled": { + "description": "True if RDS enhanced metrics are disdabled.", + "type": "boolean", + "x-order": 27 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 28 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 29 + }, + "status": { + "description": "Actual Agent status.", + "type": "string", + "x-order": 30 + }, + "table_count": { + "description": "Last known table count.", + "type": "integer", + "format": "int32", + "x-order": 31 + }, + "table_count_tablestats_group_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", + "x-order": 32 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 33 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 34 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 35 + }, + "updated_at": { + "description": "Last update timestamp.", + "type": "string", + "format": "date-time", + "x-order": 36 + }, + "version": { + "description": "Agent version.", + "type": "string", + "x-order": 37 + }, + "is_connected": { + "description": "True if Agent is running and connected to pmm-managed.", + "type": "boolean", + "x-order": 38 + }, + "expose_exporter": { + "description": "True if an exporter agent is exposed on all host addresses.", + "type": "boolean", + "x-order": 39 + } + } + }, + "x-order": 16 + }, + "status": { + "description": "Service status.\n\n - STATUS_UNSPECIFIED: In case we don't support the db vendor yet.\n - STATUS_UP: The service is up.\n - STATUS_DOWN: The service is down.\n - STATUS_UNKNOWN: The service's status cannot be known (e.g. there are no metrics yet).", + "type": "string", + "default": "STATUS_UNSPECIFIED", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_UP", + "STATUS_DOWN", + "STATUS_UNKNOWN" + ], + "x-order": 17 + }, + "version": { + "description": "The service/database version.", + "type": "string", + "x-order": 18 + } + } + }, + "x-order": 0 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 }, - "container_name": { - "description": "Container name.", + "message": { "type": "string", - "x-order": 6 + "x-order": 1 }, - "node_model": { - "description": "Node model.", + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/annotations": { + "post": { + "description": "Adds an annotation.", + "tags": [ + "ManagementService" + ], + "summary": "Add Annotation", + "operationId": "AddAnnotation", + "parameters": [ + { + "description": "AddAnnotationRequest is a params to add new annotation.", + "name": "body", + "in": "body", + "required": true, + "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", + "type": "object", + "properties": { + "text": { + "description": "An annotation description. Required.", + "type": "string", + "x-order": 0 + }, + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 + }, + "node_name": { + "description": "Used for annotating a node.", + "type": "string", + "x-order": 2 + }, + "service_names": { + "description": "Used for annotating services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/nodes": { + "post": { + "description": "Registers a new Node and a pmm-agent.", + "tags": [ + "ManagementService" + ], + "summary": "Register Node", + "operationId": "RegisterNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "address": { + "description": "Node address (DNS name or IP).", + "type": "string", + "x-order": 2 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 3 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 4 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 5 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 6 + }, + "node_model": { + "description": "Node model.", "type": "string", "x-order": 7 }, @@ -20162,14 +20415,14 @@ } } }, - "/v1/management/PostgreSQL/Add": { + "/v1/management/services": { "post": { - "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", + "description": "Adds a service and starts several agents.", "tags": [ "ManagementService" ], - "summary": "Add PostgreSQL", - "operationId": "AddPostgreSQL", + "summary": "Add a Service", + "operationId": "AddServiceMixin3", "parameters": [ { "name": "body", @@ -20178,433 +20431,238 @@ "schema": { "type": "object", "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "mysql": { "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], "x-order": 0 }, "node_name": { - "description": "Unique across all Nodes user-defined name.", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, "x-order": 2 }, - "distro": { - "description": "Linux distribution name and version.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "container_name": { - "description": "Container name.", - "type": "string", + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 5 }, - "node_model": { - "description": "Node model.", + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 6 }, - "region": { - "description": "Node region.", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", "type": "string", "x-order": 7 }, - "az": { - "description": "Node availability zone.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 8 }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - }, - "x-order": 2 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Service Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "database": { - "description": "Database name.", - "type": "string", - "x-order": 6 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 7 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", - "type": "string", - "x-order": 8 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 9 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 10 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 11 - }, - "username": { - "description": "PostgreSQL username for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "password": { - "description": "PostgreSQL password for scraping metrics.", - "type": "string", - "x-order": 13 - }, - "qan_postgresql_pgstatements_agent": { - "description": "If true, adds qan-postgresql-pgstatements-agent for provided service.", - "type": "boolean", - "x-order": 14 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service.", - "type": "boolean", - "x-order": 15 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 16 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 17 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 18 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 19 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 20 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 21 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", - "type": "boolean", - "x-order": 22 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 23 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 24 - }, - "tls_ca": { - "description": "TLS CA certificate.", - "type": "string", - "x-order": 25 - }, - "tls_cert": { - "description": "TLS Certifcate.", - "type": "string", - "x-order": 26 - }, - "tls_key": { - "description": "TLS Certificate Key.", - "type": "string", - "x-order": 27 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 28 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 29 - }, - "auto_discovery_limit": { - "description": "Limit for auto discovery.", - "type": "integer", - "format": "int32", - "x-order": 30 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 32 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "service": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier where this instance runs.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 3 + "x-order": 9 }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "replication_set": { + "description": "Replication set name.", "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 + "x-order": 10 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", + "username": { + "description": "MySQL username for scraping metrics.", "type": "string", - "x-order": 6 + "x-order": 11 }, - "environment": { - "description": "Environment name.", + "password": { + "description": "MySQL password for scraping metrics.", "type": "string", - "x-order": 7 + "x-order": 12 }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 8 + "qan_mysql_perfschema": { + "description": "If true, adds qan-mysql-perfschema-agent for provided service.", + "type": "boolean", + "x-order": 13 }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 + "qan_mysql_slowlog": { + "description": "If true, adds qan-mysql-slowlog-agent for provided service.", + "type": "boolean", + "x-order": 14 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 10 + "x-order": 15 }, - "version": { - "description": "PostgreSQL version.", - "type": "string", - "x-order": 11 + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 16 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 17 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 12 - } - }, - "x-order": 0 - }, - "postgres_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 + "x-order": 18 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "disable_query_examples": { + "description": "Disable query examples.", "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 + "x-order": 19 }, - "username": { - "description": "PostgreSQL username for scraping metrics.", + "max_slowlog_file_size": { + "description": "If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if \u003e 0.\nIf zero, server's default value is used.\nUse negative value to disable rotation.", "type": "string", - "x-order": 4 + "format": "int64", + "x-order": 20 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 5 + "x-order": 21 }, "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 6 + "x-order": 22 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 23 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 24 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 25 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", + "type": "integer", + "format": "int32", + "x-order": 26 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", + "default": "METRICS_MODE_UNSPECIFIED", "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" ], - "x-order": 10 + "x-order": 27 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 28 }, - "process_exec_path": { - "description": "Path to exec process.", + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 12 + "x-order": 29 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -20619,206 +20677,250 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 + "x-order": 30 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 + "x-order": 31 } }, - "x-order": 1 + "x-order": 0 }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "mongodb": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 5 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", + "type": "string", "x-order": 6 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "type": "string", "x-order": 7 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "environment": { + "description": "Environment name.", + "type": "string", "x-order": 8 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "cluster": { + "description": "Cluster name.", + "type": "string", "x-order": 9 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "replication_set": { + "description": "Replication set name.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], "x-order": 10 }, - "process_exec_path": { - "description": "Path to exec process.", + "username": { + "description": "MongoDB username for exporter and QAN agent access.", "type": "string", "x-order": 11 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "password": { + "description": "MongoDB password for exporter and QAN agent access.", "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], "x-order": 12 - } - }, - "x-order": 2 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "qan_mongodb_profiler": { + "description": "If true, adds qan-mongodb-profiler-agent for provided service.", "type": "boolean", - "x-order": 2 + "x-order": 13 }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 + "custom_labels": { + "description": "Custom user-assigned labels for Service.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 14 }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", - "type": "string", - "x-order": 4 + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 15 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 5 + "x-order": 16 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 6 + "x-order": 17 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 7 + "tls_certificate_key": { + "description": "Client certificate and key.", + "type": "string", + "x-order": 18 + }, + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 19 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 20 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 8 + "x-order": 21 }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 9 + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 22 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { "type": "string" }, - "x-order": 10 + "x-order": 23 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 11 + "x-order": 24 }, - "process_exec_path": { - "description": "Path to exec process.", + "authentication_database": { + "description": "Authentication database.", "type": "string", - "x-order": 12 + "x-order": 25 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 26 + }, + "stats_collections": { + "description": "List of collections to get stats from. Can use * .", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 27 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 28 + }, + "enable_all_collectors": { + "type": "boolean", + "title": "Enable all collectors", + "x-order": 29 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -20833,427 +20935,241 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 - } - }, - "x-order": 3 - }, - "warning": { - "description": "Warning message.", - "type": "string", - "x-order": 4 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } + "x-order": 30 }, - "additionalProperties": false + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 31 + } }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/ProxySQL/Add": { - "post": { - "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", - "tags": [ - "ManagementService" - ], - "summary": "Add ProxySQL", - "operationId": "AddProxySQL", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", "x-order": 1 }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "postgresql": { "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], "x-order": 0 }, "node_name": { - "description": "Unique across all Nodes user-defined name.", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, "x-order": 2 }, - "distro": { - "description": "Linux distribution name and version.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "container_name": { - "description": "Container name.", - "type": "string", + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 5 }, - "node_model": { - "description": "Node model.", + "database": { + "description": "Database name.", "type": "string", "x-order": 6 }, - "region": { - "description": "Node region.", + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 7 }, - "az": { - "description": "Node availability zone.", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", "type": "string", "x-order": 8 }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "environment": { + "description": "Environment name.", + "type": "string", "x-order": 9 - } - }, - "x-order": 2 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Service Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", - "type": "string", - "x-order": 7 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 8 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 9 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 10 - }, - "username": { - "description": "ProxySQL username for scraping metrics.", - "type": "string", - "x-order": 11 - }, - "password": { - "description": "ProxySQL password for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 14 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 15 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 16 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 17 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 18 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 19 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 20 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 21 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "service": { - "description": "ProxySQLService represents a generic ProxySQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "cluster": { + "description": "Cluster name.", "type": "string", - "x-order": 1 + "x-order": 10 }, - "node_id": { - "description": "Node identifier where this instance runs.", + "replication_set": { + "description": "Replication set name.", "type": "string", - "x-order": 2 + "x-order": 11 }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "username": { + "description": "PostgreSQL username for scraping metrics.", "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 + "x-order": 12 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", + "password": { + "description": "PostgreSQL password for scraping metrics.", "type": "string", - "x-order": 5 + "x-order": 13 }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 + "qan_postgresql_pgstatements_agent": { + "description": "If true, adds qan-postgresql-pgstatements-agent for provided service.", + "type": "boolean", + "x-order": 14 }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 + "qan_postgresql_pgstatmonitor_agent": { + "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service.", + "type": "boolean", + "x-order": 15 }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 16 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 17 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "version": { - "description": "ProxySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 0 - }, - "proxysql_exporter": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 + "x-order": 18 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", + "skip_connection_check": { + "description": "Skip connection check.", "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 + "x-order": 19 }, - "username": { - "description": "ProxySQL username for scraping metrics.", - "type": "string", - "x-order": 4 + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 20 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 5 + "x-order": 21 }, "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", "type": "boolean", - "x-order": 6 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 + "x-order": 22 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 23 }, - "disabled_collectors": { - "description": "List of disabled collector names.", + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", "type": "array", "items": { "type": "string" }, - "x-order": 9 + "x-order": 24 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "tls_ca": { + "description": "TLS CA certificate.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 + "x-order": 25 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 26 }, - "process_exec_path": { - "description": "Path to exec process.", + "tls_key": { + "description": "TLS Certificate Key.", "type": "string", - "x-order": 12 + "x-order": 27 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 28 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -21268,1670 +21184,1483 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 29 + }, + "auto_discovery_limit": { + "description": "Limit for auto discovery.", + "type": "integer", + "format": "int32", + "x-order": 30 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 14 + "x-order": 31 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 32 } }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 + "x-order": 2 }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } + "external": { + "type": "object", + "properties": { + "runs_on_node_id": { + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id should always be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 0 }, - "additionalProperties": false + "node_name": { + "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "type": "string", + "x-order": 1 + }, + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, + "x-order": 2 + }, + "address": { + "description": "Node and Exporter access address (DNS name or IP).\naddress should always be passed with add_node.", + "type": "string", + "x-order": 3 + }, + "service_name": { + "description": "Unique across all Services user-defined name. Required.", + "type": "string", + "x-order": 4 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 5 + }, + "password": { + "description": "HTTP basic auth password for collecting metrics.", + "type": "string", + "x-order": 6 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 7 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 8 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 9 + }, + "node_id": { + "description": "Node identifier on which an external service is been running.\nnode_id should always be passed with runs_on_node_id.", + "type": "string", + "x-order": 10 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 11 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 12 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 13 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Service.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 14 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 15 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 16 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 17 + } }, - "x-order": 2 + "x-order": 3 } } } } - } - } - }, - "/v1/management/RDS/Add": { - "post": { - "description": "Adds RDS instance.", - "tags": [ - "ManagementService" ], - "summary": "Add RDS", - "operationId": "AddRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID.", - "type": "string", - "x-order": 7 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Defaults to AWS instance ID.", - "type": "string", - "x-order": 8 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 9 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 10 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 11 - }, - "username": { - "description": "Username for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "password": { - "description": "Password for scraping metrics.", - "type": "string", - "x-order": 13 - }, - "aws_access_key": { - "description": "AWS Access key.", - "type": "string", - "x-order": 14 - }, - "aws_secret_key": { - "description": "AWS Secret key.", - "type": "string", - "x-order": 15 - }, - "rds_exporter": { - "description": "If true, adds rds_exporter.", - "type": "boolean", - "x-order": 16 - }, - "qan_mysql_perfschema": { - "description": "If true, adds qan-mysql-perfschema-agent.", - "type": "boolean", - "x-order": 17 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node and Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 18 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 19 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 20 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 21 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 22 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", - "type": "integer", - "format": "int32", - "x-order": 23 - }, - "disable_basic_metrics": { - "description": "Disable basic metrics.", - "type": "boolean", - "x-order": 24 - }, - "disable_enhanced_metrics": { - "description": "Disable enhanced metrics.", - "type": "boolean", - "x-order": 25 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 26 - }, - "qan_postgresql_pgstatements": { - "type": "boolean", - "title": "If true, add qan-pgstatements", - "x-order": 27 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 28 - }, - "database": { - "description": "Database name.", - "type": "string", - "x-order": 29 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 30 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 31 - }, - "max_postgresql_exporter_connections": { - "description": "Maximum number of exporter connections to PostgreSQL instance.", - "type": "integer", - "format": "int32", - "x-order": 32 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "node": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", + "mysql": { "type": "object", "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", + "service": { + "description": "MySQLService represents a generic MySQL instance.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 + } }, - "x-order": 6 - } - }, - "x-order": 0 - }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 - }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", + "mysqld_exporter": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 5 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 6 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 - }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", - "x-order": 9 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", + "x-order": 10 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 12 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 + }, + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 15 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 16 + }, + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 18 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 19 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 20 + } + }, + "x-order": 1 }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 + "qan_mysql_perfschema": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MySQL username for getting performance data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 11 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 13 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 14 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 16 + } + }, + "x-order": 2 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 + "qan_mysql_slowlog": { + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MySQL username for getting performance data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 14 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 15 + }, + "process_exec_path": { + "type": "string", + "title": "mod tidy", + "x-order": 16 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 17 + } + }, + "x-order": 3 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", + "table_count": { + "description": "Actual table count at the moment of adding.", "type": "integer", "format": "int32", - "x-order": 13 + "x-order": 4 } }, - "x-order": 1 + "x-order": 0 }, - "mysql": { - "description": "MySQLService represents a generic MySQL instance.", + "mongodb": { "type": "object", "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "service": { + "description": "MongoDBService represents a generic MongoDB instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "version": { + "description": "MongoDB version.", + "type": "string", + "x-order": 10 + } + }, "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", + "mongodb_exporter": { + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" + }, + "x-order": 12 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 13 + }, + "enable_all_collectors": { + "description": "Enable All collectors.", + "type": "boolean", + "x-order": 14 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 16 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 17 + } + }, "x-order": 1 }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", + "qan_mongodb_profiler": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } }, - "x-order": 9 - }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 + "x-order": 2 } }, - "x-order": 2 + "x-order": 1 }, - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "postgresql": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "service": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 3 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 4 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 7 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 8 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 + } + }, "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MySQL username for scraping metrics.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 10 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", + "postgres_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 + } }, - "x-order": 11 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 12 + "x-order": 1 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" + "qan_postgresql_pgstatements_agent": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", + "type": "string", + "x-order": 4 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + } }, - "x-order": 13 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 14 + "x-order": 2 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 18 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 19 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 - } - }, - "x-order": 3 - }, - "qan_mysql_perfschema": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 14 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 15 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 16 - } - }, - "x-order": 4 - }, - "postgresql": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 8 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", + "qan_postgresql_pgstatmonitor_agent": { + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "version": { - "description": "PostgreSQL version.", - "type": "string", - "x-order": 11 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 12 - } - }, - "x-order": 5 - }, - "postgresql_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "PostgreSQL username for scraping metrics.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", - "type": "boolean", - "x-order": 6 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 13 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 - }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 - } - }, - "x-order": 6 - }, - "qan_postgresql_pgstatements": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", - "type": "string", - "x-order": 4 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 5 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 6 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 7 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - } - }, - "x-order": 7 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/RDS/Discover": { - "post": { - "description": "Discovers RDS instances.", - "tags": [ - "ManagementService" - ], - "summary": "Discover RDS", - "operationId": "DiscoverRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "aws_access_key": { - "description": "AWS Access key. Optional.", - "type": "string", - "x-order": 0 - }, - "aws_secret_key": { - "description": "AWS Secret key. Optional.", - "type": "string", - "x-order": 1 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "rds_instances": { - "type": "array", - "items": { - "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", - "type": "object", - "properties": { - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "engine_version": { - "description": "Engine version.", - "type": "string", - "x-order": 7 - } - } - }, - "x-order": 0 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/Service/List": { - "post": { - "description": "Returns a filtered list of Services.", - "tags": [ - "ManagementV1Beta1Service" - ], - "summary": "List Services", - "operationId": "ListServicesMixin6", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_id": { - "description": "Return only Services running on that Node.", - "type": "string", - "x-order": 0 - }, - "service_type": { - "description": "ServiceType describes supported Service types.", - "type": "string", - "default": "SERVICE_TYPE_UNSPECIFIED", - "enum": [ - "SERVICE_TYPE_UNSPECIFIED", - "SERVICE_TYPE_MYSQL_SERVICE", - "SERVICE_TYPE_MONGODB_SERVICE", - "SERVICE_TYPE_POSTGRESQL_SERVICE", - "SERVICE_TYPE_PROXYSQL_SERVICE", - "SERVICE_TYPE_HAPROXY_SERVICE", - "SERVICE_TYPE_EXTERNAL_SERVICE" - ], - "x-order": 1 - }, - "external_group": { - "description": "Return only services in this external group.", - "type": "string", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "services": { - "description": "List of Services.", - "type": "array", - "items": { - "type": "object", - "properties": { - "service_id": { - "description": "Unique service identifier.", - "type": "string", - "x-order": 0 - }, - "service_type": { - "description": "Service type.", - "type": "string", - "x-order": 1 - }, - "service_name": { - "description": "User-defined name unique across all Services.", - "type": "string", - "x-order": 2 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 3 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 4 - }, - "node_name": { - "description": "Node name where this instance runs.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "external_group": { - "description": "External group name.", - "type": "string", - "x-order": 10 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 11 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 12 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 13 - }, - "created_at": { - "description": "Creation timestamp.", - "type": "string", - "format": "date-time", - "x-order": 14 - }, - "updated_at": { - "description": "Last update timestamp.", - "type": "string", - "format": "date-time", - "x-order": 15 - }, - "agents": { - "description": "List of agents related to this service.", - "type": "array", - "items": { - "type": "object", - "properties": { - "agent_id": { - "description": "Unique agent identifier.", - "type": "string", - "x-order": 0 - }, - "is_agent_password_set": { - "description": "True if the agent password is set.", - "type": "boolean", - "x-order": 1 - }, - "agent_type": { - "description": "Agent type.", - "type": "string", - "x-order": 2 - }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", - "x-order": 3 - }, - "is_aws_secret_key_set": { - "description": "True if AWS Secret Key is set.", - "type": "boolean", - "x-order": 4 - }, - "azure_options": { - "type": "object", - "properties": { - "client_id": { - "description": "Azure client ID.", - "type": "string", - "x-order": 0 - }, - "is_client_secret_set": { - "description": "True if Azure client secret is set.", - "type": "boolean", - "x-order": 1 - }, - "resource_group": { - "description": "Azure resource group.", - "type": "string", - "x-order": 2 - }, - "subscription_id": { - "description": "Azure subscription ID.", - "type": "string", - "x-order": 3 - }, - "tenant_id": { - "description": "Azure tenant ID.", - "type": "string", - "x-order": 4 - } - }, - "x-order": 5 - }, - "created_at": { - "description": "Creation timestamp.", - "type": "string", - "format": "date-time", - "x-order": 6 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 10 - }, - "log_level": { - "description": "Log level for exporter.", - "type": "string", - "x-order": 11 - }, - "max_query_length": { - "description": "Limit query length in QAN.", - "type": "integer", - "format": "int32", - "x-order": 12 - }, - "max_query_log_size": { - "description": "Limit query log size in QAN.", - "type": "string", - "format": "int64", - "x-order": 13 - }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", - "x-order": 14 - }, - "metrics_scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", - "x-order": 15 - }, - "mongo_db_options": { - "type": "object", - "properties": { - "is_tls_certificate_key_set": { - "description": "True if TLS certificate is set.", - "type": "boolean", - "x-order": 0 - }, - "is_tls_certificate_key_file_password_set": { - "description": "True if TLS certificate file password is set.", - "type": "boolean", - "x-order": 1 - }, - "authentication_mechanism": { - "description": "MongoDB auth mechanism.", - "type": "string", - "x-order": 2 - }, - "authentication_database": { - "description": "MongoDB auth database.", - "type": "string", - "x-order": 3 - }, - "stats_collections": { - "description": "MongoDB stats collections.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 4 - }, - "collections_limit": { - "description": "MongoDB collections limit.", - "type": "integer", - "format": "int32", - "x-order": 5 - }, - "enable_all_collectors": { - "description": "True if all collectors are enabled.", - "type": "boolean", - "x-order": 6 - } - }, - "x-order": 16 - }, - "mysql_options": { - "type": "object", - "properties": { - "is_tls_key_set": { - "description": "True if TLS key is set.", - "type": "boolean", - "x-order": 0 - } - }, - "x-order": 17 - }, - "node_id": { - "description": "A unique node identifier.", - "type": "string", - "x-order": 18 - }, - "is_password_set": { - "description": "True if password for connecting the agent to the database is set.", - "type": "boolean", - "x-order": 19 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier.", - "type": "string", - "x-order": 20 - }, - "postgresql_options": { - "type": "object", - "properties": { - "is_ssl_key_set": { - "description": "True if TLS key is set.", - "type": "boolean", - "x-order": 0 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 1 - }, - "max_exporter_connections": { - "description": "Maximum number of connections from exporter to PostgreSQL instance.", - "type": "integer", - "format": "int32", - "x-order": 2 - } - }, - "x-order": 21 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 22 - }, - "push_metrics": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 23 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 24 - }, - "comments_parsing_disabled": { - "description": "True if query comments parsing is disabled.", - "type": "boolean", - "x-order": 25 - }, - "rds_basic_metrics_disabled": { - "description": "True if RDS basic metrics are disdabled.", - "type": "boolean", - "x-order": 26 - }, - "rds_enhanced_metrics_disabled": { - "description": "True if RDS enhanced metrics are disdabled.", - "type": "boolean", - "x-order": 27 - }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 28 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 29 - }, - "status": { - "description": "Actual Agent status.", - "type": "string", - "x-order": 30 - }, - "table_count": { - "description": "Last known table count.", - "type": "integer", - "format": "int32", - "x-order": 31 - }, - "table_count_tablestats_group_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 32 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 33 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 34 - }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", - "x-order": 35 - }, - "updated_at": { - "description": "Last update timestamp.", - "type": "string", - "format": "date-time", - "x-order": 36 - }, - "version": { - "description": "Agent version.", - "type": "string", - "x-order": 37 - }, - "is_connected": { - "description": "True if Agent is running and connected to pmm-managed.", - "type": "boolean", - "x-order": 38 - }, - "expose_exporter": { - "description": "True if an exporter agent is exposed on all host addresses.", - "type": "boolean", - "x-order": 39 - } - } + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for getting pg stat monitor data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 }, - "x-order": 16 + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 7 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 8 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + } }, - "status": { - "description": "Service status.\n\n - STATUS_UNSPECIFIED: In case we don't support the db vendor yet.\n - STATUS_UP: The service is up.\n - STATUS_DOWN: The service is down.\n - STATUS_UNKNOWN: The service's status cannot be known (e.g. there are no metrics yet).", - "type": "string", - "default": "STATUS_UNSPECIFIED", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_UP", - "STATUS_DOWN", - "STATUS_UNKNOWN" - ], - "x-order": 17 + "x-order": 3 + }, + "warning": { + "description": "Warning message.", + "type": "string", + "x-order": 4 + } + }, + "x-order": 2 + }, + "external": { + "type": "object", + "properties": { + "service": { + "description": "ExternalService represents a generic External service instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 7 + } }, - "version": { - "description": "The service/database version.", - "type": "string", - "x-order": 18 - } + "x-order": 0 + }, + "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 4 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 5 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 1 } }, - "x-order": 0 + "x-order": 3 } } } @@ -22970,14 +22699,88 @@ } } }, - "/v1/management/Service/Remove": { - "post": { - "description": "Removes a Service along with Agents.", + "/v1/management/services/{service_id}": { + "delete": { + "description": "Removes a Service along with its Agents.", "tags": [ "ManagementService" ], "summary": "Remove Service", "operationId": "RemoveServiceMixin3", + "parameters": [ + { + "type": "string", + "description": "Either a Service ID or a Service Name.", + "name": "service_id", + "in": "path", + "required": true + }, + { + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "type": "string", + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "Service type.", + "name": "service_type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/services:discoverRDS": { + "post": { + "description": "Discovers RDS instances.", + "tags": [ + "ManagementService" + ], + "summary": "Discover RDS", + "operationId": "DiscoverRDS", "parameters": [ { "name": "body", @@ -22986,30 +22789,15 @@ "schema": { "type": "object", "properties": { - "service_type": { - "description": "ServiceType describes supported Service types.", + "aws_access_key": { + "description": "AWS Access key. Optional.", "type": "string", - "default": "SERVICE_TYPE_UNSPECIFIED", - "enum": [ - "SERVICE_TYPE_UNSPECIFIED", - "SERVICE_TYPE_MYSQL_SERVICE", - "SERVICE_TYPE_MONGODB_SERVICE", - "SERVICE_TYPE_POSTGRESQL_SERVICE", - "SERVICE_TYPE_PROXYSQL_SERVICE", - "SERVICE_TYPE_HAPROXY_SERVICE", - "SERVICE_TYPE_EXTERNAL_SERVICE" - ], "x-order": 0 }, - "service_id": { - "description": "Service ID or Service Name is required.\nUnique randomly generated instance identifier.", + "aws_secret_key": { + "description": "AWS Secret key. Optional.", "type": "string", "x-order": 1 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 2 } } } @@ -23019,7 +22807,66 @@ "200": { "description": "A successful response.", "schema": { - "type": "object" + "type": "object", + "properties": { + "rds_instances": { + "type": "array", + "items": { + "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery.", + "type": "object", + "properties": { + "region": { + "description": "AWS region.", + "type": "string", + "x-order": 0 + }, + "az": { + "description": "AWS availability zone.", + "type": "string", + "x-order": 1 + }, + "instance_id": { + "description": "AWS instance ID.", + "type": "string", + "x-order": 2 + }, + "node_model": { + "description": "AWS instance class.", + "type": "string", + "x-order": 3 + }, + "address": { + "description": "Address used to connect to it.", + "type": "string", + "x-order": 4 + }, + "port": { + "description": "Access port.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", + "type": "string", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], + "x-order": 6 + }, + "engine_version": { + "description": "Engine version.", + "type": "string", + "x-order": 7 + } + } + }, + "x-order": 0 + } + } } }, "default": { diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index b85963c460b..853070da687 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -5276,103 +5276,14 @@ } } }, - "/v1/management/Annotations/Add": { - "post": { - "description": "Adds an annotation.", - "tags": [ - "ManagementService" - ], - "summary": "Add Annotation", - "operationId": "AddAnnotation", - "parameters": [ - { - "description": "AddAnnotationRequest is a params to add new annotation.", - "name": "body", - "in": "body", - "required": true, - "schema": { - "description": "AddAnnotationRequest is a params to add new annotation.", - "type": "object", - "properties": { - "text": { - "description": "An annotation description. Required.", - "type": "string", - "x-order": 0 - }, - "tags": { - "description": "Tags are used to filter annotations.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 1 - }, - "node_name": { - "description": "Used for annotate node.", - "type": "string", - "x-order": 2 - }, - "service_names": { - "description": "Used for annotate services.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 3 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/External/Add": { + "/v1/management/HAProxy/Add": { "post": { - "description": "Adds external service and adds external exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds an \"external exporter\" agent to inventory, which is running on provided \"runs_on_node_id\".", + "description": "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory.", "tags": [ "ManagementService" ], - "summary": "Add External Service", - "operationId": "AddExternal", + "summary": "Add HAProxy", + "operationId": "AddHAProxy", "parameters": [ { "name": "body", @@ -5381,8 +5292,8 @@ "schema": { "type": "object", "properties": { - "runs_on_node_id": { - "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id always should be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "node_id": { + "description": "Node identifier on which an external exporter is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, @@ -5496,25 +5407,20 @@ "format": "int64", "x-order": 9 }, - "node_id": { - "description": "Node identifier on which an external service is been running.\nnode_id always should be passed with runs_on_node_id.", - "type": "string", - "x-order": 10 - }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 11 + "x-order": 10 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 12 + "x-order": 11 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 13 + "x-order": 12 }, "custom_labels": { "description": "Custom user-assigned labels for Service.", @@ -5522,12 +5428,7 @@ "additionalProperties": { "type": "string" }, - "x-order": 14 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 15 + "x-order": 13 }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", @@ -5538,12 +5439,12 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 16 + "x-order": 14 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 17 + "x-order": 15 } } } @@ -5556,7 +5457,7 @@ "type": "object", "properties": { "service": { - "description": "ExternalService represents a generic External service instance.", + "description": "HAProxyService represents a generic HAProxy service instance.", "type": "object", "properties": { "service_id": { @@ -5596,11 +5497,6 @@ "type": "string" }, "x-order": 6 - }, - "group": { - "description": "Group name of external service.", - "type": "string", - "x-order": 7 } }, "x-order": 0 @@ -5708,14 +5604,14 @@ } } }, - "/v1/management/HAProxy/Add": { + "/v1/management/ProxySQL/Add": { "post": { - "description": "Adds HAProxy service and external exporter. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds an \"external exporter\" agent to the inventory.", + "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", "tags": [ "ManagementService" ], - "summary": "Add HAProxy", - "operationId": "AddHAProxy", + "summary": "Add ProxySQL", + "operationId": "AddProxySQL", "parameters": [ { "name": "body", @@ -5725,12 +5621,12 @@ "type": "object", "properties": { "node_id": { - "description": "Node identifier on which an external exporter is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, "node_name": { - "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, @@ -5803,54 +5699,54 @@ }, "x-order": 2 }, - "address": { - "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "username": { - "description": "HTTP basic auth username for collecting metrics.", - "type": "string", + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 5 }, - "password": { - "description": "HTTP basic auth password for collecting metrics.", + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 6 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", "type": "string", "x-order": 7 }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 8 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", + "cluster": { + "description": "Cluster name.", + "type": "string", "x-order": 9 }, - "environment": { - "description": "Environment name.", + "replication_set": { + "description": "Replication set name.", "type": "string", "x-order": 10 }, - "cluster": { - "description": "Cluster name.", + "username": { + "description": "ProxySQL username for scraping metrics.", "type": "string", "x-order": 11 }, - "replication_set": { - "description": "Replication set name.", + "password": { + "description": "ProxySQL password for scraping metrics.", "type": "string", "x-order": 12 }, @@ -5862,6 +5758,21 @@ }, "x-order": 13 }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 14 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 15 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 16 + }, "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", "type": "string", @@ -5871,12 +5782,40 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 14 + "x-order": 17 }, - "skip_connection_check": { - "description": "Skip connection check.", + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 18 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 19 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 20 + }, + "expose_exporter": { "type": "boolean", - "x-order": 15 + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 21 } } } @@ -5889,7 +5828,7 @@ "type": "object", "properties": { "service": { - "description": "HAProxyService represents a generic HAProxy service instance.", + "description": "ProxySQLService represents a generic ProxySQL instance.", "type": "object", "properties": { "service_id": { @@ -5903,24 +5842,40 @@ "x-order": 1 }, "node_id": { - "description": "Node identifier where this service instance runs.", + "description": "Node identifier where this instance runs.", "type": "string", "x-order": 2 }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 3 + "x-order": 6 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 4 + "x-order": 7 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 5 + "x-order": 8 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -5928,13 +5883,18 @@ "additionalProperties": { "type": "string" }, - "x-order": 6 - } - }, + "x-order": 9 + }, + "version": { + "description": "ProxySQL version.", + "type": "string", + "x-order": 10 + } + }, "x-order": 0 }, - "external_exporter": { - "description": "ExternalExporter runs on any Node type, including Remote Node.", + "proxysql_exporter": { + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", "type": "object", "properties": { "agent_id": { @@ -5942,13 +5902,13 @@ "type": "string", "x-order": 0 }, - "runs_on_node_id": { - "description": "Node identifier where this instance runs.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, "disabled": { - "description": "If disabled, metrics from this exporter will not be collected.", + "description": "Desired Agent status: enabled (false) or disabled (true).", "type": "boolean", "x-order": 2 }, @@ -5958,18 +5918,18 @@ "x-order": 3 }, "username": { - "description": "HTTP basic auth username for collecting metrics.", + "description": "ProxySQL username for scraping metrics.", "type": "string", "x-order": 4 }, - "scheme": { - "description": "Scheme to generate URI to exporter metrics endpoints.", - "type": "string", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "metrics_path": { - "description": "Path under which metrics are exposed, used to generate URI.", - "type": "string", + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", "x-order": 6 }, "custom_labels": { @@ -5980,21 +5940,64 @@ }, "x-order": 7 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 8 - }, "push_metrics_enabled": { "description": "True if exporter uses push metrics mode.", "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, "x-order": 9 }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 10 + "x-order": 12 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 14 } }, "x-order": 1 @@ -6036,14 +6039,14 @@ } } }, - "/v1/management/MongoDB/Add": { + "/v1/management/RDS/Add": { "post": { - "description": "Adds MongoDB Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mongodb_exporter\", and \"qan_mongodb_profiler\" agents with the provided \"pmm_agent_id\" and other parameters.", + "description": "Adds RDS instance.", "tags": [ "ManagementService" ], - "summary": "Add MongoDB", - "operationId": "AddMongoDB", + "summary": "Add RDS", + "operationId": "AddRDS", "parameters": [ { "name": "body", @@ -6052,186 +6055,148 @@ "schema": { "type": "object", "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "region": { + "description": "AWS region.", "type": "string", "x-order": 0 }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", + "az": { + "description": "AWS availability zone.", "type": "string", "x-order": 1 }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - }, + "instance_id": { + "description": "AWS instance ID.", + "type": "string", "x-order": 2 }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", + "node_model": { + "description": "AWS instance class.", "type": "string", "x-order": 3 }, "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", + "description": "Address used to connect to it.", "type": "string", "x-order": 4 }, "port": { - "description": "Service Access port.\nPort is required when the address present.", + "description": "Access port.", "type": "integer", "format": "int64", "x-order": 5 }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", + "engine": { + "description": "DiscoverRDSEngine describes supported RDS instance engines.", "type": "string", + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], "x-order": 6 }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "node_name": { + "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID.", "type": "string", "x-order": 7 }, + "service_name": { + "description": "Unique across all Services user-defined name. Defaults to AWS instance ID.", + "type": "string", + "x-order": 8 + }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 8 + "x-order": 9 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 9 + "x-order": 10 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 10 + "x-order": 11 }, "username": { - "description": "MongoDB username for exporter and QAN agent access.", + "description": "Username for scraping metrics.", "type": "string", - "x-order": 11 + "x-order": 12 }, "password": { - "description": "MongoDB password for exporter and QAN agent access.", + "description": "Password for scraping metrics.", "type": "string", - "x-order": 12 + "x-order": 13 + }, + "aws_access_key": { + "description": "AWS Access key.", + "type": "string", + "x-order": 14 + }, + "aws_secret_key": { + "description": "AWS Secret key.", + "type": "string", + "x-order": 15 }, - "qan_mongodb_profiler": { - "description": "If true, adds qan-mongodb-profiler-agent for provided service.", + "rds_exporter": { + "description": "If true, adds rds_exporter.", "type": "boolean", - "x-order": 13 + "x-order": 16 + }, + "qan_mysql_perfschema": { + "description": "If true, adds qan-mysql-perfschema-agent.", + "type": "boolean", + "x-order": 17 }, "custom_labels": { - "description": "Custom user-assigned labels for Service.", + "description": "Custom user-assigned labels for Node and Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 18 }, "skip_connection_check": { "description": "Skip connection check.", "type": "boolean", - "x-order": 15 + "x-order": 19 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 16 + "x-order": 20 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 17 - }, - "tls_certificate_key": { - "description": "Client certificate and key.", - "type": "string", - "x-order": 18 - }, - "tls_certificate_key_file_password": { - "description": "Password for decrypting tls_certificate_key.", - "type": "string", - "x-order": 19 + "x-order": 21 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 20 + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 22 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", "type": "integer", "format": "int32", - "x-order": 21 + "x-order": 23 }, - "metrics_mode": { + "disable_basic_metrics": { + "description": "Disable basic metrics.", + "type": "boolean", + "x-order": 24 + }, + "disable_enhanced_metrics": { + "description": "Disable enhanced metrics.", + "type": "boolean", + "x-order": 25 + }, + "metrics_mode": { "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", "type": "string", "default": "METRICS_MODE_UNSPECIFIED", @@ -6240,69 +6205,39 @@ "METRICS_MODE_PULL", "METRICS_MODE_PUSH" ], - "x-order": 22 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 23 - }, - "authentication_mechanism": { - "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", - "type": "string", - "x-order": 24 + "x-order": 26 }, - "authentication_database": { - "description": "Authentication database.", - "type": "string", - "x-order": 25 + "qan_postgresql_pgstatements": { + "type": "boolean", + "title": "If true, add qan-pgstatements", + "x-order": 27 }, "agent_password": { "description": "Custom password for exporter endpoint /metrics.", "type": "string", - "x-order": 26 - }, - "stats_collections": { - "description": "List of collections to get stats from. Can use * .", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 27 - }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", "x-order": 28 }, - "enable_all_collectors": { - "type": "boolean", - "title": "Enable all collectors", + "database": { + "description": "Database name.", + "type": "string", "x-order": 29 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", "x-order": 30 }, - "expose_exporter": { + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", "x-order": 31 + }, + "max_postgresql_exporter_connections": { + "description": "Maximum number of exporter connections to PostgreSQL instance.", + "type": "integer", + "format": "int32", + "x-order": 32 } } } @@ -6314,74 +6249,53 @@ "schema": { "type": "object", "properties": { - "service": { - "description": "MongoDBService represents a generic MongoDB instance.", + "node": { + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", "type": "object", "properties": { - "service_id": { + "node_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "node_name": { + "description": "Unique across all Nodes user-defined name.", "type": "string", "x-order": 1 }, - "node_id": { - "description": "Node identifier where this instance runs.", + "address": { + "description": "DB instance identifier.", "type": "string", "x-order": 2 }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "node_model": { + "description": "Node model.", "type": "string", "x-order": 3 }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", + "region": { + "description": "Node region.", + "type": "string", "x-order": 4 }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", + "az": { + "description": "Node availability zone.", "type": "string", "x-order": 5 }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 - }, - "version": { - "description": "MongoDB version.", - "type": "string", - "x-order": 10 + "x-order": 6 } }, "x-order": 0 }, - "mongodb_exporter": { - "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "rds_exporter": { + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", "type": "object", "properties": { "agent_id": { @@ -6399,46 +6313,23 @@ "type": "boolean", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "node_id": { + "description": "Node identifier.", "type": "string", "x-order": 3 }, - "username": { - "description": "MongoDB username for scraping metrics.", + "aws_access_key": { + "description": "AWS Access Key.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 + "x-order": 5 }, "status": { "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -6453,37 +6344,33 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 10 + "x-order": 6 }, "listen_port": { - "description": "Listen port for scraping metrics.", + "description": "Listen port for scraping metrics (the same for several configurations).", "type": "integer", "format": "int64", - "x-order": 11 + "x-order": 7 }, - "stats_collections": { - "type": "array", - "title": "List of colletions to get stats from. Can use *", - "items": { - "type": "string" - }, - "x-order": 12 + "basic_metrics_disabled": { + "description": "Basic metrics are disabled.", + "type": "boolean", + "x-order": 8 }, - "collections_limit": { - "type": "integer", - "format": "int32", - "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", - "x-order": 13 + "enhanced_metrics_disabled": { + "description": "Enhanced metrics are disabled.", + "type": "boolean", + "x-order": 9 }, - "enable_all_collectors": { - "description": "Enable All collectors.", + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 14 + "x-order": 10 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 15 + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -6498,88 +6385,200 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 16 + "x-order": 12 }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 17 + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 13 } }, "x-order": 1 }, - "qan_mongodb_profiler": { - "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "mysql": { + "description": "MySQLService represents a generic MySQL instance.", "type": "object", "properties": { - "agent_id": { + "service_id": { "description": "Unique randomly generated instance identifier.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "service_name": { + "description": "Unique across all Services user-defined name.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 3 }, - "username": { - "description": "MongoDB username for getting profiler data.", - "type": "string", + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", "x-order": 5 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "environment": { + "description": "Environment name.", + "type": "string", "x-order": 6 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", + "cluster": { + "description": "Cluster name.", + "type": "string", "x-order": 7 }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 8 + "x-order": 9 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "version": { + "description": "MySQL version.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", + "x-order": 10 + } + }, + "x-order": 2 + }, + "mysqld_exporter": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", + "x-order": 10 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 12 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 + }, + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", "AGENT_STATUS_WAITING", "AGENT_STATUS_STOPPING", "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 9 + "x-order": 15 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 16 + }, + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 10 + "x-order": 18 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -6594,326 +6593,134 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 11 - } - }, - "x-order": 2 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } + "x-order": 19 }, - "additionalProperties": false + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 20 + } }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/MySQL/Add": { - "post": { - "description": "Adds MySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on the provided \"node_id\", then adds \"mysqld_exporter\", and \"qan_mysql_perfschema\" agents with the provided \"pmm_agent_id\" and other parameters.", - "tags": [ - "ManagementService" - ], - "summary": "Add MySQL", - "operationId": "AddMySQL", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 + "x-order": 3 }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "qan_mysql_perfschema": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "agent_id": { + "description": "Unique randomly generated instance identifier.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], "x-order": 0 }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", "type": "string", "x-order": 1 }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", "x-order": 2 }, - "distro": { - "description": "Linux distribution name and version.", + "service_id": { + "description": "Service identifier.", "type": "string", "x-order": 3 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "username": { + "description": "MySQL username for getting performance data.", "type": "string", "x-order": 4 }, - "container_name": { - "description": "Container name.", - "type": "string", + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", "x-order": 5 }, - "node_model": { - "description": "Node model.", - "type": "string", + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", "x-order": 6 }, - "region": { - "description": "Node region.", + "tls_ca": { + "description": "Certificate Authority certificate chain.", "type": "string", "x-order": 7 }, - "az": { - "description": "Node availability zone.", + "tls_cert": { + "description": "Client certificate.", "type": "string", "x-order": 8 }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", "x-order": 9 - } - }, - "x-order": 2 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Service Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", - "type": "string", - "x-order": 7 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 8 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 9 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 10 - }, - "username": { - "description": "MySQL username for scraping metrics.", - "type": "string", - "x-order": 11 - }, - "password": { - "description": "MySQL password for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "qan_mysql_perfschema": { - "description": "If true, adds qan-mysql-perfschema-agent for provided service.", - "type": "boolean", - "x-order": 13 - }, - "qan_mysql_slowlog": { - "description": "If true, adds qan-mysql-slowlog-agent for provided service.", - "type": "boolean", - "x-order": 14 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 15 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 16 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 17 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 18 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 19 - }, - "max_slowlog_file_size": { - "description": "If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if \u003e 0.\nIf zero, server's default value is used.\nUse negative value to disable rotation.", - "type": "string", - "format": "int64", - "x-order": 20 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 21 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 22 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 23 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 24 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 25 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", - "type": "integer", - "format": "int32", - "x-order": 26 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 27 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 11 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 13 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 14 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 16 + } }, - "x-order": 28 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 29 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 30 + "x-order": 4 }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "service": { - "description": "MySQLService represents a generic MySQL instance.", + "postgresql": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", "type": "object", "properties": { "service_id": { @@ -6926,41 +6733,46 @@ "type": "string", "x-order": 1 }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 + }, "node_id": { "description": "Node identifier where this instance runs.", "type": "string", - "x-order": 2 + "x-order": 3 }, "address": { "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", - "x-order": 3 + "x-order": 4 }, "port": { "description": "Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", - "x-order": 4 + "x-order": 5 }, "socket": { "description": "Access unix socket.\nAddress (and port) or socket is required.", "type": "string", - "x-order": 5 + "x-order": 6 }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 6 + "x-order": 7 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 7 + "x-order": 8 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 8 + "x-order": 9 }, "custom_labels": { "description": "Custom user-assigned labels.", @@ -6968,18 +6780,24 @@ "additionalProperties": { "type": "string" }, - "x-order": 9 + "x-order": 10 }, "version": { - "description": "MySQL version.", + "description": "PostgreSQL version.", "type": "string", - "x-order": 10 + "x-order": 11 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 } }, - "x-order": 0 + "x-order": 5 }, - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "postgresql_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", "type": "object", "properties": { "agent_id": { @@ -7003,7 +6821,7 @@ "x-order": 3 }, "username": { - "description": "MySQL username for scraping metrics.", + "description": "PostgreSQL username for scraping metrics.", "type": "string", "x-order": 4 }, @@ -7013,43 +6831,22 @@ "x-order": 5 }, "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", "type": "boolean", "x-order": 6 }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 10 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 11 + "x-order": 7 }, "push_metrics_enabled": { "description": "True if exporter uses push metrics mode.", "type": "boolean", - "x-order": 12 + "x-order": 8 }, "disabled_collectors": { "description": "List of disabled collector names.", @@ -7057,13 +6854,7 @@ "items": { "type": "string" }, - "x-order": 13 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 14 + "x-order": 9 }, "status": { "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -7078,23 +6869,18 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 15 + "x-order": 10 }, "listen_port": { "description": "Listen port for scraping metrics.", "type": "integer", "format": "int64", - "x-order": 16 - }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 + "x-order": 11 }, "process_exec_path": { "description": "Path to exec process.", "type": "string", - "x-order": 18 + "x-order": 12 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -7109,18 +6895,30 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 19 + "x-order": 13 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 + "x-order": 15 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 } }, - "x-order": 1 + "x-order": 6 }, - "qan_mysql_perfschema": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "qan_postgresql_pgstatements": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", "type": "object", "properties": { "agent_id": { @@ -7144,180 +6942,38 @@ "x-order": 3 }, "username": { - "description": "MySQL username for getting performance data.", + "description": "PostgreSQL username for getting pg stat statements data.", "type": "string", "x-order": 4 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, "disable_comments_parsing": { "description": "Disable parsing comments from queries and showing them in QAN.", "type": "boolean", - "x-order": 10 + "x-order": 5 }, "max_query_length": { "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 14 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 15 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 16 - } - }, - "x-order": 2 - }, - "qan_mysql_slowlog": { - "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 + "x-order": 6 }, "tls": { "description": "Use TLS for database connections.", "type": "boolean", - "x-order": 5 + "x-order": 7 }, "tls_skip_verify": { "description": "Skip TLS certificate and hostname validation.", "type": "boolean", - "x-order": 6 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", "x-order": 8 }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "type": "integer", - "format": "int32", - "title": "Limit query length in QAN (default: server-defined; -1: no limit)", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "max_slowlog_file_size": { - "description": "Slowlog file is rotated at this size if \u003e 0.", - "type": "string", - "format": "int64", - "x-order": 13 - }, "custom_labels": { "description": "Custom user-assigned labels.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 14 + "x-order": 9 }, "status": { "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", @@ -7332,12 +6988,12 @@ "AGENT_STATUS_DONE", "AGENT_STATUS_UNKNOWN" ], - "x-order": 15 + "x-order": 10 }, "process_exec_path": { + "description": "Path to exec process.", "type": "string", - "title": "mod tidy", - "x-order": 16 + "x-order": 11 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -7352,16 +7008,10 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 17 + "x-order": 12 } }, - "x-order": 3 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 4 + "x-order": 7 } } } @@ -7400,34 +7050,123 @@ } } }, - "/v1/management/Node/Register": { + "/v1/management/annotations": { "post": { - "description": "Registers a new Node and pmm-agent.", + "description": "Adds an annotation.", "tags": [ "ManagementService" ], - "summary": "Register Node", - "operationId": "RegisterNode", + "summary": "Add Annotation", + "operationId": "AddAnnotation", "parameters": [ { + "description": "AddAnnotationRequest is a params to add new annotation.", "name": "body", "in": "body", "required": true, "schema": { + "description": "AddAnnotationRequest is a params to add new annotation.", "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "text": { + "description": "An annotation description. Required.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], + "x-order": 0 + }, + "tags": { + "description": "Tags are used to filter annotations.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 1 + }, + "node_name": { + "description": "Used for annotating a node.", + "type": "string", + "x-order": 2 + }, + "service_names": { + "description": "Used for annotating services.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 3 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/management/nodes": { + "post": { + "description": "Registers a new Node and a pmm-agent.", + "tags": [ + "ManagementService" + ], + "summary": "Register Node", + "operationId": "RegisterNode", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], "x-order": 0 }, "node_name": { @@ -7724,14 +7463,14 @@ } } }, - "/v1/management/PostgreSQL/Add": { + "/v1/management/services": { "post": { - "description": "Adds PostgreSQL Service and starts postgres exporter. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"postgres_exporter\" with provided \"pmm_agent_id\" and other parameters.", + "description": "Adds a service and starts several agents.", "tags": [ "ManagementService" ], - "summary": "Add PostgreSQL", - "operationId": "AddPostgreSQL", + "summary": "Add a Service", + "operationId": "AddService", "parameters": [ { "name": "body", @@ -7740,433 +7479,745 @@ "schema": { "type": "object", "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "mysql": { "type": "object", "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], "x-order": 0 }, "node_name": { - "description": "Unique across all Nodes user-defined name.", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, "x-order": 2 }, - "distro": { - "description": "Linux distribution name and version.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, - "container_name": { - "description": "Container name.", - "type": "string", + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", "x-order": 5 }, - "node_model": { - "description": "Node model.", + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 6 }, - "region": { - "description": "Node region.", + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", "type": "string", "x-order": 7 }, - "az": { - "description": "Node availability zone.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 8 }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 9 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 10 + }, + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 11 + }, + "password": { + "description": "MySQL password for scraping metrics.", + "type": "string", + "x-order": 12 + }, + "qan_mysql_perfschema": { + "description": "If true, adds qan-mysql-perfschema-agent for provided service.", + "type": "boolean", + "x-order": 13 + }, + "qan_mysql_slowlog": { + "description": "If true, adds qan-mysql-slowlog-agent for provided service.", + "type": "boolean", + "x-order": 14 + }, "custom_labels": { - "description": "Custom user-assigned labels for Node.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 9 - } - }, - "x-order": 2 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Service Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "database": { - "description": "Database name.", - "type": "string", - "x-order": 6 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 7 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", - "type": "string", - "x-order": 8 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 9 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 10 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 11 - }, - "username": { - "description": "PostgreSQL username for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "password": { - "description": "PostgreSQL password for scraping metrics.", - "type": "string", - "x-order": 13 - }, - "qan_postgresql_pgstatements_agent": { - "description": "If true, adds qan-postgresql-pgstatements-agent for provided service.", - "type": "boolean", - "x-order": 14 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service.", - "type": "boolean", - "x-order": 15 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 16 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 17 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 18 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 19 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 20 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 21 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", - "type": "boolean", - "x-order": 22 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 23 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" + "x-order": 15 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 16 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 17 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 18 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 19 + }, + "max_slowlog_file_size": { + "description": "If qan-mysql-slowlog-agent is added, slowlog file is rotated at this size if \u003e 0.\nIf zero, server's default value is used.\nUse negative value to disable rotation.", + "type": "string", + "format": "int64", + "x-order": 20 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 21 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 22 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 23 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 24 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 25 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", + "type": "integer", + "format": "int32", + "x-order": 26 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 27 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 28 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 29 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 30 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 31 + } }, - "x-order": 24 - }, - "tls_ca": { - "description": "TLS CA certificate.", - "type": "string", - "x-order": 25 - }, - "tls_cert": { - "description": "TLS Certifcate.", - "type": "string", - "x-order": 26 - }, - "tls_key": { - "description": "TLS Certificate Key.", - "type": "string", - "x-order": 27 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 28 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 29 - }, - "auto_discovery_limit": { - "description": "Limit for auto discovery.", - "type": "integer", - "format": "int32", - "x-order": 30 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 31 + "x-order": 0 }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 32 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "service": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "mongodb": { "type": "object", "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, - "service_name": { - "description": "Unique across all Services user-defined name.", + "node_name": { + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "database_name": { - "description": "Database name.", - "type": "string", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, "x-order": 2 }, - "node_id": { - "description": "Node identifier where this instance runs.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", "type": "string", "x-order": 4 }, "port": { - "description": "Access port.\nPort is required when the address present.", + "description": "Service Access port.\nPort is required when the address present.", "type": "integer", "format": "int64", "x-order": 5 }, "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", + "description": "Service Access socket.\nAddress (and port) or socket is required.", "type": "string", "x-order": 6 }, + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "type": "string", + "x-order": 7 + }, "environment": { "description": "Environment name.", "type": "string", - "x-order": 7 + "x-order": 8 }, "cluster": { "description": "Cluster name.", "type": "string", - "x-order": 8 + "x-order": 9 }, "replication_set": { "description": "Replication set name.", "type": "string", - "x-order": 9 + "x-order": 10 + }, + "username": { + "description": "MongoDB username for exporter and QAN agent access.", + "type": "string", + "x-order": 11 + }, + "password": { + "description": "MongoDB password for exporter and QAN agent access.", + "type": "string", + "x-order": 12 + }, + "qan_mongodb_profiler": { + "description": "If true, adds qan-mongodb-profiler-agent for provided service.", + "type": "boolean", + "x-order": 13 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 10 + "x-order": 14 }, - "version": { - "description": "PostgreSQL version.", + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 15 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 16 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 17 + }, + "tls_certificate_key": { + "description": "Client certificate and key.", "type": "string", - "x-order": 11 + "x-order": 18 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", + "tls_certificate_key_file_password": { + "description": "Password for decrypting tls_certificate_key.", + "type": "string", + "x-order": 19 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 20 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", "type": "integer", "format": "int32", - "x-order": 12 + "x-order": 21 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 22 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 23 + }, + "authentication_mechanism": { + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details.", + "type": "string", + "x-order": 24 + }, + "authentication_database": { + "description": "Authentication database.", + "type": "string", + "x-order": 25 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 26 + }, + "stats_collections": { + "description": "List of collections to get stats from. Can use * .", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 27 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 28 + }, + "enable_all_collectors": { + "type": "boolean", + "title": "Enable all collectors", + "x-order": 29 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 30 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 31 } }, - "x-order": 0 + "x-order": 1 }, - "postgres_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "postgresql": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "node_id": { + "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, "x-order": 2 }, - "service_id": { - "description": "Service identifier.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 3 }, + "address": { + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 4 + }, + "port": { + "description": "Service Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "database": { + "description": "Database name.", + "type": "string", + "x-order": 6 + }, + "socket": { + "description": "Service Access socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 7 + }, + "pmm_agent_id": { + "description": "The \"pmm-agent\" identifier which should run agents. Required.", + "type": "string", + "x-order": 8 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 9 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 10 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 11 + }, "username": { "description": "PostgreSQL username for scraping metrics.", "type": "string", - "x-order": 4 + "x-order": 12 }, - "tls": { - "description": "Use TLS for database connections.", + "password": { + "description": "PostgreSQL password for scraping metrics.", + "type": "string", + "x-order": 13 + }, + "qan_postgresql_pgstatements_agent": { + "description": "If true, adds qan-postgresql-pgstatements-agent for provided service.", "type": "boolean", - "x-order": 5 + "x-order": 14 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "qan_postgresql_pgstatmonitor_agent": { + "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service.", "type": "boolean", - "x-order": 6 + "x-order": 15 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 16 + }, + "disable_query_examples": { + "description": "Disable query examples.", + "type": "boolean", + "x-order": 17 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 7 + "x-order": 18 }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", + "skip_connection_check": { + "description": "Skip connection check.", "type": "boolean", - "x-order": 8 + "x-order": 19 }, - "disabled_collectors": { - "description": "List of disabled collector names.", + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 20 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 21 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 22 + }, + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", + "type": "string", + "default": "METRICS_MODE_UNSPECIFIED", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "x-order": 23 + }, + "disable_collectors": { + "description": "List of collector names to disable in this exporter.", "type": "array", "items": { "type": "string" }, - "x-order": 9 + "x-order": 24 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "tls_ca": { + "description": "TLS CA certificate.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 + "x-order": 25 }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 + "tls_cert": { + "description": "TLS Certifcate.", + "type": "string", + "x-order": 26 }, - "process_exec_path": { - "description": "Path to exec process.", + "tls_key": { + "description": "TLS Certificate Key.", "type": "string", - "x-order": 12 + "x-order": 27 + }, + "agent_password": { + "description": "Custom password for exporter endpoint /metrics.", + "type": "string", + "x-order": 28 }, "log_level": { "description": "- LOG_LEVEL_UNSPECIFIED: Auto", @@ -8181,1678 +8232,1560 @@ "LOG_LEVEL_INFO", "LOG_LEVEL_DEBUG" ], - "x-order": 13 + "x-order": 29 }, "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", + "description": "Limit for auto discovery.", "type": "integer", "format": "int32", - "x-order": 14 + "x-order": 30 }, "expose_exporter": { "type": "boolean", "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 + "x-order": 31 }, "max_exporter_connections": { "description": "Maximum number of connections that exporter can open to the database instance.", "type": "integer", "format": "int32", - "x-order": 16 + "x-order": 32 } }, - "x-order": 1 + "x-order": 2 }, - "qan_postgresql_pgstatements_agent": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "external": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", + "runs_on_node_id": { + "description": "Node identifier on which an external exporter is been running.\nruns_on_node_id should always be passed with node_id.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", + "node_name": { + "description": "Node name on which a service and node is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", "type": "string", "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", + "add_node": { + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", + "type": "object", + "properties": { + "node_type": { + "description": "NodeType describes supported Node types.", + "type": "string", + "default": "NODE_TYPE_UNSPECIFIED", + "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" + ], + "x-order": 0 + }, + "node_name": { + "description": "Unique across all Nodes user-defined name.", + "type": "string", + "x-order": 1 + }, + "machine_id": { + "description": "Linux machine-id.", + "type": "string", + "x-order": 2 + }, + "distro": { + "description": "Linux distribution name and version.", + "type": "string", + "x-order": 3 + }, + "container_id": { + "description": "Container identifier. If specified, must be a unique Docker container identifier.", + "type": "string", + "x-order": 4 + }, + "container_name": { + "description": "Container name.", + "type": "string", + "x-order": 5 + }, + "node_model": { + "description": "Node model.", + "type": "string", + "x-order": 6 + }, + "region": { + "description": "Node region.", + "type": "string", + "x-order": 7 + }, + "az": { + "description": "Node availability zone.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels for Node.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + } + }, + "x-order": 2 + }, + "address": { + "description": "Node and Exporter access address (DNS name or IP).\naddress should always be passed with add_node.", "type": "string", "x-order": 3 }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "service_name": { + "description": "Unique across all Services user-defined name. Required.", "type": "string", "x-order": 4 }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", "x-order": 5 }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", + "password": { + "description": "HTTP basic auth password for collecting metrics.", + "type": "string", "x-order": 6 }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", "x-order": 7 }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", "x-order": 8 }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", "x-order": 9 }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "node_id": { + "description": "Node identifier on which an external service is been running.\nnode_id should always be passed with runs_on_node_id.", "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], "x-order": 10 }, - "process_exec_path": { - "description": "Path to exec process.", + "environment": { + "description": "Environment name.", "type": "string", "x-order": 11 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "cluster": { + "description": "Cluster name.", "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], "x-order": 12 - } - }, - "x-order": 2 - }, - "qan_postgresql_pgstatmonitor_agent": { - "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 }, - "username": { - "description": "PostgreSQL username for getting pg stat monitor data.", + "replication_set": { + "description": "Replication set name.", "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 7 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 8 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 9 + "x-order": 13 }, "custom_labels": { - "description": "Custom user-assigned labels.", + "description": "Custom user-assigned labels for Service.", "type": "object", "additionalProperties": { "type": "string" }, - "x-order": 10 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 11 + "x-order": 14 }, - "process_exec_path": { - "description": "Path to exec process.", + "group": { + "description": "Group name of external service.", "type": "string", - "x-order": 12 + "x-order": 15 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "metrics_mode": { + "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", + "default": "METRICS_MODE_UNSPECIFIED", "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" ], - "x-order": 13 + "x-order": 16 + }, + "skip_connection_check": { + "description": "Skip connection check.", + "type": "boolean", + "x-order": 17 } }, "x-order": 3 - }, - "warning": { - "description": "Warning message.", - "type": "string", - "x-order": 4 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 } } } } - } - } - }, - "/v1/management/ProxySQL/Add": { - "post": { - "description": "Adds ProxySQL Service and starts several Agents. It automatically adds a service to inventory, which is running on provided \"node_id\", then adds \"proxysql_exporter\" with provided \"pmm_agent_id\" and other parameters.", - "tags": [ - "ManagementService" ], - "summary": "Add ProxySQL", - "operationId": "AddProxySQL", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, + "responses": { + "200": { + "description": "A successful response.", "schema": { "type": "object", "properties": { - "node_id": { - "description": "Node identifier on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node.", - "type": "string", - "x-order": 1 - }, - "add_node": { - "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service.", - "type": "object", - "properties": { - "node_type": { - "description": "NodeType describes supported Node types.", - "type": "string", - "default": "NODE_TYPE_UNSPECIFIED", - "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" - ], - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "machine_id": { - "description": "Linux machine-id.", - "type": "string", - "x-order": 2 - }, - "distro": { - "description": "Linux distribution name and version.", - "type": "string", - "x-order": 3 - }, - "container_id": { - "description": "Container identifier. If specified, must be a unique Docker container identifier.", - "type": "string", - "x-order": 4 - }, - "container_name": { - "description": "Container name.", - "type": "string", - "x-order": 5 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 6 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 7 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - } - }, - "x-order": 2 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Required.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Service Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "socket": { - "description": "Service Access socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "pmm_agent_id": { - "description": "The \"pmm-agent\" identifier which should run agents. Required.", - "type": "string", - "x-order": 7 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 8 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 9 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 10 - }, - "username": { - "description": "ProxySQL username for scraping metrics.", - "type": "string", - "x-order": 11 - }, - "password": { - "description": "ProxySQL password for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 14 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 15 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 16 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 17 - }, - "disable_collectors": { - "description": "List of collector names to disable in this exporter.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 18 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 19 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 20 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 21 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "service": { - "description": "ProxySQLService represents a generic ProxySQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "version": { - "description": "ProxySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 0 - }, - "proxysql_exporter": { - "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "ProxySQL username for scraping metrics.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 9 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 13 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 14 - } - }, - "x-order": 1 - } - } - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, - "/v1/management/RDS/Add": { - "post": { - "description": "Adds RDS instance.", - "tags": [ - "ManagementService" - ], - "summary": "Add RDS", - "operationId": "AddRDS", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "region": { - "description": "AWS region.", - "type": "string", - "x-order": 0 - }, - "az": { - "description": "AWS availability zone.", - "type": "string", - "x-order": 1 - }, - "instance_id": { - "description": "AWS instance ID.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "AWS instance class.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Address used to connect to it.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "engine": { - "description": "DiscoverRDSEngine describes supported RDS instance engines.", - "type": "string", - "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "enum": [ - "DISCOVER_RDS_ENGINE_UNSPECIFIED", - "DISCOVER_RDS_ENGINE_MYSQL", - "DISCOVER_RDS_ENGINE_POSTGRESQL" - ], - "x-order": 6 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID.", - "type": "string", - "x-order": 7 - }, - "service_name": { - "description": "Unique across all Services user-defined name. Defaults to AWS instance ID.", - "type": "string", - "x-order": 8 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 9 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 10 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 11 - }, - "username": { - "description": "Username for scraping metrics.", - "type": "string", - "x-order": 12 - }, - "password": { - "description": "Password for scraping metrics.", - "type": "string", - "x-order": 13 - }, - "aws_access_key": { - "description": "AWS Access key.", - "type": "string", - "x-order": 14 - }, - "aws_secret_key": { - "description": "AWS Secret key.", - "type": "string", - "x-order": 15 - }, - "rds_exporter": { - "description": "If true, adds rds_exporter.", - "type": "boolean", - "x-order": 16 - }, - "qan_mysql_perfschema": { - "description": "If true, adds qan-mysql-perfschema-agent.", - "type": "boolean", - "x-order": 17 - }, - "custom_labels": { - "description": "Custom user-assigned labels for Node and Service.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 18 - }, - "skip_connection_check": { - "description": "Skip connection check.", - "type": "boolean", - "x-order": 19 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 20 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 21 - }, - "disable_query_examples": { - "description": "Disable query examples.", - "type": "boolean", - "x-order": 22 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors will be disabled if there are more than that number of tables.\nIf zero, server's default value is used.\nUse negative value to disable them.", - "type": "integer", - "format": "int32", - "x-order": 23 - }, - "disable_basic_metrics": { - "description": "Disable basic metrics.", - "type": "boolean", - "x-order": 24 - }, - "disable_enhanced_metrics": { - "description": "Disable enhanced metrics.", - "type": "boolean", - "x-order": 25 - }, - "metrics_mode": { - "description": "MetricsMode defines desired metrics mode for agent,\nit can be pull, push or auto mode chosen by server.\n\n - METRICS_MODE_UNSPECIFIED: Auto", - "type": "string", - "default": "METRICS_MODE_UNSPECIFIED", - "enum": [ - "METRICS_MODE_UNSPECIFIED", - "METRICS_MODE_PULL", - "METRICS_MODE_PUSH" - ], - "x-order": 26 - }, - "qan_postgresql_pgstatements": { - "type": "boolean", - "title": "If true, add qan-pgstatements", - "x-order": 27 - }, - "agent_password": { - "description": "Custom password for exporter endpoint /metrics.", - "type": "string", - "x-order": 28 - }, - "database": { - "description": "Database name.", - "type": "string", - "x-order": 29 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 30 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 31 - }, - "max_postgresql_exporter_connections": { - "description": "Maximum number of exporter connections to PostgreSQL instance.", - "type": "integer", - "format": "int32", - "x-order": 32 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object", - "properties": { - "node": { - "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes.", - "type": "object", - "properties": { - "node_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "node_name": { - "description": "Unique across all Nodes user-defined name.", - "type": "string", - "x-order": 1 - }, - "address": { - "description": "DB instance identifier.", - "type": "string", - "x-order": 2 - }, - "node_model": { - "description": "Node model.", - "type": "string", - "x-order": 3 - }, - "region": { - "description": "Node region.", - "type": "string", - "x-order": 4 - }, - "az": { - "description": "Node availability zone.", - "type": "string", - "x-order": 5 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 6 - } - }, - "x-order": 0 - }, - "rds_exporter": { - "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier.", - "type": "string", - "x-order": 3 - }, - "aws_access_key": { - "description": "AWS Access Key.", - "type": "string", - "x-order": 4 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 5 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 6 - }, - "listen_port": { - "description": "Listen port for scraping metrics (the same for several configurations).", - "type": "integer", - "format": "int64", - "x-order": 7 - }, - "basic_metrics_disabled": { - "description": "Basic metrics are disabled.", - "type": "boolean", - "x-order": 8 - }, - "enhanced_metrics_disabled": { - "description": "Enhanced metrics are disabled.", - "type": "boolean", - "x-order": 9 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 10 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 13 - } - }, - "x-order": 1 - }, - "mysql": { - "description": "MySQLService represents a generic MySQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 2 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 3 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 4 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 5 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 6 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 7 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 9 - }, - "version": { - "description": "MySQL version.", - "type": "string", - "x-order": 10 - } - }, - "x-order": 2 - }, - "mysqld_exporter": { - "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MySQL username for scraping metrics.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "tablestats_group_table_limit": { - "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", - "type": "integer", - "format": "int32", - "x-order": 10 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 11 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 12 - }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" - }, - "x-order": 13 - }, - "table_count": { - "description": "Actual table count at the moment of adding.", - "type": "integer", - "format": "int32", - "x-order": 14 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 15 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 16 - }, - "tablestats_group_disabled": { - "description": "True if tablestats group collectors are currently disabled.", - "type": "boolean", - "x-order": 17 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 18 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 19 - }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 20 - } - }, - "x-order": 3 - }, - "qan_mysql_perfschema": { - "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", - "type": "object", - "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", - "x-order": 1 - }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "MySQL username for getting performance data.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 6 - }, - "tls_ca": { - "description": "Certificate Authority certificate chain.", - "type": "string", - "x-order": 7 - }, - "tls_cert": { - "description": "Client certificate.", - "type": "string", - "x-order": 8 - }, - "tls_key": { - "description": "Password for decrypting tls_cert.", - "type": "string", - "x-order": 9 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 10 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 11 - }, - "query_examples_disabled": { - "description": "True if query examples are disabled.", - "type": "boolean", - "x-order": 12 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 13 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 14 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 15 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 16 - } - }, - "x-order": 4 - }, - "postgresql": { - "description": "PostgreSQLService represents a generic PostgreSQL instance.", - "type": "object", - "properties": { - "service_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", - "x-order": 0 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 1 - }, - "database_name": { - "description": "Database name.", - "type": "string", - "x-order": 2 - }, - "node_id": { - "description": "Node identifier where this instance runs.", - "type": "string", - "x-order": 3 - }, - "address": { - "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 4 - }, - "port": { - "description": "Access port.\nPort is required when the address present.", - "type": "integer", - "format": "int64", - "x-order": 5 - }, - "socket": { - "description": "Access unix socket.\nAddress (and port) or socket is required.", - "type": "string", - "x-order": 6 - }, - "environment": { - "description": "Environment name.", - "type": "string", - "x-order": 7 - }, - "cluster": { - "description": "Cluster name.", - "type": "string", - "x-order": 8 - }, - "replication_set": { - "description": "Replication set name.", - "type": "string", - "x-order": 9 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "x-order": 10 - }, - "version": { - "description": "PostgreSQL version.", - "type": "string", - "x-order": 11 - }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", - "type": "integer", - "format": "int32", - "x-order": 12 - } - }, - "x-order": 5 - }, - "postgresql_exporter": { - "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "mysql": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "service": { + "description": "MySQLService represents a generic MySQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "version": { + "description": "MySQL version.", + "type": "string", + "x-order": 10 + } + }, "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", + "mysqld_exporter": { + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MySQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "tablestats_group_table_limit": { + "description": "Tablestats group collectors are disabled if there are more than that number of tables.\n0 means tablestats group collectors are always enabled (no limit).\nNegative value means tablestats group collectors are always disabled.", + "type": "integer", + "format": "int32", + "x-order": 10 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 11 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 12 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 13 + }, + "table_count": { + "description": "Actual table count at the moment of adding.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 15 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 16 + }, + "tablestats_group_disabled": { + "description": "True if tablestats group collectors are currently disabled.", + "type": "boolean", + "x-order": 17 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 18 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 19 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 20 + } + }, "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", - "x-order": 2 - }, - "service_id": { - "description": "Service identifier.", - "type": "string", - "x-order": 3 - }, - "username": { - "description": "PostgreSQL username for scraping metrics.", - "type": "string", - "x-order": 4 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 5 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", - "type": "boolean", - "x-order": 6 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", + "qan_mysql_perfschema": { + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MySQL username for getting performance data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 11 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 13 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 14 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 16 + } }, - "x-order": 7 - }, - "push_metrics_enabled": { - "description": "True if exporter uses push metrics mode.", - "type": "boolean", - "x-order": 8 + "x-order": 2 }, - "disabled_collectors": { - "description": "List of disabled collector names.", - "type": "array", - "items": { - "type": "string" + "qan_mysql_slowlog": { + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MySQL username for getting performance data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "tls_ca": { + "description": "Certificate Authority certificate chain.", + "type": "string", + "x-order": 7 + }, + "tls_cert": { + "description": "Client certificate.", + "type": "string", + "x-order": 8 + }, + "tls_key": { + "description": "Password for decrypting tls_cert.", + "type": "string", + "x-order": 9 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 10 + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)", + "x-order": 11 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 12 + }, + "max_slowlog_file_size": { + "description": "Slowlog file is rotated at this size if \u003e 0.", + "type": "string", + "format": "int64", + "x-order": 13 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 14 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 15 + }, + "process_exec_path": { + "type": "string", + "title": "mod tidy", + "x-order": 16 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 17 + } }, - "x-order": 9 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "listen_port": { - "description": "Listen port for scraping metrics.", - "type": "integer", - "format": "int64", - "x-order": 11 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 12 - }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 13 + "x-order": 3 }, - "auto_discovery_limit": { - "description": "Limit of databases for auto-discovery.", + "table_count": { + "description": "Actual table count at the moment of adding.", "type": "integer", "format": "int32", - "x-order": 14 + "x-order": 4 + } + }, + "x-order": 0 + }, + "mongodb": { + "type": "object", + "properties": { + "service": { + "description": "MongoDBService represents a generic MongoDB instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 2 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 3 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 4 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 5 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 6 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 7 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "version": { + "description": "MongoDB version.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 0 }, - "expose_exporter": { - "type": "boolean", - "title": "Optionally expose the exporter process on all public interfaces", - "x-order": 15 + "mongodb_exporter": { + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "stats_collections": { + "type": "array", + "title": "List of colletions to get stats from. Can use *", + "items": { + "type": "string" + }, + "x-order": 12 + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "title": "Collections limit. Only get Databases and collection stats if the total number of collections in the server\nis less than this value. 0: no limit", + "x-order": 13 + }, + "enable_all_collectors": { + "description": "Enable All collectors.", + "type": "boolean", + "x-order": 14 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 15 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 16 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 17 + } + }, + "x-order": 1 }, - "max_exporter_connections": { - "description": "Maximum number of connections that exporter can open to the database instance.", - "type": "integer", - "format": "int32", - "x-order": 16 + "qan_mongodb_profiler": { + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "MongoDB username for getting profiler data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 8 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 11 + } + }, + "x-order": 2 } }, - "x-order": 6 + "x-order": 1 }, - "qan_postgresql_pgstatements": { - "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "postgresql": { "type": "object", "properties": { - "agent_id": { - "description": "Unique randomly generated instance identifier.", - "type": "string", + "service": { + "description": "PostgreSQLService represents a generic PostgreSQL instance.", + "type": "object", + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "database_name": { + "description": "Database name.", + "type": "string", + "x-order": 2 + }, + "node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 3 + }, + "address": { + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 4 + }, + "port": { + "description": "Access port.\nPort is required when the address present.", + "type": "integer", + "format": "int64", + "x-order": 5 + }, + "socket": { + "description": "Access unix socket.\nAddress (and port) or socket is required.", + "type": "string", + "x-order": 6 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 7 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 8 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "version": { + "description": "PostgreSQL version.", + "type": "string", + "x-order": 11 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 12 + } + }, "x-order": 0 }, - "pmm_agent_id": { - "description": "The pmm-agent identifier which runs this instance.", - "type": "string", + "postgres_exporter": { + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for scraping metrics.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full.", + "type": "boolean", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 8 + }, + "disabled_collectors": { + "description": "List of disabled collector names.", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + }, + "auto_discovery_limit": { + "description": "Limit of databases for auto-discovery.", + "type": "integer", + "format": "int32", + "x-order": 14 + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces", + "x-order": 15 + }, + "max_exporter_connections": { + "description": "Maximum number of connections that exporter can open to the database instance.", + "type": "integer", + "format": "int32", + "x-order": 16 + } + }, "x-order": 1 }, - "disabled": { - "description": "Desired Agent status: enabled (false) or disabled (true).", - "type": "boolean", + "qan_postgresql_pgstatements_agent": { + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for getting pg stat statements data.", + "type": "string", + "x-order": 4 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 5 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 6 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 7 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 8 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 9 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 10 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 11 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 12 + } + }, "x-order": 2 }, - "service_id": { - "description": "Service identifier.", - "type": "string", + "qan_postgresql_pgstatmonitor_agent": { + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "description": "The pmm-agent identifier which runs this instance.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "Desired Agent status: enabled (false) or disabled (true).", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "PostgreSQL username for getting pg stat monitor data.", + "type": "string", + "x-order": 4 + }, + "tls": { + "description": "Use TLS for database connections.", + "type": "boolean", + "x-order": 5 + }, + "tls_skip_verify": { + "description": "Skip TLS certificate and hostname validation.", + "type": "boolean", + "x-order": 6 + }, + "disable_comments_parsing": { + "description": "Disable parsing comments from queries and showing them in QAN.", + "type": "boolean", + "x-order": 7 + }, + "max_query_length": { + "description": "Limit query length in QAN (default: server-defined; -1: no limit).", + "type": "integer", + "format": "int32", + "x-order": 8 + }, + "query_examples_disabled": { + "description": "True if query examples are disabled.", + "type": "boolean", + "x-order": 9 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 10 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", + "type": "string", + "default": "AGENT_STATUS_UNSPECIFIED", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 11 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 12 + }, + "log_level": { + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "type": "string", + "title": "Log level for exporters", + "default": "LOG_LEVEL_UNSPECIFIED", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "x-order": 13 + } + }, "x-order": 3 }, - "username": { - "description": "PostgreSQL username for getting pg stat statements data.", + "warning": { + "description": "Warning message.", "type": "string", "x-order": 4 - }, - "disable_comments_parsing": { - "description": "Disable parsing comments from queries and showing them in QAN.", - "type": "boolean", - "x-order": 5 - }, - "max_query_length": { - "description": "Limit query length in QAN (default: server-defined; -1: no limit).", - "type": "integer", - "format": "int32", - "x-order": 6 - }, - "tls": { - "description": "Use TLS for database connections.", - "type": "boolean", - "x-order": 7 - }, - "tls_skip_verify": { - "description": "Skip TLS certificate and hostname validation.", - "type": "boolean", - "x-order": 8 - }, - "custom_labels": { - "description": "Custom user-assigned labels.", + } + }, + "x-order": 2 + }, + "external": { + "type": "object", + "properties": { + "service": { + "description": "ExternalService represents a generic External service instance.", "type": "object", - "additionalProperties": { - "type": "string" + "properties": { + "service_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "service_name": { + "description": "Unique across all Services user-defined name.", + "type": "string", + "x-order": 1 + }, + "node_id": { + "description": "Node identifier where this service instance runs.", + "type": "string", + "x-order": 2 + }, + "environment": { + "description": "Environment name.", + "type": "string", + "x-order": 3 + }, + "cluster": { + "description": "Cluster name.", + "type": "string", + "x-order": 4 + }, + "replication_set": { + "description": "Replication set name.", + "type": "string", + "x-order": 5 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 6 + }, + "group": { + "description": "Group name of external service.", + "type": "string", + "x-order": 7 + } }, - "x-order": 9 - }, - "status": { - "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_RUNNING: Agent is running.\n - AGENT_STATUS_WAITING: Agent encountered error and will be restarted automatically soon.\n - AGENT_STATUS_STOPPING: Agent is stopping.\n - AGENT_STATUS_DONE: Agent finished.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state.", - "type": "string", - "default": "AGENT_STATUS_UNSPECIFIED", - "enum": [ - "AGENT_STATUS_UNSPECIFIED", - "AGENT_STATUS_STARTING", - "AGENT_STATUS_RUNNING", - "AGENT_STATUS_WAITING", - "AGENT_STATUS_STOPPING", - "AGENT_STATUS_DONE", - "AGENT_STATUS_UNKNOWN" - ], - "x-order": 10 - }, - "process_exec_path": { - "description": "Path to exec process.", - "type": "string", - "x-order": 11 + "x-order": 0 }, - "log_level": { - "description": "- LOG_LEVEL_UNSPECIFIED: Auto", - "type": "string", - "title": "Log level for exporters", - "default": "LOG_LEVEL_UNSPECIFIED", - "enum": [ - "LOG_LEVEL_UNSPECIFIED", - "LOG_LEVEL_FATAL", - "LOG_LEVEL_ERROR", - "LOG_LEVEL_WARN", - "LOG_LEVEL_INFO", - "LOG_LEVEL_DEBUG" - ], - "x-order": 12 + "external_exporter": { + "description": "ExternalExporter runs on any Node type, including Remote Node.", + "type": "object", + "properties": { + "agent_id": { + "description": "Unique randomly generated instance identifier.", + "type": "string", + "x-order": 0 + }, + "runs_on_node_id": { + "description": "Node identifier where this instance runs.", + "type": "string", + "x-order": 1 + }, + "disabled": { + "description": "If disabled, metrics from this exporter will not be collected.", + "type": "boolean", + "x-order": 2 + }, + "service_id": { + "description": "Service identifier.", + "type": "string", + "x-order": 3 + }, + "username": { + "description": "HTTP basic auth username for collecting metrics.", + "type": "string", + "x-order": 4 + }, + "scheme": { + "description": "Scheme to generate URI to exporter metrics endpoints.", + "type": "string", + "x-order": 5 + }, + "metrics_path": { + "description": "Path under which metrics are exposed, used to generate URI.", + "type": "string", + "x-order": 6 + }, + "custom_labels": { + "description": "Custom user-assigned labels.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 7 + }, + "listen_port": { + "description": "Listen port for scraping metrics.", + "type": "integer", + "format": "int64", + "x-order": 8 + }, + "push_metrics_enabled": { + "description": "True if exporter uses push metrics mode.", + "type": "boolean", + "x-order": 9 + }, + "process_exec_path": { + "description": "Path to exec process.", + "type": "string", + "x-order": 10 + } + }, + "x-order": 1 } }, - "x-order": 7 + "x-order": 3 + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": false + }, + "x-order": 2 } } } + } + } + } + }, + "/v1/management/services/{service_id}": { + "delete": { + "description": "Removes a Service along with its Agents.", + "tags": [ + "ManagementService" + ], + "summary": "Remove Service", + "operationId": "RemoveService", + "parameters": [ + { + "type": "string", + "description": "Either a Service ID or a Service Name.", + "name": "service_id", + "in": "path", + "required": true + }, + { + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "type": "string", + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "Service type.", + "name": "service_type", + "in": "query" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } }, "default": { "description": "An unexpected error response.", @@ -9888,7 +9821,7 @@ } } }, - "/v1/management/RDS/Discover": { + "/v1/management/services:discoverRDS": { "post": { "description": "Discovers RDS instances.", "tags": [ @@ -10018,92 +9951,6 @@ } } }, - "/v1/management/Service/Remove": { - "post": { - "description": "Removes a Service along with Agents.", - "tags": [ - "ManagementService" - ], - "summary": "Remove Service", - "operationId": "RemoveService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "service_type": { - "description": "ServiceType describes supported Service types.", - "type": "string", - "default": "SERVICE_TYPE_UNSPECIFIED", - "enum": [ - "SERVICE_TYPE_UNSPECIFIED", - "SERVICE_TYPE_MYSQL_SERVICE", - "SERVICE_TYPE_MONGODB_SERVICE", - "SERVICE_TYPE_POSTGRESQL_SERVICE", - "SERVICE_TYPE_PROXYSQL_SERVICE", - "SERVICE_TYPE_HAPROXY_SERVICE", - "SERVICE_TYPE_EXTERNAL_SERVICE" - ], - "x-order": 0 - }, - "service_id": { - "description": "Service ID or Service Name is required.\nUnique randomly generated instance identifier.", - "type": "string", - "x-order": 1 - }, - "service_name": { - "description": "Unique across all Services user-defined name.", - "type": "string", - "x-order": 2 - } - } - } - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "type": "object" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32", - "x-order": 0 - }, - "message": { - "type": "string", - "x-order": 1 - }, - "details": { - "type": "array", - "items": { - "type": "object", - "properties": { - "@type": { - "type": "string", - "x-order": 0 - } - }, - "additionalProperties": false - }, - "x-order": 2 - } - } - } - } - } - } - }, "/v1/qan/Filters/Get": { "post": { "description": "Provides a filtered map of metrics names.", diff --git a/descriptor.bin b/descriptor.bin index 99bc30990c1f805043e40cb156ac3307c791314b..f378de0d65172aa94793e34c9606a3011e1b1225 100644 GIT binary patch delta 29700 zcmeHwX>?rGm2Tak>fXAVOH!#+l1imnDoLfmmTb*~ZAligEX%VkY|B^%gDnrT-I&2; zXb7Phl8}Z&7()}1mnMWEfPjz$Iw1ojA!+D9LMD=Q)5+?7Njk5)^E%V}_L)jD^y>HP zt@YOGU(&w!>~r=#cb`4)TQ~k~!_D7nICq_Koq3&go&BVL>VUoYy5X_6fA5qo9y{RQ zAMa`DcvdtnqsP zM00hwk*F+hIo;NBX#Vuv{K=yy&a^Ddoj85yqPd0ci|0;mIdg1oA@r!>d82bD+0^^| zMT<{e?_X_Y-2HyTb3%Tf?*|rpV4oFU%)Zh8R9`C7Gwq^KfLXqeT85Y5S$2^TvYF+U zdD)(A7rDMr;7-fD-?F?c&rdLJ-)XryUMAf(eIffJmR%xln!W%Ba}|iOAF=Yn3bY6; zj!IPAyenndM4wL|v3X^L&20#p>+K)p9ju?^IF z(-iwd_I-L;(+^aD`3bp>AGr6Wm-PepJ`2lk^vnR>z=M|W2kf0M`zJ#WT5gedfoBJN z*!sXjmiaIn{fd7)^$?ze=A!G^oQJIZS_NXRhpe`B3dA#f+_DF}JTFLt?Z;kzzEWPw z5%_i}@CnQQYb$^;4j*%yt1pSQjZokb%Y53hqCN46LklNa!B_o5sYk2;-#FkHAmS0L ztXr;XfQUz|br*SJ2?I-f+Oi+V68W4ALy(~^rbj(t*-vRg44Vj%mwNdon4!Qkmic)Q z(iCT}f7Rcadd3QH{sR#vh zCcxwb$V;7^04o%D!7{%F0&3$!2M%mzw|vdtlzJgegasmANE2a!h!={yB@Sl0;LBuOoLA`u* z;>}mA6=Mp-PJG?6H_Dx`z{hz_AlYPaa+2 zy>Xl670g}?`FO)8Uhyw};+4Qx-Y~w-jy~wLv%kH-i7)=>LFd|x;4fQ*Nc=EsdnQoG zQja7SOpO0>M8Az z6=u&o?o>^MmtaApTHz&63BI+$cuLYeJ~~*%X1&@sqN~`8c&(fcllHB|u8&r*Tb^)= z+1e+Z!qyVK6}XMzCBZ655MWGQQd{TsOLW{WV>dqG47Qdn!J-W;3$|%2+Q71v9rE>) zz_H5N|9-+rw3h3~z*S(CXQbDnEi1=bV#`bdE7<1GV9P3&V9}OUWK`<4Xv->UYQ08D zA-1fFed;q#^I(;osYls(T~%56X&AFq71X3*%u-d~pl8AG8dm(I)7)BP2lXiEBdf+M zNyEUZiIq$CGNEv-I(GU=r*ooi$?gPzRTqqDtN^g;Dk|mc0v9FBHubvb=@M8$92|>Y zR}=f~lTM<&NzaI@7}cZ?4q(jKgoCq+?}0@do3yJ~ENC~f)KgC8%A|e>+@!mnA_p*# zlOSh{M8?Z%wdw zpLR-_d(Oy>=F36EFss8wcr+pcKsOuwj2&hdEIMAITT?OoSlFB6Z>BiPIb0jcN zFH0>tEs0)D37xiHO$nW~UQn`f4NPRJT&#-LrbQjB$gIcyfnu?{eY!&M3b z<}eP?7{_!&)>`&BMULV}hHhO7~`=~<_}d&KnQ zh#;PHBtyNvAh1V5HR>L)N9q$2+Y4D^W|R$v-KJI#SYvwQJz$Lm3nZ2Ytg)hE2w7S) zBV>)65!RM#m#!8xWdL_v<7NPNJQ$L=8NeMcEb1e4p zz{lr?tS#(!pLK?kTg+TZO)kc7$*WKh#&4;v^;Yolc_C|?SsATm|NJ?poZa}m6H08; z9GM5iZJHzVfVi!^0wRVsJ`}Qcu$P{95{Vs}un@-Y2&!eF$E+Rsh29h&pC7VzvEt7; z)5%?$nes7ymqV5SZCXCY?Rf{2OV;vXnZloAFQg8 zR7FG9CG4dyI9-WL^!O;oU*f3uAI11f@cza8B_ZolR{sL#zf_Me!T3uZa`0&W5{$pJ zu0if>X~;UvZhgV&ZaS=YsTAW62h~|A#rVTGD?)IUg{*n((u;L=gne+mW3${Boj_t< zz%6r*5!_peHFmEJS)e8YlVHR3|UvOiNAMNx8r|cU7@im zfpvvG29?0N0>?m{=c@5HO8OSilQ3h&w~Gj&Z`O8=UD1XPQ3Y?fdwcu;WKMsNS`xsoFxc@ zJi?c#4cXVSuYbuIYrfXNlZY|3K)Kcc=SvVM*BaPwcr=)>E@WTFhF)?uB(F=O)B)u> z15Ynd>VR^cfyeKI+W@!t2E%tNd;TS-x8MfDE%rt+5!vweO@q;d&o}{Yc9nuSzeUTj5P`AI^4sxkhv_&W?S+$78>9yxeXj6v)sFmMGiC2lFCWHtgkkL9m6-ebmjyV+CVF^5BD0GuY(oPR)3R zW_PmdGJpk zJ`lIUtm!+>&eE{S1vy3_hGd27>d68H1R%m5_>R+A5iuL&jQnC#vv;z&A;R*c>7hSQXY$sORQ&x%QtjUPTM20xRmd^&qp zoc-VpSov{1p5AU;ign>f$6;2A`9WzVYkd>*SL*RJNu^Z&2KOQ=BgOE3X?|>XHGAKi zPF12>kEb_MErlgU&=7bLWV;)PN?En+1I%q`#s7GZwHk{o_*!Yt;2yAQAr8o7FvyLs zXHDOAY7_N(JX!GdhzHPn#|VtCM>K$B1mqq3Gj`Q?or*+4k0;wbp?8Vgy99QrjE{%y z-o(E0U8g+JBt^JklEvOsD!3jH#y24jOU5^Z7@RSd`#q<X;NiP5F4&N#xI?TDDjLp2|G#}{z4}dYb z1hhKMb$lVnHtcAp^Z>XVv^q2D)jh1x*)XUetkAh;Ey6;yyLOlFs0b0!>*{jLIm2*Y zw#V#dKYGKdm;!{I?~xP>kG4lLj__xDz&P{*0AWvh3cC1FBS?sup2F39%ec4OM_bm! z&fVn(n)>vl#EpG&--MsrhkYY%gvT1P2Fw9=;~P%(W2^ zI_wTH@LG*W47^q{Fzx|wE!Ss6kPU*?7IsU5Y`HsY!(E6X(7c#vgkAGPr)+XW&qoYC z63mkOOAJ1eD||bQ$9yB9b~&FP^C1LjjpVm^vwS`rfH5epE$s0_2oL<}ht5P&xp)@$ zV#lPL1_%?66^6Y791$mB+>A!I6JiTnf3KUxp865aopSOlelEtPGynwbaY%zW#|Bjs z?15YSrLC6f;+ZD&!_euN&~J-Q#{}M%*i;;jNw(?7PRsbD9#4m3QpymEAC5^FT!Pht zSZ1=QS3Z1DZsug9N6rW5c8a}>`I?m5XPM;IPU-o`t)0SrBrPm*Yp2b%LYsEK?RewL z`@=1uO-scE2x!x=wgnj(AY(eVMv{>s$(Sx5=8Dxa;qh)^x4sRRXQ<5Vw_m1lIlGbcF_l}w|F0d^V zp7bvE-JdwMx{t*XVrYV7^^aQ4=Jj$1W)94o)jP?HRWIr_QS6 zjI`t}lRWJi>B#}Yd^4c$LOvdz_8v1gI>iP)>Nc=9e(JQtITcYW%Op>Gk8~UW0dWr; zhe3`APkSG`|D*13VxNrNAXJO-`(*3}5XSGTt(Th!PkTT6@qKm~d;Vuj+)~RVcYD7K zNC5)Ue!OW?9~QaW2gs*s*M2FkVf+D26nWSOq&H)k@URb(H`A~EQe4CMgVK)ygz*Pq z$WxrgGT~ug!s37B*0(6X6xT5R5=ZeadDoX<_n#&8WSMZU51WbT!|aC_+k05|n7bKL zu?XC7So&yyfPWYUsCZxGW*>&1N(R1V!p)vHq1FfN?tXDU0s%BHRVnTRcV4PeK){`c z4;_Rag3vndtKyjo5}(Hx55D7k(Xbw@_1F)hZZUh`9ygawWx6GcxBlGug+KU`k`hY(R8N$Gym0&W1px zoxnYCcD58&1PRX0hOi=$$xXvt*7j?sGLft2qos1SpH9ju7aB;!kN||(u`8W6w&|Wg zK~y>C^w1$F<9&QmY-<5Ke!H`S4gQ;B<0(l~73leCs|$2Ahcs0IM7Z!yF)+-GJDe~( z`!8VVutp+v6xM+-Qb%D#WJRnOdl+G_Ug<=V0pLe84%u80{UD@iB6tu|c|2YkW#7IY z&P~p55T%G}Br?3BI_f|QCW;3W5lC!iDI55WQ=cf+<4LuYN&`YfNlRfsh|n)oON@Q! zH%{kpOow7gwZwENmh7$=jx$+B@ER+8YlT%r@3g`#Nt@kO#4$~YD#i$BFye8 z$t&FKt|4CO8LyFa;u>bGkz69o?i$G@fbd{7l1m5@Tv8)d8jNlvBiQk4k!8XE*y1`p zEAdL5Hk*l8>R@#cZ*k+ifq1JFSY+cgXe_dE8no?6%+nw_jGO3<#9=McL~qns#5axF zaUi~Flq|?=6Cwc~$atd*#1@li*1F6TSMB|_FJ;=5L0L1I~}B=-RV)+)(;fPl3M+;@h* zFBl?S><|C$T-n+sm6gFQkS<5qeSk2&3x>;^!mWUb(Pze^FB{DGm>Xwb{jKv-Aj~lU zvER?9s1Cb|PFQow>psj~A zppD|d1!jJi@o?MH_9$M=U>JC`cKY_#rGOs;kwID z&YhT_J-k`eYfaBBoH~4xefui6g1vg$pL6>Y?)KodVWFJYYUP|<5fw@}(>GwWXH$_$ zT+M_xE9(<7-MIG#F*MiAx$IuU-Ild*$7Z5es;Fb4Y1Gly9M1U{X}oA z6w*+b3gje~MhCc24V5jGKxs+83{T^<#Mm_j?vRfC_)Le=$kx076fkd_(SId=bQ@|b30U%t%B9+TDawR0>I3Ew1tJ#YIccMuJ zfS`jhzFONCBvGsJkRpv74B5420~-jtZBr`vgKQ=+YNdM!2pF}r_quXiJb#lsIzBFgoAm1<8Qg?W zyRgR~gOlvjhmrcF+@=ceAomFhlbS-3!%0wB%J%?bxRpKby0Jv7UW0^ht6qbIZ!6ZI za27I_A*-EjEOIN8By8I?4hh?K&DSJs+u_ZL3>bv%N_Kyd+rb7CuHCd!n=>SAS88*H zgzZWwlq6pW!nV^aU=?5VS9c2@Baz#w7bKC}DP@k2i`>q_ z-G9P8%bxSxOOSOJ8pg+6uwJQQ0AcN3Xc!TRj-mc&wP%uasD zU|RuijajZBx)*O#5Xe}w7|wK^Z1Xp5tUT&AbLWG-y2riA{&t2}#NIyRFJglSomGo7 zCGJB;)rIHF&|EG~1g+vLGpj-k$=n=%_F3wDjDI$tK4@fx~)!yw|2-XJ->P>Lo##taRjIn*8^;&N3>H!@{AW$*`5lIo&lLOU1Fvs%+f0jdCZ7j11$M35*xVcf4tEaeDKXUa#MVOFR2R~JC@=#~8lf_TD<;fVN0Qg~Wrpoi#=F&EVeR ztn?iL0d2OfN7@~v?q>T3wDb03*0REFT4H+q$@2}np4GH$^ElxZmZ7t*rYk?fJW!3^YXlZL9 zyxdw~_4)A2v`G+2n*`(Oh$DGo5v@qcI*4dRO4dO{D^g`0M3!0yCEPk-s|q0FlsiWz zLCI2+ASO%#m4H`Hm@z6RdxuPdilrt&6*mdkJ?or!LYyStLFrdM^Fr0;8xU=#ic^nD%I_w1nK7U%~f1z(p|@Q48lr-XF8 z3Ka@xsX;p>q~jYPhD9(MI=+$347nZSDo7|CrAF;sl4@^+Ru+#$DYHf$3|A?$Mua)V zd{F((>@CcfRPjTUgW`=g>-k8_H!s!lEoMb@P^5V-9)?HNq9p{W`<7+uz6I)Dc&+fJ z+E9(!M~KDjTf=TkqD>=`%5QU&RYM+Cn|8yX@>g&-ESUp2utJ*&r14j1FN`$)3dmGp zCP3qNa5F(_0Mhy$dNtDe9a>nD*6)C@6jlth{wkI#wAV?sO+M5rjY*n+l_OjkSOvgb zRaq@nEAm)fY1Qf_y0kD40jo=^RZ{j{csdbYhqCXX#8G7%DnzkXk6w$?Sv@j+B&tVy z;+5W$LT5nl53t&G?$e0@y$tF70f++e;z{oh0Dopds_x0MMCiT7^2ku$1 zZP4!`Hg3@SM=E}U%(p@P19Jnc5o!HE$8RF*=ecAFxNwuUfJn1%(iRYD_D$LX zf@0rH5#OQSQW!y-wQW!ef;Vg1fK>fvZ3L03-z?+3J`<{btFlMRfVEXWCMo=_+8!Z= zzZLd~R`}b~3V-`Dg};57!r#7B;qMd*f2U>*QusTUDg2#jg+JrFD6Q~kP%9`jHx&Mb zrl^Jy3jab~-a`ui!ct)b359!zf_-=hr$Quupf&77}=!r#-{mR9(C zmnr2bol^St!36gqah~j!zyvFc)7yY2>Meq^!y1&1XR;3w|mZ z%y91UIx<-PX16k)VTVPh4PC_q8R)E4qp(00+e)Ld>?}Qs3hJ_;RV(FO0CO1I>{iEf z>>NFc5@k71tDEI0Jbxa0YqPsGo`+sn-WG-xDOsEcQ-g;|sVS}i9RpKa+=1Kzv=NFP zB~ERa-M__cZcVp!;VQ@rXB3LLsA&#MgkfUDXhp!d9bv!U;>KGex*tkph$9*4COR?{ zBgkkeED(e^^Hw)L5nX~slSP+ck)0R?mS`b^om*zsTAVe|5Qnj4Xh&?|bbzC&o9mga zZeuFl&4sHNRi2?btOVbeBS%&$v2eS>jz+WML)3s6KZ%ZPyiL_kM_KQ5mlwF7hU>i$ zr=bFSQ6p!=Q&rh)|2DU_y-GipFn+5ban!W*SXBr>k4iLvHE0rf^-E4qw;Ds~%NpHW zg>)vCu7RDW?-LT17J3X1-@sb7yY-2*9Yc@aphYpgwgwn=#atobRwKJ+yIaCeUF6S= zE)8Hcf=|Sxc$#MRWtuc?oX{I;)|r2LkY6_g7tO{jdPutrzt`NGwc}Y8T#vs0o0f+G7^7ymL+=@F+N?iVsC_N);ah0$z`9MnEvL zPo!xplVrWB>Ox_?s_H^O!0MApTHekyKuOy6WCr$SK-+Q@>L1Xy99ggfu;qkl01I`9 z?R~?ICo_RFqznGZN*&S#|74{Oq2OQGe~3k`p$37fWEODNXdE(7*JvDyN38*l*gqJk z>)6A)VV9;&7P3pzCJWi6WU>g$8FuL?vuE6n)uURolZ85(q1+g)G)cch%H-jhzeZ^%?3Ykd?YVU&YSIN?i|QTE^=qd>hl+mm0aKCZ3C+N%q?r zH<_ATRx~jwwZ0HPlSq@wB=08QW-$*Pt4#X5dq+csKACu`A%mDQ(dHd zr;9~S01$|rt{@E-=LN4@eLKYLbO5)aCz_5mN>wR<0a;O*!vEl%?UGXgVcd4fsemxu zc5o`uik|abz8Nta9nW3(umRC((`>s<5h($HE!-_b+<-7}H#7`c#DFl}?xKiR&3|fV z2lpV&Ld8xz-(bFx!Dg=Tm$9LPPA9qiA71R;=l;Qn>^tAn&yQ2uwuf!n@0PO5uJC8E zyRP=f$4TB!xe(npwF& zul;N8&ujmh`}5>q!-ah>UtYP(+?R*DEL>Rfn|a;RYF~pdQdZy(Q$)_vvs0dGvh7W3)_e0wABlms?o}YAu zQM$TLxWYx)oORk2=Kj5Qg}HyPU19Fub5}S5ZIV`)6x1Kpt}yrbwJXd$ez?NI4B#IB zs|$z_obT(a03Y}Dp`JxmC0zXr*!Th7r zUu~C2ObX?zA|UjO0#g+MiSE%2IKv`+0Ed60D9`%UNjH$#s4Xz^@i%I_jePu#+FOT@ zzlpr{s>CMksgrlVNqg$#-EV@YE;@%1&fmf87J-hr=Y!+eeg7rPqF%7Zc1fK;uyId*%E1m z?DEZ~t&m;FkLwt~Zd3W|LL-X_gg3OiLdOR%-R{OFi3XZxmK6=msG@-s_j_iRRSnGG zI~rm+cnKGpTllk!p#Oz>ak6SIOm0;7u-t{ynX(jJNT*$ z2aLXl1<+&+vu|GQMxpql|E>5*@e4(cm-YWygr9%%;e10tDRmX$$0wq2{>Tt8``9Cy zb`#s@xPk5OWe=zn{QqsRUrf#Ig`#LfeCou}%h}sQ@OAzxdqLj#2YaKlPm> zfc{=#ew7H}WsI$@pN-P`Jz9a0 zebA#77}*CsI+hFjpijkeDbkR@IXIL-WGt)0j(i;uwQEk9_-h# zTpsL4@^&KiUZH-qAw1NN4Uw{Zt#33f%h#d|U(51!%PPRu=|n7fSL>ElfUVONV7N76 zcJd6ajOUIhVa{dw$TC?zva&;aW#3}`H@XQSCeeXXviSUs?mJ%aT)p`C)-~eeTSs%< zuu;kS3^$%x;jI^~#TmXFmUFwiK9%7Q6ZzCOOsyuoNR0qcm1**t0fL}6sMSOa#H}oo zYbo5KC|i~Y8W4nmS@@cf7ziL6Rb0@txJCLUTcc4ZG#eeOp6r7O`Ks94x4Xx(L)cCc zJpw)W+|?cM8qZcO$xV`LT7VFfh+bgQFxz_QP81Wr?teu0^6KSp>OBVMzgqvLOabD%}A>4ti8auy{EwB3L3Y0)Ifwg|bO{A2x7D3krJ)T}egIpJ7@=d;^SeLfENuC>oLdZ31 z;}!$}Y+qh)yZ z4!3~ipt*NkRkVr_O1q3*iV#XW7>f);Kydro-_yG=IdS7A>0eAM9fDW!oBb65bi~XFdYH3{i1M-jzGyu{7-;92!JqazdQ(l zKxID;!ZwbDgD{BNy!E=TxR!0Z*DY$N!0@2n9|{Z)>IP#v8iR<6@8mOptYI`5Pv{2Y z`b4_*nqtGlG8BytVjvD96iwlD^Z=uSnhLY2x0oWs>Beg+9$%|pGDU{h%2G%4{ZgG6 zN*yEYPxrzJN_SUN^kYQ73o?2}Wb}hK1dp+n`%u%AZknc`@R%%v5S_qdaO=f8hb1#k z4a|*`RG^q{m8PJ_xb*8px9>RoI`Mue=rJyX9=In%IpY!4#0(>6f|{5cd5yR#HM4l& zV?xhKhRy`$Br(N1deKOIKf*<-z)W=UPD*hhx_Bp{&c%4xI8*Fy8m~&r(0dD-RcV>% z(xuWeDknsbEdr|S@9#$~{j_x6L>KO~{QQ#W!kxxf3@C7e)>`U-?)fMJH(T_0GHJHR zstnP5y9I&dK|UTP%{I||yGd3NE9EGZD#g)_2kO=K6&l!+2lkzF_=%t@eOjw^VVT#7OeRKR$JY?A{- zH)Wd~AkcAzY?DLgC1hQxmm`gFrOaL77SOINRm+iLy;3g+;3`o*fz>FMah0r|u<^-i z;9VulCvcO7%JK=DlAl-0@(BRIyIL^%3eMIKszgJU@T4w z@@$3JWI$F5pls%|>3LG-YA%iea7ffr0RmnszCzu@a;eT$fao1KA$*z3oaD_(fRHc& z*sMS#<b$&R1$7w+gDZ=LWLPKZ`S;4OL9(D1t+YUx%I zv8oMGzX0CQ_`}owh_S$aeGXkd*FPUDXSW~q_qA0Pd4%{2SKb8ckoZ2Z`fBh6?anm?Jm_O+jV*es@R=NHho^V5w*E%T_kSqMD=Ns;EH zP<+Y8(u1aNvE0YqlIHUsp>pqSL*1b)>dc&t%X`rVfD3>Z@G)dJ+Q8{p5QLNxAw}mA zvLL_WzgYNbccZcRFQ0J_8^)t-?^EtJV<&t1DYvzup75&v6TI#NhZZiv_MVttyO}vp zyEhvzvA=xUok<-c;ceOxunWsoLW=};AwE8~n^OrOVke@LRL)Jo zxFsdwQ?n;#k1WLTZSu>{ECi1qj`zh^;?ouE*Ju4jsrV(c{01&|^r(Os3H*qyf@&o1 zBW3C%w7ec0b@kFqF7?%j4J9R13NM)?tU()EW>$+01%!KLaznWX9m5YGkPU65xbqrA zDH#WOL?u=vRu-Og3}3CI7Xhysbx*b`@24Ftw?)8HIMn6EDknf1upD6%fd&m2w^hp_ zZD^do2>RlfX+WFAW%&j`;KdPfTF;jQP=(Jk_wv~0lI@fmsrPYgNbI*bKku=hsC2@r zRg!B&-BVRmSWoDnrwy&bC!J|S;r`e8n#6|E^VY$RA#;bj{|)$pV|{!b4hTd|`rNEv z8>f#N>T@(XdxQ$UXg`4l&8p%KfH0-{WCS2AoJ-$~pgKTq4K$if?7qKs!=r#ea-(j< zr8)0G4*I)2&(nnP!mQ8$;M7c1&%ZDG0@VEKyV<(<;)MB*Y~_9F16Gk0|2!4@ig$FS($ujE=iKW6oL8PCB?+6mrqc z&i##BZM3uGXWc&bUvU2&c`SG__`wN59$9-c_`L}Uf!LX4 zKR0oqy-yLVer|$a62!uIvuEuCidd6=*+5+QF1#G<3@o8T<_Qbmsvu&C@7WX2yWdD1 z(gcuqcSsXJoP9_WfS;PMFSU;-0^|=(h)aS18ZmDlR|N1MnGhHLO%QEH||fW$h4u+Go{bHh)@vLHw`= zeoo>V!~6^O$``?`FhcEX49qTY>6av~F)+OZu`$;eEyGKGN#a_=zTQy3E~0)(LS9V& zlEnKA`$misKXW2}NkU#i?>FcUgaS7k=IsU^IYwI!)f%7WyfGiA{}0WhT6g{;I_`oJ z7`^t*Mj%sxpz~%Ui~ooXO$Rz}HfmN#Is^E{i(3qQmsQajkiU2#FA6$oRO5#X`!6-2 z0sfO0^3oV5)CmQcVcu(4(ba6#%l>%kKhfrjPDGb%X6T;>aX=?C^v{DJ+5}L`00(dC zPQ#v(GQg2P55g}A8Zjd95yQSmlZfA!pr2}?Yl~le$-VTa=G$4U<&!W5uj}(yEZ*|T z;7w-mW>=I-m9vUZ1Hq+mr_o6Ac%?#B;U3UD>FIE@AOndKmU6x5 zoU%ViVP)XAFNC22Ak$Qa3eFOsr3yV$*4T;a)y!gLw$LffgxT_t{D^6uFW-pXY4C?G zXWw}wc+I*zSC!Qx3LO&33JQgTdYDZlZU_SPA$+e_LYOrK9W1|v8TLikJ)aIvZVtO4 zPA=DIMe@-BfZU>G0qr800~1=SC?qTdp|y%oYEGZn1)r4Q(_np%1}9P_ZZ@Bo$FfUx zB$O1O`p%SyWtYm2C5TvdDL&9b+s9+oWzy>e0JJjg=+lcSLnNLaO@yq=MEV901WgQR zb>bd*vN4TEFFU63=xxOoTOJEO-)KC<{^_k?oO2@sH-;83{C@DmcJS$Z!IA@gV97#5tEQfXt(iKzcx!ifpKUEsF&;6!E7lF5)+zSOkL zglQ=z0a}(!4MKu*NU<|jNn{a!r0_y;6SHK6)S)0@pQR54MrNBTL+R&`D+!~>Lbfj1 zq3lw&egbfIjw#~$kefiukwGayK+BQ&kQ5iHyj?*Mjo^B&PDfEhJy+vVL_JsX9#T(O zE?4p%%B$gw$b$p`Xn7iq;^}!h@ka6VJfuIwYQb(gfGU4Z5%rM9qlkJ)mz+~XJ%m!G zc`y-VZ`fDN{^_T|`BYfum$+44WQx}b08@H3W^U>0K!y7Ik}t!Zj?u401E)# zQbe9&K$s*VPq8r3BO#G%1B6M?JduH3P;T{>`YPDZeij@_l`btAE;EIJk5iAi$|ONT zB9zJGjgSasFk@*?xEULhZw>&^RF5YhY)MRR2_TRVLnce0;TV_W#qkfF;M-5YE7!}> zF)o*HPJ9=tT)sKsGH5D^)#F-UZ&s47 zp-()E<*-`~GKr7G8i)7^PvHqDcGw^b-$mA~Ax|WB0b!N~&qpfVxP4$^5H5+__F z*VOl-0RfG^7cI~*f1^gD6Rs*`Ei*+&yisSPD1Fwb@o>VMQQ%i)AK%i|@!tJ|#6=!7@B;&}0lS;}h0`J&Hm!SZSItuWA=wPEh$i9;8~ zFPb}i7}g%STO{?`q|)PI<#sv02rH{^W{9wIyCdcoVdZvAzY^2q8%&+}su#S<&FK1y zA6nquUx(P={bR5y)d`Y_c0Z+_SIM~n;E`8J+5v%xRg!iBj qX|!HqJNk^acn4s+eko`CobCEG9=(p6p!F|4{)^y_v;POE203d0 delta 29103 zcmd^od3apKm2cmr`&M7=t)->b)>^EkCAFlsY{}YXNtPvBl5Kg#tFRTvfF*B%F~n{= zEJ+9hA2{ z|GYouAAhdfb*j#-d+OBhY^Cd-umAL4*Ppt|xXQfBy2^gQziyxX<7W+*Kf8yO%pcn4 zzpyMEcJl{6Iz798W@_fhr3d!TY?wKEXm0i>zu+qW2gWD(1y}ojV!vUy1^lyz{RO=5 z8vhRCVt(ct|5~doRKnl#y~H zqo>++O* z4?N``OP;X;AveSI({nRqpRsalyrxCX)?qhG{%VH;w_EldR=~}5gVfzV`_#jg`eCZq z7cKkC=#}F-qSxnGD4-t6`HfKEZp*yKvLank9{7oWIC-}fC{eQ-VB&78w9{*XiMy@g zy^09~OnlX{|57tyC??cH$prQKnq_}eGhx`ognHC17QqY!&RXVQfr-W_f9fax<;k;F zAY099f{C+MPNmlb6KAcaKE;HI;qSBT`!y4$VnRKXOi-@}EPGxvVG1VHqve7LD-<|q znco8wHBo-W)Bcv^xfBx?m^hbW!U7ZLQcPGF{vpeLR5M{ICe%a81oe8%vcIdDumlt8 zQ9>|*E>BwKGhm`J$`5^?mGjYO{29q7tw64Ne;b@UY30>pw0wRE*w4jTjfz_Nd& zIk6Qd>Y?O>di~h4pVpk%f)n*f3Wh%vc+N6^E(PPK&-jNgdM?F;A51)#V!{t5o=Y*| z$MDZv_RlmEe#L}(D4C#Me`DD%Y9{=G33~L&Q_uS6PdyuW^+n@dzVmJ;!M`-&^v>UV zxATcK_q}Gh1OLq671davUwxaU4c24FnYJ(FcYN0vhU;Sc`HYa|umU&TwQZl}3)##} zv(WNW3%@b9z^!uw)WR;bTz>nvoY-2|W^ShI$fxM#2E(bgg?6M^jfmZyVHSEL8t9vW z5i7)q2921-bMJSmTC!|cjew`LtTH)3xDl=r|@~7{2>JqsN<}yK*n^vT$Oi<;Pl)ANw3e9}GoIm}dQ`{}z*f1?W zJxuXyVT}B=h#muSZ{?Sk>9@2)R+yi7z^PgrUO;7oD!kw=ZBT{rmhwwLbRuTGw{FB` z#4U7N1Xm`lTM7S{2b@GpiCzIbMX!=zmEr?!j95}r>-H)t{9MK-zU}n4lr5m5bt?%g2-*KAytL=2%%f@Z!&OEl>b@f5w9^nO7bBQ{~bw2L*cXknY}D*pI6e}j@ZJi{wB z>vut$I=LQKXk(0KaJ5m5fp6BzPyLm%Io`T}iiU1=z16qGM{33D*V5i6ZkKWUL8m^p z%w$pn2ws;3bG#O2S(caYwu=53tetOp&{>*nHv_5%@zw5>crEmAFORwr(H}gmFbg9Y z(SiLlv&W*xjvtzdyQ-&&_gkT7B|cXKbG_d%%8G(8-j=vTqsuIb{C|4Pvxk~F~IKj&1(229d}(4{8H(LhO!*Fyh+ z`WPgZ-pL7BgWTxHM=$@ZKM;37KWOHwt_}zX3#z;p2nVsvRtrKFvWEGaX?A~`oP>eX zVf{)Bl*3MzqGX^P4&_3H(3HWDHNtQF4J5wzVaM$lF}*Jl#1JEC-WLyIh>_3|HAE0Y zjMT-{5N^mC<)(wk50l2$XtFer ztqFz{SsKXJsyX13xZ8~r!sRCq1)-&9@W zE*1TALe>`E@R+kKwnd9v4*GA=BA0{yTgoe-Y-n*qA!{4I_Aw_G+ot&mq5rm^H(Ln( zx8>%$>qP(DkhPt^{+P2NzFo^pF8XhG2nx`u=A!@hB2s2FeqPAhX%W4ldnTj!(y?mTZpAC}i#D)!%ix zWBYagBJ|(yL{qOv@$LQ=^WOrN-RNH$U1E1^Xx2;mVe(#iyhWv zWgt5o^psB-$PS0{lqM(-Sx5QC?>lu(NA(shNB^VD`#k07e-zWaV~Ba8A?q@;g`a)b zdW(PdNqnKpG+h*Qm$8^yktpacYid>+sv=|^=ke7n9k8uMAmN@aPYm-o`6*|4Q_~LT`*p^uGcdLvHMnCVr$}l+a6^pBj;#C0CK0@>Tw8IUF#2u%!hoq@BRlqwK>$iCh%^CQdoPk-dZ`Nw|jv6XssvM#J}KFlxxBKqK8~K;f5TTtdtCP5k*EI~83w893-@ zZafU&sR87#njpE!h(x_62EWOus=hFA=*Zl$xux#cdE-;g+s6I#B|mXKYDDFc21t`( zh9gDMO-E<;ML#lkBsx7iJ9ljQ*bM)Rr=3JJCYBUmG0Uuul>U)kzkk}%h}t6y*`##}9rggafW0|<4x#U6g~0ZF)}E8T222pRCPds!yl%`F>H8y%$S z{MRoyOUBamc!c%RgWd>)K+}PM7)EM4QPf=k+f;jl5vcpB<3^OY9%393~?Hc-lTz1y8>0)bqUe%ge_O4j&8KDepQ7IBbv&G||!p$P~;C)DYQ9w10S)lLYFWiR)2@Yh~*CJrvghla=rRb{oC!(x1>C@f~X zLgqqYS?y_c-ftMVy}sXTVc_<`A$W9XW$jMiA?e+rFV)G)g@6cqwA<|Dr(bp|)}e(} z?^cXTtF&94*U~2KhRo37qlNY8&RZe&5VfRs=+5sD%Oxzq1VRweCezT7^yzEp@p#?trH62NDzxs^QLhTnm5#ocsOMg+X;=@x2{gEE|1uPQQ zL6{ghuQ_L0(89ojdSF_LLG>l@8+FCOLqcnj&<^w8ong(%VcnnPby&$OdZ7QXIBSRz z8;lI+cPd6~wIIUv9-*2RzFS7~9Rg=t2D8EU1Mlbnxa zOY;jqVxEyuLe1mHJa7kEBe|{aw3r9`U=-)iMtx9 z35gyUZxakQIbJ%(+f+HC#!FY@ZK_(O_=6d{h2Qb_;BSi_kIdLDnm;mQw`l${Fy0o; zUxpfQ3;3hM(lTM@ZsYDhIJIj%0};PXYR`Xsy@Rm~>^Xy8? zB&&I^avY(B{(JF}$;)Dq)jY%h^-C*~v4?_^?da$@|Ip=)iW$$8vgx zC0d}`uS^iMK(!zEn^34_!dgDSfA!~f8GruE%x&nDuW8oL39v6QhqA3lMlkgB!F(2u#@Nb^}lphwauw>6wlCqPMxD@ zq5m9A-XIPlsH!8rDiLKMWqM?u{gd-O!+N^Luc9&Og9Ln){M5||4IaWA0B~u(D7+HRq0BUvFAf+1+%ouc z|K>Et0nf#oNc@&j=$YCCe>19=xGV5pz-olhdm@cmk4AXrpZeXgEG5q9L0z9NQO6RxV&EJcOVSC1 zMlRoV(rJy;QI@M|=qSt8wly7Pxj3u$h{>?%`TWh(&W;wJNq+NuO-0`zUpr{%K+A_7 zm$oH3!iN11CmIXu{&X^hwL6OrrZ7CH(wB>ar-(mt(kYAwKw6|}2!s{sx1p1!2ya7& zqVRGS^TY2trLkh&pFmi#eiJ%dit#4WxWcNI@-=6ivJSb-biR~oN;+Rk6~6G9biR}V zUr2u~&X;ntK2pn#2&>@F?_e3Lg5bDZ`&8+mDc3$#LS^OH;{=`n!z+Em5KY|k60FxK$wCWj zP@^P^T2iuV)S(Bcj#vcWeKmqC_&=7XPLE1rRj1K5iB%oY3(2E^^f4)q&;AC!l$a(W zxr(W;CvkmD$)dpZjUOeEPS}g|WEqPjVI4)&|K{ zT*;vT_AMlbktF_)Sz0s|Nmh%JMhWj*lr#do167O2!o=LZndm|MbBRJ*_zj~Z^e7~6 zDL78@mQeC3K!2N=2hc{N@XOzIG81?R@-|IQLf58Wm4vQMiK{^W%gr1CKeBRkT3R3*YLX zm;hj;pGSZ140rS^bHp$+@OJ$wP=FSw`$O{7Knv9UI5m0&HK4~zo^{e*&Y!=O*?2Q@ zv#-<(LnvgW{<4HZR>EyQAxMEThWP2Ay^8n0W7!Z20vSX4B?)8@ zPe*){av#%P7-1zT3v0F6C{(w!saBivrO`si)y1{mZy0WMtU;0Cr_rR@qJA^*ZAMM$ z`+)gOKbAIlzkzNv-mK`bMaN9(=jYz%sX)=V_knz@nI=*GE= zXJ(^EW)2;hL7?joz_)AF%AphHT^p1UDYP)a+MJNUk0zNk6a36^R@{vLW6>rw746pv zr5f-Xs3vmrw4dv4{%@FM!Li)+fiqipTfhws?Atf|C&y-v%uZjjVdn71W{w^UE#c3+ zV1?&j|G;_5;8*^T_K}9vflD7bXOSB$2Og(eBq@H&;~&`Uww64#Uh?SATXgj2 zK|!CB1o*s#W@+Rb27lus*1+G(W7owBP0#I3l2@3$(7RQLxeg01vF^qEY(6{6$3~p& zh!>`zuUHIKEgiV{ilzLUCA>Vy*7DV}ESfIE#=($XYsUEPg{+mkgDjhWf0kvpNXIga zJi9g$v%xyU$YkaD@uWCrxmU{dhNf&X3nG`^Y_l5P>#|DujZe6&q_IhVGE$aJO2mCa zSvJ8ZF3}j2WwROKcU;9v;%Qh4&$)vDC8(N}$%+_N>=X7?pAMXpebop1M`5Xz z3$fHnU@7u)0V9!PM(RrmrUp%Eg-S3rSS}T&1XF{ElS?wZ(~!AbdcXjO!1|C`E`%N} z`Z3z-wZO*E{IN{tWLnoJT%P@PR>E&9fwZOUjeGa7>oT8Ab910j#^+}D&ke2QPhHOb zC*N7d{>j+F=Q>z{k>I<_VX8or4a`4Q&StEFw+*2R6@^NYoZ;P7?A72)l~RfAO)0U3 zc1sP}E&06YJ1niIQkXM%1=m;M7D-Dc)3?(|AU^^MP7R;ZZrWx3KJDPYscM zlm|6*gVu{-9=(X&$Zt5|MAJU4m0yInoMxYiMHZ>N$Rd>&fy$HG3}cp%Hd{Sbq6L-C zuoA7vNc)v&MMl2+60OKQ-+c)b*~LPRp&iTl+qLXqtXz*rim_a8NIKoh@fwq&KjgNO z=M1p*u}a;a&}gOdzxjllxf1R-86?NoS;CEawn6*8Wgf>8ZLyFhTmlG)ggB`QYx#+K zHnG-odqX>7{965fgg9&U`#E^OTK#^GQq;A0KdGwlbG=kmQSBIqt%DKkwVEOjTCdd< zgrkAfRGD^+LyMw+gI*B=o()<>kvb(6RTDp7d3uKyAl7jDG7!C+~2^4;^*s5ufNcp=szwdBHd|LAjAciP9FbN18a{h)hb6Q zP{+%x5el>{`v0UrrD_uj6soN@mda!j3RJ5#f|l*dtpmk~gd`DH<}FRkj;+v)k&|kL z4lI-YT%iNY(4Sr8+v!Y@{_N5;B;;Yb0Zm69tO30R$b&V2(EfTc9XwcreD`5C*-ZYcK^>+i|J9(* z*dhPbAcX2+sYl?z8sQVi*tvKCw%mw5j>vyCqK_l;UyUe}#7FL{Q8G#T`tW}!f>E8p zL}?$RI)jPaS)@MUMc`0w?&l(SUej@T`jUy#PrpO`X zW0Jpe)Gk*UCPkRab6@*RO8%G(dLd9s{+NU(jPShAMDoXaZ36}35fHA|Q&JYldhKbU zERglEfCdC1vOuQz<^&sDF{R(I7}Qhx4JjvND&!@IQBKGdpuwH;4UrVGnU{UczLj6R zl)16Z`h!qL$Yz`=Ql2OyWOGTG0xrl1*~;%&%4%X;wU|;G$X2}{C=FyQWUNB)h%}H3 z_}fcaRqO)oZlnB<3$(k9@;@%XGLlv2Gm-zXLs@m#vOuyNud_o>M2R3f^nRd3kR8gV zgKuWHZ*R&svm20KxPBa`;UrmMS_Ntrway^aj5R$SzbC9$Fx~u(nGLNjBYuy?xra`dz{;IygN$ zy?^E)QXrczZEZey{3!4HI%E9$Wgh}3?B88Ci@?eJ4=!hq8a%s$?J_n=T++g`zQMu* zmvG>c;`t9c*bmLTmrOUCD2`99U+Y1W`B%HxY9n~IN@A0J|0OmFFTy5a51VY~H}tS@ zRwg{JDeRCVu)~MUtA#KkXAz9Z6ELFTzcQ~<2qP>I20s;G(G-j*k}x9WcqAB6q>ovG z5k>l#B^Xhpk68~!6fJ}iB?3n98ytLuJ-5Pu(SV^`00wC(Nmq$P3FQk>LZw6rDO5q; zs!FXQ2_;l6Lc)>R`;d#QdXxYnpW=w5KG5q?fNF3>|9an73PIP$qJx2ySM zKX3vGvcx>MBCDxz@P^CzeC!N`M47(ZQ4X_Ann?1;yT>i3m@0IMOVFbq1o2%4&5w z15b2{(>YE6qEjCR1Ry%~=}Z8k6K^8j@Bk3qI=W=HA~6)C-Fi9#5#1`rB$GzFqm}Lh z^7H|U=;sq7>^rf3Jr|*eew2I3FHh*99|ROH^HKb3B>}5MY^9!nki$xisR%i&)R+pu zVMt&qktgc;1$`p$<@p8C0uA{Eb)M)dg=`W41bCTMdK(g0Sf#fufrV8-HZn~TSYb61 z{hrH1uH)P&mVC7)Bgn8?iylFS)et@TN`MSweBHZNBY$p`1scXQ5ut@K4a*5FjA64q zC>IWJVFJOqhZ-jIx)Dg2P;oin3G|-;kWmNlGKK~Q0%hEN0*HY(q)&jeK1ya3lw>gZTb-87|N=LYU!#MVR4&6lU1z+n2%&J0ay7Gwd=w zUjkuFQKjZMB?EHtzE&6`+tG~3S7y(nCk zjbnI9^}>RM_{*EvrfA3x>0Tn{4+pPsgHl0UzFER2H?zL%eAI`^LM6d%n15k2YidcA zbm1x33#aAFv8Z4UQ-pDlmx;0*xRL=x`0qBeXiJeUijofIqO?>29f8dv1h+gYuwBg8 zY+=#0#S5rtu;K+&gf)?%4{3lVg=pAiX00V;11;}ykGiBhW6OFHB#^;$>>U5T|=qDI48Roi@eE30X# z)~_W2bTw3uH!QtYHGIt@iVV#fKEIWX#%pv#?&}h*K0dC9-aw1t3L@hdePA}1-0>W907wP?K)f0!FG1B#O+`+vPW?H^snvvFGUe8%;}{l$|ymvipT<=0+uX_ z$mTTmYamB~f_@F;$kEjgASYo0pz2Dqk$-T`DT}9LO;_sNegdc~b#6Za)RpxO3jV>} zHAM9QwXq@HpK$4r?oVE>A@r9E30%60e{Cn=XbQYgh#&=C2#ykXkpLQSbTzkjv1J{r z^&y`H?pCLHmKuT6)j3|W41v?tIIAfiOZdCS_@P~_echO*roh2inpd(#NOdgN^T-iW z9Rr3|L4a}Jy3_$oWm}CHRVblJ{+nGao}65iN-?PrfK)(}2#KnI?grmRIS%cu4e(vi ziHxW%93J9O6j}Y)CZ3~2hIgmZBtn$aRCsOuX7O+744X zUC_W1?of_%w9s)!w#@8C3&ZUQ7wXgbwxxV#4{JF;eDRYsHxKsyy1Apr_8*zyKfIj% z&3x5`?0v(yfLH88{9+mJ*oV*u;ukwOTm&Waf4z?lnnm|mZhnexp|hZ6KfA>+Zs$eS ztX33_|0e;Am5ZDNC7zRDn~}&C0Sv_whQ>0e7;Pqk@c%ts2PNmb4k#}j`W10hvw**T zH(WUr2U$RbS;L-3+zYeHV1&c}P{-Cckg`4BZ{UTSh2KE?85qC3o{g{jV=e)&rjhh4 z9h1@)V^GgE+R?zgY$NSxAeVuPobt1?%&tA(bKuo|3eSO#Nw|Dh3}N{8B9^D4+!R%a zY2O054Md=nC()_Qv#3e2Ho^{-HH5+k&=YCkw}06#;>~_I#K{XV@qgk4kncw+w{h)d z@KSE$@G{65poCladvmOF!HF!K1KPABCENnjZlm~m^C1YIfFmkGAP>SP&=^HRg$y%SniR@Lr3YUPk)P+kxTk66k z;N^kZ{11m&;6r`^&+Zm}0odKrCKi4H5p@nhBs=v%7lKae)CZmL3uupp@C)2{1V`5S z&H%3@h$0Hz+F=1-K(BCEDBn576ngbKkXN8rdo9Q-&^M&k*ewYu08~txax74EVWl=2$w{yhMx!#Q!+g4#JrWON zIaX<7TDS+aF)iE!+L$KyfM-k>;t)!mvxS&-wKk@OuRt5q!dC!eT4D#`D=0Z(N65ht zh*Naoe1Czr)rG$R$Gc45gu7rZH!fvSog4%Y0bXydmR#}|tcB#tx=pwXCiufA>|*sT zD4^ga2>DF%8F&doXn}G9TUEv};4@gK?R_`4P6Ie{60Fm(kDLVSw5<;(!3MJR%j2b3 z&kfq%C;z|(ZSRwRU<2%ZS#XS)!bZLxm7TGTTKFlZun}j7{F)R~*a-2`F@?=3|3I8# z3Y)dGkbhva{?rsx*o;q2$>TmVN(X%TpRnD@t$Ly;`fr85Sxyv1|E-ARC^)m-cVP<7 zY=b~%7FtaemrUjv5Q(a@;KFw;(RIn9)$I0M#a=c1g3or`iBcH&+R zIUQ_{UFJr?p&?=ryY%D)k9Nf;z27k1t_@R)42|99X7v;K6Ly<%)ru1E+1f4~3lhm5NE^uRd`Cd{Z1S(lb*DVf5-_MnoILF_Qmb4oSO;|k4Et86j)38XX>F?(rM0cn;bgMzRxL_vTeUE)ZA2ac33UXFEII;4 z799a2ZOgP(_7Z9Pv3x!Fp!a|&`?&M&_e298LkJzoz?z95bj{E1sxMXW;K ze?lSRiahTw6JhJ&$}oxN;9INW>9?_{NU2SD;!gHm6`W~G3Tu1~DJiT$G6W$f;a92S zv$p{`dG?t^Aax3zNxw=R#*zKOM~r_L{gbIm5c<|J-JcdYrshRreUqyy*M+*xOPt%?kkj2Y&3O)vpH@D!Wq#vf$cbOcW;7BWi2_z)K53`hi z=JTv%%uA$|9+;)d{V6>#OCc`=+R%crxAa3b%S%zSO!6dZmY0z{)yBQsuJ8;qE(=Q0 zk~PcAlxT^X<#w}AidNAC729~pw)hQn?JCYLYnIy=)hxGvsAjo6(jz2Mlq|0xNvuX1 znM^^#GmPimeHaJ7{E1TKE?KJV-F1a$=-;J1Q6!&TkWaY|lnmbWp;G0pg{8_p z|Jzb!FU?GrD);D8y3kKQ+`wKnvXWsf~aZ zM(x8!*es~95e5+WAJv6qC?wkMbw(K&n-$T$^CYs4nv*FUTlhjQsq79c!p`x_K;B zpiLNKjk5G)neiG}dh+v=&tr}9dEhtY(^*sKl}!VKj8oZkLy~gTy(~CO)bot%G0E>S zjxk9)iBjT8)I2P_f-QRS%yC`dPUSsbR-7y{o>Zy?EsQjY6I+f1;Idwg#M_Wzv7mOF z93x&%oU9+FoH%)Z0I-v z`x9*0q_RF_S@0%!toucOz?LntEO?7@g~+ntEy@)l%YwHkR|txJskT~_1#i>iQ(nY2 zh1X>>q0E#d08NI_7v(ElPpP>M2GCR`nt@W|aP9=k+;8**@5;&|2Q z`;@#O#&Lv1bP(fmmAoK>7?-O`I2pvayi_L7${@z&h~G#uOm&4Qyi58K2_a9%6{_+M zE&5Sa-k}9Pu27YC2=IigkL&5^9Qn8kk>MwheZ0h*jv(I0^>k>QFcU%z+9r8APN+N$ zJ1Gv>6Dm;yKT=nfs9{r_^`uJFKm&9q_2hKUo>Yk%_zh$yRicJXfWRvcL<3|=iGcB{ z6m?Bj$VEoWN}`GSKnm2`cpv+eVRndXr_hqka<7Rn{wX86)NA5ums7^_c17xhaMzbP zp?<`zk<@JRnjk%G#7Dg*NKYGU$H{bX#D!MZcg~N0jh!*fn+^WXDStSp+f6?zZ~op* zcXJjR{On0o!}ULf%(urAK)E-(6v*ahf51Zg@q1V#{JlaqXIv+ynpvm^gv4DdfZgrM7P_pw3#{KL%Uecxq4{vY?D z(y!qO{IBeOK=hX%W;r#2uPE_Vd>&ukEcB}L_I+&9$UJ4a3@wqR8!F?J$s1H9m63AM zEYm!F3p{&r~ym!6@wqCmrHE^GPgtY~ummN6v(de;{&hW<` zWAQe@Q7Lg$cpgV$7_styYPl{kBCDT5QCaL1zYi$wy!xif2f@c@%@8fBSDX|%WukS| zYeuK|6K7HNS^fxf7Vvh{qiorEyz!=Qu}GC6#+=mB<}@d$ta0k)%H`f~%zLzx?9 z4&s-n+8L2*KKE@_+BraSd{heZALT^#hb$BM*sn{Z6@PciioYsZB=s_R6>@M!$dq2# z(Ya=0B+Hv|@fEvdgXJoPE7M86Aq^YCFYObYl8o z)=c!kQ4}Q~{@8&dGyCE$f9JFQWqj)`tRUju;7B^W09H%47!o?Xkl+3#e;eJa5#V>- z!tz?ZAS9{nLcnfZ??DQ-7=IUl&Kx=tis4hdxRQyo@ zJ8IVRedkzfGK!nufq3Pg1hAsG_+7Oycog@(qrOz!>>si#>}tB`f5D#vkdIP5me_Rx zBunW(1z?K@fQA?WTD8G!vm%M8r)tEV13d2`XvyY>SV6J@f1E(hO<8FT_}c`k1x_09 zrwQadxbNR?w3|In)ZYYdxhQY@uU7cfP5tRp&mVUzsHYB*U-xc zF9A7XK%6kc=7be_%82rVkF&o?4&#p#$ag2eJdD3hpjw!D7=M~Tj*I*L?N#=uH?#Vi z0P<0)$Cy3t&1{L8#e>humB0v7<_;@zrAaFx)LV3VAOGFM>^J;hA7c(8E3g;>qEH@; z;&K3MDoc1Hs0D7O>Q^XkD0gF{y~X23{apb0NOD6xw%Xf0Zp7aNkPo=z1{KTG=0#TI zQ<59#)~~+*2s0!ngaxMcy5J84Skro4$e^Cq>w=rU>H z{9yq3;C=Z;fCy&I%dE)13JD<%$Jt}-S4pzCXZ3~&fQebXVaWcT)f*;&Ddy}W9uooi z7YgJf$prN{YG3Lx5fC3oJot@d0)GeO3iB$%io7McI5Ni{dV;-`q&%@Jv}`(H;tDOB zqWWsa~Hka5JgL z3lqGkM-5`D1Vgy3)V$3|T9INBSsWw~SRAGFp98bVl%3s6m!nHI;B~-lrh#;?2_|ne zG9q3ROx|cLS*n-}g2~Sr_MdAegNjM@P%=rqZZ_H zN$Pc{VSmNrF%A2RJ}W(&FMN_+^o!87nQq?U=~+62&-x3bLTY-S-)$clk5)CN7`#;wfa{WT;FxnMayYSbRFm7UR>yIaxP=6TzK=<4VGbF5&zLQ zgA>_d77|PfH*g{DQ@?SqThN4o3RRE?Kj7sHL((yY76vLrVmDoA3*jiiC0+;a39e0+ zuuL(K@c5Q$Cn2TYc@BB$_$^hp8%W1*DK0*tMS|NFsm{vuLIY%F+S;Y%FN43DUIo8_ zgEASxKnu%X4zgPL8<}(EnvTXqjh&*SZ&E(L{odfi4c4=zE}#CVU_NhtB^cyy{4$99 zx3%b9{7Ud9JNQJd6utfri{6Ev=;iUAH-Z;J^ki|u{}<6KkfK-OWuFPrL*n%U(Tnjb z3*7poloLo979v9xQ{o(@=#X^rqaj+JaMJxVnL5}jt8=R;k2!Uv8+n#f zSGtjBITzVIvjP&^VY;IDLLg4MM|7OO_jkd)$*_vMU`t{nnewZlfl&(;Gji`12IU12 za_<&qWeaAIYC^FxnM;EPzE_b_CTL-hBK5t{qMjicgF*|ep*SH8wV2|TrBd9+_tr0h ztCFP)6LQN;opg(_$`nIV2b8GF6b+>Lbbxbn&}rS_`PaTHR7H3*~7A_(nO zs{+?jdwDlWpani^b(Dh^p%zgNNe1mzhkYX!0lEy+d9gnkovPC=NZQtQYTtBCn9abx*Lez*piI&*wNxT8M%wj6794(9z%aKt|v@m%L z!5ujYxNK0nNZyL;UFIx9P2OeBXn~9_bCzTnzfqIXUiT6@EK?xcMjfD`&EBZ#u-Ti` z-`+rw2y{(a!P91M!l#qUpEi3F0)KKk1W@8?d&xU)E4``SJr~lOy3~>5OK<8@4Bv*~ zVPmxW`i)3kbP82fWQxYHS!X?(OawSJ z8N{wvlabibEx!T8u21P1zYx1VO-Ewarwa1$8_4?RANXZ(>&gEG D4X7_M diff --git a/managed/models/service_helpers.go b/managed/models/service_helpers.go index f0ec8abf95e..ba06664aa42 100644 --- a/managed/models/service_helpers.go +++ b/managed/models/service_helpers.go @@ -72,7 +72,7 @@ func validateDBConnectionOptions(socket, host *string, port *uint16) error { } if port == nil { - return status.Errorf(codes.InvalidArgument, "Port are expected to be passed with address.") + return status.Errorf(codes.InvalidArgument, "Port is expected to be passed along with the host address.") } } diff --git a/managed/services/agents/connection_checker.go b/managed/services/agents/connection_checker.go index 150e9a8a471..7fdc784fa1d 100644 --- a/managed/services/agents/connection_checker.go +++ b/managed/services/agents/connection_checker.go @@ -99,11 +99,8 @@ func (c *ConnectionChecker) CheckConnectionToService(ctx context.Context, q *ref l.Infof("CheckConnection response: %+v.", resp) switch service.ServiceType { - case models.MySQLServiceType: - if err != nil { - l.Warnf("Failed to check if serviceInfoBroker is supported: %s.", err) - } - case models.ExternalServiceType, + case models.MySQLServiceType, + models.ExternalServiceType, models.HAProxyServiceType, models.PostgreSQLServiceType, models.MongoDBServiceType, diff --git a/managed/services/agents/mysql.go b/managed/services/agents/mysql.go index 8824e82689c..80678e6d82d 100644 --- a/managed/services/agents/mysql.go +++ b/managed/services/agents/mysql.go @@ -31,7 +31,7 @@ import ( var mysqlExporterVersionWithPluginCollector = version.MustParse("2.36.0-0") -// mysqldExporterConfig returns desired configuration of mysqld_exporter process. +// The mysqldExporterConfig returns desired configuration of mysqld_exporter process. func mysqldExporterConfig( node *models.Node, diff --git a/managed/services/agents/postgresql_test.go b/managed/services/agents/postgresql_test.go index 1739da3a677..0875eca60f8 100644 --- a/managed/services/agents/postgresql_test.go +++ b/managed/services/agents/postgresql_test.go @@ -114,7 +114,7 @@ func (s *PostgresExporterConfigTestSuite) TestEmptyPassword() { actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") - s.Assert().Equal("DATA_SOURCE_NAME=postgres://username@1.2.3.4:5432/postgres?connect_timeout=1&sslmode=disable", actual.Env[0]) + s.Equal("DATA_SOURCE_NAME=postgres://username@1.2.3.4:5432/postgres?connect_timeout=1&sslmode=disable", actual.Env[0]) } func (s *PostgresExporterConfigTestSuite) TestEmptyUsername() { @@ -123,7 +123,7 @@ func (s *PostgresExporterConfigTestSuite) TestEmptyUsername() { actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") - s.Assert().Equal("DATA_SOURCE_NAME=postgres://:s3cur3%20p%40$$w0r4.@1.2.3.4:5432/postgres?connect_timeout=1&sslmode=disable", actual.Env[0]) + s.Equal("DATA_SOURCE_NAME=postgres://:s3cur3%20p%40$$w0r4.@1.2.3.4:5432/postgres?connect_timeout=1&sslmode=disable", actual.Env[0]) } func (s *PostgresExporterConfigTestSuite) TestEmptyUsernameAndPassword() { @@ -133,7 +133,7 @@ func (s *PostgresExporterConfigTestSuite) TestEmptyUsernameAndPassword() { actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") - s.Assert().Equal("DATA_SOURCE_NAME=postgres://1.2.3.4:5432/postgres?connect_timeout=1&sslmode=disable", actual.Env[0]) + s.Equal("DATA_SOURCE_NAME=postgres://1.2.3.4:5432/postgres?connect_timeout=1&sslmode=disable", actual.Env[0]) } func (s *PostgresExporterConfigTestSuite) TestSocket() { @@ -146,7 +146,7 @@ func (s *PostgresExporterConfigTestSuite) TestSocket() { actual, err := postgresExporterConfig(s.node, s.postgresql, s.exporter, exposeSecrets, s.pmmAgentVersion) s.NoError(err, "Failed to create exporter config") - s.Assert().Equal("DATA_SOURCE_NAME=postgres:///postgres?connect_timeout=1&host=%2Fvar%2Frun%2Fpostgres&sslmode=disable", actual.Env[0]) + s.Equal("DATA_SOURCE_NAME=postgres:///postgres?connect_timeout=1&host=%2Fvar%2Frun%2Fpostgres&sslmode=disable", actual.Env[0]) } func (s *PostgresExporterConfigTestSuite) TestDisabledCollectors() { diff --git a/managed/services/agents/service_info_broker.go b/managed/services/agents/service_info_broker.go index 49bd7b1918b..de3296d3c7b 100644 --- a/managed/services/agents/service_info_broker.go +++ b/managed/services/agents/service_info_broker.go @@ -32,11 +32,8 @@ import ( inventoryv1 "github.com/percona/pmm/api/inventory/v1" "github.com/percona/pmm/managed/models" "github.com/percona/pmm/utils/logger" - "github.com/percona/pmm/version" ) -var sericeInfoBrokerPMMVersion = version.MustParse("2.40.99") - // ServiceInfoBroker helps query various information from services. type ServiceInfoBroker struct { r *Registry diff --git a/managed/services/grafana/auth_server.go b/managed/services/grafana/auth_server.go index 2dcf495421f..93324a9c246 100644 --- a/managed/services/grafana/auth_server.go +++ b/managed/services/grafana/auth_server.go @@ -53,13 +53,14 @@ var rules = map[string]role{ "/server.": admin, // TODO: do we need it for older agents? "/server.v1.": admin, "/qan.v1.CollectorService.": viewer, + "/qan.v1.QANService.": viewer, "/v1/alerting": viewer, "/v1/backup": admin, "/v1/dump": admin, "/v1/role": admin, "/v1/inventory/": admin, - "/v1/inventory/Services/ListTypes": viewer, + "/v1/inventory/services:getTypes": viewer, "/v1/management/": admin, "/v1/actions/": viewer, "/v1/management/Jobs": viewer, diff --git a/managed/services/grafana/auth_server_test.go b/managed/services/grafana/auth_server_test.go index 31054faeac9..85fc3f37ae0 100644 --- a/managed/services/grafana/auth_server_test.go +++ b/managed/services/grafana/auth_server_test.go @@ -201,17 +201,17 @@ func TestAuthServerAuthenticate(t *testing.T) { for uri, minRole := range map[string]role{ "/agent.v1.AgentService/Connect": none, - "/inventory.Nodes/ListNodes": admin, - "/actions/StartMySQLShowTableStatusAction": viewer, - "/management.Service/RemoveService": admin, - "/management.Service/ListServices": admin, - "/management.Annotation/AddAnnotation": admin, - "/server.v1.ServerService/CheckUpdates": viewer, - "/server.v1.ServerService/StartUpdate": admin, - "/server.v1.ServerService/UpdateStatus": none, - "/server.v1.ServerService/AWSInstanceCheck": none, - - "/v1/inventory/Nodes/List": admin, + "/inventory.v1.Nodes/ListNodes": admin, + "/actions/StartMySQLShowTableStatusAction": viewer, + "/management.v1.ManagementService/RemoveService": admin, + "/management.v1.ManagementService/ListServices": admin, + "/management.v1.ManagementService/AddAnnotation": admin, + "/server.v1.ServerService/CheckUpdates": viewer, + "/server.v1.ServerService/StartUpdate": admin, + "/server.v1.ServerService/UpdateStatus": none, + "/server.v1.ServerService/AWSInstanceCheck": none, + + "/v1/inventory/nodes": admin, "/v1/actions/StartMySQLShowTableStatus": viewer, "/v1/management/Service/Remove": admin, "/v1/management/Service/List": admin, diff --git a/managed/services/management/external.go b/managed/services/management/external.go index 0ed63c3ee4e..e9e8f8cc985 100644 --- a/managed/services/management/external.go +++ b/managed/services/management/external.go @@ -29,10 +29,10 @@ import ( ) // AddExternal adds an external service based on the provided request. -func (s *ManagementService) AddExternal(ctx context.Context, req *managementv1.AddExternalRequest) (*managementv1.AddExternalResponse, error) { - res := &managementv1.AddExternalResponse{} +func (s *ManagementService) AddExternal(ctx context.Context, req *managementv1.AddExternalServiceParams) (*managementv1.AddServiceResponse, error) { + res := &managementv1.AddServiceResponse{} var pmmAgentID *string - if e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { + errTx := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { if (req.NodeId == "") != (req.RunsOnNodeId == "") { return status.Error(codes.InvalidArgument, "runs_on_node_id and node_id should be specified together.") } @@ -66,7 +66,6 @@ func (s *ManagementService) AddExternal(ctx context.Context, req *managementv1.A if err != nil { return err } - res.Service = invService.(*inventoryv1.ExternalService) //nolint:forcetypeassert if req.MetricsMode == managementv1.MetricsMode_METRICS_MODE_UNSPECIFIED { agentIDs, err := models.FindPMMAgentsRunningOnNode(tx.Querier, req.RunsOnNodeId) @@ -107,19 +106,28 @@ func (s *ManagementService) AddExternal(ctx context.Context, req *managementv1.A if err != nil { return err } - res.ExternalExporter = agent.(*inventoryv1.ExternalExporter) //nolint:forcetypeassert + + res.Service = &managementv1.AddServiceResponse_External{ + External: &managementv1.ExternalServiceResult{ + Service: invService.(*inventoryv1.ExternalService), //nolint:forcetypeassert + ExternalExporter: agent.(*inventoryv1.ExternalExporter), //nolint:forcetypeassert + }, + } pmmAgentID = row.PMMAgentID return nil - }); e != nil { - return nil, e + }) + if errTx != nil { + return nil, errTx } - // we have to trigger after transaction + + // we have to trigger these once the transaction completes if pmmAgentID != nil { // It's required to regenerate victoriametrics config file. s.state.RequestStateUpdate(ctx, *pmmAgentID) } else { s.vmdb.RequestConfigurationUpdate() } + return res, nil } diff --git a/managed/services/management/mongodb.go b/managed/services/management/mongodb.go index ed8eb242a26..8ec1d09a8c7 100644 --- a/managed/services/management/mongodb.go +++ b/managed/services/management/mongodb.go @@ -28,8 +28,8 @@ import ( ) // AddMongoDB adds "MongoDB Service", "MongoDB Exporter Agent" and "QAN MongoDB Profiler". -func (s *ManagementService) AddMongoDB(ctx context.Context, req *managementv1.AddMongoDBRequest) (*managementv1.AddMongoDBResponse, error) { - res := &managementv1.AddMongoDBResponse{} +func (s *ManagementService) AddMongoDB(ctx context.Context, req *managementv1.AddMongoDBServiceParams) (*managementv1.AddServiceResponse, error) { + mongodb := &managementv1.MongoDBServiceResult{} if e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { nodeID, err := nodeID(tx, req.NodeId, req.NodeName, req.AddNode, req.Address) @@ -55,7 +55,7 @@ func (s *ManagementService) AddMongoDB(ctx context.Context, req *managementv1.Ad if err != nil { return err } - res.Service = invService.(*inventoryv1.MongoDBService) //nolint:forcetypeassert + mongodb.Service = invService.(*inventoryv1.MongoDBService) //nolint:forcetypeassert mongoDBOptions := models.MongoDBOptionsFromRequest(req) @@ -96,7 +96,7 @@ func (s *ManagementService) AddMongoDB(ctx context.Context, req *managementv1.Ad if err != nil { return err } - res.MongodbExporter = agent.(*inventoryv1.MongoDBExporter) //nolint:forcetypeassert + mongodb.MongodbExporter = agent.(*inventoryv1.MongoDBExporter) //nolint:forcetypeassert if req.QanMongodbProfiler { row, err = models.CreateAgent(tx.Querier, models.QANMongoDBProfilerAgentType, &models.CreateAgentParams{ @@ -119,7 +119,7 @@ func (s *ManagementService) AddMongoDB(ctx context.Context, req *managementv1.Ad if err != nil { return err } - res.QanMongodbProfiler = agent.(*inventoryv1.QANMongoDBProfilerAgent) //nolint:forcetypeassert + mongodb.QanMongodbProfiler = agent.(*inventoryv1.QANMongoDBProfilerAgent) //nolint:forcetypeassert } return nil @@ -130,5 +130,11 @@ func (s *ManagementService) AddMongoDB(ctx context.Context, req *managementv1.Ad s.state.RequestStateUpdate(ctx, req.PmmAgentId) s.vc.RequestSoftwareVersionsUpdate() + res := &managementv1.AddServiceResponse{ + Service: &managementv1.AddServiceResponse_Mongodb{ + Mongodb: mongodb, + }, + } + return res, nil } diff --git a/managed/services/management/mysql.go b/managed/services/management/mysql.go index 16713a79a2a..3c3d77e0e6d 100644 --- a/managed/services/management/mysql.go +++ b/managed/services/management/mysql.go @@ -33,10 +33,10 @@ const ( ) // AddMySQL adds "MySQL Service", "MySQL Exporter Agent" and "QAN MySQL PerfSchema Agent". -func (s *ManagementService) AddMySQL(ctx context.Context, req *managementv1.AddMySQLRequest) (*managementv1.AddMySQLResponse, error) { - res := &managementv1.AddMySQLResponse{} +func (s *ManagementService) AddMySQL(ctx context.Context, req *managementv1.AddMySQLServiceParams) (*managementv1.AddServiceResponse, error) { + mysql := &managementv1.MySQLServiceResult{} - if e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { + errTx := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { // tweak according to API docs tablestatsGroupTableLimit := req.TablestatsGroupTableLimit if tablestatsGroupTableLimit == 0 { @@ -79,7 +79,7 @@ func (s *ManagementService) AddMySQL(ctx context.Context, req *managementv1.AddM if err != nil { return err } - res.Service = invService.(*inventoryv1.MySQLService) //nolint:forcetypeassert + mysql.Service = invService.(*inventoryv1.MySQLService) //nolint:forcetypeassert req.MetricsMode, err = supportedMetricsMode(tx.Querier, req.MetricsMode, req.PmmAgentId) if err != nil { @@ -113,14 +113,14 @@ func (s *ManagementService) AddMySQL(ctx context.Context, req *managementv1.AddM return err } // GetInfoFromService updates the table count in row so, let's also update the response - res.TableCount = *row.TableCount + mysql.TableCount = *row.TableCount } agent, err := services.ToAPIAgent(tx.Querier, row) if err != nil { return err } - res.MysqldExporter = agent.(*inventoryv1.MySQLdExporter) //nolint:forcetypeassert + mysql.MysqldExporter = agent.(*inventoryv1.MySQLdExporter) //nolint:forcetypeassert if req.QanMysqlPerfschema { row, err = models.CreateAgent(tx.Querier, models.QANMySQLPerfSchemaAgentType, &models.CreateAgentParams{ @@ -144,7 +144,7 @@ func (s *ManagementService) AddMySQL(ctx context.Context, req *managementv1.AddM if err != nil { return err } - res.QanMysqlPerfschema = agent.(*inventoryv1.QANMySQLPerfSchemaAgent) //nolint:forcetypeassert + mysql.QanMysqlPerfschema = agent.(*inventoryv1.QANMySQLPerfSchemaAgent) //nolint:forcetypeassert } if req.QanMysqlSlowlog { @@ -170,16 +170,24 @@ func (s *ManagementService) AddMySQL(ctx context.Context, req *managementv1.AddM if err != nil { return err } - res.QanMysqlSlowlog = agent.(*inventoryv1.QANMySQLSlowlogAgent) //nolint:forcetypeassert + mysql.QanMysqlSlowlog = agent.(*inventoryv1.QANMySQLSlowlogAgent) //nolint:forcetypeassert } return nil - }); e != nil { - return nil, e + }) + + if errTx != nil { + return nil, errTx } s.state.RequestStateUpdate(ctx, req.PmmAgentId) s.vc.RequestSoftwareVersionsUpdate() + res := &managementv1.AddServiceResponse{ + Service: &managementv1.AddServiceResponse_Mysql{ + Mysql: mysql, + }, + } + return res, nil } diff --git a/managed/services/management/postgresql.go b/managed/services/management/postgresql.go index 6f60c5fc760..859ac450af0 100644 --- a/managed/services/management/postgresql.go +++ b/managed/services/management/postgresql.go @@ -28,10 +28,10 @@ import ( ) // AddPostgreSQL adds "PostgreSQL Service", "PostgreSQL Exporter Agent" and "QAN PostgreSQL PerfSchema Agent". -func (s *ManagementService) AddPostgreSQL(ctx context.Context, req *managementv1.AddPostgreSQLRequest) (*managementv1.AddPostgreSQLResponse, error) { - res := &managementv1.AddPostgreSQLResponse{} +func (s *ManagementService) AddPostgreSQL(ctx context.Context, req *managementv1.AddPostgreSQLServiceParams) (*managementv1.AddServiceResponse, error) { + postgres := &managementv1.PostgreSQLServiceResult{} - if e := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { + errTx := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { nodeID, err := nodeID(tx, req.NodeId, req.NodeName, req.AddNode, req.Address) if err != nil { return err @@ -57,7 +57,7 @@ func (s *ManagementService) AddPostgreSQL(ctx context.Context, req *managementv1 if err != nil { return err } - res.Service = invService.(*inventoryv1.PostgreSQLService) //nolint:forcetypeassert + postgres.Service = invService.(*inventoryv1.PostgreSQLService) //nolint:forcetypeassert req.MetricsMode, err = supportedMetricsMode(tx.Querier, req.MetricsMode, req.PmmAgentId) if err != nil { @@ -94,7 +94,7 @@ func (s *ManagementService) AddPostgreSQL(ctx context.Context, req *managementv1 // In case of not available PGSM extension it is switch to PGSS. if req.QanPostgresqlPgstatmonitorAgent && row.PostgreSQLOptions.PGSMVersion == "" { - res.Warning = "Could not to detect the pg_stat_monitor extension on your system. Falling back to the pg_stat_statements." + postgres.Warning = "Could not to detect the pg_stat_monitor extension on your system. Falling back to the pg_stat_statements." req.QanPostgresqlPgstatementsAgent = true req.QanPostgresqlPgstatmonitorAgent = false } @@ -104,7 +104,7 @@ func (s *ManagementService) AddPostgreSQL(ctx context.Context, req *managementv1 if err != nil { return err } - res.PostgresExporter = agent.(*inventoryv1.PostgresExporter) //nolint:forcetypeassert + postgres.PostgresExporter = agent.(*inventoryv1.PostgresExporter) //nolint:forcetypeassert if req.QanPostgresqlPgstatementsAgent { row, err = models.CreateAgent(tx.Querier, models.QANPostgreSQLPgStatementsAgentType, &models.CreateAgentParams{ @@ -128,7 +128,7 @@ func (s *ManagementService) AddPostgreSQL(ctx context.Context, req *managementv1 if err != nil { return err } - res.QanPostgresqlPgstatementsAgent = agent.(*inventoryv1.QANPostgreSQLPgStatementsAgent) //nolint:forcetypeassert + postgres.QanPostgresqlPgstatementsAgent = agent.(*inventoryv1.QANPostgreSQLPgStatementsAgent) //nolint:forcetypeassert } if req.QanPostgresqlPgstatmonitorAgent { @@ -153,14 +153,23 @@ func (s *ManagementService) AddPostgreSQL(ctx context.Context, req *managementv1 if err != nil { return err } - res.QanPostgresqlPgstatmonitorAgent = agent.(*inventoryv1.QANPostgreSQLPgStatMonitorAgent) //nolint:forcetypeassert + postgres.QanPostgresqlPgstatmonitorAgent = agent.(*inventoryv1.QANPostgreSQLPgStatMonitorAgent) //nolint:forcetypeassert } return nil - }); e != nil { - return nil, e + }) + + if errTx != nil { + return nil, errTx } s.state.RequestStateUpdate(ctx, req.PmmAgentId) + + res := &managementv1.AddServiceResponse{ + Service: &managementv1.AddServiceResponse_Postgresql{ + Postgresql: postgres, + }, + } + return res, nil } diff --git a/managed/services/management/service.go b/managed/services/management/service.go index 1d18d953f2c..24c25adaf11 100644 --- a/managed/services/management/service.go +++ b/managed/services/management/service.go @@ -19,6 +19,7 @@ import ( "context" "github.com/AlekSi/pointer" + "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "gopkg.in/reform.v1" @@ -66,7 +67,23 @@ func NewManagementService( } } -// RemoveService removes Service with Agents. +// AddService add a Service and its Agents. +func (s *ManagementService) AddService(ctx context.Context, req *managementv1.AddServiceRequest) (*managementv1.AddServiceResponse, error) { + switch req.Service.(type) { + case *managementv1.AddServiceRequest_Mysql: + return s.AddMySQL(ctx, req.GetMysql()) + case *managementv1.AddServiceRequest_External: + return s.AddExternal(ctx, req.GetExternal()) + case *managementv1.AddServiceRequest_Mongodb: + return s.AddMongoDB(ctx, req.GetMongodb()) + case *managementv1.AddServiceRequest_Postgresql: + return s.AddPostgreSQL(ctx, req.GetPostgresql()) + default: + return nil, errors.Errorf("invalid request %v", req.GetService()) + } +} + +// RemoveService removes a Service along with its Agents. func (s *ManagementService) RemoveService(ctx context.Context, req *managementv1.RemoveServiceRequest) (*managementv1.RemoveServiceResponse, error) { err := s.validateRequest(req) if err != nil { @@ -75,18 +92,20 @@ func (s *ManagementService) RemoveService(ctx context.Context, req *managementv1 pmmAgentIDs := make(map[string]struct{}) var reloadPrometheusConfig bool - errTX := s.db.InTransaction(func(tx *reform.TX) error { + errTX := s.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { var service *models.Service var err error - switch { - case req.ServiceName != "": - service, err = models.FindServiceByName(tx.Querier, req.ServiceName) - case req.ServiceId != "": - service, err = models.FindServiceByID(tx.Querier, req.ServiceId) + + if LooksLikeID(req.ServiceId) { + service, err = models.FindServiceByID(tx.Querier, models.NormalizeServiceID(req.ServiceId)) + } else { + // if it's not a service ID, it is a service name then + service, err = models.FindServiceByName(tx.Querier, req.ServiceId) } if err != nil { return err } + if req.ServiceType != inventoryv1.ServiceType_SERVICE_TYPE_UNSPECIFIED { err := s.checkServiceType(service, req.ServiceType) if err != nil { @@ -120,7 +139,7 @@ func (s *ManagementService) RemoveService(ctx context.Context, req *managementv1 return err } - // For RDS and Azure remove also node. + // For RDS and Azure we also want to remove the node. if node.NodeType == models.RemoteRDSNodeType || node.NodeType == models.RemoteAzureDatabaseNodeType { agents, err = models.FindAgents(tx.Querier, models.AgentFilters{NodeID: node.NodeID}) if err != nil { @@ -168,11 +187,8 @@ func (s *ManagementService) checkServiceType(service *models.Service, serviceTyp } func (s *ManagementService) validateRequest(request *managementv1.RemoveServiceRequest) error { - if request.ServiceName == "" && request.ServiceId == "" { + if request.ServiceId == "" { return status.Error(codes.InvalidArgument, "service_id or service_name expected") } - if request.ServiceName != "" && request.ServiceId != "" { - return status.Error(codes.InvalidArgument, "service_id or service_name expected; not both") - } return nil } diff --git a/managed/services/management/service_test.go b/managed/services/management/service_test.go index e4d1834e254..bdf3e073c63 100644 --- a/managed/services/management/service_test.go +++ b/managed/services/management/service_test.go @@ -96,20 +96,11 @@ func TestServiceService(t *testing.T) { tests.AssertGRPCError(t, status.New(codes.InvalidArgument, `service_id or service_name expected`), err) }) - t.Run("Both params", func(t *testing.T) { - ctx, s, teardown, _ := setup(t) - defer teardown(t) - - response, err := s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceId: "some-id", ServiceName: "some-service-name"}) - assert.Nil(t, response) - tests.AssertGRPCError(t, status.New(codes.InvalidArgument, `service_id or service_name expected; not both`), err) - }) - t.Run("Not found", func(t *testing.T) { ctx, s, teardown, _ := setup(t) defer teardown(t) - response, err := s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceName: "some-service-name"}) + response, err := s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceId: "some-service-name"}) assert.Nil(t, response) tests.AssertGRPCError(t, status.New(codes.NotFound, `Service with name "some-service-name" not found.`), err) }) @@ -156,7 +147,7 @@ func TestServiceService(t *testing.T) { require.NoError(t, err) s.state.(*mockAgentsStateUpdater).On("RequestStateUpdate", ctx, pmmAgent.AgentID) - response, err := s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceName: service.ServiceName, ServiceType: inventoryv1.ServiceType_SERVICE_TYPE_MYSQL_SERVICE}) + response, err := s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceId: service.ServiceName, ServiceType: inventoryv1.ServiceType_SERVICE_TYPE_MYSQL_SERVICE}) assert.NotNil(t, response) assert.NoError(t, err) @@ -207,7 +198,7 @@ func TestServiceService(t *testing.T) { require.NoError(t, err) s.state.(*mockAgentsStateUpdater).On("RequestStateUpdate", ctx, pmmAgent.AgentID) - _, err = s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceName: service.ServiceName, ServiceType: inventoryv1.ServiceType_SERVICE_TYPE_MYSQL_SERVICE}) + _, err = s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceId: service.ServiceName, ServiceType: inventoryv1.ServiceType_SERVICE_TYPE_MYSQL_SERVICE}) assert.NoError(t, err) _, err = models.FindServiceByID(s.db.Querier, service.ServiceID) @@ -261,7 +252,7 @@ func TestServiceService(t *testing.T) { require.NoError(t, err) s.state.(*mockAgentsStateUpdater).On("RequestStateUpdate", ctx, pmmAgent.AgentID) - _, err = s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceName: service.ServiceName, ServiceType: inventoryv1.ServiceType_SERVICE_TYPE_MYSQL_SERVICE}) + _, err = s.RemoveService(ctx, &managementv1.RemoveServiceRequest{ServiceId: service.ServiceName, ServiceType: inventoryv1.ServiceType_SERVICE_TYPE_MYSQL_SERVICE}) assert.NoError(t, err) _, err = models.FindServiceByID(s.db.Querier, service.ServiceID) diff --git a/managed/services/management/utils.go b/managed/services/management/utils.go index 246535709d4..3988236c054 100644 --- a/managed/services/management/utils.go +++ b/managed/services/management/utils.go @@ -16,6 +16,8 @@ package management import ( + "regexp" + "github.com/AlekSi/pointer" "github.com/percona/pmm/managed/models" @@ -35,3 +37,9 @@ func IsVMAgent(agent *models.Agent, service *models.Service) bool { func IsServiceAgent(agent *models.Agent, service *models.Service) bool { return agent.ServiceID != nil && pointer.GetString(agent.ServiceID) == service.ServiceID } + +// LooksLikeID checks if a string contains a UUID substring in it. +func LooksLikeID(serviceID string) bool { + r := regexp.MustCompile(`[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$`) + return r.MatchString(serviceID) +}