diff --git a/admin/Makefile b/admin/Makefile index d5572464c3f..e73a2bb741d 100644 --- a/admin/Makefile +++ b/admin/Makefile @@ -30,13 +30,24 @@ gen: clean ## Generate files clean: ## Remove generated files find . -name *_reform.go -delete -release: ## Build pmm-admin release binary +# Corrupted go-swagger output sometimes adds imports of .../json/models (no such package) and +# same-package self-imports; that breaks `go build` with import cycles. Catch early. +verify-swagger-client-imports: ## Fail if api json client *_parameters.go import bogus json/models + @bad=$$(find ../api -name '*_parameters.go' -exec grep -l 'github.com/percona/pmm/api/.*/json/models' {} + 2>/dev/null || true); \ + if [ -n "$$bad" ]; then \ + echo 'ERROR: These files import non-existent github.com/percona/pmm/api/.../json/models:'; \ + for f in $$bad; do echo " $$f"; done; \ + echo 'Remove those imports (request/response types are in the same package, e.g. *_responses.go).'; \ + exit 1; \ + fi + +release: verify-swagger-client-imports ## Build pmm-admin release binary CGO_ENABLED=0 go build -v $(LD_FLAGS) -o $(PMM_RELEASE_PATH)/pmm-admin ./cmd/pmm-admin/ -install: ## Install pmm & pmm-admin binary +install: verify-swagger-client-imports ## Install pmm & pmm-admin binary go build -v $(LD_FLAGS) -o $(GOBIN)/pmm-admin ./cmd/pmm-admin/ -install-race: ## Install pmm & pmm-admin binary with race detector +install-race: verify-swagger-client-imports ## Install pmm & pmm-admin binary with race detector go build -v $(LD_FLAGS) -race -o $(GOBIN)/pmm-admin ./cmd/pmm-admin/ TEST_FLAGS ?= -timeout=20s diff --git a/admin/commands/inventory/list_agents.go b/admin/commands/inventory/list_agents.go index 96258748b7d..e964d4edcc0 100644 --- a/admin/commands/inventory/list_agents.go +++ b/admin/commands/inventory/list_agents.go @@ -53,6 +53,7 @@ var acceptableAgentTypes = map[string][]string{ types.AgentTypeQANPostgreSQLPgStatMonitorAgent: {types.AgentTypeName(types.AgentTypeQANPostgreSQLPgStatMonitorAgent), "qan-postgresql-pgstatmonitor-agent"}, types.AgentTypeRDSExporter: {types.AgentTypeName(types.AgentTypeRDSExporter), "rds-exporter"}, types.AgentTypeRTAMongoDBAgent: {types.AgentTypeName(types.AgentTypeRTAMongoDBAgent), "rta-mongodb-agent"}, + types.AgentTypeOtelCollector: {types.AgentTypeName(types.AgentTypeOtelCollector), "otel-collector"}, } type listResultAgent struct { @@ -283,6 +284,18 @@ func (cmd *ListAgentsCommand) RunCmd() (commands.Result, error) { }) } + for _, a := range agentsRes.Payload.OtelCollector { + agentsList = append(agentsList, listResultAgent{ + AgentType: types.AgentTypeOtelCollector, + AgentID: a.AgentID, + PMMAgentID: a.PMMAgentID, + ServiceID: "", + Status: getAgentStatus(a.Status), + Disabled: a.Disabled, + Port: 0, + }) + } + return &listAgentsResult{ Agents: agentsList, }, nil diff --git a/admin/commands/list.go b/admin/commands/list.go index f5f29d42199..4bef3139b63 100644 --- a/admin/commands/list.go +++ b/admin/commands/list.go @@ -308,6 +308,7 @@ func agentsList(agentsRes *agents.ListAgentsOK, nodeID string) []listResultAgent agentsList = append(agentsList, vmAgents(agentsRes, pmmAgentIDs)...) agentsList = append(agentsList, nomadAgents(agentsRes, pmmAgentIDs)...) agentsList = append(agentsList, rtaMongodbAgents(agentsRes, pmmAgentIDs)...) + agentsList = append(agentsList, otelCollectors(agentsRes, pmmAgentIDs)...) return agentsList } @@ -619,3 +620,21 @@ func rtaMongodbAgents(agentsRes *agents.ListAgentsOK, pmmAgentIDs map[string]str return agentsList } + +func otelCollectors(agentsRes *agents.ListAgentsOK, pmmAgentIDs map[string]struct{}) []listResultAgent { + var agentsList []listResultAgent + for _, a := range agentsRes.Payload.OtelCollector { + if _, ok := pmmAgentIDs[a.PMMAgentID]; ok { + agentsList = append(agentsList, listResultAgent{ + AgentType: types.AgentTypeOtelCollector, + AgentID: a.AgentID, + ServiceID: "", + Status: getStatus(a.Status), + Disabled: a.Disabled, + MetricsMode: "", + Port: 0, + }) + } + } + return agentsList +} diff --git a/admin/commands/management/add.go b/admin/commands/management/add.go index f817ca4b1bb..2178487723c 100644 --- a/admin/commands/management/add.go +++ b/admin/commands/management/add.go @@ -29,6 +29,7 @@ type AddCommand struct { PostgreSQL AddPostgreSQLCommand `cmd:"" name:"postgresql" help:"Add PostgreSQL to monitoring"` Valkey AddValkeyCommand `cmd:"" name:"valkey" help:"Add Valkey to monitoring"` ProxySQL AddProxySQLCommand `cmd:"" name:"proxysql" help:"Add ProxySQL to monitoring"` + Otel AddOtelCommandGroup `cmd:"" name:"otel" help:"Create or update the single OTEL collector on this pmm-agent (logs, eBPF, traces)"` } // AddCommonFlags is used by Kong for CLI flags and commands. diff --git a/admin/commands/management/add_otel_ebpf.go b/admin/commands/management/add_otel_ebpf.go new file mode 100644 index 00000000000..21cf7708921 --- /dev/null +++ b/admin/commands/management/add_otel_ebpf.go @@ -0,0 +1,56 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package management + +import ( + agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" + + "github.com/percona/pmm/admin/commands" +) + +// AddOtelEbpfCommand enables eBPF-related labels on the single node OTEL collector. +type AddOtelEbpfCommand struct { + PMMAgentID string `help:"PMM Agent ID (default: local pmm-agent)"` + CustomLabels map[string]string `mapsep:"," help:"Extra custom labels merged with defaults"` +} + +// RunCmd implements eBPF label upsert. +func (cmd *AddOtelEbpfCommand) RunCmd() (commands.Result, error) { + pmmAgentID, err := resolvePMMAgentIDForOtel(cmd.PMMAgentID) + if err != nil { + return nil, err + } + + rows, err := ensureAtMostOneOtelCollector(pmmAgentID) + if err != nil { + return nil, err + } + + custom := *commands.ParseKeyValuePair(&cmd.CustomLabels) + if custom["pmm_ebpf_pipeline"] == "" { + custom["pmm_ebpf_pipeline"] = "v1" + } + + if len(rows) == 0 { + return addOtelCollectorAPI(&agents.AddAgentParamsBodyOtelCollector{ + PMMAgentID: pmmAgentID, + CustomLabels: custom, + }) + } + + return changeOtelCollectorAPI(rows[0].AgentID, &agents.ChangeAgentParamsBodyOtelCollector{ + MergeLabels: custom, + }) +} diff --git a/admin/commands/management/add_otel_group.go b/admin/commands/management/add_otel_group.go new file mode 100644 index 00000000000..47f0a88b148 --- /dev/null +++ b/admin/commands/management/add_otel_group.go @@ -0,0 +1,25 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package management + +// AddOtelCommandGroup groups subcommands that create or update the single otel_collector per pmm-agent. +// +// TODO(otel): Add `pmm-admin remove otel` (symmetric to `add otel`, e.g. logs-only vs whole collector) — planned soon. +// Until then, remove the otel_collector agent with `pmm-admin inventory remove agent `. +type AddOtelCommandGroup struct { + Logs AddOtelLogsCommand `cmd:"" name:"logs" help:"Add or update log file sources on the node OTEL collector"` + Ebpf AddOtelEbpfCommand `cmd:"" name:"ebpf" help:"Enable eBPF pipeline labels on the node OTEL collector (OTLP export unchanged)"` + Traces AddOtelTracesCommand `cmd:"" name:"traces" help:"Mark trace ingestion intent; collector already accepts OTLP traces on 4317/4318"` +} diff --git a/admin/commands/management/add_otel_helpers.go b/admin/commands/management/add_otel_helpers.go new file mode 100644 index 00000000000..f21e75bdd53 --- /dev/null +++ b/admin/commands/management/add_otel_helpers.go @@ -0,0 +1,200 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package management + +import ( + "fmt" + "strings" + + "github.com/percona/pmm/admin/agentlocal" + "github.com/percona/pmm/admin/commands" + "github.com/percona/pmm/api/inventory/v1/json/client" + agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" + "github.com/percona/pmm/api/inventory/v1/types" +) + +var otelUpsertResultT = commands.ParseTemplate(` +OTEL Collector {{ .Verb }}. +Agent ID : {{ .AgentID }} +PMM-Agent ID : {{ .PMMAgentID }} +Status : {{ .Status }} +Disabled : {{ .Disabled }} +`) + +// otelUpsertResult is printed after add or change otel_collector. +type otelUpsertResult struct { + Verb string + AgentID string + PMMAgentID string + Status string + Disabled bool +} + +func (res *otelUpsertResult) Result() {} + +func (res *otelUpsertResult) String() string { + return commands.RenderTemplate(otelUpsertResultT, res) +} + +func otelStatusString(s *string) string { + if s == nil { + return "" + } + return *s +} + +func resolvePMMAgentIDForOtel(explicit string) (string, error) { + if explicit != "" { + return explicit, nil + } + status, err := agentlocal.GetStatus(agentlocal.DoNotRequestNetworkInfo) + if err != nil { + return "", err + } + return status.AgentID, nil +} + +func listOtelCollectorsForPMMAgent(pmmAgentID string) ([]*agents.ListAgentsOKBodyOtelCollectorItems0, error) { + at := types.AgentTypeOtelCollector + params := agents.NewListAgentsParams(). + WithContext(commands.Ctx). + WithPMMAgentID(&pmmAgentID). + WithAgentType(&at) + resp, err := client.Default.AgentsService.ListAgents(params) + if err != nil { + return nil, err + } + if resp.Payload == nil { + return nil, nil + } + return resp.Payload.OtelCollector, nil +} + +func ensureAtMostOneOtelCollector(pmmAgentID string) ([]*agents.ListAgentsOKBodyOtelCollectorItems0, error) { + rows, err := listOtelCollectorsForPMMAgent(pmmAgentID) + if err != nil { + return nil, err + } + if len(rows) > 1 { + return nil, fmt.Errorf("multiple otel_collector agents exist for this pmm-agent; remove extras with `pmm-admin inventory remove agent` until only one remains") + } + return rows, nil +} + +func addOtelCollectorAPI(body *agents.AddAgentParamsBodyOtelCollector) (*otelUpsertResult, error) { + params := &agents.AddAgentParams{ + Body: agents.AddAgentBody{ + OtelCollector: body, + }, + Context: commands.Ctx, + } + resp, err := client.Default.AgentsService.AddAgent(params) + if err != nil { + return nil, err + } + a := resp.Payload.OtelCollector + return &otelUpsertResult{ + Verb: "created", + AgentID: a.AgentID, + PMMAgentID: a.PMMAgentID, + Status: otelStatusString(a.Status), + Disabled: a.Disabled, + }, nil +} + +func changeOtelCollectorAPI(agentID string, body *agents.ChangeAgentParamsBodyOtelCollector) (*otelUpsertResult, error) { + params := agents.NewChangeAgentParams(). + WithContext(commands.Ctx). + WithAgentID(agentID). + WithBody(agents.ChangeAgentBody{ + OtelCollector: body, + }) + resp, err := client.Default.AgentsService.ChangeAgent(params) + if err != nil { + return nil, err + } + a := resp.Payload.OtelCollector + return &otelUpsertResult{ + Verb: "updated", + AgentID: a.AgentID, + PMMAgentID: a.PMMAgentID, + Status: otelStatusString(a.Status), + Disabled: a.Disabled, + }, nil +} + +// appendLogSourcesFromCLI parses --log-sources and --log-file-paths / --parser-preset into swagger log source items. +func appendLogSourcesFromCLI(logSources string, logFilePaths []string, parserPreset string) ([]*agents.AddAgentParamsBodyOtelCollectorLogSourcesItems0, error) { + var out []*agents.AddAgentParamsBodyOtelCollectorLogSourcesItems0 + if logSources != "" { + for _, pair := range strings.Split(logSources, ",") { + pair = strings.TrimSpace(pair) + if pair == "" { + continue + } + path := pair + preset := "raw" + if idx := strings.Index(pair, ":"); idx >= 0 { + path = strings.TrimSpace(pair[:idx]) + preset = strings.TrimSpace(pair[idx+1:]) + if preset == "" { + preset = "raw" + } + } + if path != "" { + out = append(out, &agents.AddAgentParamsBodyOtelCollectorLogSourcesItems0{ + Path: path, + Preset: preset, + }) + } + } + return out, nil + } + if len(logFilePaths) == 0 { + return nil, nil + } + preset := parserPreset + if preset == "" { + preset = "raw" + } + for _, p := range logFilePaths { + p = strings.TrimSpace(p) + if p == "" { + continue + } + out = append(out, &agents.AddAgentParamsBodyOtelCollectorLogSourcesItems0{ + Path: p, + Preset: preset, + }) + } + return out, nil +} + +func toChangeAddLogSources(in []*agents.AddAgentParamsBodyOtelCollectorLogSourcesItems0) []*agents.ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0 { + if len(in) == 0 { + return nil + } + out := make([]*agents.ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0, 0, len(in)) + for _, e := range in { + if e == nil { + continue + } + out = append(out, &agents.ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0{ + Path: e.Path, + Preset: e.Preset, + }) + } + return out +} diff --git a/admin/commands/management/add_otel_logs.go b/admin/commands/management/add_otel_logs.go new file mode 100644 index 00000000000..39ccf59d361 --- /dev/null +++ b/admin/commands/management/add_otel_logs.go @@ -0,0 +1,73 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package management + +import ( + "fmt" + + "github.com/percona/pmm/admin/commands" + agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" +) + +// AddOtelLogsCommand adds or merges log sources (and optional labels) on the single otel_collector agent. +type AddOtelLogsCommand struct { + PMMAgentID string `help:"PMM Agent ID (default: local pmm-agent)"` + LogFilePaths []string `name:"log-file-paths" help:"Log file paths. Used with --parser-preset or as raw if --log-sources not set."` + LogSources string `name:"log-sources" help:"Comma-separated path:preset pairs (e.g. /var/log/mysql/error.log:mysql_error,/var/log/messages:syslog_mysql_systemd). Overrides --log-file-paths."` + ParserPreset string `name:"parser-preset" help:"Preset for all --log-file-paths when --log-sources is not set (built-ins include mysql_error, syslog_mysql_systemd, nginx_access, raw, …; UI: Configuration → OTEL)."` + CustomLabels map[string]string `mapsep:"," help:"Custom labels merged into the collector agent"` +} + +// RunCmd implements OTEL log source upsert. +func (cmd *AddOtelLogsCommand) RunCmd() (commands.Result, error) { + pmmAgentID, err := resolvePMMAgentIDForOtel(cmd.PMMAgentID) + if err != nil { + return nil, err + } + + rows, err := ensureAtMostOneOtelCollector(pmmAgentID) + if err != nil { + return nil, err + } + + srcItems, err := appendLogSourcesFromCLI(cmd.LogSources, cmd.LogFilePaths, cmd.ParserPreset) + if err != nil { + return nil, err + } + + custom := commands.ParseKeyValuePair(&cmd.CustomLabels) + + if len(rows) == 0 { + body := &agents.AddAgentParamsBodyOtelCollector{ + PMMAgentID: pmmAgentID, + CustomLabels: *custom, + } + if len(srcItems) > 0 { + body.LogSources = srcItems + } + return addOtelCollectorAPI(body) + } + + chBody := &agents.ChangeAgentParamsBodyOtelCollector{ + MergeLabels: *custom, + } + if len(srcItems) > 0 { + chBody.AddLogSources = toChangeAddLogSources(srcItems) + } + if len(chBody.MergeLabels) == 0 && len(chBody.AddLogSources) == 0 { + return nil, fmt.Errorf("nothing to change: set --log-sources, --log-file-paths, or --custom-labels") + } + return changeOtelCollectorAPI(rows[0].AgentID, chBody) +} diff --git a/admin/commands/management/add_otel_traces.go b/admin/commands/management/add_otel_traces.go new file mode 100644 index 00000000000..86ed212b405 --- /dev/null +++ b/admin/commands/management/add_otel_traces.go @@ -0,0 +1,56 @@ +// Copyright (C) 2023 Percona LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package management + +import ( + agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" + + "github.com/percona/pmm/admin/commands" +) + +// AddOtelTracesCommand records trace-ingestion intent via labels; OTLP receivers are already enabled on the collector. +type AddOtelTracesCommand struct { + PMMAgentID string `help:"PMM Agent ID (default: local pmm-agent)"` + CustomLabels map[string]string `mapsep:"," help:"Extra custom labels merged with defaults"` +} + +// RunCmd implements trace-policy label upsert. +func (cmd *AddOtelTracesCommand) RunCmd() (commands.Result, error) { + pmmAgentID, err := resolvePMMAgentIDForOtel(cmd.PMMAgentID) + if err != nil { + return nil, err + } + + rows, err := ensureAtMostOneOtelCollector(pmmAgentID) + if err != nil { + return nil, err + } + + custom := *commands.ParseKeyValuePair(&cmd.CustomLabels) + if custom["pmm_otlp_traces_enabled"] == "" { + custom["pmm_otlp_traces_enabled"] = "v1" + } + + if len(rows) == 0 { + return addOtelCollectorAPI(&agents.AddAgentParamsBodyOtelCollector{ + PMMAgentID: pmmAgentID, + CustomLabels: custom, + }) + } + + return changeOtelCollectorAPI(rows[0].AgentID, &agents.ChangeAgentParamsBodyOtelCollector{ + MergeLabels: custom, + }) +} diff --git a/admin/commands/management/remove.go b/admin/commands/management/remove.go index c7588cce40a..206f42243d0 100644 --- a/admin/commands/management/remove.go +++ b/admin/commands/management/remove.go @@ -39,6 +39,8 @@ func (res *removeServiceResult) String() string { } // RemoveCommand is used by Kong for CLI flags and commands. +// +// TODO(otel): `pmm-admin remove otel` is not implemented yet (planned soon); OTEL teardown today is via inventory. type RemoveCommand struct { ServiceType string `arg:"" enum:"${serviceTypesEnum}" help:"Service type, one of: ${enum}"` ServiceName string `arg:"" default:"" help:"Service name"` diff --git a/agent/agents/supervisor/supervisor.go b/agent/agents/supervisor/supervisor.go index 13e9f232319..b77c89d08fa 100644 --- a/agent/agents/supervisor/supervisor.go +++ b/agent/agents/supervisor/supervisor.go @@ -17,12 +17,14 @@ package supervisor import ( "context" + "encoding/base64" "fmt" "io" "os" "path/filepath" "runtime/pprof" "sort" + "strconv" "strings" "sync" "time" @@ -787,6 +789,15 @@ func (s *Supervisor) processParams(agentID string, agentProcess *agentv1.SetStat templateParams["nomad_data_dir"] = cfg.Paths.NomadDataDir processParams.Path = cfg.Paths.Nomad processParams.Env = append(processParams.Env, os.Environ()...) + case inventoryv1.AgentType_AGENT_TYPE_OTEL_COLLECTOR: + scheme := "https" + if cfg.Server.WithoutTLS { + scheme = "http" + } + templateParams["server_otlp_url"] = fmt.Sprintf("%s://%s/otlp", scheme, cfg.Server.Address) + templateParams["server_auth_b64"] = base64.StdEncoding.EncodeToString([]byte(cfg.Server.Username + ":" + cfg.Server.Password)) + templateParams["server_insecure"] = strconv.FormatBool(cfg.Server.InsecureTLS) + processParams.Path = cfg.Paths.OtelCollector default: return nil, errors.Errorf("unhandled agent type %[1]s (%[1]d).", agentProcess.Type) //nolint:revive } diff --git a/agent/cmd/pmm-agent-entrypoint/main.go b/agent/cmd/pmm-agent-entrypoint/main.go index ea878c55609..c802f24d19c 100644 --- a/agent/cmd/pmm-agent-entrypoint/main.go +++ b/agent/cmd/pmm-agent-entrypoint/main.go @@ -205,6 +205,7 @@ func main() { } status = 0 + if *pmmAgentPrerunFile != "" || *pmmAgentPrerunScript != "" { //nolint:nestif l.Info("Starting pmm-agent for prerun...") agent := commandPmmAgent([]string{"run"}) diff --git a/agent/commands/run.go b/agent/commands/run.go index b0c1c706ef5..15923752d2d 100644 --- a/agent/commands/run.go +++ b/agent/commands/run.go @@ -52,6 +52,7 @@ func Run() { // handle termination signals signals := make(chan os.Signal, 1) signal.Notify(signals, unix.SIGTERM, unix.SIGINT) + go func() { s := <-signals signal.Stop(signals) @@ -80,6 +81,7 @@ func Run() { var wg sync.WaitGroup wg.Add(3) reloadCh := make(chan bool, 1) + go func() { defer wg.Done() supervisor.Run(ctx) @@ -100,6 +102,7 @@ func Run() { cleanupTmp(cfg.Paths.TempDir, l) wg.Wait() + select { case <-rootCtx.Done(): return @@ -171,6 +174,7 @@ func cleanupTmp(tmpRoot string, log *logrus.Entry) { log.Warnf("Failed to read directory '%s': %s", tmpRoot, err.Error()) return } + for _, dir := range dirs { if dir.IsDir() { dirPath := filepath.Join(tmpRoot, dir.Name()) diff --git a/agent/commands/setup.go b/agent/commands/setup.go index 7d9f6f434a2..7bb18f75187 100644 --- a/agent/commands/setup.go +++ b/agent/commands/setup.go @@ -43,7 +43,6 @@ func Setup() { $ pmm-agent setup We will use server address from config, not from run's flag. */ - l := logrus.WithField("component", "setup") configStorage := config.NewStorage(nil) @@ -94,6 +93,7 @@ func checkStatus(configFilepath string, l *logrus.Entry) (string, bool) { fmt.Printf("Checking local pmm-agent status...\n") status, err := localStatus() l.Debugf("Status error: %#v", err) + switch err := err.(type) { //nolint:errorlint case nil: if status.ConfigFilepath == "" { diff --git a/agent/config/config.go b/agent/config/config.go index 09a2a27e2eb..80abf4273b9 100644 --- a/agent/config/config.go +++ b/agent/config/config.go @@ -102,8 +102,9 @@ type Paths struct { AzureExporter string `yaml:"azure_exporter"` ValkeyExporter string `yaml:"valkey_exporter"` - VMAgent string `yaml:"vmagent"` - Nomad string `yaml:"nomad"` + VMAgent string `yaml:"vmagent"` + Nomad string `yaml:"nomad"` + OtelCollector string `yaml:"otel_collector"` TempDir string `yaml:"tempdir"` NomadDataDir string `yaml:"nomad_data_dir"` @@ -239,6 +240,7 @@ func get(args []string, cfg *Config, l *logrus.Entry) (string, error) { //nolint &cfg.Paths.PTMongoDBSummary: "tools/pt-mongodb-summary", &cfg.Paths.PTMySQLSummary: "tools/pt-mysql-summary", &cfg.Paths.Nomad: "tools/nomad", + &cfg.Paths.OtelCollector: "tools/otelcol-contrib", } { if *sp == "" { *sp = v @@ -280,6 +282,7 @@ func get(args []string, cfg *Config, l *logrus.Entry) (string, error) { //nolint "Percona Toolkit pt-mongodb-summary": &cfg.Paths.PTMongoDBSummary, "Percona Toolkit pt-mysql-summary": &cfg.Paths.PTMySQLSummary, "Nomad binary": &cfg.Paths.Nomad, + "OTEL Collector": &cfg.Paths.OtelCollector, } { if !filepath.IsAbs(*sp) { *sp = filepath.Join(cfg.Paths.PathsBase, *sp) diff --git a/agent/config/config_test.go b/agent/config/config_test.go index bf168a2bad8..77b2b618d8f 100644 --- a/agent/config/config_test.go +++ b/agent/config/config_test.go @@ -123,6 +123,7 @@ func TestGet(t *testing.T) { PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary", PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary", Nomad: "/usr/local/percona/pmm/tools/nomad", + OtelCollector: "/usr/local/percona/pmm/tools/otelcol-contrib", }, WindowConnectedTime: defaultWindowPeriod, Ports: Ports{ @@ -188,6 +189,7 @@ func TestGet(t *testing.T) { PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary", PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary", Nomad: "/usr/local/percona/pmm/tools/nomad", + OtelCollector: "/usr/local/percona/pmm/tools/otelcol-contrib", }, WindowConnectedTime: defaultWindowPeriod, Ports: Ports{ @@ -253,6 +255,7 @@ func TestGet(t *testing.T) { PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary", PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary", Nomad: "/usr/local/percona/pmm/tools/nomad", + OtelCollector: "/usr/local/percona/pmm/tools/otelcol-contrib", }, WindowConnectedTime: defaultWindowPeriod, Ports: Ports{ @@ -324,6 +327,7 @@ func TestGet(t *testing.T) { PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary", PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary", Nomad: "/usr/local/percona/pmm/tools/nomad", + OtelCollector: "/usr/local/percona/pmm/tools/otelcol-contrib", }, WindowConnectedTime: defaultWindowPeriod, Ports: Ports{ @@ -393,6 +397,7 @@ func TestGet(t *testing.T) { PTMongoDBSummary: "/base/tools/pt-mongodb-summary", PTMySQLSummary: "/base/tools/pt-mysql-summary", Nomad: "/base/tools/nomad", + OtelCollector: "/base/tools/otelcol-contrib", }, WindowConnectedTime: defaultWindowPeriod, Ports: Ports{ @@ -460,6 +465,7 @@ func TestGet(t *testing.T) { PTMongoDBSummary: "/base/tools/pt-mongodb-summary", PTMySQLSummary: "/base/tools/pt-mysql-summary", Nomad: "/base/tools/nomad", + OtelCollector: "/base/tools/otelcol-contrib", }, WindowConnectedTime: defaultWindowPeriod, Ports: Ports{ @@ -512,6 +518,7 @@ func TestGet(t *testing.T) { PTMongoDBSummary: "/usr/local/percona/pmm/tools/pt-mongodb-summary", PTMySQLSummary: "/usr/local/percona/pmm/tools/pt-mysql-summary", Nomad: "/usr/local/percona/pmm/tools/nomad", + OtelCollector: "/usr/local/percona/pmm/tools/otelcol-contrib", }, WindowConnectedTime: defaultWindowPeriod, Ports: Ports{ diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.go b/api/accesscontrol/v1beta1/accesscontrol.pb.go index f5e8ea4b004..639df37bd7e 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.go @@ -7,15 +7,14 @@ package accesscontrolv1beta1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -824,27 +823,24 @@ func file_accesscontrol_v1beta1_accesscontrol_proto_rawDescGZIP() []byte { return file_accesscontrol_v1beta1_accesscontrol_proto_rawDescData } -var ( - file_accesscontrol_v1beta1_accesscontrol_proto_msgTypes = make([]protoimpl.MessageInfo, 15) - file_accesscontrol_v1beta1_accesscontrol_proto_goTypes = []any{ - (*CreateRoleRequest)(nil), // 0: accesscontrol.v1beta1.CreateRoleRequest - (*CreateRoleResponse)(nil), // 1: accesscontrol.v1beta1.CreateRoleResponse - (*UpdateRoleRequest)(nil), // 2: accesscontrol.v1beta1.UpdateRoleRequest - (*UpdateRoleResponse)(nil), // 3: accesscontrol.v1beta1.UpdateRoleResponse - (*DeleteRoleRequest)(nil), // 4: accesscontrol.v1beta1.DeleteRoleRequest - (*DeleteRoleResponse)(nil), // 5: accesscontrol.v1beta1.DeleteRoleResponse - (*GetRoleRequest)(nil), // 6: accesscontrol.v1beta1.GetRoleRequest - (*GetRoleResponse)(nil), // 7: accesscontrol.v1beta1.GetRoleResponse - (*SetDefaultRoleRequest)(nil), // 8: accesscontrol.v1beta1.SetDefaultRoleRequest - (*SetDefaultRoleResponse)(nil), // 9: accesscontrol.v1beta1.SetDefaultRoleResponse - (*AssignRolesRequest)(nil), // 10: accesscontrol.v1beta1.AssignRolesRequest - (*AssignRolesResponse)(nil), // 11: accesscontrol.v1beta1.AssignRolesResponse - (*ListRolesRequest)(nil), // 12: accesscontrol.v1beta1.ListRolesRequest - (*ListRolesResponse)(nil), // 13: accesscontrol.v1beta1.ListRolesResponse - (*ListRolesResponse_RoleData)(nil), // 14: accesscontrol.v1beta1.ListRolesResponse.RoleData - } -) - +var file_accesscontrol_v1beta1_accesscontrol_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_accesscontrol_v1beta1_accesscontrol_proto_goTypes = []any{ + (*CreateRoleRequest)(nil), // 0: accesscontrol.v1beta1.CreateRoleRequest + (*CreateRoleResponse)(nil), // 1: accesscontrol.v1beta1.CreateRoleResponse + (*UpdateRoleRequest)(nil), // 2: accesscontrol.v1beta1.UpdateRoleRequest + (*UpdateRoleResponse)(nil), // 3: accesscontrol.v1beta1.UpdateRoleResponse + (*DeleteRoleRequest)(nil), // 4: accesscontrol.v1beta1.DeleteRoleRequest + (*DeleteRoleResponse)(nil), // 5: accesscontrol.v1beta1.DeleteRoleResponse + (*GetRoleRequest)(nil), // 6: accesscontrol.v1beta1.GetRoleRequest + (*GetRoleResponse)(nil), // 7: accesscontrol.v1beta1.GetRoleResponse + (*SetDefaultRoleRequest)(nil), // 8: accesscontrol.v1beta1.SetDefaultRoleRequest + (*SetDefaultRoleResponse)(nil), // 9: accesscontrol.v1beta1.SetDefaultRoleResponse + (*AssignRolesRequest)(nil), // 10: accesscontrol.v1beta1.AssignRolesRequest + (*AssignRolesResponse)(nil), // 11: accesscontrol.v1beta1.AssignRolesResponse + (*ListRolesRequest)(nil), // 12: accesscontrol.v1beta1.ListRolesRequest + (*ListRolesResponse)(nil), // 13: accesscontrol.v1beta1.ListRolesResponse + (*ListRolesResponse_RoleData)(nil), // 14: accesscontrol.v1beta1.ListRolesResponse.RoleData +} var file_accesscontrol_v1beta1_accesscontrol_proto_depIdxs = []int32{ 14, // 0: accesscontrol.v1beta1.ListRolesResponse.roles:type_name -> accesscontrol.v1beta1.ListRolesResponse.RoleData 0, // 1: accesscontrol.v1beta1.AccessControlService.CreateRole:input_type -> accesscontrol.v1beta1.CreateRoleRequest diff --git a/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go b/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go index a055badfff2..eb8ae6ba022 100644 --- a/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go +++ b/api/accesscontrol/v1beta1/accesscontrol.pb.validate.go @@ -290,6 +290,7 @@ func (m *UpdateRoleRequest) validate(all bool) error { } if m.Title != nil { + if utf8.RuneCountInString(m.GetTitle()) < 1 { err := UpdateRoleRequestValidationError{ field: "Title", @@ -300,6 +301,7 @@ func (m *UpdateRoleRequest) validate(all bool) error { } errors = append(errors, err) } + } if m.Filter != nil { diff --git a/api/accesscontrol/v1beta1/accesscontrol.swagger.json b/api/accesscontrol/v1beta1/accesscontrol.swagger.json new file mode 100644 index 00000000000..d9435ab700b --- /dev/null +++ b/api/accesscontrol/v1beta1/accesscontrol.swagger.json @@ -0,0 +1,410 @@ +{ + "swagger": "2.0", + "info": { + "title": "accesscontrol/v1beta1/accesscontrol.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AccessControlService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/accesscontrol/roles": { + "get": { + "summary": "List Roles", + "description": "Lists all roles.", + "operationId": "ListRoles", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListRolesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "AccessControlService" + ] + }, + "post": { + "summary": "Create a Role", + "description": "Creates a new role.", + "operationId": "CreateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1CreateRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1CreateRoleRequest" + } + } + ], + "tags": [ + "AccessControlService" + ] + } + }, + "/v1/accesscontrol/roles/{role_id}": { + "get": { + "summary": "Get a Role", + "description": "Retrieves a role by ID.", + "operationId": "GetRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1GetRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "role_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + } + ], + "tags": [ + "AccessControlService" + ] + }, + "delete": { + "summary": "Delete a Role", + "description": "Deletes a role.", + "operationId": "DeleteRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1DeleteRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "role_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "replacement_role_id", + "description": "Role ID to be used as a replacement for the role. Additional logic applies.", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + } + ], + "tags": [ + "AccessControlService" + ] + }, + "put": { + "summary": "Update a Role", + "description": "Updates an existing role.", + "operationId": "UpdateRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1UpdateRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "role_id", + "in": "path", + "required": true, + "type": "integer", + "format": "int64" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AccessControlServiceUpdateRoleBody" + } + } + ], + "tags": [ + "AccessControlService" + ] + } + }, + "/v1/accesscontrol/roles:assign": { + "post": { + "summary": "Assign Roles to a User", + "description": "Replaces all existing roles for a user.", + "operationId": "AssignRoles", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1AssignRolesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1AssignRolesRequest" + } + } + ], + "tags": [ + "AccessControlService" + ] + } + }, + "/v1/accesscontrol/roles:setDefault": { + "post": { + "summary": "Set a Default Role", + "description": "Configures a default role assigned to users.", + "operationId": "SetDefaultRole", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1SetDefaultRoleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1SetDefaultRoleRequest" + } + } + ], + "tags": [ + "AccessControlService" + ] + } + } + }, + "definitions": { + "AccessControlServiceUpdateRoleBody": { + "type": "object", + "properties": { + "title": { + "type": "string", + "x-nullable": true + }, + "filter": { + "type": "string", + "x-nullable": true + }, + "description": { + "type": "string", + "x-nullable": true + } + } + }, + "ListRolesResponseRoleData": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + }, + "title": { + "type": "string" + }, + "filter": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1AssignRolesRequest": { + "type": "object", + "properties": { + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "user_id": { + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1AssignRolesResponse": { + "type": "object" + }, + "v1beta1CreateRoleRequest": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "filter": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "v1beta1CreateRoleResponse": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1DeleteRoleResponse": { + "type": "object" + }, + "v1beta1GetRoleResponse": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + }, + "title": { + "type": "string" + }, + "filter": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "v1beta1ListRolesResponse": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ListRolesResponseRoleData" + } + } + } + }, + "v1beta1SetDefaultRoleRequest": { + "type": "object", + "properties": { + "role_id": { + "type": "integer", + "format": "int64" + } + } + }, + "v1beta1SetDefaultRoleResponse": { + "type": "object" + }, + "v1beta1UpdateRoleResponse": { + "type": "object" + } + } +} diff --git a/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go b/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go index 27f509ee6f5..f868b277a03 100644 --- a/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go +++ b/api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go @@ -8,7 +8,6 @@ package accesscontrolv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -162,27 +161,21 @@ type UnimplementedAccessControlServiceServer struct{} func (UnimplementedAccessControlServiceServer) CreateRole(context.Context, *CreateRoleRequest) (*CreateRoleResponse, error) { return nil, status.Error(codes.Unimplemented, "method CreateRole not implemented") } - func (UnimplementedAccessControlServiceServer) UpdateRole(context.Context, *UpdateRoleRequest) (*UpdateRoleResponse, error) { return nil, status.Error(codes.Unimplemented, "method UpdateRole not implemented") } - func (UnimplementedAccessControlServiceServer) DeleteRole(context.Context, *DeleteRoleRequest) (*DeleteRoleResponse, error) { return nil, status.Error(codes.Unimplemented, "method DeleteRole not implemented") } - func (UnimplementedAccessControlServiceServer) GetRole(context.Context, *GetRoleRequest) (*GetRoleResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetRole not implemented") } - func (UnimplementedAccessControlServiceServer) ListRoles(context.Context, *ListRolesRequest) (*ListRolesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListRoles not implemented") } - func (UnimplementedAccessControlServiceServer) AssignRoles(context.Context, *AssignRolesRequest) (*AssignRolesResponse, error) { return nil, status.Error(codes.Unimplemented, "method AssignRoles not implemented") } - func (UnimplementedAccessControlServiceServer) SetDefaultRole(context.Context, *SetDefaultRoleRequest) (*SetDefaultRoleResponse, error) { return nil, status.Error(codes.Unimplemented, "method SetDefaultRole not implemented") } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go index 382f7922a2d..cb993665cc2 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_parameters.go @@ -60,6 +60,7 @@ AssignRolesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AssignRolesParams struct { + // Body. Body AssignRolesBody @@ -129,6 +130,7 @@ func (o *AssignRolesParams) SetBody(body AssignRolesBody) { // WriteToRequest writes these params to a swagger request func (o *AssignRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go index e8da90c3536..2a2044f1092 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/assign_roles_responses.go @@ -104,6 +104,7 @@ func (o *AssignRolesOK) GetPayload() any { } func (o *AssignRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *AssignRolesDefault) GetPayload() *AssignRolesDefaultBody { } func (o *AssignRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AssignRolesDefaultBody) // response payload @@ -190,6 +192,7 @@ AssignRolesBody assign roles body swagger:model AssignRolesBody */ type AssignRolesBody struct { + // role ids RoleIds []int64 `json:"role_ids"` @@ -230,6 +233,7 @@ AssignRolesDefaultBody assign roles default body swagger:model AssignRolesDefaultBody */ type AssignRolesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -299,7 +303,9 @@ func (o *AssignRolesDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -319,6 +325,7 @@ func (o *AssignRolesDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -347,6 +354,7 @@ AssignRolesDefaultBodyDetailsItems0 assign roles default body details items0 swagger:model AssignRolesDefaultBodyDetailsItems0 */ type AssignRolesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -358,6 +366,7 @@ type AssignRolesDefaultBodyDetailsItems0 struct { func (o *AssignRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -395,6 +404,7 @@ func (o *AssignRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AssignRolesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go index b938a079586..1bb34601822 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_parameters.go @@ -60,6 +60,7 @@ CreateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRoleParams struct { + // Body. Body CreateRoleBody @@ -129,6 +130,7 @@ func (o *CreateRoleParams) SetBody(body CreateRoleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go index b03fdb96075..0df54ce131f 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/create_role_responses.go @@ -104,6 +104,7 @@ func (o *CreateRoleOK) GetPayload() *CreateRoleOKBody { } func (o *CreateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRoleOKBody) // response payload @@ -177,6 +178,7 @@ func (o *CreateRoleDefault) GetPayload() *CreateRoleDefaultBody { } func (o *CreateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRoleDefaultBody) // response payload @@ -192,6 +194,7 @@ CreateRoleBody create role body swagger:model CreateRoleBody */ type CreateRoleBody struct { + // title Title string `json:"title,omitempty"` @@ -235,6 +238,7 @@ CreateRoleDefaultBody create role default body swagger:model CreateRoleDefaultBody */ type CreateRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -304,7 +308,9 @@ func (o *CreateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -324,6 +330,7 @@ func (o *CreateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -352,6 +359,7 @@ CreateRoleDefaultBodyDetailsItems0 create role default body details items0 swagger:model CreateRoleDefaultBodyDetailsItems0 */ type CreateRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -363,6 +371,7 @@ type CreateRoleDefaultBodyDetailsItems0 struct { func (o *CreateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -400,6 +409,7 @@ func (o *CreateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -463,6 +473,7 @@ CreateRoleOKBody create role OK body swagger:model CreateRoleOKBody */ type CreateRoleOKBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go index 7e502e8dcd7..0b1b7b1af71 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_parameters.go @@ -61,6 +61,7 @@ DeleteRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteRoleParams struct { + /* ReplacementRoleID. Role ID to be used as a replacement for the role. Additional logic applies. @@ -151,6 +152,7 @@ func (o *DeleteRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -166,6 +168,7 @@ func (o *DeleteRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qReplacementRoleID := swag.FormatInt64(qrReplacementRoleID) if qReplacementRoleID != "" { + if err := r.SetQueryParam("replacement_role_id", qReplacementRoleID); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go index 84cb3699513..86015ab4298 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/delete_role_responses.go @@ -104,6 +104,7 @@ func (o *DeleteRoleOK) GetPayload() any { } func (o *DeleteRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *DeleteRoleDefault) GetPayload() *DeleteRoleDefaultBody { } func (o *DeleteRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteRoleDefaultBody) // response payload @@ -190,6 +192,7 @@ DeleteRoleDefaultBody delete role default body swagger:model DeleteRoleDefaultBody */ type DeleteRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *DeleteRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *DeleteRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -307,6 +313,7 @@ DeleteRoleDefaultBodyDetailsItems0 delete role default body details items0 swagger:model DeleteRoleDefaultBodyDetailsItems0 */ type DeleteRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type DeleteRoleDefaultBodyDetailsItems0 struct { func (o *DeleteRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *DeleteRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go index 31a018c004a..609e5c621ee 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_parameters.go @@ -61,6 +61,7 @@ GetRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetRoleParams struct { + // RoleID. // // Format: int64 @@ -132,6 +133,7 @@ func (o *GetRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *GetRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go index f731e38c4d1..3b6e7faabf5 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/get_role_responses.go @@ -104,6 +104,7 @@ func (o *GetRoleOK) GetPayload() *GetRoleOKBody { } func (o *GetRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetRoleOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetRoleDefault) GetPayload() *GetRoleDefaultBody { } func (o *GetRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetRoleDefaultBody) // response payload @@ -192,6 +194,7 @@ GetRoleDefaultBody get role default body swagger:model GetRoleDefaultBody */ type GetRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetRoleDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetRoleDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -309,6 +315,7 @@ GetRoleDefaultBodyDetailsItems0 get role default body details items0 swagger:model GetRoleDefaultBodyDetailsItems0 */ type GetRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetRoleDefaultBodyDetailsItems0 struct { func (o *GetRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetRoleOKBody get role OK body swagger:model GetRoleOKBody */ type GetRoleOKBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go index 0fb513e0af3..2d886057c5e 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_parameters.go @@ -115,6 +115,7 @@ func (o *ListRolesParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go index 62d47cc68b2..1834c8ed751 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/list_roles_responses.go @@ -104,6 +104,7 @@ func (o *ListRolesOK) GetPayload() *ListRolesOKBody { } func (o *ListRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRolesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListRolesDefault) GetPayload() *ListRolesDefaultBody { } func (o *ListRolesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRolesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListRolesDefaultBody list roles default body swagger:model ListRolesDefaultBody */ type ListRolesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *ListRolesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *ListRolesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -309,6 +315,7 @@ ListRolesDefaultBodyDetailsItems0 list roles default body details items0 swagger:model ListRolesDefaultBodyDetailsItems0 */ type ListRolesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type ListRolesDefaultBodyDetailsItems0 struct { func (o *ListRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *ListRolesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListRolesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ ListRolesOKBody list roles OK body swagger:model ListRolesOKBody */ type ListRolesOKBody struct { + // roles Roles []*ListRolesOKBodyRolesItems0 `json:"roles"` } @@ -483,7 +493,9 @@ func (o *ListRolesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Roles); i++ { + if o.Roles[i] != nil { if swag.IsZero(o.Roles[i]) { // not required @@ -503,6 +515,7 @@ func (o *ListRolesOKBody) contextValidateRoles(ctx context.Context, formats strf return err } } + } return nil @@ -531,6 +544,7 @@ ListRolesOKBodyRolesItems0 list roles OK body roles items0 swagger:model ListRolesOKBodyRolesItems0 */ type ListRolesOKBodyRolesItems0 struct { + // role id RoleID int64 `json:"role_id,omitempty"` diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go index 516a1543b14..858d855c7eb 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_parameters.go @@ -60,6 +60,7 @@ SetDefaultRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SetDefaultRoleParams struct { + // Body. Body SetDefaultRoleBody @@ -129,6 +130,7 @@ func (o *SetDefaultRoleParams) SetBody(body SetDefaultRoleBody) { // WriteToRequest writes these params to a swagger request func (o *SetDefaultRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go index 101b2683e30..e6288362405 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/set_default_role_responses.go @@ -104,6 +104,7 @@ func (o *SetDefaultRoleOK) GetPayload() any { } func (o *SetDefaultRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *SetDefaultRoleDefault) GetPayload() *SetDefaultRoleDefaultBody { } func (o *SetDefaultRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SetDefaultRoleDefaultBody) // response payload @@ -190,6 +192,7 @@ SetDefaultRoleBody set default role body swagger:model SetDefaultRoleBody */ type SetDefaultRoleBody struct { + // role id RoleID int64 `json:"role_id,omitempty"` } @@ -227,6 +230,7 @@ SetDefaultRoleDefaultBody set default role default body swagger:model SetDefaultRoleDefaultBody */ type SetDefaultRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *SetDefaultRoleDefaultBody) ContextValidate(ctx context.Context, formats } func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,6 +322,7 @@ func (o *SetDefaultRoleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -344,6 +351,7 @@ SetDefaultRoleDefaultBodyDetailsItems0 set default role default body details ite swagger:model SetDefaultRoleDefaultBodyDetailsItems0 */ type SetDefaultRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -355,6 +363,7 @@ type SetDefaultRoleDefaultBodyDetailsItems0 struct { func (o *SetDefaultRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -392,6 +401,7 @@ func (o *SetDefaultRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o SetDefaultRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go index c5724145e12..234a65456d7 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_parameters.go @@ -61,6 +61,7 @@ UpdateRoleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateRoleParams struct { + // Body. Body UpdateRoleBody @@ -146,6 +147,7 @@ func (o *UpdateRoleParams) SetRoleID(roleID int64) { // WriteToRequest writes these params to a swagger request func (o *UpdateRoleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go index 0fd4a4964f6..f280b94732a 100644 --- a/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go +++ b/api/accesscontrol/v1beta1/json/client/access_control_service/update_role_responses.go @@ -104,6 +104,7 @@ func (o *UpdateRoleOK) GetPayload() any { } func (o *UpdateRoleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *UpdateRoleDefault) GetPayload() *UpdateRoleDefaultBody { } func (o *UpdateRoleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateRoleDefaultBody) // response payload @@ -190,6 +192,7 @@ UpdateRoleBody update role body swagger:model UpdateRoleBody */ type UpdateRoleBody struct { + // title Title *string `json:"title,omitempty"` @@ -233,6 +236,7 @@ UpdateRoleDefaultBody update role default body swagger:model UpdateRoleDefaultBody */ type UpdateRoleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -302,7 +306,9 @@ func (o *UpdateRoleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -322,6 +328,7 @@ func (o *UpdateRoleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -350,6 +357,7 @@ UpdateRoleDefaultBodyDetailsItems0 update role default body details items0 swagger:model UpdateRoleDefaultBodyDetailsItems0 */ type UpdateRoleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -361,6 +369,7 @@ type UpdateRoleDefaultBodyDetailsItems0 struct { func (o *UpdateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -398,6 +407,7 @@ func (o *UpdateRoleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateRoleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/actions/v1/actions.pb.go b/api/actions/v1/actions.pb.go index 8cc8bdac9e8..c22f9dab1a2 100644 --- a/api/actions/v1/actions.pb.go +++ b/api/actions/v1/actions.pb.go @@ -7,15 +7,14 @@ package actionsv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -2610,46 +2609,43 @@ func file_actions_v1_actions_proto_rawDescGZIP() []byte { return file_actions_v1_actions_proto_rawDescData } -var ( - file_actions_v1_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_actions_v1_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 32) - file_actions_v1_actions_proto_goTypes = []any{ - (ActionType)(0), // 0: actions.v1.ActionType - (*GetActionRequest)(nil), // 1: actions.v1.GetActionRequest - (*GetActionResponse)(nil), // 2: actions.v1.GetActionResponse - (*StartMySQLExplainActionParams)(nil), // 3: actions.v1.StartMySQLExplainActionParams - (*StartMySQLExplainActionResult)(nil), // 4: actions.v1.StartMySQLExplainActionResult - (*StartMySQLExplainJSONActionParams)(nil), // 5: actions.v1.StartMySQLExplainJSONActionParams - (*StartMySQLExplainJSONActionResult)(nil), // 6: actions.v1.StartMySQLExplainJSONActionResult - (*StartMySQLExplainTraditionalJSONActionParams)(nil), // 7: actions.v1.StartMySQLExplainTraditionalJSONActionParams - (*StartMySQLExplainTraditionalJSONActionResult)(nil), // 8: actions.v1.StartMySQLExplainTraditionalJSONActionResult - (*StartMySQLShowCreateTableActionParams)(nil), // 9: actions.v1.StartMySQLShowCreateTableActionParams - (*StartMySQLShowCreateTableActionResult)(nil), // 10: actions.v1.StartMySQLShowCreateTableActionResult - (*StartMySQLShowTableStatusActionParams)(nil), // 11: actions.v1.StartMySQLShowTableStatusActionParams - (*StartMySQLShowTableStatusActionResult)(nil), // 12: actions.v1.StartMySQLShowTableStatusActionResult - (*StartMySQLShowIndexActionParams)(nil), // 13: actions.v1.StartMySQLShowIndexActionParams - (*StartMySQLShowIndexActionResult)(nil), // 14: actions.v1.StartMySQLShowIndexActionResult - (*StartPostgreSQLShowCreateTableActionParams)(nil), // 15: actions.v1.StartPostgreSQLShowCreateTableActionParams - (*StartPostgreSQLShowCreateTableActionResult)(nil), // 16: actions.v1.StartPostgreSQLShowCreateTableActionResult - (*StartPostgreSQLShowIndexActionParams)(nil), // 17: actions.v1.StartPostgreSQLShowIndexActionParams - (*StartPostgreSQLShowIndexActionResult)(nil), // 18: actions.v1.StartPostgreSQLShowIndexActionResult - (*StartMongoDBExplainActionParams)(nil), // 19: actions.v1.StartMongoDBExplainActionParams - (*StartMongoDBExplainActionResult)(nil), // 20: actions.v1.StartMongoDBExplainActionResult - (*StartPTPgSummaryActionParams)(nil), // 21: actions.v1.StartPTPgSummaryActionParams - (*StartPTPgSummaryActionResult)(nil), // 22: actions.v1.StartPTPgSummaryActionResult - (*StartPTMongoDBSummaryActionParams)(nil), // 23: actions.v1.StartPTMongoDBSummaryActionParams - (*StartPTMongoDBSummaryActionResult)(nil), // 24: actions.v1.StartPTMongoDBSummaryActionResult - (*StartPTMySQLSummaryActionParams)(nil), // 25: actions.v1.StartPTMySQLSummaryActionParams - (*StartPTMySQLSummaryActionResult)(nil), // 26: actions.v1.StartPTMySQLSummaryActionResult - (*StartPTSummaryActionRequest)(nil), // 27: actions.v1.StartPTSummaryActionRequest - (*StartPTSummaryActionResponse)(nil), // 28: actions.v1.StartPTSummaryActionResponse - (*CancelActionRequest)(nil), // 29: actions.v1.CancelActionRequest - (*CancelActionResponse)(nil), // 30: actions.v1.CancelActionResponse - (*StartServiceActionRequest)(nil), // 31: actions.v1.StartServiceActionRequest - (*StartServiceActionResponse)(nil), // 32: actions.v1.StartServiceActionResponse - } -) - +var file_actions_v1_actions_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_actions_v1_actions_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_actions_v1_actions_proto_goTypes = []any{ + (ActionType)(0), // 0: actions.v1.ActionType + (*GetActionRequest)(nil), // 1: actions.v1.GetActionRequest + (*GetActionResponse)(nil), // 2: actions.v1.GetActionResponse + (*StartMySQLExplainActionParams)(nil), // 3: actions.v1.StartMySQLExplainActionParams + (*StartMySQLExplainActionResult)(nil), // 4: actions.v1.StartMySQLExplainActionResult + (*StartMySQLExplainJSONActionParams)(nil), // 5: actions.v1.StartMySQLExplainJSONActionParams + (*StartMySQLExplainJSONActionResult)(nil), // 6: actions.v1.StartMySQLExplainJSONActionResult + (*StartMySQLExplainTraditionalJSONActionParams)(nil), // 7: actions.v1.StartMySQLExplainTraditionalJSONActionParams + (*StartMySQLExplainTraditionalJSONActionResult)(nil), // 8: actions.v1.StartMySQLExplainTraditionalJSONActionResult + (*StartMySQLShowCreateTableActionParams)(nil), // 9: actions.v1.StartMySQLShowCreateTableActionParams + (*StartMySQLShowCreateTableActionResult)(nil), // 10: actions.v1.StartMySQLShowCreateTableActionResult + (*StartMySQLShowTableStatusActionParams)(nil), // 11: actions.v1.StartMySQLShowTableStatusActionParams + (*StartMySQLShowTableStatusActionResult)(nil), // 12: actions.v1.StartMySQLShowTableStatusActionResult + (*StartMySQLShowIndexActionParams)(nil), // 13: actions.v1.StartMySQLShowIndexActionParams + (*StartMySQLShowIndexActionResult)(nil), // 14: actions.v1.StartMySQLShowIndexActionResult + (*StartPostgreSQLShowCreateTableActionParams)(nil), // 15: actions.v1.StartPostgreSQLShowCreateTableActionParams + (*StartPostgreSQLShowCreateTableActionResult)(nil), // 16: actions.v1.StartPostgreSQLShowCreateTableActionResult + (*StartPostgreSQLShowIndexActionParams)(nil), // 17: actions.v1.StartPostgreSQLShowIndexActionParams + (*StartPostgreSQLShowIndexActionResult)(nil), // 18: actions.v1.StartPostgreSQLShowIndexActionResult + (*StartMongoDBExplainActionParams)(nil), // 19: actions.v1.StartMongoDBExplainActionParams + (*StartMongoDBExplainActionResult)(nil), // 20: actions.v1.StartMongoDBExplainActionResult + (*StartPTPgSummaryActionParams)(nil), // 21: actions.v1.StartPTPgSummaryActionParams + (*StartPTPgSummaryActionResult)(nil), // 22: actions.v1.StartPTPgSummaryActionResult + (*StartPTMongoDBSummaryActionParams)(nil), // 23: actions.v1.StartPTMongoDBSummaryActionParams + (*StartPTMongoDBSummaryActionResult)(nil), // 24: actions.v1.StartPTMongoDBSummaryActionResult + (*StartPTMySQLSummaryActionParams)(nil), // 25: actions.v1.StartPTMySQLSummaryActionParams + (*StartPTMySQLSummaryActionResult)(nil), // 26: actions.v1.StartPTMySQLSummaryActionResult + (*StartPTSummaryActionRequest)(nil), // 27: actions.v1.StartPTSummaryActionRequest + (*StartPTSummaryActionResponse)(nil), // 28: actions.v1.StartPTSummaryActionResponse + (*CancelActionRequest)(nil), // 29: actions.v1.CancelActionRequest + (*CancelActionResponse)(nil), // 30: actions.v1.CancelActionResponse + (*StartServiceActionRequest)(nil), // 31: actions.v1.StartServiceActionRequest + (*StartServiceActionResponse)(nil), // 32: actions.v1.StartServiceActionResponse +} var file_actions_v1_actions_proto_depIdxs = []int32{ 3, // 0: actions.v1.StartServiceActionRequest.mysql_explain:type_name -> actions.v1.StartMySQLExplainActionParams 5, // 1: actions.v1.StartServiceActionRequest.mysql_explain_json:type_name -> actions.v1.StartMySQLExplainJSONActionParams diff --git a/api/actions/v1/actions.swagger.json b/api/actions/v1/actions.swagger.json new file mode 100644 index 00000000000..04404da66a7 --- /dev/null +++ b/api/actions/v1/actions.swagger.json @@ -0,0 +1,737 @@ +{ + "swagger": "2.0", + "info": { + "title": "actions/v1/actions.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ActionsService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/actions/{action_id}": { + "get": { + "summary": "Get Action", + "description": "Gets the result of a given Action.", + "operationId": "GetAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "action_id", + "description": "Unique Action ID.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "ActionsService" + ] + } + }, + "/v1/actions:cancelAction": { + "post": { + "summary": "Cancel an Action", + "description": "Stops an Action.", + "operationId": "CancelAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CancelActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CancelActionRequest" + } + } + ], + "tags": [ + "ActionsService" + ] + } + }, + "/v1/actions:startNodeAction": { + "post": { + "summary": "Start 'PT Summary' Action", + "description": "Starts 'Percona Toolkit Summary' Action.", + "operationId": "StartPTSummaryAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StartPTSummaryActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StartPTSummaryActionRequest" + } + } + ], + "tags": [ + "ActionsService" + ] + } + }, + "/v1/actions:startServiceAction": { + "post": { + "summary": "Start a Service Action", + "description": "Starts a Service Action.", + "operationId": "StartServiceAction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StartServiceActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StartServiceActionRequest" + } + } + ], + "tags": [ + "ActionsService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1CancelActionRequest": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID. Required." + } + } + }, + "v1CancelActionResponse": { + "type": "object" + }, + "v1GetActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where this Action is running / was run." + }, + "output": { + "type": "string", + "description": "Current Action output; may be partial if Action is still running." + }, + "done": { + "type": "boolean", + "description": "True if Action is finished." + }, + "error": { + "type": "string", + "description": "Error message if Action failed." + } + } + }, + "v1StartMongoDBExplainActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "query": { + "type": "string", + "description": "Query. Required." + } + } + }, + "v1StartMongoDBExplainActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartMySQLExplainActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "query_id": { + "type": "string", + "description": "Query ID of query." + }, + "placeholders": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Array of placeholder values" + }, + "database": { + "type": "string", + "description": "Database name. Required if it can't be deduced from the query ID." + } + } + }, + "v1StartMySQLExplainActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartMySQLExplainJSONActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "query_id": { + "type": "string", + "description": "Query ID of query." + }, + "placeholders": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Array of placeholder values" + }, + "database": { + "type": "string", + "description": "Database name. Required if it can't be deduced from the query ID." + } + } + }, + "v1StartMySQLExplainJSONActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartMySQLExplainTraditionalJSONActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "query_id": { + "type": "string", + "description": "Query ID of query." + }, + "placeholders": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Array of placeholder values" + }, + "database": { + "type": "string", + "description": "Database name. Required if it can't be deduced from the query ID." + } + } + }, + "v1StartMySQLExplainTraditionalJSONActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartMySQLShowCreateTableActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "v1StartMySQLShowCreateTableActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartMySQLShowIndexActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "v1StartMySQLShowIndexActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartMySQLShowTableStatusActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "v1StartMySQLShowTableStatusActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartPTMongoDBSummaryActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action." + } + }, + "title": "Message to prepare pt-mongodb-summary data" + }, + "v1StartPTMongoDBSummaryActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + }, + "title": "Message to retrieve the prepared pt-mongodb-summary data" + }, + "v1StartPTMySQLSummaryActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action." + } + }, + "title": "Message to prepare pt-mysql-summary data" + }, + "v1StartPTMySQLSummaryActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + }, + "title": "Message to retrieve the prepared pt-mysql-summary data" + }, + "v1StartPTPgSummaryActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action." + } + }, + "title": "Message to prepare pt-pg-summary data" + }, + "v1StartPTPgSummaryActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + }, + "title": "Message to retrieve the prepared pt-pg-summary data" + }, + "v1StartPTSummaryActionRequest": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "node_id": { + "type": "string", + "description": "Node ID for this Action." + } + } + }, + "v1StartPTSummaryActionResponse": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartPostgreSQLShowCreateTableActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "v1StartPostgreSQLShowCreateTableActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartPostgreSQLShowIndexActionParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to run this Action." + }, + "service_id": { + "type": "string", + "description": "Service ID for this Action. Required." + }, + "table_name": { + "type": "string", + "description": "Table name. Required. May additionally contain a database name." + }, + "database": { + "type": "string", + "description": "Database name. Required if not given in the table_name field." + } + } + }, + "v1StartPostgreSQLShowIndexActionResult": { + "type": "object", + "properties": { + "action_id": { + "type": "string", + "description": "Unique Action ID." + }, + "pmm_agent_id": { + "type": "string", + "description": "pmm-agent ID where to this Action was started." + } + } + }, + "v1StartServiceActionRequest": { + "type": "object", + "properties": { + "mysql_explain": { + "$ref": "#/definitions/v1StartMySQLExplainActionParams" + }, + "mysql_explain_json": { + "$ref": "#/definitions/v1StartMySQLExplainJSONActionParams" + }, + "mysql_explain_traditional_json": { + "$ref": "#/definitions/v1StartMySQLExplainTraditionalJSONActionParams" + }, + "mysql_show_index": { + "$ref": "#/definitions/v1StartMySQLShowIndexActionParams" + }, + "mysql_show_create_table": { + "$ref": "#/definitions/v1StartMySQLShowCreateTableActionParams" + }, + "mysql_show_table_status": { + "$ref": "#/definitions/v1StartMySQLShowTableStatusActionParams" + }, + "postgres_show_create_table": { + "$ref": "#/definitions/v1StartPostgreSQLShowCreateTableActionParams" + }, + "postgres_show_index": { + "$ref": "#/definitions/v1StartPostgreSQLShowIndexActionParams" + }, + "mongodb_explain": { + "$ref": "#/definitions/v1StartMongoDBExplainActionParams" + }, + "pt_mongodb_summary": { + "$ref": "#/definitions/v1StartPTMongoDBSummaryActionParams" + }, + "pt_mysql_summary": { + "$ref": "#/definitions/v1StartPTMySQLSummaryActionParams" + }, + "pt_postgres_summary": { + "$ref": "#/definitions/v1StartPTPgSummaryActionParams" + } + } + }, + "v1StartServiceActionResponse": { + "type": "object", + "properties": { + "mysql_explain": { + "$ref": "#/definitions/v1StartMySQLExplainActionResult" + }, + "mysql_explain_json": { + "$ref": "#/definitions/v1StartMySQLExplainJSONActionResult" + }, + "mysql_explain_traditional_json": { + "$ref": "#/definitions/v1StartMySQLExplainTraditionalJSONActionResult" + }, + "mysql_show_index": { + "$ref": "#/definitions/v1StartMySQLShowIndexActionResult" + }, + "mysql_show_create_table": { + "$ref": "#/definitions/v1StartMySQLShowCreateTableActionResult" + }, + "mysql_show_table_status": { + "$ref": "#/definitions/v1StartMySQLShowTableStatusActionResult" + }, + "postgresql_show_create_table": { + "$ref": "#/definitions/v1StartPostgreSQLShowCreateTableActionResult" + }, + "postgresql_show_index": { + "$ref": "#/definitions/v1StartPostgreSQLShowIndexActionResult" + }, + "mongodb_explain": { + "$ref": "#/definitions/v1StartMongoDBExplainActionResult" + }, + "pt_mongodb_summary": { + "$ref": "#/definitions/v1StartPTMongoDBSummaryActionResult" + }, + "pt_mysql_summary": { + "$ref": "#/definitions/v1StartPTMySQLSummaryActionResult" + }, + "pt_postgres_summary": { + "$ref": "#/definitions/v1StartPTPgSummaryActionResult" + } + } + } + } +} diff --git a/api/actions/v1/actions_grpc.pb.go b/api/actions/v1/actions_grpc.pb.go index cfe06386498..f9fb5ad5c81 100644 --- a/api/actions/v1/actions_grpc.pb.go +++ b/api/actions/v1/actions_grpc.pb.go @@ -8,7 +8,6 @@ package actionsv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -117,15 +116,12 @@ type UnimplementedActionsServiceServer struct{} func (UnimplementedActionsServiceServer) GetAction(context.Context, *GetActionRequest) (*GetActionResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAction not implemented") } - func (UnimplementedActionsServiceServer) StartServiceAction(context.Context, *StartServiceActionRequest) (*StartServiceActionResponse, error) { return nil, status.Error(codes.Unimplemented, "method StartServiceAction not implemented") } - func (UnimplementedActionsServiceServer) StartPTSummaryAction(context.Context, *StartPTSummaryActionRequest) (*StartPTSummaryActionResponse, error) { return nil, status.Error(codes.Unimplemented, "method StartPTSummaryAction not implemented") } - func (UnimplementedActionsServiceServer) CancelAction(context.Context, *CancelActionRequest) (*CancelActionResponse, error) { return nil, status.Error(codes.Unimplemented, "method CancelAction not implemented") } diff --git a/api/actions/v1/json/client/actions_service/cancel_action_parameters.go b/api/actions/v1/json/client/actions_service/cancel_action_parameters.go index 6348e7d94eb..212f1d60d20 100644 --- a/api/actions/v1/json/client/actions_service/cancel_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/cancel_action_parameters.go @@ -60,6 +60,7 @@ CancelActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CancelActionParams struct { + // Body. Body CancelActionBody @@ -129,6 +130,7 @@ func (o *CancelActionParams) SetBody(body CancelActionBody) { // WriteToRequest writes these params to a swagger request func (o *CancelActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/cancel_action_responses.go b/api/actions/v1/json/client/actions_service/cancel_action_responses.go index 0e13c7ab307..09883420047 100644 --- a/api/actions/v1/json/client/actions_service/cancel_action_responses.go +++ b/api/actions/v1/json/client/actions_service/cancel_action_responses.go @@ -104,6 +104,7 @@ func (o *CancelActionOK) GetPayload() any { } func (o *CancelActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *CancelActionDefault) GetPayload() *CancelActionDefaultBody { } func (o *CancelActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CancelActionDefaultBody) // response payload @@ -190,6 +192,7 @@ CancelActionBody cancel action body swagger:model CancelActionBody */ type CancelActionBody struct { + // Unique Action ID. Required. ActionID string `json:"action_id,omitempty"` } @@ -227,6 +230,7 @@ CancelActionDefaultBody cancel action default body swagger:model CancelActionDefaultBody */ type CancelActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *CancelActionDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,6 +322,7 @@ func (o *CancelActionDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -344,6 +351,7 @@ CancelActionDefaultBodyDetailsItems0 cancel action default body details items0 swagger:model CancelActionDefaultBodyDetailsItems0 */ type CancelActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -355,6 +363,7 @@ type CancelActionDefaultBodyDetailsItems0 struct { func (o *CancelActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -392,6 +401,7 @@ func (o *CancelActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o CancelActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/actions/v1/json/client/actions_service/get_action_parameters.go b/api/actions/v1/json/client/actions_service/get_action_parameters.go index 260fc6822b1..6b0d82f9eea 100644 --- a/api/actions/v1/json/client/actions_service/get_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/get_action_parameters.go @@ -60,6 +60,7 @@ GetActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetActionParams struct { + /* ActionID. Unique Action ID. @@ -132,6 +133,7 @@ func (o *GetActionParams) SetActionID(actionID string) { // WriteToRequest writes these params to a swagger request func (o *GetActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/get_action_responses.go b/api/actions/v1/json/client/actions_service/get_action_responses.go index 9b33b0d5d9e..d45f0432bae 100644 --- a/api/actions/v1/json/client/actions_service/get_action_responses.go +++ b/api/actions/v1/json/client/actions_service/get_action_responses.go @@ -104,6 +104,7 @@ func (o *GetActionOK) GetPayload() *GetActionOKBody { } func (o *GetActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetActionOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetActionDefault) GetPayload() *GetActionDefaultBody { } func (o *GetActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetActionDefaultBody) // response payload @@ -192,6 +194,7 @@ GetActionDefaultBody get action default body swagger:model GetActionDefaultBody */ type GetActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetActionDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetActionDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -309,6 +315,7 @@ GetActionDefaultBodyDetailsItems0 get action default body details items0 swagger:model GetActionDefaultBodyDetailsItems0 */ type GetActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetActionDefaultBodyDetailsItems0 struct { func (o *GetActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetActionOKBody get action OK body swagger:model GetActionOKBody */ type GetActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go b/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go index 968ef894f1e..5b8ccd3118d 100644 --- a/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/start_pt_summary_action_parameters.go @@ -60,6 +60,7 @@ StartPTSummaryActionParams contains all the parameters to send to the API endpoi Typically these are written to a http.Request. */ type StartPTSummaryActionParams struct { + // Body. Body StartPTSummaryActionBody @@ -129,6 +130,7 @@ func (o *StartPTSummaryActionParams) SetBody(body StartPTSummaryActionBody) { // WriteToRequest writes these params to a swagger request func (o *StartPTSummaryActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go b/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go index 8cafc764bc5..78ab76df792 100644 --- a/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go +++ b/api/actions/v1/json/client/actions_service/start_pt_summary_action_responses.go @@ -104,6 +104,7 @@ func (o *StartPTSummaryActionOK) GetPayload() *StartPTSummaryActionOKBody { } func (o *StartPTSummaryActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTSummaryActionOKBody) // response payload @@ -177,6 +178,7 @@ func (o *StartPTSummaryActionDefault) GetPayload() *StartPTSummaryActionDefaultB } func (o *StartPTSummaryActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartPTSummaryActionDefaultBody) // response payload @@ -192,6 +194,7 @@ StartPTSummaryActionBody start PT summary action body swagger:model StartPTSummaryActionBody */ type StartPTSummaryActionBody struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -232,6 +235,7 @@ StartPTSummaryActionDefaultBody start PT summary action default body swagger:model StartPTSummaryActionDefaultBody */ type StartPTSummaryActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -301,7 +305,9 @@ func (o *StartPTSummaryActionDefaultBody) ContextValidate(ctx context.Context, f } func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -321,6 +327,7 @@ func (o *StartPTSummaryActionDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -349,6 +356,7 @@ StartPTSummaryActionDefaultBodyDetailsItems0 start PT summary action default bod swagger:model StartPTSummaryActionDefaultBodyDetailsItems0 */ type StartPTSummaryActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -360,6 +368,7 @@ type StartPTSummaryActionDefaultBodyDetailsItems0 struct { func (o *StartPTSummaryActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -397,6 +406,7 @@ func (o *StartPTSummaryActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte // MarshalJSON marshals this object with additional properties into a JSON object func (o StartPTSummaryActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -460,6 +470,7 @@ StartPTSummaryActionOKBody start PT summary action OK body swagger:model StartPTSummaryActionOKBody */ type StartPTSummaryActionOKBody struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` diff --git a/api/actions/v1/json/client/actions_service/start_service_action_parameters.go b/api/actions/v1/json/client/actions_service/start_service_action_parameters.go index efc1acb5ebf..9aa53446c00 100644 --- a/api/actions/v1/json/client/actions_service/start_service_action_parameters.go +++ b/api/actions/v1/json/client/actions_service/start_service_action_parameters.go @@ -60,6 +60,7 @@ StartServiceActionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartServiceActionParams struct { + // Body. Body StartServiceActionBody @@ -129,6 +130,7 @@ func (o *StartServiceActionParams) SetBody(body StartServiceActionBody) { // WriteToRequest writes these params to a swagger request func (o *StartServiceActionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/actions/v1/json/client/actions_service/start_service_action_responses.go b/api/actions/v1/json/client/actions_service/start_service_action_responses.go index ffe544f60ab..3184f68f740 100644 --- a/api/actions/v1/json/client/actions_service/start_service_action_responses.go +++ b/api/actions/v1/json/client/actions_service/start_service_action_responses.go @@ -104,6 +104,7 @@ func (o *StartServiceActionOK) GetPayload() *StartServiceActionOKBody { } func (o *StartServiceActionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartServiceActionOKBody) // response payload @@ -177,6 +178,7 @@ func (o *StartServiceActionDefault) GetPayload() *StartServiceActionDefaultBody } func (o *StartServiceActionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartServiceActionDefaultBody) // response payload @@ -192,6 +194,7 @@ StartServiceActionBody start service action body swagger:model StartServiceActionBody */ type StartServiceActionBody struct { + // mongodb explain MongodbExplain *StartServiceActionParamsBodyMongodbExplain `json:"mongodb_explain,omitempty"` @@ -622,6 +625,7 @@ func (o *StartServiceActionBody) ContextValidate(ctx context.Context, formats st } func (o *StartServiceActionBody) contextValidateMongodbExplain(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExplain != nil { if swag.IsZero(o.MongodbExplain) { // not required @@ -646,6 +650,7 @@ func (o *StartServiceActionBody) contextValidateMongodbExplain(ctx context.Conte } func (o *StartServiceActionBody) contextValidateMysqlExplain(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplain != nil { if swag.IsZero(o.MysqlExplain) { // not required @@ -670,6 +675,7 @@ func (o *StartServiceActionBody) contextValidateMysqlExplain(ctx context.Context } func (o *StartServiceActionBody) contextValidateMysqlExplainJSON(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplainJSON != nil { if swag.IsZero(o.MysqlExplainJSON) { // not required @@ -694,6 +700,7 @@ func (o *StartServiceActionBody) contextValidateMysqlExplainJSON(ctx context.Con } func (o *StartServiceActionBody) contextValidateMysqlExplainTraditionalJSON(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplainTraditionalJSON != nil { if swag.IsZero(o.MysqlExplainTraditionalJSON) { // not required @@ -718,6 +725,7 @@ func (o *StartServiceActionBody) contextValidateMysqlExplainTraditionalJSON(ctx } func (o *StartServiceActionBody) contextValidateMysqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowCreateTable != nil { if swag.IsZero(o.MysqlShowCreateTable) { // not required @@ -742,6 +750,7 @@ func (o *StartServiceActionBody) contextValidateMysqlShowCreateTable(ctx context } func (o *StartServiceActionBody) contextValidateMysqlShowIndex(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowIndex != nil { if swag.IsZero(o.MysqlShowIndex) { // not required @@ -766,6 +775,7 @@ func (o *StartServiceActionBody) contextValidateMysqlShowIndex(ctx context.Conte } func (o *StartServiceActionBody) contextValidateMysqlShowTableStatus(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowTableStatus != nil { if swag.IsZero(o.MysqlShowTableStatus) { // not required @@ -790,6 +800,7 @@ func (o *StartServiceActionBody) contextValidateMysqlShowTableStatus(ctx context } func (o *StartServiceActionBody) contextValidatePostgresShowCreateTable(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresShowCreateTable != nil { if swag.IsZero(o.PostgresShowCreateTable) { // not required @@ -814,6 +825,7 @@ func (o *StartServiceActionBody) contextValidatePostgresShowCreateTable(ctx cont } func (o *StartServiceActionBody) contextValidatePostgresShowIndex(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresShowIndex != nil { if swag.IsZero(o.PostgresShowIndex) { // not required @@ -838,6 +850,7 @@ func (o *StartServiceActionBody) contextValidatePostgresShowIndex(ctx context.Co } func (o *StartServiceActionBody) contextValidatePTMongodbSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTMongodbSummary != nil { if swag.IsZero(o.PTMongodbSummary) { // not required @@ -862,6 +875,7 @@ func (o *StartServiceActionBody) contextValidatePTMongodbSummary(ctx context.Con } func (o *StartServiceActionBody) contextValidatePTMysqlSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTMysqlSummary != nil { if swag.IsZero(o.PTMysqlSummary) { // not required @@ -886,6 +900,7 @@ func (o *StartServiceActionBody) contextValidatePTMysqlSummary(ctx context.Conte } func (o *StartServiceActionBody) contextValidatePTPostgresSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTPostgresSummary != nil { if swag.IsZero(o.PTPostgresSummary) { // not required @@ -932,6 +947,7 @@ StartServiceActionDefaultBody start service action default body swagger:model StartServiceActionDefaultBody */ type StartServiceActionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -1001,7 +1017,9 @@ func (o *StartServiceActionDefaultBody) ContextValidate(ctx context.Context, for } func (o *StartServiceActionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -1021,6 +1039,7 @@ func (o *StartServiceActionDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -1049,6 +1068,7 @@ StartServiceActionDefaultBodyDetailsItems0 start service action default body det swagger:model StartServiceActionDefaultBodyDetailsItems0 */ type StartServiceActionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -1060,6 +1080,7 @@ type StartServiceActionDefaultBodyDetailsItems0 struct { func (o *StartServiceActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1097,6 +1118,7 @@ func (o *StartServiceActionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o StartServiceActionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1160,6 +1182,7 @@ StartServiceActionOKBody start service action OK body swagger:model StartServiceActionOKBody */ type StartServiceActionOKBody struct { + // mongodb explain MongodbExplain *StartServiceActionOKBodyMongodbExplain `json:"mongodb_explain,omitempty"` @@ -1590,6 +1613,7 @@ func (o *StartServiceActionOKBody) ContextValidate(ctx context.Context, formats } func (o *StartServiceActionOKBody) contextValidateMongodbExplain(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExplain != nil { if swag.IsZero(o.MongodbExplain) { // not required @@ -1614,6 +1638,7 @@ func (o *StartServiceActionOKBody) contextValidateMongodbExplain(ctx context.Con } func (o *StartServiceActionOKBody) contextValidateMysqlExplain(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplain != nil { if swag.IsZero(o.MysqlExplain) { // not required @@ -1638,6 +1663,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplain(ctx context.Conte } func (o *StartServiceActionOKBody) contextValidateMysqlExplainJSON(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplainJSON != nil { if swag.IsZero(o.MysqlExplainJSON) { // not required @@ -1662,6 +1688,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplainJSON(ctx context.C } func (o *StartServiceActionOKBody) contextValidateMysqlExplainTraditionalJSON(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlExplainTraditionalJSON != nil { if swag.IsZero(o.MysqlExplainTraditionalJSON) { // not required @@ -1686,6 +1713,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlExplainTraditionalJSON(ct } func (o *StartServiceActionOKBody) contextValidateMysqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowCreateTable != nil { if swag.IsZero(o.MysqlShowCreateTable) { // not required @@ -1710,6 +1738,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowCreateTable(ctx conte } func (o *StartServiceActionOKBody) contextValidateMysqlShowIndex(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowIndex != nil { if swag.IsZero(o.MysqlShowIndex) { // not required @@ -1734,6 +1763,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowIndex(ctx context.Con } func (o *StartServiceActionOKBody) contextValidateMysqlShowTableStatus(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlShowTableStatus != nil { if swag.IsZero(o.MysqlShowTableStatus) { // not required @@ -1758,6 +1788,7 @@ func (o *StartServiceActionOKBody) contextValidateMysqlShowTableStatus(ctx conte } func (o *StartServiceActionOKBody) contextValidatePostgresqlShowCreateTable(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlShowCreateTable != nil { if swag.IsZero(o.PostgresqlShowCreateTable) { // not required @@ -1782,6 +1813,7 @@ func (o *StartServiceActionOKBody) contextValidatePostgresqlShowCreateTable(ctx } func (o *StartServiceActionOKBody) contextValidatePostgresqlShowIndex(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlShowIndex != nil { if swag.IsZero(o.PostgresqlShowIndex) { // not required @@ -1806,6 +1838,7 @@ func (o *StartServiceActionOKBody) contextValidatePostgresqlShowIndex(ctx contex } func (o *StartServiceActionOKBody) contextValidatePTMongodbSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTMongodbSummary != nil { if swag.IsZero(o.PTMongodbSummary) { // not required @@ -1830,6 +1863,7 @@ func (o *StartServiceActionOKBody) contextValidatePTMongodbSummary(ctx context.C } func (o *StartServiceActionOKBody) contextValidatePTMysqlSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTMysqlSummary != nil { if swag.IsZero(o.PTMysqlSummary) { // not required @@ -1854,6 +1888,7 @@ func (o *StartServiceActionOKBody) contextValidatePTMysqlSummary(ctx context.Con } func (o *StartServiceActionOKBody) contextValidatePTPostgresSummary(ctx context.Context, formats strfmt.Registry) error { + if o.PTPostgresSummary != nil { if swag.IsZero(o.PTPostgresSummary) { // not required @@ -1900,6 +1935,7 @@ StartServiceActionOKBodyMongodbExplain start service action OK body mongodb expl swagger:model StartServiceActionOKBodyMongodbExplain */ type StartServiceActionOKBodyMongodbExplain struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1940,6 +1976,7 @@ StartServiceActionOKBodyMysqlExplain start service action OK body mysql explain swagger:model StartServiceActionOKBodyMysqlExplain */ type StartServiceActionOKBodyMysqlExplain struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -1980,6 +2017,7 @@ StartServiceActionOKBodyMysqlExplainJSON start service action OK body mysql expl swagger:model StartServiceActionOKBodyMysqlExplainJSON */ type StartServiceActionOKBodyMysqlExplainJSON struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2020,6 +2058,7 @@ StartServiceActionOKBodyMysqlExplainTraditionalJSON start service action OK body swagger:model StartServiceActionOKBodyMysqlExplainTraditionalJSON */ type StartServiceActionOKBodyMysqlExplainTraditionalJSON struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2060,6 +2099,7 @@ StartServiceActionOKBodyMysqlShowCreateTable start service action OK body mysql swagger:model StartServiceActionOKBodyMysqlShowCreateTable */ type StartServiceActionOKBodyMysqlShowCreateTable struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2100,6 +2140,7 @@ StartServiceActionOKBodyMysqlShowIndex start service action OK body mysql show i swagger:model StartServiceActionOKBodyMysqlShowIndex */ type StartServiceActionOKBodyMysqlShowIndex struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2140,6 +2181,7 @@ StartServiceActionOKBodyMysqlShowTableStatus start service action OK body mysql swagger:model StartServiceActionOKBodyMysqlShowTableStatus */ type StartServiceActionOKBodyMysqlShowTableStatus struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2180,6 +2222,7 @@ StartServiceActionOKBodyPTMongodbSummary Message to retrieve the prepared pt-mon swagger:model StartServiceActionOKBodyPTMongodbSummary */ type StartServiceActionOKBodyPTMongodbSummary struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2220,6 +2263,7 @@ StartServiceActionOKBodyPTMysqlSummary Message to retrieve the prepared pt-mysql swagger:model StartServiceActionOKBodyPTMysqlSummary */ type StartServiceActionOKBodyPTMysqlSummary struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2260,6 +2304,7 @@ StartServiceActionOKBodyPTPostgresSummary Message to retrieve the prepared pt-pg swagger:model StartServiceActionOKBodyPTPostgresSummary */ type StartServiceActionOKBodyPTPostgresSummary struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2300,6 +2345,7 @@ StartServiceActionOKBodyPostgresqlShowCreateTable start service action OK body p swagger:model StartServiceActionOKBodyPostgresqlShowCreateTable */ type StartServiceActionOKBodyPostgresqlShowCreateTable struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2340,6 +2386,7 @@ StartServiceActionOKBodyPostgresqlShowIndex start service action OK body postgre swagger:model StartServiceActionOKBodyPostgresqlShowIndex */ type StartServiceActionOKBodyPostgresqlShowIndex struct { + // Unique Action ID. ActionID string `json:"action_id,omitempty"` @@ -2380,6 +2427,7 @@ StartServiceActionParamsBodyMongodbExplain start service action params body mong swagger:model StartServiceActionParamsBodyMongodbExplain */ type StartServiceActionParamsBodyMongodbExplain struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2423,6 +2471,7 @@ StartServiceActionParamsBodyMysqlExplain start service action params body mysql swagger:model StartServiceActionParamsBodyMysqlExplain */ type StartServiceActionParamsBodyMysqlExplain struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2472,6 +2521,7 @@ StartServiceActionParamsBodyMysqlExplainJSON start service action params body my swagger:model StartServiceActionParamsBodyMysqlExplainJSON */ type StartServiceActionParamsBodyMysqlExplainJSON struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2521,6 +2571,7 @@ StartServiceActionParamsBodyMysqlExplainTraditionalJSON start service action par swagger:model StartServiceActionParamsBodyMysqlExplainTraditionalJSON */ type StartServiceActionParamsBodyMysqlExplainTraditionalJSON struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2570,6 +2621,7 @@ StartServiceActionParamsBodyMysqlShowCreateTable start service action params bod swagger:model StartServiceActionParamsBodyMysqlShowCreateTable */ type StartServiceActionParamsBodyMysqlShowCreateTable struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2616,6 +2668,7 @@ StartServiceActionParamsBodyMysqlShowIndex start service action params body mysq swagger:model StartServiceActionParamsBodyMysqlShowIndex */ type StartServiceActionParamsBodyMysqlShowIndex struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2662,6 +2715,7 @@ StartServiceActionParamsBodyMysqlShowTableStatus start service action params bod swagger:model StartServiceActionParamsBodyMysqlShowTableStatus */ type StartServiceActionParamsBodyMysqlShowTableStatus struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2708,6 +2762,7 @@ StartServiceActionParamsBodyPTMongodbSummary Message to prepare pt-mongodb-summa swagger:model StartServiceActionParamsBodyPTMongodbSummary */ type StartServiceActionParamsBodyPTMongodbSummary struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2748,6 +2803,7 @@ StartServiceActionParamsBodyPTMysqlSummary Message to prepare pt-mysql-summary d swagger:model StartServiceActionParamsBodyPTMysqlSummary */ type StartServiceActionParamsBodyPTMysqlSummary struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2788,6 +2844,7 @@ StartServiceActionParamsBodyPTPostgresSummary Message to prepare pt-pg-summary d swagger:model StartServiceActionParamsBodyPTPostgresSummary */ type StartServiceActionParamsBodyPTPostgresSummary struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2828,6 +2885,7 @@ StartServiceActionParamsBodyPostgresShowCreateTable start service action params swagger:model StartServiceActionParamsBodyPostgresShowCreateTable */ type StartServiceActionParamsBodyPostgresShowCreateTable struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -2874,6 +2932,7 @@ StartServiceActionParamsBodyPostgresShowIndex start service action params body p swagger:model StartServiceActionParamsBodyPostgresShowIndex */ type StartServiceActionParamsBodyPostgresShowIndex struct { + // pmm-agent ID where to run this Action. PMMAgentID string `json:"pmm_agent_id,omitempty"` diff --git a/api/advisors/v1/advisors.pb.go b/api/advisors/v1/advisors.pb.go index 1961afd6e44..e86ccdfcea8 100644 --- a/api/advisors/v1/advisors.pb.go +++ b/api/advisors/v1/advisors.pb.go @@ -7,17 +7,15 @@ package advisorsv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/percona/pmm/api/management/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/management/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -1358,36 +1356,33 @@ func file_advisors_v1_advisors_proto_rawDescGZIP() []byte { return file_advisors_v1_advisors_proto_rawDescData } -var ( - file_advisors_v1_advisors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_advisors_v1_advisors_proto_msgTypes = make([]protoimpl.MessageInfo, 20) - file_advisors_v1_advisors_proto_goTypes = []any{ - (AdvisorCheckInterval)(0), // 0: advisors.v1.AdvisorCheckInterval - (AdvisorCheckFamily)(0), // 1: advisors.v1.AdvisorCheckFamily - (*AdvisorCheckResult)(nil), // 2: advisors.v1.AdvisorCheckResult - (*CheckResultSummary)(nil), // 3: advisors.v1.CheckResultSummary - (*CheckResult)(nil), // 4: advisors.v1.CheckResult - (*AdvisorCheck)(nil), // 5: advisors.v1.AdvisorCheck - (*Advisor)(nil), // 6: advisors.v1.Advisor - (*ChangeAdvisorCheckParams)(nil), // 7: advisors.v1.ChangeAdvisorCheckParams - (*StartAdvisorChecksRequest)(nil), // 8: advisors.v1.StartAdvisorChecksRequest - (*StartAdvisorChecksResponse)(nil), // 9: advisors.v1.StartAdvisorChecksResponse - (*ListAdvisorChecksRequest)(nil), // 10: advisors.v1.ListAdvisorChecksRequest - (*ListAdvisorChecksResponse)(nil), // 11: advisors.v1.ListAdvisorChecksResponse - (*ListAdvisorsRequest)(nil), // 12: advisors.v1.ListAdvisorsRequest - (*ListAdvisorsResponse)(nil), // 13: advisors.v1.ListAdvisorsResponse - (*ChangeAdvisorChecksRequest)(nil), // 14: advisors.v1.ChangeAdvisorChecksRequest - (*ChangeAdvisorChecksResponse)(nil), // 15: advisors.v1.ChangeAdvisorChecksResponse - (*ListFailedServicesRequest)(nil), // 16: advisors.v1.ListFailedServicesRequest - (*ListFailedServicesResponse)(nil), // 17: advisors.v1.ListFailedServicesResponse - (*GetFailedChecksRequest)(nil), // 18: advisors.v1.GetFailedChecksRequest - (*GetFailedChecksResponse)(nil), // 19: advisors.v1.GetFailedChecksResponse - nil, // 20: advisors.v1.AdvisorCheckResult.LabelsEntry - nil, // 21: advisors.v1.CheckResult.LabelsEntry - (v1.Severity)(0), // 22: management.v1.Severity - } -) - +var file_advisors_v1_advisors_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_advisors_v1_advisors_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_advisors_v1_advisors_proto_goTypes = []any{ + (AdvisorCheckInterval)(0), // 0: advisors.v1.AdvisorCheckInterval + (AdvisorCheckFamily)(0), // 1: advisors.v1.AdvisorCheckFamily + (*AdvisorCheckResult)(nil), // 2: advisors.v1.AdvisorCheckResult + (*CheckResultSummary)(nil), // 3: advisors.v1.CheckResultSummary + (*CheckResult)(nil), // 4: advisors.v1.CheckResult + (*AdvisorCheck)(nil), // 5: advisors.v1.AdvisorCheck + (*Advisor)(nil), // 6: advisors.v1.Advisor + (*ChangeAdvisorCheckParams)(nil), // 7: advisors.v1.ChangeAdvisorCheckParams + (*StartAdvisorChecksRequest)(nil), // 8: advisors.v1.StartAdvisorChecksRequest + (*StartAdvisorChecksResponse)(nil), // 9: advisors.v1.StartAdvisorChecksResponse + (*ListAdvisorChecksRequest)(nil), // 10: advisors.v1.ListAdvisorChecksRequest + (*ListAdvisorChecksResponse)(nil), // 11: advisors.v1.ListAdvisorChecksResponse + (*ListAdvisorsRequest)(nil), // 12: advisors.v1.ListAdvisorsRequest + (*ListAdvisorsResponse)(nil), // 13: advisors.v1.ListAdvisorsResponse + (*ChangeAdvisorChecksRequest)(nil), // 14: advisors.v1.ChangeAdvisorChecksRequest + (*ChangeAdvisorChecksResponse)(nil), // 15: advisors.v1.ChangeAdvisorChecksResponse + (*ListFailedServicesRequest)(nil), // 16: advisors.v1.ListFailedServicesRequest + (*ListFailedServicesResponse)(nil), // 17: advisors.v1.ListFailedServicesResponse + (*GetFailedChecksRequest)(nil), // 18: advisors.v1.GetFailedChecksRequest + (*GetFailedChecksResponse)(nil), // 19: advisors.v1.GetFailedChecksResponse + nil, // 20: advisors.v1.AdvisorCheckResult.LabelsEntry + nil, // 21: advisors.v1.CheckResult.LabelsEntry + (v1.Severity)(0), // 22: management.v1.Severity +} var file_advisors_v1_advisors_proto_depIdxs = []int32{ 22, // 0: advisors.v1.AdvisorCheckResult.severity:type_name -> management.v1.Severity 20, // 1: advisors.v1.AdvisorCheckResult.labels:type_name -> advisors.v1.AdvisorCheckResult.LabelsEntry diff --git a/api/advisors/v1/advisors.pb.validate.go b/api/advisors/v1/advisors.pb.validate.go index ef8f8500241..2c9a192edc4 100644 --- a/api/advisors/v1/advisors.pb.validate.go +++ b/api/advisors/v1/advisors.pb.validate.go @@ -1937,6 +1937,7 @@ func (m *GetFailedChecksRequest) validate(all bool) error { // no validation rules for ServiceId if m.PageSize != nil { + if m.GetPageSize() < 1 { err := GetFailedChecksRequestValidationError{ field: "PageSize", @@ -1947,9 +1948,11 @@ func (m *GetFailedChecksRequest) validate(all bool) error { } errors = append(errors, err) } + } if m.PageIndex != nil { + if m.GetPageIndex() < 0 { err := GetFailedChecksRequestValidationError{ field: "PageIndex", @@ -1960,6 +1963,7 @@ func (m *GetFailedChecksRequest) validate(all bool) error { } errors = append(errors, err) } + } if len(errors) > 0 { diff --git a/api/advisors/v1/advisors.swagger.json b/api/advisors/v1/advisors.swagger.json new file mode 100644 index 00000000000..5cb79b42b6c --- /dev/null +++ b/api/advisors/v1/advisors.swagger.json @@ -0,0 +1,539 @@ +{ + "swagger": "2.0", + "info": { + "title": "advisors/v1/advisors.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AdvisorService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/advisors": { + "get": { + "summary": "List Advisors", + "description": "List advisors available to the user.", + "operationId": "ListAdvisors", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListAdvisorsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "AdvisorService" + ] + } + }, + "/v1/advisors/checks": { + "get": { + "summary": "List Advisor Checks", + "description": "List advisor checks available to the user.", + "operationId": "ListAdvisorChecks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListAdvisorChecksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "AdvisorService" + ] + } + }, + "/v1/advisors/checks/failed": { + "get": { + "summary": "Get Failed Advisor Checks", + "description": "Returns the latest check results for a given service.", + "operationId": "GetFailedChecks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetFailedChecksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "page_size", + "description": "Maximum number of results per page.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "page_index", + "description": "Index of the requested page, starts from 0.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "service_id", + "description": "Service ID.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "AdvisorService" + ] + } + }, + "/v1/advisors/checks:batchChange": { + "post": { + "summary": "Change Advisor Checks", + "description": "Enables/disables advisor checks or changes their exec interval.", + "operationId": "ChangeAdvisorChecks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeAdvisorChecksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ChangeAdvisorChecksRequest" + } + } + ], + "tags": [ + "AdvisorService" + ] + } + }, + "/v1/advisors/checks:start": { + "post": { + "summary": "Start Advisor Checks", + "description": "Executes Advisor checks and returns when all checks are executed. All available checks will be started if check names aren't specified.", + "operationId": "StartAdvisorChecks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StartAdvisorChecksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StartAdvisorChecksRequest" + } + } + ], + "tags": [ + "AdvisorService" + ] + } + }, + "/v1/advisors/failedServices": { + "get": { + "summary": "List Failed Services", + "description": "Returns a list of services with failed checks and a summary of check results.", + "operationId": "ListFailedServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListFailedServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "AdvisorService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1Advisor": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "description": { + "type": "string", + "description": "Long human-readable description." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "comment": { + "type": "string", + "description": "Comment." + }, + "category": { + "type": "string", + "description": "Category." + }, + "checks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AdvisorCheck" + }, + "description": "Advisor checks." + } + } + }, + "v1AdvisorCheck": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "enabled": { + "type": "boolean", + "description": "True if that check is enabled." + }, + "description": { + "type": "string", + "description": "Long human-readable description." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "interval": { + "$ref": "#/definitions/v1AdvisorCheckInterval", + "description": "Check execution interval." + }, + "family": { + "$ref": "#/definitions/v1AdvisorCheckFamily", + "description": "DB family." + } + }, + "description": "AdvisorCheck contains check name and status." + }, + "v1AdvisorCheckFamily": { + "type": "string", + "enum": [ + "ADVISOR_CHECK_FAMILY_UNSPECIFIED", + "ADVISOR_CHECK_FAMILY_MYSQL", + "ADVISOR_CHECK_FAMILY_POSTGRESQL", + "ADVISOR_CHECK_FAMILY_MONGODB" + ], + "default": "ADVISOR_CHECK_FAMILY_UNSPECIFIED" + }, + "v1AdvisorCheckInterval": { + "type": "string", + "enum": [ + "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "ADVISOR_CHECK_INTERVAL_STANDARD", + "ADVISOR_CHECK_INTERVAL_FREQUENT", + "ADVISOR_CHECK_INTERVAL_RARE" + ], + "default": "ADVISOR_CHECK_INTERVAL_UNSPECIFIED", + "description": "AdvisorCheckInterval represents possible execution interval values for checks." + }, + "v1ChangeAdvisorCheckParams": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the check to change." + }, + "enable": { + "type": "boolean", + "x-nullable": true + }, + "interval": { + "$ref": "#/definitions/v1AdvisorCheckInterval", + "description": "check execution interval." + } + }, + "description": "ChangeAdvisorCheckParams specifies a single check parameters." + }, + "v1ChangeAdvisorChecksRequest": { + "type": "object", + "properties": { + "params": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ChangeAdvisorCheckParams" + } + } + } + }, + "v1ChangeAdvisorChecksResponse": { + "type": "object" + }, + "v1CheckResult": { + "type": "object", + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "severity": { + "$ref": "#/definitions/v1Severity" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "read_more_url": { + "type": "string", + "description": "URL containing information on how to resolve an issue detected by an Advisor check." + }, + "service_name": { + "type": "string", + "description": "Name of the monitored service on which the check ran." + }, + "service_id": { + "type": "string", + "description": "ID of the monitored service on which the check ran." + }, + "check_name": { + "type": "string", + "title": "Name of the check that failed" + }, + "silenced": { + "type": "boolean", + "title": "Silence status of the check result" + } + }, + "description": "CheckResult represents the check results for a given service." + }, + "v1CheckResultSummary": { + "type": "object", + "properties": { + "service_name": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "emergency_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"EMERGENCY\"." + }, + "alert_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"ALERT\"." + }, + "critical_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"CRITICAL\"." + }, + "error_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"ERROR\"." + }, + "warning_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"WARNING\"." + }, + "notice_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"NOTICE\"." + }, + "info_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"INFO\"." + }, + "debug_count": { + "type": "integer", + "format": "int64", + "description": "Number of failed checks for this service with severity level \"DEBUG\"." + } + }, + "description": "CheckResultSummary is a summary of check results." + }, + "v1GetFailedChecksResponse": { + "type": "object", + "properties": { + "total_items": { + "type": "integer", + "format": "int32", + "description": "Total number of results." + }, + "total_pages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages." + }, + "results": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1CheckResult" + }, + "title": "Check results" + } + } + }, + "v1ListAdvisorChecksResponse": { + "type": "object", + "properties": { + "checks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AdvisorCheck" + } + } + } + }, + "v1ListAdvisorsResponse": { + "type": "object", + "properties": { + "advisors": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Advisor" + } + } + } + }, + "v1ListFailedServicesResponse": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1CheckResultSummary" + } + } + } + }, + "v1Severity": { + "type": "string", + "enum": [ + "SEVERITY_UNSPECIFIED", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "default": "SEVERITY_UNSPECIFIED", + "description": "Severity represents severity level of the check result or alert." + }, + "v1StartAdvisorChecksRequest": { + "type": "object", + "properties": { + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Names of the checks that should be started." + } + } + }, + "v1StartAdvisorChecksResponse": { + "type": "object" + } + } +} diff --git a/api/advisors/v1/advisors_grpc.pb.go b/api/advisors/v1/advisors_grpc.pb.go index 968dd072fc8..b5a99aa9d13 100644 --- a/api/advisors/v1/advisors_grpc.pb.go +++ b/api/advisors/v1/advisors_grpc.pb.go @@ -8,7 +8,6 @@ package advisorsv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -147,23 +146,18 @@ type UnimplementedAdvisorServiceServer struct{} func (UnimplementedAdvisorServiceServer) ListFailedServices(context.Context, *ListFailedServicesRequest) (*ListFailedServicesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListFailedServices not implemented") } - func (UnimplementedAdvisorServiceServer) GetFailedChecks(context.Context, *GetFailedChecksRequest) (*GetFailedChecksResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetFailedChecks not implemented") } - func (UnimplementedAdvisorServiceServer) StartAdvisorChecks(context.Context, *StartAdvisorChecksRequest) (*StartAdvisorChecksResponse, error) { return nil, status.Error(codes.Unimplemented, "method StartAdvisorChecks not implemented") } - func (UnimplementedAdvisorServiceServer) ListAdvisorChecks(context.Context, *ListAdvisorChecksRequest) (*ListAdvisorChecksResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListAdvisorChecks not implemented") } - func (UnimplementedAdvisorServiceServer) ListAdvisors(context.Context, *ListAdvisorsRequest) (*ListAdvisorsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListAdvisors not implemented") } - func (UnimplementedAdvisorServiceServer) ChangeAdvisorChecks(context.Context, *ChangeAdvisorChecksRequest) (*ChangeAdvisorChecksResponse, error) { return nil, status.Error(codes.Unimplemented, "method ChangeAdvisorChecks not implemented") } diff --git a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go index 9f9ee299089..a6f9670f4d3 100644 --- a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_parameters.go @@ -60,6 +60,7 @@ ChangeAdvisorChecksParams contains all the parameters to send to the API endpoin Typically these are written to a http.Request. */ type ChangeAdvisorChecksParams struct { + // Body. Body ChangeAdvisorChecksBody @@ -129,6 +130,7 @@ func (o *ChangeAdvisorChecksParams) SetBody(body ChangeAdvisorChecksBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go index 5206e6f500b..bd687235181 100644 --- a/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/change_advisor_checks_responses.go @@ -105,6 +105,7 @@ func (o *ChangeAdvisorChecksOK) GetPayload() any { } func (o *ChangeAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -176,6 +177,7 @@ func (o *ChangeAdvisorChecksDefault) GetPayload() *ChangeAdvisorChecksDefaultBod } func (o *ChangeAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAdvisorChecksDefaultBody) // response payload @@ -191,6 +193,7 @@ ChangeAdvisorChecksBody change advisor checks body swagger:model ChangeAdvisorChecksBody */ type ChangeAdvisorChecksBody struct { + // params Params []*ChangeAdvisorChecksParamsBodyParamsItems0 `json:"params"` } @@ -254,7 +257,9 @@ func (o *ChangeAdvisorChecksBody) ContextValidate(ctx context.Context, formats s } func (o *ChangeAdvisorChecksBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -274,6 +279,7 @@ func (o *ChangeAdvisorChecksBody) contextValidateParams(ctx context.Context, for return err } } + } return nil @@ -302,6 +308,7 @@ ChangeAdvisorChecksDefaultBody change advisor checks default body swagger:model ChangeAdvisorChecksDefaultBody */ type ChangeAdvisorChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -371,7 +378,9 @@ func (o *ChangeAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, fo } func (o *ChangeAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -391,6 +400,7 @@ func (o *ChangeAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Cont return err } } + } return nil @@ -419,6 +429,7 @@ ChangeAdvisorChecksDefaultBodyDetailsItems0 change advisor checks default body d swagger:model ChangeAdvisorChecksDefaultBodyDetailsItems0 */ type ChangeAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -430,6 +441,7 @@ type ChangeAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -467,6 +479,7 @@ func (o *ChangeAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -530,6 +543,7 @@ ChangeAdvisorChecksParamsBodyParamsItems0 ChangeAdvisorCheckParams specifies a s swagger:model ChangeAdvisorChecksParamsBodyParamsItems0 */ type ChangeAdvisorChecksParamsBodyParamsItems0 struct { + // The name of the check to change. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go index 0248b1355a4..87eedd930ea 100644 --- a/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/get_failed_checks_parameters.go @@ -61,6 +61,7 @@ GetFailedChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetFailedChecksParams struct { + /* PageIndex. Index of the requested page, starts from 0. @@ -171,6 +172,7 @@ func (o *GetFailedChecksParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -186,6 +188,7 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qPageIndex := swag.FormatInt32(qrPageIndex) if qPageIndex != "" { + if err := r.SetQueryParam("page_index", qPageIndex); err != nil { return err } @@ -202,6 +205,7 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } @@ -218,6 +222,7 @@ func (o *GetFailedChecksParams) WriteToRequest(r runtime.ClientRequest, reg strf } qServiceID := qrServiceID if qServiceID != "" { + if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go b/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go index a74c7943f5a..80ff7506eb0 100644 --- a/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/get_failed_checks_responses.go @@ -105,6 +105,7 @@ func (o *GetFailedChecksOK) GetPayload() *GetFailedChecksOKBody { } func (o *GetFailedChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFailedChecksOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetFailedChecksDefault) GetPayload() *GetFailedChecksDefaultBody { } func (o *GetFailedChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFailedChecksDefaultBody) // response payload @@ -193,6 +195,7 @@ GetFailedChecksDefaultBody get failed checks default body swagger:model GetFailedChecksDefaultBody */ type GetFailedChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *GetFailedChecksDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *GetFailedChecksDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -310,6 +316,7 @@ GetFailedChecksDefaultBodyDetailsItems0 get failed checks default body details i swagger:model GetFailedChecksDefaultBodyDetailsItems0 */ type GetFailedChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type GetFailedChecksDefaultBodyDetailsItems0 struct { func (o *GetFailedChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *GetFailedChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetFailedChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ GetFailedChecksOKBody get failed checks OK body swagger:model GetFailedChecksOKBody */ type GetFailedChecksOKBody struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -490,7 +500,9 @@ func (o *GetFailedChecksOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Results); i++ { + if o.Results[i] != nil { if swag.IsZero(o.Results[i]) { // not required @@ -510,6 +522,7 @@ func (o *GetFailedChecksOKBody) contextValidateResults(ctx context.Context, form return err } } + } return nil @@ -538,6 +551,7 @@ GetFailedChecksOKBodyResultsItems0 CheckResult represents the check results for swagger:model GetFailedChecksOKBodyResultsItems0 */ type GetFailedChecksOKBodyResultsItems0 struct { + // summary Summary string `json:"summary,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go index 23e2a16e65b..4718c378e1a 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_parameters.go @@ -115,6 +115,7 @@ func (o *ListAdvisorChecksParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go index 1696a05ac3d..9b715e5fb64 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisor_checks_responses.go @@ -105,6 +105,7 @@ func (o *ListAdvisorChecksOK) GetPayload() *ListAdvisorChecksOKBody { } func (o *ListAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorChecksOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListAdvisorChecksDefault) GetPayload() *ListAdvisorChecksDefaultBody { } func (o *ListAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorChecksDefaultBody) // response payload @@ -193,6 +195,7 @@ ListAdvisorChecksDefaultBody list advisor checks default body swagger:model ListAdvisorChecksDefaultBody */ type ListAdvisorChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, form } func (o *ListAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -310,6 +316,7 @@ ListAdvisorChecksDefaultBodyDetailsItems0 list advisor checks default body detai swagger:model ListAdvisorChecksDefaultBodyDetailsItems0 */ type ListAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *ListAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListAdvisorChecksOKBody list advisor checks OK body swagger:model ListAdvisorChecksOKBody */ type ListAdvisorChecksOKBody struct { + // checks Checks []*ListAdvisorChecksOKBodyChecksItems0 `json:"checks"` } @@ -484,7 +494,9 @@ func (o *ListAdvisorChecksOKBody) ContextValidate(ctx context.Context, formats s } func (o *ListAdvisorChecksOKBody) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Checks); i++ { + if o.Checks[i] != nil { if swag.IsZero(o.Checks[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListAdvisorChecksOKBody) contextValidateChecks(ctx context.Context, for return err } } + } return nil @@ -532,6 +545,7 @@ ListAdvisorChecksOKBodyChecksItems0 AdvisorCheck contains check name and status. swagger:model ListAdvisorChecksOKBodyChecksItems0 */ type ListAdvisorChecksOKBodyChecksItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go b/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go index 214b86b0951..375bb68b896 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisors_parameters.go @@ -115,6 +115,7 @@ func (o *ListAdvisorsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAdvisorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go b/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go index 4631a560e62..6f3228b661a 100644 --- a/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_advisors_responses.go @@ -105,6 +105,7 @@ func (o *ListAdvisorsOK) GetPayload() *ListAdvisorsOKBody { } func (o *ListAdvisorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListAdvisorsDefault) GetPayload() *ListAdvisorsDefaultBody { } func (o *ListAdvisorsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAdvisorsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListAdvisorsDefaultBody list advisors default body swagger:model ListAdvisorsDefaultBody */ type ListAdvisorsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListAdvisorsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListAdvisorsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -310,6 +316,7 @@ ListAdvisorsDefaultBodyDetailsItems0 list advisors default body details items0 swagger:model ListAdvisorsDefaultBodyDetailsItems0 */ type ListAdvisorsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListAdvisorsDefaultBodyDetailsItems0 struct { func (o *ListAdvisorsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListAdvisorsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAdvisorsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListAdvisorsOKBody list advisors OK body swagger:model ListAdvisorsOKBody */ type ListAdvisorsOKBody struct { + // advisors Advisors []*ListAdvisorsOKBodyAdvisorsItems0 `json:"advisors"` } @@ -484,7 +494,9 @@ func (o *ListAdvisorsOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Advisors); i++ { + if o.Advisors[i] != nil { if swag.IsZero(o.Advisors[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListAdvisorsOKBody) contextValidateAdvisors(ctx context.Context, format return err } } + } return nil @@ -532,6 +545,7 @@ ListAdvisorsOKBodyAdvisorsItems0 list advisors OK body advisors items0 swagger:model ListAdvisorsOKBodyAdvisorsItems0 */ type ListAdvisorsOKBodyAdvisorsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -610,7 +624,9 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) ContextValidate(ctx context.Context, } func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Checks); i++ { + if o.Checks[i] != nil { if swag.IsZero(o.Checks[i]) { // not required @@ -630,6 +646,7 @@ func (o *ListAdvisorsOKBodyAdvisorsItems0) contextValidateChecks(ctx context.Con return err } } + } return nil @@ -658,6 +675,7 @@ ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 AdvisorCheck contains check name an swagger:model ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 */ type ListAdvisorsOKBodyAdvisorsItems0ChecksItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go b/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go index 7b386ac01a3..579c66ebdae 100644 --- a/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/list_failed_services_parameters.go @@ -115,6 +115,7 @@ func (o *ListFailedServicesParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListFailedServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go b/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go index f8a8531e45e..8cc3888c528 100644 --- a/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go +++ b/api/advisors/v1/json/client/advisor_service/list_failed_services_responses.go @@ -104,6 +104,7 @@ func (o *ListFailedServicesOK) GetPayload() *ListFailedServicesOKBody { } func (o *ListFailedServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListFailedServicesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListFailedServicesDefault) GetPayload() *ListFailedServicesDefaultBody } func (o *ListFailedServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListFailedServicesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListFailedServicesDefaultBody list failed services default body swagger:model ListFailedServicesDefaultBody */ type ListFailedServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *ListFailedServicesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *ListFailedServicesDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -309,6 +315,7 @@ ListFailedServicesDefaultBodyDetailsItems0 list failed services default body det swagger:model ListFailedServicesDefaultBodyDetailsItems0 */ type ListFailedServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type ListFailedServicesDefaultBodyDetailsItems0 struct { func (o *ListFailedServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *ListFailedServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ListFailedServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ ListFailedServicesOKBody list failed services OK body swagger:model ListFailedServicesOKBody */ type ListFailedServicesOKBody struct { + // result Result []*ListFailedServicesOKBodyResultItems0 `json:"result"` } @@ -483,7 +493,9 @@ func (o *ListFailedServicesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Result); i++ { + if o.Result[i] != nil { if swag.IsZero(o.Result[i]) { // not required @@ -503,6 +515,7 @@ func (o *ListFailedServicesOKBody) contextValidateResult(ctx context.Context, fo return err } } + } return nil @@ -531,6 +544,7 @@ ListFailedServicesOKBodyResultItems0 CheckResultSummary is a summary of check re swagger:model ListFailedServicesOKBodyResultItems0 */ type ListFailedServicesOKBodyResultItems0 struct { + // service name ServiceName string `json:"service_name,omitempty"` diff --git a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go index 879f8418f64..9a9d66c843a 100644 --- a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go +++ b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_parameters.go @@ -60,6 +60,7 @@ StartAdvisorChecksParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartAdvisorChecksParams struct { + // Body. Body StartAdvisorChecksBody @@ -129,6 +130,7 @@ func (o *StartAdvisorChecksParams) SetBody(body StartAdvisorChecksBody) { // WriteToRequest writes these params to a swagger request func (o *StartAdvisorChecksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go index 4fd31464244..c1c2b9eea3f 100644 --- a/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go +++ b/api/advisors/v1/json/client/advisor_service/start_advisor_checks_responses.go @@ -104,6 +104,7 @@ func (o *StartAdvisorChecksOK) GetPayload() any { } func (o *StartAdvisorChecksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *StartAdvisorChecksDefault) GetPayload() *StartAdvisorChecksDefaultBody } func (o *StartAdvisorChecksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartAdvisorChecksDefaultBody) // response payload @@ -190,6 +192,7 @@ StartAdvisorChecksBody start advisor checks body swagger:model StartAdvisorChecksBody */ type StartAdvisorChecksBody struct { + // Names of the checks that should be started. Names []string `json:"names"` } @@ -227,6 +230,7 @@ StartAdvisorChecksDefaultBody start advisor checks default body swagger:model StartAdvisorChecksDefaultBody */ type StartAdvisorChecksDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *StartAdvisorChecksDefaultBody) ContextValidate(ctx context.Context, for } func (o *StartAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,6 +322,7 @@ func (o *StartAdvisorChecksDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -344,6 +351,7 @@ StartAdvisorChecksDefaultBodyDetailsItems0 start advisor checks default body det swagger:model StartAdvisorChecksDefaultBodyDetailsItems0 */ type StartAdvisorChecksDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -355,6 +363,7 @@ type StartAdvisorChecksDefaultBodyDetailsItems0 struct { func (o *StartAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -392,6 +401,7 @@ func (o *StartAdvisorChecksDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o StartAdvisorChecksDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/agent/pb/agent.pb.go b/api/agent/pb/agent.pb.go index cfe97cee491..3e266018313 100644 --- a/api/agent/pb/agent.pb.go +++ b/api/agent/pb/agent.pb.go @@ -7,13 +7,11 @@ package pb import ( - reflect "reflect" - unsafe "unsafe" - + v1 "github.com/percona/pmm/api/agent/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/agent/v1" + reflect "reflect" + unsafe "unsafe" ) const ( @@ -37,7 +35,6 @@ var file_agent_pb_agent_proto_goTypes = []any{ (*v1.AgentMessage)(nil), // 0: agent.v1.AgentMessage (*v1.ServerMessage)(nil), // 1: agent.v1.ServerMessage } - var file_agent_pb_agent_proto_depIdxs = []int32{ 0, // 0: agent.Agent.Connect:input_type -> agent.v1.AgentMessage 1, // 1: agent.Agent.Connect:output_type -> agent.v1.ServerMessage diff --git a/api/agent/pb/agent.swagger.json b/api/agent/pb/agent.swagger.json new file mode 100644 index 00000000000..5c75bc6dbe5 --- /dev/null +++ b/api/agent/pb/agent.swagger.json @@ -0,0 +1,55 @@ +{ + "swagger": "2.0", + "info": { + "title": "agent/pb/agent.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "Agent" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + } + } +} diff --git a/api/agent/pb/agent_grpc.pb.go b/api/agent/pb/agent_grpc.pb.go index 6755a51892e..591479ea96f 100644 --- a/api/agent/pb/agent_grpc.pb.go +++ b/api/agent/pb/agent_grpc.pb.go @@ -8,12 +8,10 @@ package pb import ( context "context" - + v1 "github.com/percona/pmm/api/agent/v1" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - - v1 "github.com/percona/pmm/api/agent/v1" ) // This is a compile-time assertion to ensure that this generated file diff --git a/api/agent/v1/agent.pb.go b/api/agent/v1/agent.pb.go index 9169133a80d..134579c7352 100644 --- a/api/agent/v1/agent.pb.go +++ b/api/agent/v1/agent.pb.go @@ -7,18 +7,16 @@ package agentv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - + v11 "github.com/percona/pmm/api/backup/v1" + v1 "github.com/percona/pmm/api/inventory/v1" status "google.golang.org/genproto/googleapis/rpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v11 "github.com/percona/pmm/api/backup/v1" - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -7109,118 +7107,115 @@ func file_agent_v1_agent_proto_rawDescGZIP() []byte { return file_agent_v1_agent_proto_rawDescData } -var ( - file_agent_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 92) - file_agent_v1_agent_proto_goTypes = []any{ - (MysqlExplainOutputFormat)(0), // 0: agent.v1.MysqlExplainOutputFormat - (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService - (*TextFiles)(nil), // 2: agent.v1.TextFiles - (*Ping)(nil), // 3: agent.v1.Ping - (*Pong)(nil), // 4: agent.v1.Pong - (*QANCollectRequest)(nil), // 5: agent.v1.QANCollectRequest - (*QANCollectResponse)(nil), // 6: agent.v1.QANCollectResponse - (*StateChangedRequest)(nil), // 7: agent.v1.StateChangedRequest - (*StateChangedResponse)(nil), // 8: agent.v1.StateChangedResponse - (*SetStateRequest)(nil), // 9: agent.v1.SetStateRequest - (*SetStateResponse)(nil), // 10: agent.v1.SetStateResponse - (*QueryActionValue)(nil), // 11: agent.v1.QueryActionValue - (*QueryActionSlice)(nil), // 12: agent.v1.QueryActionSlice - (*QueryActionMap)(nil), // 13: agent.v1.QueryActionMap - (*QueryActionBinary)(nil), // 14: agent.v1.QueryActionBinary - (*QueryActionResult)(nil), // 15: agent.v1.QueryActionResult - (*StartActionRequest)(nil), // 16: agent.v1.StartActionRequest - (*StartActionResponse)(nil), // 17: agent.v1.StartActionResponse - (*StopActionRequest)(nil), // 18: agent.v1.StopActionRequest - (*StopActionResponse)(nil), // 19: agent.v1.StopActionResponse - (*ActionResultRequest)(nil), // 20: agent.v1.ActionResultRequest - (*ActionResultResponse)(nil), // 21: agent.v1.ActionResultResponse - (*PBMSwitchPITRRequest)(nil), // 22: agent.v1.PBMSwitchPITRRequest - (*PBMSwitchPITRResponse)(nil), // 23: agent.v1.PBMSwitchPITRResponse - (*AgentLogsRequest)(nil), // 24: agent.v1.AgentLogsRequest - (*AgentLogsResponse)(nil), // 25: agent.v1.AgentLogsResponse - (*CheckConnectionRequest)(nil), // 26: agent.v1.CheckConnectionRequest - (*CheckConnectionResponse)(nil), // 27: agent.v1.CheckConnectionResponse - (*ServiceInfoRequest)(nil), // 28: agent.v1.ServiceInfoRequest - (*ServiceInfoResponse)(nil), // 29: agent.v1.ServiceInfoResponse - (*JobStatusRequest)(nil), // 30: agent.v1.JobStatusRequest - (*JobStatusResponse)(nil), // 31: agent.v1.JobStatusResponse - (*S3LocationConfig)(nil), // 32: agent.v1.S3LocationConfig - (*FilesystemLocationConfig)(nil), // 33: agent.v1.FilesystemLocationConfig - (*StartJobRequest)(nil), // 34: agent.v1.StartJobRequest - (*StartJobResponse)(nil), // 35: agent.v1.StartJobResponse - (*StopJobRequest)(nil), // 36: agent.v1.StopJobRequest - (*StopJobResponse)(nil), // 37: agent.v1.StopJobResponse - (*JobResult)(nil), // 38: agent.v1.JobResult - (*JobProgress)(nil), // 39: agent.v1.JobProgress - (*GetVersionsRequest)(nil), // 40: agent.v1.GetVersionsRequest - (*GetVersionsResponse)(nil), // 41: agent.v1.GetVersionsResponse - (*AgentMessage)(nil), // 42: agent.v1.AgentMessage - (*ServerMessage)(nil), // 43: agent.v1.ServerMessage - nil, // 44: agent.v1.TextFiles.FilesEntry - (*SetStateRequest_AgentProcess)(nil), // 45: agent.v1.SetStateRequest.AgentProcess - nil, // 46: agent.v1.SetStateRequest.AgentProcessesEntry - (*SetStateRequest_BuiltinAgent)(nil), // 47: agent.v1.SetStateRequest.BuiltinAgent - nil, // 48: agent.v1.SetStateRequest.BuiltinAgentsEntry - nil, // 49: agent.v1.SetStateRequest.AgentProcess.TextFilesEntry - nil, // 50: agent.v1.SetStateRequest.BuiltinAgent.EnvEntry - nil, // 51: agent.v1.QueryActionMap.MapEntry - (*StartActionRequest_MySQLExplainParams)(nil), // 52: agent.v1.StartActionRequest.MySQLExplainParams - (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 53: agent.v1.StartActionRequest.MySQLShowCreateTableParams - (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 54: agent.v1.StartActionRequest.MySQLShowTableStatusParams - (*StartActionRequest_MySQLShowIndexParams)(nil), // 55: agent.v1.StartActionRequest.MySQLShowIndexParams - (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 56: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams - (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 57: agent.v1.StartActionRequest.PostgreSQLShowIndexParams - (*StartActionRequest_MongoDBExplainParams)(nil), // 58: agent.v1.StartActionRequest.MongoDBExplainParams - (*StartActionRequest_PTSummaryParams)(nil), // 59: agent.v1.StartActionRequest.PTSummaryParams - (*StartActionRequest_PTPgSummaryParams)(nil), // 60: agent.v1.StartActionRequest.PTPgSummaryParams - (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 61: agent.v1.StartActionRequest.PTMongoDBSummaryParams - (*StartActionRequest_PTMySQLSummaryParams)(nil), // 62: agent.v1.StartActionRequest.PTMySQLSummaryParams - (*StartActionRequest_MySQLQueryShowParams)(nil), // 63: agent.v1.StartActionRequest.MySQLQueryShowParams - (*StartActionRequest_MySQLQuerySelectParams)(nil), // 64: agent.v1.StartActionRequest.MySQLQuerySelectParams - (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 65: agent.v1.StartActionRequest.PostgreSQLQueryShowParams - (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 66: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams - (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 67: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams - (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 68: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams - (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 69: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams - (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 70: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams - (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 71: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams - (*StartActionRequest_RestartSystemServiceParams)(nil), // 72: agent.v1.StartActionRequest.RestartSystemServiceParams - (*CheckConnectionResponse_Stats)(nil), // 73: agent.v1.CheckConnectionResponse.Stats - (*StartJobRequest_MySQLBackup)(nil), // 74: agent.v1.StartJobRequest.MySQLBackup - (*StartJobRequest_MySQLRestoreBackup)(nil), // 75: agent.v1.StartJobRequest.MySQLRestoreBackup - (*StartJobRequest_MongoDBBackup)(nil), // 76: agent.v1.StartJobRequest.MongoDBBackup - (*StartJobRequest_MongoDBRestoreBackup)(nil), // 77: agent.v1.StartJobRequest.MongoDBRestoreBackup - (*JobResult_Error)(nil), // 78: agent.v1.JobResult.Error - (*JobResult_MongoDBBackup)(nil), // 79: agent.v1.JobResult.MongoDBBackup - (*JobResult_MySQLBackup)(nil), // 80: agent.v1.JobResult.MySQLBackup - (*JobResult_MySQLRestoreBackup)(nil), // 81: agent.v1.JobResult.MySQLRestoreBackup - (*JobResult_MongoDBRestoreBackup)(nil), // 82: agent.v1.JobResult.MongoDBRestoreBackup - (*JobProgress_MySQLBackup)(nil), // 83: agent.v1.JobProgress.MySQLBackup - (*JobProgress_MySQLRestoreBackup)(nil), // 84: agent.v1.JobProgress.MySQLRestoreBackup - (*JobProgress_Logs)(nil), // 85: agent.v1.JobProgress.Logs - (*GetVersionsRequest_MySQLd)(nil), // 86: agent.v1.GetVersionsRequest.MySQLd - (*GetVersionsRequest_Xtrabackup)(nil), // 87: agent.v1.GetVersionsRequest.Xtrabackup - (*GetVersionsRequest_Xbcloud)(nil), // 88: agent.v1.GetVersionsRequest.Xbcloud - (*GetVersionsRequest_Qpress)(nil), // 89: agent.v1.GetVersionsRequest.Qpress - (*GetVersionsRequest_MongoDB)(nil), // 90: agent.v1.GetVersionsRequest.MongoDB - (*GetVersionsRequest_PBM)(nil), // 91: agent.v1.GetVersionsRequest.PBM - (*GetVersionsRequest_Software)(nil), // 92: agent.v1.GetVersionsRequest.Software - (*GetVersionsResponse_Version)(nil), // 93: agent.v1.GetVersionsResponse.Version - (*timestamppb.Timestamp)(nil), // 94: google.protobuf.Timestamp - (*MetricsBucket)(nil), // 95: agent.v1.MetricsBucket - (v1.AgentStatus)(0), // 96: inventory.v1.AgentStatus - (*durationpb.Duration)(nil), // 97: google.protobuf.Duration - (v1.ServiceType)(0), // 98: inventory.v1.ServiceType - (*status.Status)(nil), // 99: google.rpc.Status - (v1.AgentType)(0), // 100: inventory.v1.AgentType - (*v1.RTAOptions)(nil), // 101: inventory.v1.RTAOptions - (v11.DataModel)(0), // 102: backup.v1.DataModel - (*v11.PbmMetadata)(nil), // 103: backup.v1.PbmMetadata - (*v11.Metadata)(nil), // 104: backup.v1.Metadata - } -) - +var file_agent_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_agent_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 92) +var file_agent_v1_agent_proto_goTypes = []any{ + (MysqlExplainOutputFormat)(0), // 0: agent.v1.MysqlExplainOutputFormat + (StartActionRequest_RestartSystemServiceParams_SystemService)(0), // 1: agent.v1.StartActionRequest.RestartSystemServiceParams.SystemService + (*TextFiles)(nil), // 2: agent.v1.TextFiles + (*Ping)(nil), // 3: agent.v1.Ping + (*Pong)(nil), // 4: agent.v1.Pong + (*QANCollectRequest)(nil), // 5: agent.v1.QANCollectRequest + (*QANCollectResponse)(nil), // 6: agent.v1.QANCollectResponse + (*StateChangedRequest)(nil), // 7: agent.v1.StateChangedRequest + (*StateChangedResponse)(nil), // 8: agent.v1.StateChangedResponse + (*SetStateRequest)(nil), // 9: agent.v1.SetStateRequest + (*SetStateResponse)(nil), // 10: agent.v1.SetStateResponse + (*QueryActionValue)(nil), // 11: agent.v1.QueryActionValue + (*QueryActionSlice)(nil), // 12: agent.v1.QueryActionSlice + (*QueryActionMap)(nil), // 13: agent.v1.QueryActionMap + (*QueryActionBinary)(nil), // 14: agent.v1.QueryActionBinary + (*QueryActionResult)(nil), // 15: agent.v1.QueryActionResult + (*StartActionRequest)(nil), // 16: agent.v1.StartActionRequest + (*StartActionResponse)(nil), // 17: agent.v1.StartActionResponse + (*StopActionRequest)(nil), // 18: agent.v1.StopActionRequest + (*StopActionResponse)(nil), // 19: agent.v1.StopActionResponse + (*ActionResultRequest)(nil), // 20: agent.v1.ActionResultRequest + (*ActionResultResponse)(nil), // 21: agent.v1.ActionResultResponse + (*PBMSwitchPITRRequest)(nil), // 22: agent.v1.PBMSwitchPITRRequest + (*PBMSwitchPITRResponse)(nil), // 23: agent.v1.PBMSwitchPITRResponse + (*AgentLogsRequest)(nil), // 24: agent.v1.AgentLogsRequest + (*AgentLogsResponse)(nil), // 25: agent.v1.AgentLogsResponse + (*CheckConnectionRequest)(nil), // 26: agent.v1.CheckConnectionRequest + (*CheckConnectionResponse)(nil), // 27: agent.v1.CheckConnectionResponse + (*ServiceInfoRequest)(nil), // 28: agent.v1.ServiceInfoRequest + (*ServiceInfoResponse)(nil), // 29: agent.v1.ServiceInfoResponse + (*JobStatusRequest)(nil), // 30: agent.v1.JobStatusRequest + (*JobStatusResponse)(nil), // 31: agent.v1.JobStatusResponse + (*S3LocationConfig)(nil), // 32: agent.v1.S3LocationConfig + (*FilesystemLocationConfig)(nil), // 33: agent.v1.FilesystemLocationConfig + (*StartJobRequest)(nil), // 34: agent.v1.StartJobRequest + (*StartJobResponse)(nil), // 35: agent.v1.StartJobResponse + (*StopJobRequest)(nil), // 36: agent.v1.StopJobRequest + (*StopJobResponse)(nil), // 37: agent.v1.StopJobResponse + (*JobResult)(nil), // 38: agent.v1.JobResult + (*JobProgress)(nil), // 39: agent.v1.JobProgress + (*GetVersionsRequest)(nil), // 40: agent.v1.GetVersionsRequest + (*GetVersionsResponse)(nil), // 41: agent.v1.GetVersionsResponse + (*AgentMessage)(nil), // 42: agent.v1.AgentMessage + (*ServerMessage)(nil), // 43: agent.v1.ServerMessage + nil, // 44: agent.v1.TextFiles.FilesEntry + (*SetStateRequest_AgentProcess)(nil), // 45: agent.v1.SetStateRequest.AgentProcess + nil, // 46: agent.v1.SetStateRequest.AgentProcessesEntry + (*SetStateRequest_BuiltinAgent)(nil), // 47: agent.v1.SetStateRequest.BuiltinAgent + nil, // 48: agent.v1.SetStateRequest.BuiltinAgentsEntry + nil, // 49: agent.v1.SetStateRequest.AgentProcess.TextFilesEntry + nil, // 50: agent.v1.SetStateRequest.BuiltinAgent.EnvEntry + nil, // 51: agent.v1.QueryActionMap.MapEntry + (*StartActionRequest_MySQLExplainParams)(nil), // 52: agent.v1.StartActionRequest.MySQLExplainParams + (*StartActionRequest_MySQLShowCreateTableParams)(nil), // 53: agent.v1.StartActionRequest.MySQLShowCreateTableParams + (*StartActionRequest_MySQLShowTableStatusParams)(nil), // 54: agent.v1.StartActionRequest.MySQLShowTableStatusParams + (*StartActionRequest_MySQLShowIndexParams)(nil), // 55: agent.v1.StartActionRequest.MySQLShowIndexParams + (*StartActionRequest_PostgreSQLShowCreateTableParams)(nil), // 56: agent.v1.StartActionRequest.PostgreSQLShowCreateTableParams + (*StartActionRequest_PostgreSQLShowIndexParams)(nil), // 57: agent.v1.StartActionRequest.PostgreSQLShowIndexParams + (*StartActionRequest_MongoDBExplainParams)(nil), // 58: agent.v1.StartActionRequest.MongoDBExplainParams + (*StartActionRequest_PTSummaryParams)(nil), // 59: agent.v1.StartActionRequest.PTSummaryParams + (*StartActionRequest_PTPgSummaryParams)(nil), // 60: agent.v1.StartActionRequest.PTPgSummaryParams + (*StartActionRequest_PTMongoDBSummaryParams)(nil), // 61: agent.v1.StartActionRequest.PTMongoDBSummaryParams + (*StartActionRequest_PTMySQLSummaryParams)(nil), // 62: agent.v1.StartActionRequest.PTMySQLSummaryParams + (*StartActionRequest_MySQLQueryShowParams)(nil), // 63: agent.v1.StartActionRequest.MySQLQueryShowParams + (*StartActionRequest_MySQLQuerySelectParams)(nil), // 64: agent.v1.StartActionRequest.MySQLQuerySelectParams + (*StartActionRequest_PostgreSQLQueryShowParams)(nil), // 65: agent.v1.StartActionRequest.PostgreSQLQueryShowParams + (*StartActionRequest_PostgreSQLQuerySelectParams)(nil), // 66: agent.v1.StartActionRequest.PostgreSQLQuerySelectParams + (*StartActionRequest_MongoDBQueryGetParameterParams)(nil), // 67: agent.v1.StartActionRequest.MongoDBQueryGetParameterParams + (*StartActionRequest_MongoDBQueryBuildInfoParams)(nil), // 68: agent.v1.StartActionRequest.MongoDBQueryBuildInfoParams + (*StartActionRequest_MongoDBQueryGetCmdLineOptsParams)(nil), // 69: agent.v1.StartActionRequest.MongoDBQueryGetCmdLineOptsParams + (*StartActionRequest_MongoDBQueryReplSetGetStatusParams)(nil), // 70: agent.v1.StartActionRequest.MongoDBQueryReplSetGetStatusParams + (*StartActionRequest_MongoDBQueryGetDiagnosticDataParams)(nil), // 71: agent.v1.StartActionRequest.MongoDBQueryGetDiagnosticDataParams + (*StartActionRequest_RestartSystemServiceParams)(nil), // 72: agent.v1.StartActionRequest.RestartSystemServiceParams + (*CheckConnectionResponse_Stats)(nil), // 73: agent.v1.CheckConnectionResponse.Stats + (*StartJobRequest_MySQLBackup)(nil), // 74: agent.v1.StartJobRequest.MySQLBackup + (*StartJobRequest_MySQLRestoreBackup)(nil), // 75: agent.v1.StartJobRequest.MySQLRestoreBackup + (*StartJobRequest_MongoDBBackup)(nil), // 76: agent.v1.StartJobRequest.MongoDBBackup + (*StartJobRequest_MongoDBRestoreBackup)(nil), // 77: agent.v1.StartJobRequest.MongoDBRestoreBackup + (*JobResult_Error)(nil), // 78: agent.v1.JobResult.Error + (*JobResult_MongoDBBackup)(nil), // 79: agent.v1.JobResult.MongoDBBackup + (*JobResult_MySQLBackup)(nil), // 80: agent.v1.JobResult.MySQLBackup + (*JobResult_MySQLRestoreBackup)(nil), // 81: agent.v1.JobResult.MySQLRestoreBackup + (*JobResult_MongoDBRestoreBackup)(nil), // 82: agent.v1.JobResult.MongoDBRestoreBackup + (*JobProgress_MySQLBackup)(nil), // 83: agent.v1.JobProgress.MySQLBackup + (*JobProgress_MySQLRestoreBackup)(nil), // 84: agent.v1.JobProgress.MySQLRestoreBackup + (*JobProgress_Logs)(nil), // 85: agent.v1.JobProgress.Logs + (*GetVersionsRequest_MySQLd)(nil), // 86: agent.v1.GetVersionsRequest.MySQLd + (*GetVersionsRequest_Xtrabackup)(nil), // 87: agent.v1.GetVersionsRequest.Xtrabackup + (*GetVersionsRequest_Xbcloud)(nil), // 88: agent.v1.GetVersionsRequest.Xbcloud + (*GetVersionsRequest_Qpress)(nil), // 89: agent.v1.GetVersionsRequest.Qpress + (*GetVersionsRequest_MongoDB)(nil), // 90: agent.v1.GetVersionsRequest.MongoDB + (*GetVersionsRequest_PBM)(nil), // 91: agent.v1.GetVersionsRequest.PBM + (*GetVersionsRequest_Software)(nil), // 92: agent.v1.GetVersionsRequest.Software + (*GetVersionsResponse_Version)(nil), // 93: agent.v1.GetVersionsResponse.Version + (*timestamppb.Timestamp)(nil), // 94: google.protobuf.Timestamp + (*MetricsBucket)(nil), // 95: agent.v1.MetricsBucket + (v1.AgentStatus)(0), // 96: inventory.v1.AgentStatus + (*durationpb.Duration)(nil), // 97: google.protobuf.Duration + (v1.ServiceType)(0), // 98: inventory.v1.ServiceType + (*status.Status)(nil), // 99: google.rpc.Status + (v1.AgentType)(0), // 100: inventory.v1.AgentType + (*v1.RTAOptions)(nil), // 101: inventory.v1.RTAOptions + (v11.DataModel)(0), // 102: backup.v1.DataModel + (*v11.PbmMetadata)(nil), // 103: backup.v1.PbmMetadata + (*v11.Metadata)(nil), // 104: backup.v1.Metadata +} var file_agent_v1_agent_proto_depIdxs = []int32{ 44, // 0: agent.v1.TextFiles.files:type_name -> agent.v1.TextFiles.FilesEntry 94, // 1: agent.v1.Pong.current_time:type_name -> google.protobuf.Timestamp diff --git a/api/agent/v1/agent.pb.validate.go b/api/agent/v1/agent.pb.validate.go index 3cac3cc4faf..cfc2a1682b7 100644 --- a/api/agent/v1/agent.pb.validate.go +++ b/api/agent/v1/agent.pb.validate.go @@ -19,6 +19,7 @@ import ( "google.golang.org/protobuf/types/known/anypb" backupv1 "github.com/percona/pmm/api/backup/v1" + inventoryv1 "github.com/percona/pmm/api/inventory/v1" ) diff --git a/api/agent/v1/agent.swagger.json b/api/agent/v1/agent.swagger.json new file mode 100644 index 00000000000..9be2eb39da2 --- /dev/null +++ b/api/agent/v1/agent.swagger.json @@ -0,0 +1,55 @@ +{ + "swagger": "2.0", + "info": { + "title": "agent/v1/agent.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AgentService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + } + } +} diff --git a/api/agent/v1/agent_grpc.pb.go b/api/agent/v1/agent_grpc.pb.go index 93727efa84c..d307ddcad19 100644 --- a/api/agent/v1/agent_grpc.pb.go +++ b/api/agent/v1/agent_grpc.pb.go @@ -8,7 +8,6 @@ package agentv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/agent/v1/collector.pb.go b/api/agent/v1/collector.pb.go index 4eaa7eb54a1..f1c9b64e7a9 100644 --- a/api/agent/v1/collector.pb.go +++ b/api/agent/v1/collector.pb.go @@ -7,14 +7,12 @@ package agentv1 import ( + v1 "github.com/percona/pmm/api/inventory/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" ) const ( @@ -2810,23 +2808,20 @@ func file_agent_v1_collector_proto_rawDescGZIP() []byte { return file_agent_v1_collector_proto_rawDescData } -var ( - file_agent_v1_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_agent_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_agent_v1_collector_proto_goTypes = []any{ - (ExampleType)(0), // 0: agent.v1.ExampleType - (*MetricsBucket)(nil), // 1: agent.v1.MetricsBucket - (*HistogramItem)(nil), // 2: agent.v1.HistogramItem - (*MetricsBucket_Common)(nil), // 3: agent.v1.MetricsBucket.Common - (*MetricsBucket_MySQL)(nil), // 4: agent.v1.MetricsBucket.MySQL - (*MetricsBucket_MongoDB)(nil), // 5: agent.v1.MetricsBucket.MongoDB - (*MetricsBucket_PostgreSQL)(nil), // 6: agent.v1.MetricsBucket.PostgreSQL - nil, // 7: agent.v1.MetricsBucket.Common.CommentsEntry - nil, // 8: agent.v1.MetricsBucket.Common.ErrorsEntry - (v1.AgentType)(0), // 9: inventory.v1.AgentType - } -) - +var file_agent_v1_collector_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_agent_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_agent_v1_collector_proto_goTypes = []any{ + (ExampleType)(0), // 0: agent.v1.ExampleType + (*MetricsBucket)(nil), // 1: agent.v1.MetricsBucket + (*HistogramItem)(nil), // 2: agent.v1.HistogramItem + (*MetricsBucket_Common)(nil), // 3: agent.v1.MetricsBucket.Common + (*MetricsBucket_MySQL)(nil), // 4: agent.v1.MetricsBucket.MySQL + (*MetricsBucket_MongoDB)(nil), // 5: agent.v1.MetricsBucket.MongoDB + (*MetricsBucket_PostgreSQL)(nil), // 6: agent.v1.MetricsBucket.PostgreSQL + nil, // 7: agent.v1.MetricsBucket.Common.CommentsEntry + nil, // 8: agent.v1.MetricsBucket.Common.ErrorsEntry + (v1.AgentType)(0), // 9: inventory.v1.AgentType +} var file_agent_v1_collector_proto_depIdxs = []int32{ 3, // 0: agent.v1.MetricsBucket.common:type_name -> agent.v1.MetricsBucket.Common 4, // 1: agent.v1.MetricsBucket.mysql:type_name -> agent.v1.MetricsBucket.MySQL diff --git a/api/agent/v1/collector.swagger.json b/api/agent/v1/collector.swagger.json new file mode 100644 index 00000000000..461533c2478 --- /dev/null +++ b/api/agent/v1/collector.swagger.json @@ -0,0 +1,50 @@ +{ + "swagger": "2.0", + "info": { + "title": "agent/v1/collector.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "The status code, which should be an enum value of\n[google.rpc.Code][google.rpc.Code]." + }, + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\n[google.rpc.Status.details][google.rpc.Status.details] field, or localized\nby the client." + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + }, + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + } + }, + "description": "The `Status` type defines a logical error model that is suitable for\ndifferent programming environments, including REST APIs and RPC APIs. It is\nused by [gRPC](https://github.com/grpc). Each `Status` message contains\nthree pieces of data: error code, error message, and error details.\n\nYou can find out more about this error model and how to work with it in the\n[API Design Guide](https://cloud.google.com/apis/design/errors)." + } + } +} diff --git a/api/agentlocal/v1/agentlocal.pb.go b/api/agentlocal/v1/agentlocal.pb.go index a2836f3cd3c..374821c2931 100644 --- a/api/agentlocal/v1/agentlocal.pb.go +++ b/api/agentlocal/v1/agentlocal.pb.go @@ -7,16 +7,14 @@ package agentlocalv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -244,7 +242,7 @@ func (x *StatusRequest) GetGetNetworkInfo() bool { type StatusResponse struct { state protoimpl.MessageState `protogen:"open.v1"` AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` - RunsOnNodeId string `protobuf:"bytes,2,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` // TODO: rename to node_id + RunsOnNodeId string `protobuf:"bytes,2,opt,name=runs_on_node_id,json=runsOnNodeId,proto3" json:"runs_on_node_id,omitempty"` //TODO: rename to node_id NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` ServerInfo *ServerInfo `protobuf:"bytes,4,opt,name=server_info,json=serverInfo,proto3" json:"server_info,omitempty"` AgentsInfo []*AgentInfo `protobuf:"bytes,5,rep,name=agents_info,json=agentsInfo,proto3" json:"agents_info,omitempty"` @@ -471,21 +469,18 @@ func file_agentlocal_v1_agentlocal_proto_rawDescGZIP() []byte { return file_agentlocal_v1_agentlocal_proto_rawDescData } -var ( - file_agentlocal_v1_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_agentlocal_v1_agentlocal_proto_goTypes = []any{ - (*ServerInfo)(nil), // 0: agentlocal.v1.ServerInfo - (*AgentInfo)(nil), // 1: agentlocal.v1.AgentInfo - (*StatusRequest)(nil), // 2: agentlocal.v1.StatusRequest - (*StatusResponse)(nil), // 3: agentlocal.v1.StatusResponse - (*ReloadRequest)(nil), // 4: agentlocal.v1.ReloadRequest - (*ReloadResponse)(nil), // 5: agentlocal.v1.ReloadResponse - (*durationpb.Duration)(nil), // 6: google.protobuf.Duration - (v1.AgentType)(0), // 7: inventory.v1.AgentType - (v1.AgentStatus)(0), // 8: inventory.v1.AgentStatus - } -) - +var file_agentlocal_v1_agentlocal_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_agentlocal_v1_agentlocal_proto_goTypes = []any{ + (*ServerInfo)(nil), // 0: agentlocal.v1.ServerInfo + (*AgentInfo)(nil), // 1: agentlocal.v1.AgentInfo + (*StatusRequest)(nil), // 2: agentlocal.v1.StatusRequest + (*StatusResponse)(nil), // 3: agentlocal.v1.StatusResponse + (*ReloadRequest)(nil), // 4: agentlocal.v1.ReloadRequest + (*ReloadResponse)(nil), // 5: agentlocal.v1.ReloadResponse + (*durationpb.Duration)(nil), // 6: google.protobuf.Duration + (v1.AgentType)(0), // 7: inventory.v1.AgentType + (v1.AgentStatus)(0), // 8: inventory.v1.AgentStatus +} var file_agentlocal_v1_agentlocal_proto_depIdxs = []int32{ 6, // 0: agentlocal.v1.ServerInfo.latency:type_name -> google.protobuf.Duration 6, // 1: agentlocal.v1.ServerInfo.clock_drift:type_name -> google.protobuf.Duration diff --git a/api/agentlocal/v1/agentlocal.swagger.json b/api/agentlocal/v1/agentlocal.swagger.json new file mode 100644 index 00000000000..59369724f1d --- /dev/null +++ b/api/agentlocal/v1/agentlocal.swagger.json @@ -0,0 +1,296 @@ +{ + "swagger": "2.0", + "info": { + "title": "agentlocal/v1/agentlocal.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AgentLocalService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/local/Reload": { + "post": { + "summary": "Reload reloads pmm-agent configuration.", + "operationId": "Reload", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ReloadResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ReloadRequest" + } + } + ], + "tags": [ + "AgentLocalService" + ] + } + }, + "/local/Status": { + "get": { + "summary": "Status returns current pmm-agent status.", + "operationId": "Status2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "get_network_info", + "description": "Returns network info (latency and clock_drift) if true.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "AgentLocalService" + ] + }, + "post": { + "summary": "Status returns current pmm-agent status.", + "operationId": "Status", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StatusRequest" + } + } + ], + "tags": [ + "AgentLocalService" + ] + } + } + }, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v1AgentInfo": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "agent_type": { + "$ref": "#/definitions/v1AgentType" + }, + "status": { + "$ref": "#/definitions/v1AgentStatus" + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "The current listen port of this Agent (exporter or vmagent).\nZero for other Agent types, or if unknown or not yet supported." + }, + "process_exec_path": { + "type": "string" + } + }, + "description": "AgentInfo contains information about Agent managed by pmm-agent." + }, + "v1AgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "default": "AGENT_STATUS_UNSPECIFIED", + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "v1AgentType": { + "type": "string", + "enum": [ + "AGENT_TYPE_UNSPECIFIED", + "AGENT_TYPE_PMM_AGENT", + "AGENT_TYPE_VM_AGENT", + "AGENT_TYPE_NODE_EXPORTER", + "AGENT_TYPE_MYSQLD_EXPORTER", + "AGENT_TYPE_MONGODB_EXPORTER", + "AGENT_TYPE_POSTGRES_EXPORTER", + "AGENT_TYPE_PROXYSQL_EXPORTER", + "AGENT_TYPE_VALKEY_EXPORTER", + "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", + "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", + "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "AGENT_TYPE_EXTERNAL_EXPORTER", + "AGENT_TYPE_RDS_EXPORTER", + "AGENT_TYPE_AZURE_DATABASE_EXPORTER", + "AGENT_TYPE_NOMAD_AGENT", + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_OTEL_COLLECTOR" + ], + "default": "AGENT_TYPE_UNSPECIFIED", + "description": "AgentType describes supported Agent types." + }, + "v1ReloadRequest": { + "type": "object" + }, + "v1ReloadResponse": { + "type": "object", + "description": "ReloadRequest may not be received by the client due to pmm-agent restart." + }, + "v1ServerInfo": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "PMM Server URL in a form https://HOST:PORT/." + }, + "insecure_tls": { + "type": "boolean", + "description": "PMM Server's TLS certificate validation should be skipped if true." + }, + "connected": { + "type": "boolean", + "description": "True if pmm-agent is currently connected to the server." + }, + "version": { + "type": "string", + "description": "PMM Server version (if agent is connected)." + }, + "latency": { + "type": "string", + "description": "Ping time from pmm-agent to pmm-managed (if agent is connected)." + }, + "clock_drift": { + "type": "string", + "description": "Clock drift from PMM Server (if agent is connected)." + } + }, + "description": "ServerInfo contains information about the PMM Server." + }, + "v1StatusRequest": { + "type": "object", + "properties": { + "get_network_info": { + "type": "boolean", + "description": "Returns network info (latency and clock_drift) if true." + } + } + }, + "v1StatusResponse": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "runs_on_node_id": { + "type": "string", + "title": "TODO: rename to node_id" + }, + "node_name": { + "type": "string" + }, + "server_info": { + "$ref": "#/definitions/v1ServerInfo" + }, + "agents_info": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AgentInfo" + } + }, + "config_filepath": { + "type": "string", + "description": "Config file path if pmm-agent was started with one." + }, + "agent_version": { + "type": "string", + "description": "PMM Agent version." + }, + "connection_uptime": { + "type": "number", + "format": "float", + "title": "Shows connection uptime in percentage between agent and server" + } + } + } + } +} diff --git a/api/agentlocal/v1/agentlocal_grpc.pb.go b/api/agentlocal/v1/agentlocal_grpc.pb.go index 14d47f7c727..1b4e4c73073 100644 --- a/api/agentlocal/v1/agentlocal_grpc.pb.go +++ b/api/agentlocal/v1/agentlocal_grpc.pb.go @@ -8,7 +8,6 @@ package agentlocalv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -87,7 +86,6 @@ type UnimplementedAgentLocalServiceServer struct{} func (UnimplementedAgentLocalServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method Status not implemented") } - func (UnimplementedAgentLocalServiceServer) Reload(context.Context, *ReloadRequest) (*ReloadResponse, error) { return nil, status.Error(codes.Unimplemented, "method Reload not implemented") } diff --git a/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go index 7a559d37dc8..2e504d1316f 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/reload_parameters.go @@ -60,6 +60,7 @@ ReloadParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ReloadParams struct { + // Body. Body any @@ -129,6 +130,7 @@ func (o *ReloadParams) SetBody(body any) { // WriteToRequest writes these params to a swagger request func (o *ReloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go b/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go index 1595292df0d..b2c7d41e7fd 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/reload_responses.go @@ -104,6 +104,7 @@ func (o *ReloadOK) GetPayload() any { } func (o *ReloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *ReloadDefault) GetPayload() *ReloadDefaultBody { } func (o *ReloadDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ReloadDefaultBody) // response payload @@ -190,6 +192,7 @@ ReloadDefaultBody reload default body swagger:model ReloadDefaultBody */ type ReloadDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *ReloadDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *ReloadDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -307,6 +313,7 @@ ReloadDefaultBodyDetailsItems0 reload default body details items0 swagger:model ReloadDefaultBodyDetailsItems0 */ type ReloadDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type ReloadDefaultBodyDetailsItems0 struct { func (o *ReloadDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *ReloadDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ReloadDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go index 220d4c5bbac..e1a0f18fb76 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status2_parameters.go @@ -61,6 +61,7 @@ Status2Params contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type Status2Params struct { + /* GetNetworkInfo. Returns network info (latency and clock_drift) if true. @@ -133,6 +134,7 @@ func (o *Status2Params) SetGetNetworkInfo(getNetworkInfo *bool) { // WriteToRequest writes these params to a swagger request func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -148,6 +150,7 @@ func (o *Status2Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qGetNetworkInfo := swag.FormatBool(qrGetNetworkInfo) if qGetNetworkInfo != "" { + if err := r.SetQueryParam("get_network_info", qGetNetworkInfo); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go b/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go index 39bee162725..2ad4a9b490d 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status2_responses.go @@ -105,6 +105,7 @@ func (o *Status2OK) GetPayload() *Status2OKBody { } func (o *Status2OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(Status2OKBody) // response payload @@ -178,6 +179,7 @@ func (o *Status2Default) GetPayload() *Status2DefaultBody { } func (o *Status2Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(Status2DefaultBody) // response payload @@ -193,6 +195,7 @@ Status2DefaultBody status2 default body swagger:model Status2DefaultBody */ type Status2DefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *Status2DefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *Status2DefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -310,6 +316,7 @@ Status2DefaultBodyDetailsItems0 status2 default body details items0 swagger:model Status2DefaultBodyDetailsItems0 */ type Status2DefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type Status2DefaultBodyDetailsItems0 struct { func (o *Status2DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *Status2DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o Status2DefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ Status2OKBody status2 OK body swagger:model Status2OKBody */ type Status2OKBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -536,7 +546,9 @@ func (o *Status2OKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AgentsInfo); i++ { + if o.AgentsInfo[i] != nil { if swag.IsZero(o.AgentsInfo[i]) { // not required @@ -556,12 +568,14 @@ func (o *Status2OKBody) contextValidateAgentsInfo(ctx context.Context, formats s return err } } + } return nil } func (o *Status2OKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { + if o.ServerInfo != nil { if swag.IsZero(o.ServerInfo) { // not required @@ -608,11 +622,12 @@ Status2OKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model Status2OKBodyAgentsInfoItems0 */ type Status2OKBodyAgentsInfoItems0 struct { + // agent id AgentID string `json:"agent_id,omitempty"` // AgentType describes supported Agent types. - // Enum: ["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT","AGENT_TYPE_RTA_MONGODB_AGENT"] + // Enum: ["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT","AGENT_TYPE_RTA_MONGODB_AGENT","AGENT_TYPE_OTEL_COLLECTOR"] AgentType *string `json:"agent_type,omitempty"` // AgentStatus represents actual Agent status. @@ -657,7 +672,7 @@ var status2OkBodyAgentsInfoItems0TypeAgentTypePropEnum []any func init() { var res []string - if err := json.Unmarshal([]byte(`["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT","AGENT_TYPE_RTA_MONGODB_AGENT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT","AGENT_TYPE_RTA_MONGODB_AGENT","AGENT_TYPE_OTEL_COLLECTOR"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -726,6 +741,9 @@ const ( // Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPERTAMONGODBAGENT captures enum value "AGENT_TYPE_RTA_MONGODB_AGENT" Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPERTAMONGODBAGENT string = "AGENT_TYPE_RTA_MONGODB_AGENT" + + // Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPEOTELCOLLECTOR captures enum value "AGENT_TYPE_OTEL_COLLECTOR" + Status2OKBodyAgentsInfoItems0AgentTypeAGENTTYPEOTELCOLLECTOR string = "AGENT_TYPE_OTEL_COLLECTOR" ) // prop value enum @@ -837,6 +855,7 @@ Status2OKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model Status2OKBodyServerInfo */ type Status2OKBodyServerInfo struct { + // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go b/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go index f522c468298..56301866ccc 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status_parameters.go @@ -60,6 +60,7 @@ StatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StatusParams struct { + // Body. Body StatusBody @@ -129,6 +130,7 @@ func (o *StatusParams) SetBody(body StatusBody) { // WriteToRequest writes these params to a swagger request func (o *StatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/agentlocal/v1/json/client/agent_local_service/status_responses.go b/api/agentlocal/v1/json/client/agent_local_service/status_responses.go index f7e4f3fa0c8..f095045274a 100644 --- a/api/agentlocal/v1/json/client/agent_local_service/status_responses.go +++ b/api/agentlocal/v1/json/client/agent_local_service/status_responses.go @@ -105,6 +105,7 @@ func (o *StatusOK) GetPayload() *StatusOKBody { } func (o *StatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StatusOKBody) // response payload @@ -178,6 +179,7 @@ func (o *StatusDefault) GetPayload() *StatusDefaultBody { } func (o *StatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StatusDefaultBody) // response payload @@ -193,6 +195,7 @@ StatusBody status body swagger:model StatusBody */ type StatusBody struct { + // Returns network info (latency and clock_drift) if true. GetNetworkInfo bool `json:"get_network_info,omitempty"` } @@ -230,6 +233,7 @@ StatusDefaultBody status default body swagger:model StatusDefaultBody */ type StatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -299,7 +303,9 @@ func (o *StatusDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -319,6 +325,7 @@ func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -347,6 +354,7 @@ StatusDefaultBodyDetailsItems0 status default body details items0 swagger:model StatusDefaultBodyDetailsItems0 */ type StatusDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -358,6 +366,7 @@ type StatusDefaultBodyDetailsItems0 struct { func (o *StatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -395,6 +404,7 @@ func (o *StatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -458,6 +468,7 @@ StatusOKBody status OK body swagger:model StatusOKBody */ type StatusOKBody struct { + // agent id AgentID string `json:"agent_id,omitempty"` @@ -573,7 +584,9 @@ func (o *StatusOKBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AgentsInfo); i++ { + if o.AgentsInfo[i] != nil { if swag.IsZero(o.AgentsInfo[i]) { // not required @@ -593,12 +606,14 @@ func (o *StatusOKBody) contextValidateAgentsInfo(ctx context.Context, formats st return err } } + } return nil } func (o *StatusOKBody) contextValidateServerInfo(ctx context.Context, formats strfmt.Registry) error { + if o.ServerInfo != nil { if swag.IsZero(o.ServerInfo) { // not required @@ -645,11 +660,12 @@ StatusOKBodyAgentsInfoItems0 AgentInfo contains information about Agent managed swagger:model StatusOKBodyAgentsInfoItems0 */ type StatusOKBodyAgentsInfoItems0 struct { + // agent id AgentID string `json:"agent_id,omitempty"` // AgentType describes supported Agent types. - // Enum: ["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT","AGENT_TYPE_RTA_MONGODB_AGENT"] + // Enum: ["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT","AGENT_TYPE_RTA_MONGODB_AGENT","AGENT_TYPE_OTEL_COLLECTOR"] AgentType *string `json:"agent_type,omitempty"` // AgentStatus represents actual Agent status. @@ -694,7 +710,7 @@ var statusOkBodyAgentsInfoItems0TypeAgentTypePropEnum []any func init() { var res []string - if err := json.Unmarshal([]byte(`["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT","AGENT_TYPE_RTA_MONGODB_AGENT"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["AGENT_TYPE_UNSPECIFIED","AGENT_TYPE_PMM_AGENT","AGENT_TYPE_VM_AGENT","AGENT_TYPE_NODE_EXPORTER","AGENT_TYPE_MYSQLD_EXPORTER","AGENT_TYPE_MONGODB_EXPORTER","AGENT_TYPE_POSTGRES_EXPORTER","AGENT_TYPE_PROXYSQL_EXPORTER","AGENT_TYPE_VALKEY_EXPORTER","AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT","AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT","AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT","AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT","AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT","AGENT_TYPE_EXTERNAL_EXPORTER","AGENT_TYPE_RDS_EXPORTER","AGENT_TYPE_AZURE_DATABASE_EXPORTER","AGENT_TYPE_NOMAD_AGENT","AGENT_TYPE_RTA_MONGODB_AGENT","AGENT_TYPE_OTEL_COLLECTOR"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -763,6 +779,9 @@ const ( // StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPERTAMONGODBAGENT captures enum value "AGENT_TYPE_RTA_MONGODB_AGENT" StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPERTAMONGODBAGENT string = "AGENT_TYPE_RTA_MONGODB_AGENT" + + // StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPEOTELCOLLECTOR captures enum value "AGENT_TYPE_OTEL_COLLECTOR" + StatusOKBodyAgentsInfoItems0AgentTypeAGENTTYPEOTELCOLLECTOR string = "AGENT_TYPE_OTEL_COLLECTOR" ) // prop value enum @@ -874,6 +893,7 @@ StatusOKBodyServerInfo ServerInfo contains information about the PMM Server. swagger:model StatusOKBodyServerInfo */ type StatusOKBodyServerInfo struct { + // PMM Server URL in a form https://HOST:PORT/. URL string `json:"url,omitempty"` diff --git a/api/agentlocal/v1/json/v1.json b/api/agentlocal/v1/json/v1.json index 1eb9d0f86fb..0141a1d5772 100644 --- a/api/agentlocal/v1/json/v1.json +++ b/api/agentlocal/v1/json/v1.json @@ -179,7 +179,8 @@ "AGENT_TYPE_RDS_EXPORTER", "AGENT_TYPE_AZURE_DATABASE_EXPORTER", "AGENT_TYPE_NOMAD_AGENT", - "AGENT_TYPE_RTA_MONGODB_AGENT" + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_OTEL_COLLECTOR" ], "x-order": 1 }, @@ -378,7 +379,8 @@ "AGENT_TYPE_RDS_EXPORTER", "AGENT_TYPE_AZURE_DATABASE_EXPORTER", "AGENT_TYPE_NOMAD_AGENT", - "AGENT_TYPE_RTA_MONGODB_AGENT" + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_OTEL_COLLECTOR" ], "x-order": 1 }, diff --git a/api/alerting/v1/alerting.pb.go b/api/alerting/v1/alerting.pb.go index acd727a9865..44c388389a1 100644 --- a/api/alerting/v1/alerting.pb.go +++ b/api/alerting/v1/alerting.pb.go @@ -7,18 +7,16 @@ package alertingv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/management/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/management/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -1426,40 +1424,37 @@ func file_alerting_v1_alerting_proto_rawDescGZIP() []byte { return file_alerting_v1_alerting_proto_rawDescData } -var ( - file_alerting_v1_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_alerting_v1_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) - file_alerting_v1_alerting_proto_goTypes = []any{ - (TemplateSource)(0), // 0: alerting.v1.TemplateSource - (FilterType)(0), // 1: alerting.v1.FilterType - (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition - (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition - (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition - (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition - (*Template)(nil), // 6: alerting.v1.Template - (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest - (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse - (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest - (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse - (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest - (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse - (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest - (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse - (*Filter)(nil), // 15: alerting.v1.Filter - (*ParamValue)(nil), // 16: alerting.v1.ParamValue - (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest - (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse - nil, // 19: alerting.v1.Template.LabelsEntry - nil, // 20: alerting.v1.Template.AnnotationsEntry - nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry - (ParamUnit)(0), // 22: alerting.v1.ParamUnit - (ParamType)(0), // 23: alerting.v1.ParamType - (*durationpb.Duration)(nil), // 24: google.protobuf.Duration - (v1.Severity)(0), // 25: management.v1.Severity - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - } -) - +var file_alerting_v1_alerting_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_alerting_v1_alerting_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_alerting_v1_alerting_proto_goTypes = []any{ + (TemplateSource)(0), // 0: alerting.v1.TemplateSource + (FilterType)(0), // 1: alerting.v1.FilterType + (*BoolParamDefinition)(nil), // 2: alerting.v1.BoolParamDefinition + (*FloatParamDefinition)(nil), // 3: alerting.v1.FloatParamDefinition + (*StringParamDefinition)(nil), // 4: alerting.v1.StringParamDefinition + (*ParamDefinition)(nil), // 5: alerting.v1.ParamDefinition + (*Template)(nil), // 6: alerting.v1.Template + (*ListTemplatesRequest)(nil), // 7: alerting.v1.ListTemplatesRequest + (*ListTemplatesResponse)(nil), // 8: alerting.v1.ListTemplatesResponse + (*CreateTemplateRequest)(nil), // 9: alerting.v1.CreateTemplateRequest + (*CreateTemplateResponse)(nil), // 10: alerting.v1.CreateTemplateResponse + (*UpdateTemplateRequest)(nil), // 11: alerting.v1.UpdateTemplateRequest + (*UpdateTemplateResponse)(nil), // 12: alerting.v1.UpdateTemplateResponse + (*DeleteTemplateRequest)(nil), // 13: alerting.v1.DeleteTemplateRequest + (*DeleteTemplateResponse)(nil), // 14: alerting.v1.DeleteTemplateResponse + (*Filter)(nil), // 15: alerting.v1.Filter + (*ParamValue)(nil), // 16: alerting.v1.ParamValue + (*CreateRuleRequest)(nil), // 17: alerting.v1.CreateRuleRequest + (*CreateRuleResponse)(nil), // 18: alerting.v1.CreateRuleResponse + nil, // 19: alerting.v1.Template.LabelsEntry + nil, // 20: alerting.v1.Template.AnnotationsEntry + nil, // 21: alerting.v1.CreateRuleRequest.CustomLabelsEntry + (ParamUnit)(0), // 22: alerting.v1.ParamUnit + (ParamType)(0), // 23: alerting.v1.ParamType + (*durationpb.Duration)(nil), // 24: google.protobuf.Duration + (v1.Severity)(0), // 25: management.v1.Severity + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp +} var file_alerting_v1_alerting_proto_depIdxs = []int32{ 22, // 0: alerting.v1.ParamDefinition.unit:type_name -> alerting.v1.ParamUnit 23, // 1: alerting.v1.ParamDefinition.type:type_name -> alerting.v1.ParamType diff --git a/api/alerting/v1/alerting.pb.validate.go b/api/alerting/v1/alerting.pb.validate.go index f6a7dbcf1fa..bc3dfba5dfa 100644 --- a/api/alerting/v1/alerting.pb.validate.go +++ b/api/alerting/v1/alerting.pb.validate.go @@ -851,6 +851,7 @@ func (m *ListTemplatesRequest) validate(all bool) error { // no validation rules for Reload if m.PageSize != nil { + if m.GetPageSize() < 1 { err := ListTemplatesRequestValidationError{ field: "PageSize", @@ -861,9 +862,11 @@ func (m *ListTemplatesRequest) validate(all bool) error { } errors = append(errors, err) } + } if m.PageIndex != nil { + if m.GetPageIndex() < 0 { err := ListTemplatesRequestValidationError{ field: "PageIndex", @@ -874,6 +877,7 @@ func (m *ListTemplatesRequest) validate(all bool) error { } errors = append(errors, err) } + } if len(errors) > 0 { diff --git a/api/alerting/v1/alerting.swagger.json b/api/alerting/v1/alerting.swagger.json new file mode 100644 index 00000000000..726625709d5 --- /dev/null +++ b/api/alerting/v1/alerting.swagger.json @@ -0,0 +1,581 @@ +{ + "swagger": "2.0", + "info": { + "title": "alerting/v1/alerting.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AlertingService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/alerting/rules": { + "post": { + "summary": "CreateRule creates alerting rule from the given template.", + "operationId": "CreateRule", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateRuleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CreateRuleRequest" + } + } + ], + "tags": [ + "AlertingService" + ] + } + }, + "/v1/alerting/templates": { + "get": { + "summary": "ListTemplates returns a list of all collected alert rule templates.", + "operationId": "ListTemplates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListTemplatesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "page_size", + "description": "Maximum number of results per page.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "page_index", + "description": "Index of the requested page, starts from 0.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "reload", + "description": "If true, template files will be re-read from disk.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "AlertingService" + ] + }, + "post": { + "summary": "CreateTemplate creates a new template.", + "operationId": "CreateTemplate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CreateTemplateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CreateTemplateRequest" + } + } + ], + "tags": [ + "AlertingService" + ] + } + }, + "/v1/alerting/templates/{name}": { + "delete": { + "summary": "DeleteTemplate deletes existing, previously created via API.", + "operationId": "DeleteTemplate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteTemplateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "name", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "AlertingService" + ] + }, + "put": { + "summary": "UpdateTemplate updates existing template, previously created via API.", + "operationId": "UpdateTemplate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateTemplateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "name", + "description": "Machine-readable name (ID).", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AlertingServiceUpdateTemplateBody" + } + } + ], + "tags": [ + "AlertingService" + ] + } + } + }, + "definitions": { + "AlertingServiceUpdateTemplateBody": { + "type": "object", + "properties": { + "yaml": { + "type": "string", + "description": "YAML template file content." + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1BoolParamDefinition": { + "type": "object", + "properties": { + "default": { + "type": "boolean", + "x-nullable": true + } + }, + "description": "BoolParamDefinition represents boolean parameter's default value." + }, + "v1CreateRuleRequest": { + "type": "object", + "properties": { + "template_name": { + "type": "string", + "description": "Template name." + }, + "name": { + "type": "string", + "description": "Rule name." + }, + "group": { + "type": "string", + "description": "Rule group name." + }, + "folder_uid": { + "type": "string", + "description": "Folder UID." + }, + "params": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ParamValue" + }, + "description": "Rule parameters. All template parameters should be set." + }, + "for": { + "type": "string", + "description": "Rule duration. Should be set." + }, + "severity": { + "$ref": "#/definitions/v1Severity", + "description": "Rule severity. Should be set." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "All custom labels to add or remove (with empty values) to default labels from template." + }, + "filters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Filter" + }, + "description": "Filters." + }, + "interval": { + "type": "string", + "title": "Evaluation Interval" + } + } + }, + "v1CreateRuleResponse": { + "type": "object" + }, + "v1CreateTemplateRequest": { + "type": "object", + "properties": { + "yaml": { + "type": "string", + "description": "YAML template file content." + } + } + }, + "v1CreateTemplateResponse": { + "type": "object" + }, + "v1DeleteTemplateResponse": { + "type": "object" + }, + "v1Filter": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/v1FilterType" + }, + "label": { + "type": "string" + }, + "regexp": { + "type": "string" + } + }, + "description": "Filter represents a single filter condition." + }, + "v1FilterType": { + "type": "string", + "enum": [ + "FILTER_TYPE_UNSPECIFIED", + "FILTER_TYPE_MATCH", + "FILTER_TYPE_MISMATCH" + ], + "default": "FILTER_TYPE_UNSPECIFIED", + "description": "FilterType represents filter matching type." + }, + "v1FloatParamDefinition": { + "type": "object", + "properties": { + "default": { + "type": "number", + "format": "double", + "x-nullable": true, + "description": "Default value." + }, + "min": { + "type": "number", + "format": "double", + "x-nullable": true, + "description": "Minimum valid value (inclusive)." + }, + "max": { + "type": "number", + "format": "double", + "x-nullable": true, + "description": "Maximum valid value (inclusive)." + } + }, + "description": "FloatParamDefinition represents float parameter's default value and valid range." + }, + "v1ListTemplatesResponse": { + "type": "object", + "properties": { + "total_items": { + "type": "integer", + "format": "int32", + "description": "Total number of results." + }, + "total_pages": { + "type": "integer", + "format": "int32", + "description": "Total number of pages." + }, + "templates": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Template" + }, + "description": "Alerting templates." + } + } + }, + "v1ParamDefinition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "summary": { + "type": "string", + "description": "Short human-readable parameter summary." + }, + "unit": { + "$ref": "#/definitions/v1ParamUnit", + "description": "Parameter unit. TODO: remove this parameter." + }, + "type": { + "$ref": "#/definitions/v1ParamType", + "description": "Parameter type." + }, + "bool": { + "$ref": "#/definitions/v1BoolParamDefinition", + "description": "Bool value." + }, + "float": { + "$ref": "#/definitions/v1FloatParamDefinition", + "description": "Float value." + }, + "string": { + "$ref": "#/definitions/v1StringParamDefinition", + "description": "String value." + } + }, + "description": "ParamDefinition represents a single query parameter." + }, + "v1ParamType": { + "type": "string", + "enum": [ + "PARAM_TYPE_UNSPECIFIED", + "PARAM_TYPE_BOOL", + "PARAM_TYPE_FLOAT", + "PARAM_TYPE_STRING" + ], + "default": "PARAM_TYPE_UNSPECIFIED", + "description": "ParamType represents template parameter type." + }, + "v1ParamUnit": { + "type": "string", + "enum": [ + "PARAM_UNIT_UNSPECIFIED", + "PARAM_UNIT_PERCENTAGE", + "PARAM_UNIT_SECONDS" + ], + "default": "PARAM_UNIT_UNSPECIFIED", + "description": "ParamUnit represents template parameter unit.\n\n - PARAM_UNIT_UNSPECIFIED: Invalid, unknown or absent.\n - PARAM_UNIT_PERCENTAGE: %\n - PARAM_UNIT_SECONDS: s" + }, + "v1ParamValue": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID) that is used in expression." + }, + "type": { + "$ref": "#/definitions/v1ParamType", + "description": "Parameter type." + }, + "bool": { + "type": "boolean", + "description": "Bool value." + }, + "float": { + "type": "number", + "format": "double", + "description": "Float value." + }, + "string": { + "type": "string", + "description": "String value." + } + }, + "description": "ParamValue represents a single rule parameter value." + }, + "v1Severity": { + "type": "string", + "enum": [ + "SEVERITY_UNSPECIFIED", + "SEVERITY_EMERGENCY", + "SEVERITY_ALERT", + "SEVERITY_CRITICAL", + "SEVERITY_ERROR", + "SEVERITY_WARNING", + "SEVERITY_NOTICE", + "SEVERITY_INFO", + "SEVERITY_DEBUG" + ], + "default": "SEVERITY_UNSPECIFIED", + "description": "Severity represents severity level of the check result or alert." + }, + "v1StringParamDefinition": { + "type": "object", + "properties": { + "default": { + "type": "string", + "x-nullable": true, + "description": "Default value." + } + }, + "description": "StringParamDefinition represents string parameter's default value." + }, + "v1Template": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Machine-readable name (ID)." + }, + "summary": { + "type": "string", + "description": "Short human-readable summary." + }, + "expr": { + "type": "string", + "description": "PromQL query expression with templating parameters." + }, + "params": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ParamDefinition" + }, + "description": "Query parameters definitions." + }, + "for": { + "type": "string", + "description": "Default duration value." + }, + "severity": { + "$ref": "#/definitions/v1Severity", + "description": "Severity." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Labels." + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Annotations." + }, + "source": { + "$ref": "#/definitions/v1TemplateSource", + "description": "Template source. Only templates created via API can be updated or deleted via API." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Template creation time. Empty for built-in and SaaS templates." + }, + "yaml": { + "type": "string", + "description": "YAML template file content. Empty for built-in and SaaS templates." + } + }, + "description": "Template represents Alert Template that is used to create Alert Rule." + }, + "v1TemplateSource": { + "type": "string", + "enum": [ + "TEMPLATE_SOURCE_UNSPECIFIED", + "TEMPLATE_SOURCE_BUILT_IN", + "TEMPLATE_SOURCE_SAAS", + "TEMPLATE_SOURCE_USER_FILE", + "TEMPLATE_SOURCE_USER_API" + ], + "default": "TEMPLATE_SOURCE_UNSPECIFIED", + "description": "TemplateSource defines template source.\n\n - TEMPLATE_SOURCE_BUILT_IN: Template that is shipped with PMM Server releases.\n - TEMPLATE_SOURCE_SAAS: Template that is downloaded from check.percona.com.\n - TEMPLATE_SOURCE_USER_FILE: Templated loaded from user-suplied file.\n - TEMPLATE_SOURCE_USER_API: Templated created via API." + }, + "v1UpdateTemplateResponse": { + "type": "object" + } + } +} diff --git a/api/alerting/v1/alerting_grpc.pb.go b/api/alerting/v1/alerting_grpc.pb.go index d559dc19bfe..1db7fdf68b9 100644 --- a/api/alerting/v1/alerting_grpc.pb.go +++ b/api/alerting/v1/alerting_grpc.pb.go @@ -8,7 +8,6 @@ package alertingv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -132,19 +131,15 @@ type UnimplementedAlertingServiceServer struct{} func (UnimplementedAlertingServiceServer) ListTemplates(context.Context, *ListTemplatesRequest) (*ListTemplatesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListTemplates not implemented") } - func (UnimplementedAlertingServiceServer) CreateTemplate(context.Context, *CreateTemplateRequest) (*CreateTemplateResponse, error) { return nil, status.Error(codes.Unimplemented, "method CreateTemplate not implemented") } - func (UnimplementedAlertingServiceServer) UpdateTemplate(context.Context, *UpdateTemplateRequest) (*UpdateTemplateResponse, error) { return nil, status.Error(codes.Unimplemented, "method UpdateTemplate not implemented") } - func (UnimplementedAlertingServiceServer) DeleteTemplate(context.Context, *DeleteTemplateRequest) (*DeleteTemplateResponse, error) { return nil, status.Error(codes.Unimplemented, "method DeleteTemplate not implemented") } - func (UnimplementedAlertingServiceServer) CreateRule(context.Context, *CreateRuleRequest) (*CreateRuleResponse, error) { return nil, status.Error(codes.Unimplemented, "method CreateRule not implemented") } diff --git a/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go b/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go index d99404fc945..dc970ceafc0 100644 --- a/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/create_rule_parameters.go @@ -60,6 +60,7 @@ CreateRuleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateRuleParams struct { + // Body. Body CreateRuleBody @@ -129,6 +130,7 @@ func (o *CreateRuleParams) SetBody(body CreateRuleBody) { // WriteToRequest writes these params to a swagger request func (o *CreateRuleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/create_rule_responses.go b/api/alerting/v1/json/client/alerting_service/create_rule_responses.go index 51443beb017..e18e8cb060d 100644 --- a/api/alerting/v1/json/client/alerting_service/create_rule_responses.go +++ b/api/alerting/v1/json/client/alerting_service/create_rule_responses.go @@ -105,6 +105,7 @@ func (o *CreateRuleOK) GetPayload() any { } func (o *CreateRuleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -176,6 +177,7 @@ func (o *CreateRuleDefault) GetPayload() *CreateRuleDefaultBody { } func (o *CreateRuleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateRuleDefaultBody) // response payload @@ -191,6 +193,7 @@ CreateRuleBody create rule body swagger:model CreateRuleBody */ type CreateRuleBody struct { + // Template name. TemplateName string `json:"template_name,omitempty"` @@ -387,7 +390,9 @@ func (o *CreateRuleBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -407,13 +412,16 @@ func (o *CreateRuleBody) contextValidateParams(ctx context.Context, formats strf return err } } + } return nil } func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Filters); i++ { + if o.Filters[i] != nil { if swag.IsZero(o.Filters[i]) { // not required @@ -433,6 +441,7 @@ func (o *CreateRuleBody) contextValidateFilters(ctx context.Context, formats str return err } } + } return nil @@ -461,6 +470,7 @@ CreateRuleDefaultBody create rule default body swagger:model CreateRuleDefaultBody */ type CreateRuleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -530,7 +540,9 @@ func (o *CreateRuleDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -550,6 +562,7 @@ func (o *CreateRuleDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -578,6 +591,7 @@ CreateRuleDefaultBodyDetailsItems0 create rule default body details items0 swagger:model CreateRuleDefaultBodyDetailsItems0 */ type CreateRuleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -589,6 +603,7 @@ type CreateRuleDefaultBodyDetailsItems0 struct { func (o *CreateRuleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -626,6 +641,7 @@ func (o *CreateRuleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateRuleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -689,6 +705,7 @@ CreateRuleParamsBodyFiltersItems0 Filter represents a single filter condition. swagger:model CreateRuleParamsBodyFiltersItems0 */ type CreateRuleParamsBodyFiltersItems0 struct { + // FilterType represents filter matching type. // Enum: ["FILTER_TYPE_UNSPECIFIED","FILTER_TYPE_MATCH","FILTER_TYPE_MISMATCH"] Type *string `json:"type,omitempty"` @@ -787,6 +804,7 @@ CreateRuleParamsBodyParamsItems0 ParamValue represents a single rule parameter v swagger:model CreateRuleParamsBodyParamsItems0 */ type CreateRuleParamsBodyParamsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` diff --git a/api/alerting/v1/json/client/alerting_service/create_template_parameters.go b/api/alerting/v1/json/client/alerting_service/create_template_parameters.go index 7af56c35841..266ab9b7c49 100644 --- a/api/alerting/v1/json/client/alerting_service/create_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/create_template_parameters.go @@ -60,6 +60,7 @@ CreateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CreateTemplateParams struct { + // Body. Body CreateTemplateBody @@ -129,6 +130,7 @@ func (o *CreateTemplateParams) SetBody(body CreateTemplateBody) { // WriteToRequest writes these params to a swagger request func (o *CreateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/create_template_responses.go b/api/alerting/v1/json/client/alerting_service/create_template_responses.go index d521ef29139..183c84fb46a 100644 --- a/api/alerting/v1/json/client/alerting_service/create_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/create_template_responses.go @@ -104,6 +104,7 @@ func (o *CreateTemplateOK) GetPayload() any { } func (o *CreateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *CreateTemplateDefault) GetPayload() *CreateTemplateDefaultBody { } func (o *CreateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CreateTemplateDefaultBody) // response payload @@ -190,6 +192,7 @@ CreateTemplateBody create template body swagger:model CreateTemplateBody */ type CreateTemplateBody struct { + // YAML template file content. Yaml string `json:"yaml,omitempty"` } @@ -227,6 +230,7 @@ CreateTemplateDefaultBody create template default body swagger:model CreateTemplateDefaultBody */ type CreateTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *CreateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,6 +322,7 @@ func (o *CreateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -344,6 +351,7 @@ CreateTemplateDefaultBodyDetailsItems0 create template default body details item swagger:model CreateTemplateDefaultBodyDetailsItems0 */ type CreateTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -355,6 +363,7 @@ type CreateTemplateDefaultBodyDetailsItems0 struct { func (o *CreateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -392,6 +401,7 @@ func (o *CreateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o CreateTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go b/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go index 12c5e9f70f9..08d19304dc6 100644 --- a/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/delete_template_parameters.go @@ -60,6 +60,7 @@ DeleteTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteTemplateParams struct { + // Name. Name string @@ -129,6 +130,7 @@ func (o *DeleteTemplateParams) SetName(name string) { // WriteToRequest writes these params to a swagger request func (o *DeleteTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/delete_template_responses.go b/api/alerting/v1/json/client/alerting_service/delete_template_responses.go index 2f12e61369a..e0387716d22 100644 --- a/api/alerting/v1/json/client/alerting_service/delete_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/delete_template_responses.go @@ -104,6 +104,7 @@ func (o *DeleteTemplateOK) GetPayload() any { } func (o *DeleteTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *DeleteTemplateDefault) GetPayload() *DeleteTemplateDefaultBody { } func (o *DeleteTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteTemplateDefaultBody) // response payload @@ -190,6 +192,7 @@ DeleteTemplateDefaultBody delete template default body swagger:model DeleteTemplateDefaultBody */ type DeleteTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *DeleteTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *DeleteTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -307,6 +313,7 @@ DeleteTemplateDefaultBodyDetailsItems0 delete template default body details item swagger:model DeleteTemplateDefaultBodyDetailsItems0 */ type DeleteTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type DeleteTemplateDefaultBodyDetailsItems0 struct { func (o *DeleteTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *DeleteTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go b/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go index 54f826721d0..a13fd2e40a5 100644 --- a/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/list_templates_parameters.go @@ -61,6 +61,7 @@ ListTemplatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListTemplatesParams struct { + /* PageIndex. Index of the requested page, starts from 0. @@ -171,6 +172,7 @@ func (o *ListTemplatesParams) SetReload(reload *bool) { // WriteToRequest writes these params to a swagger request func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -186,6 +188,7 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qPageIndex := swag.FormatInt32(qrPageIndex) if qPageIndex != "" { + if err := r.SetQueryParam("page_index", qPageIndex); err != nil { return err } @@ -202,6 +205,7 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qPageSize := swag.FormatInt32(qrPageSize) if qPageSize != "" { + if err := r.SetQueryParam("page_size", qPageSize); err != nil { return err } @@ -218,6 +222,7 @@ func (o *ListTemplatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qReload := swag.FormatBool(qrReload) if qReload != "" { + if err := r.SetQueryParam("reload", qReload); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/list_templates_responses.go b/api/alerting/v1/json/client/alerting_service/list_templates_responses.go index e3ef0e66c65..dd3c76a03a2 100644 --- a/api/alerting/v1/json/client/alerting_service/list_templates_responses.go +++ b/api/alerting/v1/json/client/alerting_service/list_templates_responses.go @@ -105,6 +105,7 @@ func (o *ListTemplatesOK) GetPayload() *ListTemplatesOKBody { } func (o *ListTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListTemplatesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListTemplatesDefault) GetPayload() *ListTemplatesDefaultBody { } func (o *ListTemplatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListTemplatesDefaultBody) // response payload @@ -193,6 +195,7 @@ ListTemplatesDefaultBody list templates default body swagger:model ListTemplatesDefaultBody */ type ListTemplatesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListTemplatesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListTemplatesDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -310,6 +316,7 @@ ListTemplatesDefaultBodyDetailsItems0 list templates default body details items0 swagger:model ListTemplatesDefaultBodyDetailsItems0 */ type ListTemplatesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListTemplatesDefaultBodyDetailsItems0 struct { func (o *ListTemplatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListTemplatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListTemplatesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListTemplatesOKBody list templates OK body swagger:model ListTemplatesOKBody */ type ListTemplatesOKBody struct { + // Total number of results. TotalItems int32 `json:"total_items,omitempty"` @@ -490,7 +500,9 @@ func (o *ListTemplatesOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Templates); i++ { + if o.Templates[i] != nil { if swag.IsZero(o.Templates[i]) { // not required @@ -510,6 +522,7 @@ func (o *ListTemplatesOKBody) contextValidateTemplates(ctx context.Context, form return err } } + } return nil @@ -538,6 +551,7 @@ ListTemplatesOKBodyTemplatesItems0 Template represents Alert Template that is us swagger:model ListTemplatesOKBodyTemplatesItems0 */ type ListTemplatesOKBodyTemplatesItems0 struct { + // Machine-readable name (ID). Name string `json:"name,omitempty"` @@ -777,7 +791,9 @@ func (o *ListTemplatesOKBodyTemplatesItems0) ContextValidate(ctx context.Context } func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Params); i++ { + if o.Params[i] != nil { if swag.IsZero(o.Params[i]) { // not required @@ -797,6 +813,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0) contextValidateParams(ctx context.C return err } } + } return nil @@ -825,6 +842,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0 ParamDefinition represents a sing swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0 */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0 struct { + // Machine-readable name (ID) that is used in expression. Name string `json:"name,omitempty"` @@ -1068,6 +1086,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) ContextValidate(ctx con } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx context.Context, formats strfmt.Registry) error { + if o.Bool != nil { if swag.IsZero(o.Bool) { // not required @@ -1092,6 +1111,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateBool(ctx } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ctx context.Context, formats strfmt.Registry) error { + if o.Float != nil { if swag.IsZero(o.Float) { // not required @@ -1116,6 +1136,7 @@ func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateFloat(ct } func (o *ListTemplatesOKBodyTemplatesItems0ParamsItems0) contextValidateString(ctx context.Context, formats strfmt.Registry) error { + if o.String != nil { if swag.IsZero(o.String) { // not required @@ -1162,6 +1183,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool BoolParamDefinition represent swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Bool struct { + // default Default *bool `json:"default,omitempty"` } @@ -1199,6 +1221,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0Float FloatParamDefinition represe swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0Float */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0Float struct { + // Default value. Default *float64 `json:"default,omitempty"` @@ -1242,6 +1265,7 @@ ListTemplatesOKBodyTemplatesItems0ParamsItems0String StringParamDefinition repre swagger:model ListTemplatesOKBodyTemplatesItems0ParamsItems0String */ type ListTemplatesOKBodyTemplatesItems0ParamsItems0String struct { + // Default value. Default *string `json:"default,omitempty"` } diff --git a/api/alerting/v1/json/client/alerting_service/update_template_parameters.go b/api/alerting/v1/json/client/alerting_service/update_template_parameters.go index 531cd4e36b3..8d019495cab 100644 --- a/api/alerting/v1/json/client/alerting_service/update_template_parameters.go +++ b/api/alerting/v1/json/client/alerting_service/update_template_parameters.go @@ -60,6 +60,7 @@ UpdateTemplateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateTemplateParams struct { + // Body. Body UpdateTemplateBody @@ -146,6 +147,7 @@ func (o *UpdateTemplateParams) SetName(name string) { // WriteToRequest writes these params to a swagger request func (o *UpdateTemplateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/alerting/v1/json/client/alerting_service/update_template_responses.go b/api/alerting/v1/json/client/alerting_service/update_template_responses.go index 51a789ea3e5..c180a25fe82 100644 --- a/api/alerting/v1/json/client/alerting_service/update_template_responses.go +++ b/api/alerting/v1/json/client/alerting_service/update_template_responses.go @@ -104,6 +104,7 @@ func (o *UpdateTemplateOK) GetPayload() any { } func (o *UpdateTemplateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *UpdateTemplateDefault) GetPayload() *UpdateTemplateDefaultBody { } func (o *UpdateTemplateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateTemplateDefaultBody) // response payload @@ -190,6 +192,7 @@ UpdateTemplateBody update template body swagger:model UpdateTemplateBody */ type UpdateTemplateBody struct { + // YAML template file content. Yaml string `json:"yaml,omitempty"` } @@ -227,6 +230,7 @@ UpdateTemplateDefaultBody update template default body swagger:model UpdateTemplateDefaultBody */ type UpdateTemplateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *UpdateTemplateDefaultBody) ContextValidate(ctx context.Context, formats } func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,6 +322,7 @@ func (o *UpdateTemplateDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -344,6 +351,7 @@ UpdateTemplateDefaultBodyDetailsItems0 update template default body details item swagger:model UpdateTemplateDefaultBodyDetailsItems0 */ type UpdateTemplateDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -355,6 +363,7 @@ type UpdateTemplateDefaultBodyDetailsItems0 struct { func (o *UpdateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -392,6 +401,7 @@ func (o *UpdateTemplateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateTemplateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/alerting/v1/params.pb.go b/api/alerting/v1/params.pb.go index 5df5a859b29..4f9034616f4 100644 --- a/api/alerting/v1/params.pb.go +++ b/api/alerting/v1/params.pb.go @@ -7,12 +7,11 @@ package alertingv1 import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -156,14 +155,11 @@ func file_alerting_v1_params_proto_rawDescGZIP() []byte { return file_alerting_v1_params_proto_rawDescData } -var ( - file_alerting_v1_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_alerting_v1_params_proto_goTypes = []any{ - (ParamUnit)(0), // 0: alerting.v1.ParamUnit - (ParamType)(0), // 1: alerting.v1.ParamType - } -) - +var file_alerting_v1_params_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_alerting_v1_params_proto_goTypes = []any{ + (ParamUnit)(0), // 0: alerting.v1.ParamUnit + (ParamType)(0), // 1: alerting.v1.ParamType +} var file_alerting_v1_params_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/alerting/v1/params.swagger.json b/api/alerting/v1/params.swagger.json new file mode 100644 index 00000000000..d56f9a7c05a --- /dev/null +++ b/api/alerting/v1/params.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "alerting/v1/params.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/backup/v1/artifacts.pb.go b/api/backup/v1/artifacts.pb.go index 5302152bd21..a921d234e96 100644 --- a/api/backup/v1/artifacts.pb.go +++ b/api/backup/v1/artifacts.pb.go @@ -7,14 +7,13 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -637,26 +636,23 @@ func file_backup_v1_artifacts_proto_rawDescGZIP() []byte { return file_backup_v1_artifacts_proto_rawDescData } -var ( - file_backup_v1_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_backup_v1_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_backup_v1_artifacts_proto_goTypes = []any{ - (BackupStatus)(0), // 0: backup.v1.BackupStatus - (*Artifact)(nil), // 1: backup.v1.Artifact - (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest - (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse - (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest - (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse - (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange - (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest - (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse - (DataModel)(0), // 9: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp - (BackupMode)(0), // 11: backup.v1.BackupMode - (*Metadata)(nil), // 12: backup.v1.Metadata - } -) - +var file_backup_v1_artifacts_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_backup_v1_artifacts_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_backup_v1_artifacts_proto_goTypes = []any{ + (BackupStatus)(0), // 0: backup.v1.BackupStatus + (*Artifact)(nil), // 1: backup.v1.Artifact + (*ListArtifactsRequest)(nil), // 2: backup.v1.ListArtifactsRequest + (*ListArtifactsResponse)(nil), // 3: backup.v1.ListArtifactsResponse + (*DeleteArtifactRequest)(nil), // 4: backup.v1.DeleteArtifactRequest + (*DeleteArtifactResponse)(nil), // 5: backup.v1.DeleteArtifactResponse + (*PitrTimerange)(nil), // 6: backup.v1.PitrTimerange + (*ListPitrTimerangesRequest)(nil), // 7: backup.v1.ListPitrTimerangesRequest + (*ListPitrTimerangesResponse)(nil), // 8: backup.v1.ListPitrTimerangesResponse + (DataModel)(0), // 9: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp + (BackupMode)(0), // 11: backup.v1.BackupMode + (*Metadata)(nil), // 12: backup.v1.Metadata +} var file_backup_v1_artifacts_proto_depIdxs = []int32{ 9, // 0: backup.v1.Artifact.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.Artifact.status:type_name -> backup.v1.BackupStatus diff --git a/api/backup/v1/artifacts.swagger.json b/api/backup/v1/artifacts.swagger.json new file mode 100644 index 00000000000..c160f10d3e5 --- /dev/null +++ b/api/backup/v1/artifacts.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "backup/v1/artifacts.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/backup/v1/backup.pb.go b/api/backup/v1/backup.pb.go index 36a2ec0efb4..f358db0246e 100644 --- a/api/backup/v1/backup.pb.go +++ b/api/backup/v1/backup.pb.go @@ -7,19 +7,17 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -1243,40 +1241,37 @@ func file_backup_v1_backup_proto_rawDescGZIP() []byte { return file_backup_v1_backup_proto_rawDescData } -var ( - file_backup_v1_backup_proto_msgTypes = make([]protoimpl.MessageInfo, 15) - file_backup_v1_backup_proto_goTypes = []any{ - (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest - (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse - (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest - (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse - (*ScheduledBackup)(nil), // 4: backup.v1.ScheduledBackup - (*ScheduleBackupRequest)(nil), // 5: backup.v1.ScheduleBackupRequest - (*ScheduleBackupResponse)(nil), // 6: backup.v1.ScheduleBackupResponse - (*ListScheduledBackupsRequest)(nil), // 7: backup.v1.ListScheduledBackupsRequest - (*ListScheduledBackupsResponse)(nil), // 8: backup.v1.ListScheduledBackupsResponse - (*ChangeScheduledBackupRequest)(nil), // 9: backup.v1.ChangeScheduledBackupRequest - (*ChangeScheduledBackupResponse)(nil), // 10: backup.v1.ChangeScheduledBackupResponse - (*RemoveScheduledBackupRequest)(nil), // 11: backup.v1.RemoveScheduledBackupRequest - (*RemoveScheduledBackupResponse)(nil), // 12: backup.v1.RemoveScheduledBackupResponse - (*GetLogsRequest)(nil), // 13: backup.v1.GetLogsRequest - (*GetLogsResponse)(nil), // 14: backup.v1.GetLogsResponse - (*durationpb.Duration)(nil), // 15: google.protobuf.Duration - (DataModel)(0), // 16: backup.v1.DataModel - (*v1.MySQLService)(nil), // 17: inventory.v1.MySQLService - (*v1.MongoDBService)(nil), // 18: inventory.v1.MongoDBService - (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp - (BackupMode)(0), // 20: backup.v1.BackupMode - (*LogChunk)(nil), // 21: backup.v1.LogChunk - (*ListArtifactsRequest)(nil), // 22: backup.v1.ListArtifactsRequest - (*DeleteArtifactRequest)(nil), // 23: backup.v1.DeleteArtifactRequest - (*ListPitrTimerangesRequest)(nil), // 24: backup.v1.ListPitrTimerangesRequest - (*ListArtifactsResponse)(nil), // 25: backup.v1.ListArtifactsResponse - (*DeleteArtifactResponse)(nil), // 26: backup.v1.DeleteArtifactResponse - (*ListPitrTimerangesResponse)(nil), // 27: backup.v1.ListPitrTimerangesResponse - } -) - +var file_backup_v1_backup_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_backup_v1_backup_proto_goTypes = []any{ + (*StartBackupRequest)(nil), // 0: backup.v1.StartBackupRequest + (*StartBackupResponse)(nil), // 1: backup.v1.StartBackupResponse + (*ListArtifactCompatibleServicesRequest)(nil), // 2: backup.v1.ListArtifactCompatibleServicesRequest + (*ListArtifactCompatibleServicesResponse)(nil), // 3: backup.v1.ListArtifactCompatibleServicesResponse + (*ScheduledBackup)(nil), // 4: backup.v1.ScheduledBackup + (*ScheduleBackupRequest)(nil), // 5: backup.v1.ScheduleBackupRequest + (*ScheduleBackupResponse)(nil), // 6: backup.v1.ScheduleBackupResponse + (*ListScheduledBackupsRequest)(nil), // 7: backup.v1.ListScheduledBackupsRequest + (*ListScheduledBackupsResponse)(nil), // 8: backup.v1.ListScheduledBackupsResponse + (*ChangeScheduledBackupRequest)(nil), // 9: backup.v1.ChangeScheduledBackupRequest + (*ChangeScheduledBackupResponse)(nil), // 10: backup.v1.ChangeScheduledBackupResponse + (*RemoveScheduledBackupRequest)(nil), // 11: backup.v1.RemoveScheduledBackupRequest + (*RemoveScheduledBackupResponse)(nil), // 12: backup.v1.RemoveScheduledBackupResponse + (*GetLogsRequest)(nil), // 13: backup.v1.GetLogsRequest + (*GetLogsResponse)(nil), // 14: backup.v1.GetLogsResponse + (*durationpb.Duration)(nil), // 15: google.protobuf.Duration + (DataModel)(0), // 16: backup.v1.DataModel + (*v1.MySQLService)(nil), // 17: inventory.v1.MySQLService + (*v1.MongoDBService)(nil), // 18: inventory.v1.MongoDBService + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (BackupMode)(0), // 20: backup.v1.BackupMode + (*LogChunk)(nil), // 21: backup.v1.LogChunk + (*ListArtifactsRequest)(nil), // 22: backup.v1.ListArtifactsRequest + (*DeleteArtifactRequest)(nil), // 23: backup.v1.DeleteArtifactRequest + (*ListPitrTimerangesRequest)(nil), // 24: backup.v1.ListPitrTimerangesRequest + (*ListArtifactsResponse)(nil), // 25: backup.v1.ListArtifactsResponse + (*DeleteArtifactResponse)(nil), // 26: backup.v1.DeleteArtifactResponse + (*ListPitrTimerangesResponse)(nil), // 27: backup.v1.ListPitrTimerangesResponse +} var file_backup_v1_backup_proto_depIdxs = []int32{ 15, // 0: backup.v1.StartBackupRequest.retry_interval:type_name -> google.protobuf.Duration 16, // 1: backup.v1.StartBackupRequest.data_model:type_name -> backup.v1.DataModel diff --git a/api/backup/v1/backup.swagger.json b/api/backup/v1/backup.swagger.json new file mode 100644 index 00000000000..084b996bce7 --- /dev/null +++ b/api/backup/v1/backup.swagger.json @@ -0,0 +1,1003 @@ +{ + "swagger": "2.0", + "info": { + "title": "backup/v1/backup.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "BackupService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/backups/artifacts": { + "get": { + "summary": "List artifacts", + "description": "Return a list of backup artifacts.", + "operationId": "ListArtifacts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListArtifactsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups/artifacts/{artifact_id}": { + "delete": { + "summary": "Delete Artifact", + "description": "Deletes an artifact.", + "operationId": "DeleteArtifact", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DeleteArtifactResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "artifact_id", + "description": "Machine-readable artifact ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "remove_files", + "description": "Removes all the backup files associated with artifact if flag is set.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups/artifacts/{artifact_id}/pitr-timeranges": { + "get": { + "summary": "List PITR Timeranges", + "description": "Return a list of available MongoDB point-in-time-recovery timeranges.", + "operationId": "ListPitrTimeranges", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListPitrTimerangesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "artifact_id", + "description": "Artifact ID represents artifact whose location has PITR timeranges to be retrieved.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups/scheduled": { + "get": { + "summary": "List Scheduled Backups", + "description": "List all scheduled backups.", + "operationId": "ListScheduledBackups", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListScheduledBackupsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups/{artifact_id}/compatible-services": { + "get": { + "summary": "List Compatible Services", + "description": "List services that are compatible with the backup artifact.", + "operationId": "ListArtifactCompatibleServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListArtifactCompatibleServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "artifact_id", + "description": "Artifact id used to determine restore compatibility.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups/{artifact_id}/logs": { + "get": { + "summary": "Get Logs", + "description": "Get logs from the underlying tools for a backup/restore job.", + "operationId": "GetLogs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetLogsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "artifact_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + } + ], + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups/{scheduled_backup_id}": { + "delete": { + "summary": "Remove a Scheduled Backup", + "description": "Remove a scheduled backup.", + "operationId": "RemoveScheduledBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveScheduledBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "scheduled_backup_id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups:changeScheduled": { + "put": { + "summary": "Change a Scheduled Backup", + "description": "Change a scheduled backup.", + "operationId": "ChangeScheduledBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeScheduledBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ChangeScheduledBackupRequest" + } + } + ], + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups:schedule": { + "post": { + "summary": "Schedule a Backup", + "description": "Schedule a backup to run at a specified time.", + "operationId": "ScheduleBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ScheduleBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ScheduleBackupRequest" + } + } + ], + "tags": [ + "BackupService" + ] + } + }, + "/v1/backups:start": { + "post": { + "summary": "Start a Backup", + "description": "Could return the Error message in the details containing specific ErrorCode indicating failure reason:\nERROR_CODE_XTRABACKUP_NOT_INSTALLED - xtrabackup is not installed on the service\nERROR_CODE_INVALID_XTRABACKUP - different versions of xtrabackup and xbcloud\nERROR_CODE_INCOMPATIBLE_XTRABACKUP - xtrabackup is not compatible with MySQL for taking a backup", + "operationId": "StartBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StartBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StartBackupRequest" + } + } + ], + "tags": [ + "BackupService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1Artifact": { + "type": "object", + "properties": { + "artifact_id": { + "type": "string", + "description": "Machine-readable artifact ID." + }, + "name": { + "type": "string", + "title": "Artifact name" + }, + "vendor": { + "type": "string", + "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "location_name": { + "type": "string", + "description": "Location name." + }, + "service_id": { + "type": "string", + "description": "Machine-readable service ID." + }, + "service_name": { + "type": "string", + "description": "Service name." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model." + }, + "status": { + "$ref": "#/definitions/v1BackupStatus", + "description": "Backup status." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Artifact creation time." + }, + "mode": { + "$ref": "#/definitions/v1BackupMode", + "description": "Backup mode." + }, + "is_sharded_cluster": { + "type": "boolean", + "description": "Source database setup type." + }, + "folder": { + "type": "string", + "description": "Folder to store artifact on a storage." + }, + "metadata_list": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Metadata" + }, + "description": "List of artifact metadata." + } + }, + "description": "Artifact represents single backup artifact." + }, + "v1BackupMode": { + "type": "string", + "enum": [ + "BACKUP_MODE_UNSPECIFIED", + "BACKUP_MODE_SNAPSHOT", + "BACKUP_MODE_INCREMENTAL", + "BACKUP_MODE_PITR" + ], + "default": "BACKUP_MODE_UNSPECIFIED", + "description": "BackupMode specifies backup mode." + }, + "v1BackupStatus": { + "type": "string", + "enum": [ + "BACKUP_STATUS_UNSPECIFIED", + "BACKUP_STATUS_PENDING", + "BACKUP_STATUS_IN_PROGRESS", + "BACKUP_STATUS_PAUSED", + "BACKUP_STATUS_SUCCESS", + "BACKUP_STATUS_ERROR", + "BACKUP_STATUS_DELETING", + "BACKUP_STATUS_FAILED_TO_DELETE", + "BACKUP_STATUS_CLEANUP_IN_PROGRESS" + ], + "default": "BACKUP_STATUS_UNSPECIFIED", + "description": "BackupStatus shows the current status of execution of backup." + }, + "v1ChangeScheduledBackupRequest": { + "type": "object", + "properties": { + "scheduled_backup_id": { + "type": "string" + }, + "enabled": { + "type": "boolean", + "x-nullable": true + }, + "cron_expression": { + "type": "string", + "x-nullable": true, + "description": "How often backup should be run in cron format." + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "First backup wouldn't happen before this time." + }, + "name": { + "type": "string", + "x-nullable": true, + "description": "Name of backup." + }, + "description": { + "type": "string", + "x-nullable": true, + "description": "Human-readable description." + }, + "retries": { + "type": "integer", + "format": "int64", + "x-nullable": true, + "description": "How many times to retry a failed backup before giving up." + }, + "retry_interval": { + "type": "string", + "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "retention": { + "type": "integer", + "format": "int64", + "x-nullable": true, + "description": "How many artifacts keep. 0 - unlimited." + } + } + }, + "v1ChangeScheduledBackupResponse": { + "type": "object" + }, + "v1DataModel": { + "type": "string", + "enum": [ + "DATA_MODEL_UNSPECIFIED", + "DATA_MODEL_PHYSICAL", + "DATA_MODEL_LOGICAL" + ], + "default": "DATA_MODEL_UNSPECIFIED", + "description": "DataModel is a model used for performing a backup." + }, + "v1DeleteArtifactResponse": { + "type": "object" + }, + "v1File": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "is_directory": { + "type": "boolean" + } + }, + "description": "File represents file or folder on a storage." + }, + "v1GetLogsResponse": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1LogChunk" + } + }, + "end": { + "type": "boolean" + } + } + }, + "v1ListArtifactCompatibleServicesResponse": { + "type": "object", + "properties": { + "mysql": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MySQLService" + } + }, + "mongodb": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MongoDBService" + } + } + } + }, + "v1ListArtifactsResponse": { + "type": "object", + "properties": { + "artifacts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Artifact" + } + } + } + }, + "v1ListPitrTimerangesResponse": { + "type": "object", + "properties": { + "timeranges": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1PitrTimerange" + } + } + } + }, + "v1ListScheduledBackupsResponse": { + "type": "object", + "properties": { + "scheduled_backups": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ScheduledBackup" + } + } + } + }, + "v1LogChunk": { + "type": "object", + "properties": { + "chunk_id": { + "type": "integer", + "format": "int64" + }, + "data": { + "type": "string" + } + }, + "description": "LogChunk represent one chunk of logs." + }, + "v1Metadata": { + "type": "object", + "properties": { + "file_list": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1File" + }, + "description": "List of files backup consists of." + }, + "restore_to": { + "type": "string", + "format": "date-time", + "description": "Exact time DB can be restored to." + }, + "pbm_metadata": { + "$ref": "#/definitions/v1PbmMetadata" + } + }, + "description": "Metadata contains extra artifact data like files it consists of, tool specific data, etc." + }, + "v1MongoDBService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "MongoDB version." + } + }, + "description": "MongoDBService represents a generic MongoDB instance." + }, + "v1MySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "MySQL version." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra parameters to be added to the DSN." + } + }, + "description": "MySQLService represents a generic MySQL instance." + }, + "v1PbmMetadata": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of backup in backup tool representation." + } + }, + "description": "PbmMetadata contains additional data for pbm cli tools." + }, + "v1PitrTimerange": { + "type": "object", + "properties": { + "start_timestamp": { + "type": "string", + "format": "date-time", + "description": "start_timestamp is the time of the first event in the PITR chunk." + }, + "end_timestamp": { + "type": "string", + "format": "date-time", + "description": "end_timestamp is the time of the last event in the PITR chunk." + } + } + }, + "v1RemoveScheduledBackupResponse": { + "type": "object" + }, + "v1ScheduleBackupRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Service identifier where backup should be performed." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "folder": { + "type": "string", + "description": "How often backup should be run in cron format.\nFolder on storage for artifact." + }, + "cron_expression": { + "type": "string" + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "First backup wouldn't happen before this time." + }, + "name": { + "type": "string", + "description": "Name of backup." + }, + "description": { + "type": "string", + "description": "Human-readable description." + }, + "enabled": { + "type": "boolean", + "description": "If scheduling is enabled." + }, + "retries": { + "type": "integer", + "format": "int64", + "description": "How many times to retry a failed backup before giving up." + }, + "retry_interval": { + "type": "string", + "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "mode": { + "$ref": "#/definitions/v1BackupMode", + "description": "Backup mode." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model (physical or logical)." + }, + "retention": { + "type": "integer", + "format": "int64", + "description": "How many artifacts keep. 0 - unlimited." + } + } + }, + "v1ScheduleBackupResponse": { + "type": "object", + "properties": { + "scheduled_backup_id": { + "type": "string" + } + } + }, + "v1ScheduledBackup": { + "type": "object", + "properties": { + "scheduled_backup_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "service_id": { + "type": "string", + "description": "Machine-readable service ID." + }, + "service_name": { + "type": "string", + "description": "Service name." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "location_name": { + "type": "string", + "description": "Location name." + }, + "folder": { + "type": "string", + "description": "Folder on storage for artifact." + }, + "cron_expression": { + "type": "string", + "description": "How often backup will be run in cron format." + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "First backup wouldn't happen before this time." + }, + "name": { + "type": "string", + "description": "Artifact name." + }, + "description": { + "type": "string", + "description": "Description." + }, + "enabled": { + "type": "boolean", + "description": "If scheduling is enabled." + }, + "retries": { + "type": "integer", + "format": "int64", + "description": "How many times to retry a failed backup before giving up." + }, + "retry_interval": { + "type": "string", + "description": "Delay between each retry. Should have a suffix in JSON: 2s, 1m, 1h." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model (physical or logical)." + }, + "mode": { + "$ref": "#/definitions/v1BackupMode", + "description": "Backup mode." + }, + "vendor": { + "type": "string", + "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." + }, + "last_run": { + "type": "string", + "format": "date-time", + "description": "Last run." + }, + "next_run": { + "type": "string", + "format": "date-time", + "description": "Next run." + }, + "retention": { + "type": "integer", + "format": "int64", + "description": "How many artifacts keep. 0 - unlimited." + } + }, + "description": "ScheduledBackup represents scheduled task for backup." + }, + "v1StartBackupRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "name": { + "type": "string", + "description": "If empty then name is auto-generated." + }, + "description": { + "type": "string", + "description": "Human-readable description." + }, + "retry_interval": { + "type": "string", + "description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "retries": { + "type": "integer", + "format": "int64", + "description": "How many times to retry a failed backup before giving up." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "DataModel represents the data model used for the backup." + }, + "folder": { + "type": "string", + "description": "Folder on storage for artifact." + } + } + }, + "v1StartBackupResponse": { + "type": "object", + "properties": { + "artifact_id": { + "type": "string", + "description": "Unique identifier." + } + } + } + } +} diff --git a/api/backup/v1/backup_grpc.pb.go b/api/backup/v1/backup_grpc.pb.go index 2f28a3ab987..6d16ad2b7de 100644 --- a/api/backup/v1/backup_grpc.pb.go +++ b/api/backup/v1/backup_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -207,39 +206,30 @@ type UnimplementedBackupServiceServer struct{} func (UnimplementedBackupServiceServer) StartBackup(context.Context, *StartBackupRequest) (*StartBackupResponse, error) { return nil, status.Error(codes.Unimplemented, "method StartBackup not implemented") } - func (UnimplementedBackupServiceServer) ListArtifactCompatibleServices(context.Context, *ListArtifactCompatibleServicesRequest) (*ListArtifactCompatibleServicesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListArtifactCompatibleServices not implemented") } - func (UnimplementedBackupServiceServer) ScheduleBackup(context.Context, *ScheduleBackupRequest) (*ScheduleBackupResponse, error) { return nil, status.Error(codes.Unimplemented, "method ScheduleBackup not implemented") } - func (UnimplementedBackupServiceServer) ListScheduledBackups(context.Context, *ListScheduledBackupsRequest) (*ListScheduledBackupsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListScheduledBackups not implemented") } - func (UnimplementedBackupServiceServer) ChangeScheduledBackup(context.Context, *ChangeScheduledBackupRequest) (*ChangeScheduledBackupResponse, error) { return nil, status.Error(codes.Unimplemented, "method ChangeScheduledBackup not implemented") } - func (UnimplementedBackupServiceServer) RemoveScheduledBackup(context.Context, *RemoveScheduledBackupRequest) (*RemoveScheduledBackupResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveScheduledBackup not implemented") } - func (UnimplementedBackupServiceServer) GetLogs(context.Context, *GetLogsRequest) (*GetLogsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetLogs not implemented") } - func (UnimplementedBackupServiceServer) ListArtifacts(context.Context, *ListArtifactsRequest) (*ListArtifactsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListArtifacts not implemented") } - func (UnimplementedBackupServiceServer) DeleteArtifact(context.Context, *DeleteArtifactRequest) (*DeleteArtifactResponse, error) { return nil, status.Error(codes.Unimplemented, "method DeleteArtifact not implemented") } - func (UnimplementedBackupServiceServer) ListPitrTimeranges(context.Context, *ListPitrTimerangesRequest) (*ListPitrTimerangesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListPitrTimeranges not implemented") } diff --git a/api/backup/v1/common.pb.go b/api/backup/v1/common.pb.go index ca4ba8be172..da7f4a0678c 100644 --- a/api/backup/v1/common.pb.go +++ b/api/backup/v1/common.pb.go @@ -7,14 +7,13 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -410,20 +409,17 @@ func file_backup_v1_common_proto_rawDescGZIP() []byte { return file_backup_v1_common_proto_rawDescData } -var ( - file_backup_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) - file_backup_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) - file_backup_v1_common_proto_goTypes = []any{ - (DataModel)(0), // 0: backup.v1.DataModel - (BackupMode)(0), // 1: backup.v1.BackupMode - (*File)(nil), // 2: backup.v1.File - (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata - (*Metadata)(nil), // 4: backup.v1.Metadata - (*LogChunk)(nil), // 5: backup.v1.LogChunk - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - } -) - +var file_backup_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_backup_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_backup_v1_common_proto_goTypes = []any{ + (DataModel)(0), // 0: backup.v1.DataModel + (BackupMode)(0), // 1: backup.v1.BackupMode + (*File)(nil), // 2: backup.v1.File + (*PbmMetadata)(nil), // 3: backup.v1.PbmMetadata + (*Metadata)(nil), // 4: backup.v1.Metadata + (*LogChunk)(nil), // 5: backup.v1.LogChunk + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp +} var file_backup_v1_common_proto_depIdxs = []int32{ 2, // 0: backup.v1.Metadata.file_list:type_name -> backup.v1.File 6, // 1: backup.v1.Metadata.restore_to:type_name -> google.protobuf.Timestamp diff --git a/api/backup/v1/common.swagger.json b/api/backup/v1/common.swagger.json new file mode 100644 index 00000000000..4e41fc07567 --- /dev/null +++ b/api/backup/v1/common.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "backup/v1/common.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/backup/v1/errors.pb.go b/api/backup/v1/errors.pb.go index d67aecce84c..a9645403e6b 100644 --- a/api/backup/v1/errors.pb.go +++ b/api/backup/v1/errors.pb.go @@ -7,12 +7,11 @@ package backupv1 import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -161,15 +160,12 @@ func file_backup_v1_errors_proto_rawDescGZIP() []byte { return file_backup_v1_errors_proto_rawDescData } -var ( - file_backup_v1_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_backup_v1_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) - file_backup_v1_errors_proto_goTypes = []any{ - (ErrorCode)(0), // 0: backup.v1.ErrorCode - (*Error)(nil), // 1: backup.v1.Error - } -) - +var file_backup_v1_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_backup_v1_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_backup_v1_errors_proto_goTypes = []any{ + (ErrorCode)(0), // 0: backup.v1.ErrorCode + (*Error)(nil), // 1: backup.v1.Error +} var file_backup_v1_errors_proto_depIdxs = []int32{ 0, // 0: backup.v1.Error.code:type_name -> backup.v1.ErrorCode 1, // [1:1] is the sub-list for method output_type diff --git a/api/backup/v1/errors.swagger.json b/api/backup/v1/errors.swagger.json new file mode 100644 index 00000000000..59e7b363676 --- /dev/null +++ b/api/backup/v1/errors.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "backup/v1/errors.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go b/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go index 484dc341fb1..e1e4cbea656 100644 --- a/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/change_scheduled_backup_parameters.go @@ -60,6 +60,7 @@ ChangeScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type ChangeScheduledBackupParams struct { + // Body. Body ChangeScheduledBackupBody @@ -129,6 +130,7 @@ func (o *ChangeScheduledBackupParams) SetBody(body ChangeScheduledBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go b/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go index 1c742c07f14..927e6a3c0a4 100644 --- a/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/change_scheduled_backup_responses.go @@ -105,6 +105,7 @@ func (o *ChangeScheduledBackupOK) GetPayload() any { } func (o *ChangeScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -176,6 +177,7 @@ func (o *ChangeScheduledBackupDefault) GetPayload() *ChangeScheduledBackupDefaul } func (o *ChangeScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeScheduledBackupDefaultBody) // response payload @@ -191,6 +193,7 @@ ChangeScheduledBackupBody change scheduled backup body swagger:model ChangeScheduledBackupBody */ type ChangeScheduledBackupBody struct { + // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` @@ -274,6 +277,7 @@ ChangeScheduledBackupDefaultBody change scheduled backup default body swagger:model ChangeScheduledBackupDefaultBody */ type ChangeScheduledBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -343,7 +347,9 @@ func (o *ChangeScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -363,6 +369,7 @@ func (o *ChangeScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -391,6 +398,7 @@ ChangeScheduledBackupDefaultBodyDetailsItems0 change scheduled backup default bo swagger:model ChangeScheduledBackupDefaultBodyDetailsItems0 */ type ChangeScheduledBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -402,6 +410,7 @@ type ChangeScheduledBackupDefaultBodyDetailsItems0 struct { func (o *ChangeScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -439,6 +448,7 @@ func (o *ChangeScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeScheduledBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go b/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go index 865c2d19370..0ab18abe2eb 100644 --- a/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go +++ b/api/backup/v1/json/client/backup_service/delete_artifact_parameters.go @@ -61,6 +61,7 @@ DeleteArtifactParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteArtifactParams struct { + /* ArtifactID. Machine-readable artifact ID. @@ -150,6 +151,7 @@ func (o *DeleteArtifactParams) SetRemoveFiles(removeFiles *bool) { // WriteToRequest writes these params to a swagger request func (o *DeleteArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -170,6 +172,7 @@ func (o *DeleteArtifactParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qRemoveFiles := swag.FormatBool(qrRemoveFiles) if qRemoveFiles != "" { + if err := r.SetQueryParam("remove_files", qRemoveFiles); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/delete_artifact_responses.go b/api/backup/v1/json/client/backup_service/delete_artifact_responses.go index 2d1ede4bc15..221036497de 100644 --- a/api/backup/v1/json/client/backup_service/delete_artifact_responses.go +++ b/api/backup/v1/json/client/backup_service/delete_artifact_responses.go @@ -104,6 +104,7 @@ func (o *DeleteArtifactOK) GetPayload() any { } func (o *DeleteArtifactOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *DeleteArtifactDefault) GetPayload() *DeleteArtifactDefaultBody { } func (o *DeleteArtifactDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteArtifactDefaultBody) // response payload @@ -190,6 +192,7 @@ DeleteArtifactDefaultBody delete artifact default body swagger:model DeleteArtifactDefaultBody */ type DeleteArtifactDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *DeleteArtifactDefaultBody) ContextValidate(ctx context.Context, formats } func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *DeleteArtifactDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -307,6 +313,7 @@ DeleteArtifactDefaultBodyDetailsItems0 delete artifact default body details item swagger:model DeleteArtifactDefaultBodyDetailsItems0 */ type DeleteArtifactDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type DeleteArtifactDefaultBodyDetailsItems0 struct { func (o *DeleteArtifactDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *DeleteArtifactDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteArtifactDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/get_logs_parameters.go b/api/backup/v1/json/client/backup_service/get_logs_parameters.go index d65124e93df..bf377166c3a 100644 --- a/api/backup/v1/json/client/backup_service/get_logs_parameters.go +++ b/api/backup/v1/json/client/backup_service/get_logs_parameters.go @@ -61,6 +61,7 @@ GetLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLogsParams struct { + // ArtifactID. ArtifactID string @@ -162,6 +163,7 @@ func (o *GetLogsParams) SetOffset(offset *int64) { // WriteToRequest writes these params to a swagger request func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -182,6 +184,7 @@ func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -198,6 +201,7 @@ func (o *GetLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/get_logs_responses.go b/api/backup/v1/json/client/backup_service/get_logs_responses.go index a3a59102f58..8182a0c2d4a 100644 --- a/api/backup/v1/json/client/backup_service/get_logs_responses.go +++ b/api/backup/v1/json/client/backup_service/get_logs_responses.go @@ -104,6 +104,7 @@ func (o *GetLogsOK) GetPayload() *GetLogsOKBody { } func (o *GetLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetLogsDefault) GetPayload() *GetLogsDefaultBody { } func (o *GetLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsDefaultBody) // response payload @@ -192,6 +194,7 @@ GetLogsDefaultBody get logs default body swagger:model GetLogsDefaultBody */ type GetLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetLogsDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetLogsDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -309,6 +315,7 @@ GetLogsDefaultBodyDetailsItems0 get logs default body details items0 swagger:model GetLogsDefaultBodyDetailsItems0 */ type GetLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetLogsDefaultBodyDetailsItems0 struct { func (o *GetLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetLogsOKBody get logs OK body swagger:model GetLogsOKBody */ type GetLogsOKBody struct { + // logs Logs []*GetLogsOKBodyLogsItems0 `json:"logs"` @@ -486,7 +496,9 @@ func (o *GetLogsOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Logs); i++ { + if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -506,6 +518,7 @@ func (o *GetLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt. return err } } + } return nil @@ -534,6 +547,7 @@ GetLogsOKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetLogsOKBodyLogsItems0 */ type GetLogsOKBodyLogsItems0 struct { + // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go index 77f127caee5..aa2fb065491 100644 --- a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_parameters.go @@ -60,6 +60,7 @@ ListArtifactCompatibleServicesParams contains all the parameters to send to the Typically these are written to a http.Request. */ type ListArtifactCompatibleServicesParams struct { + /* ArtifactID. Artifact id used to determine restore compatibility. @@ -132,6 +133,7 @@ func (o *ListArtifactCompatibleServicesParams) SetArtifactID(artifactID string) // WriteToRequest writes these params to a swagger request func (o *ListArtifactCompatibleServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go index cb6169a7f4b..41e1f96b663 100644 --- a/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go +++ b/api/backup/v1/json/client/backup_service/list_artifact_compatible_services_responses.go @@ -104,6 +104,7 @@ func (o *ListArtifactCompatibleServicesOK) GetPayload() *ListArtifactCompatibleS } func (o *ListArtifactCompatibleServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactCompatibleServicesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListArtifactCompatibleServicesDefault) GetPayload() *ListArtifactCompat } func (o *ListArtifactCompatibleServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactCompatibleServicesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListArtifactCompatibleServicesDefaultBody list artifact compatible services defa swagger:model ListArtifactCompatibleServicesDefaultBody */ type ListArtifactCompatibleServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *ListArtifactCompatibleServicesDefaultBody) ContextValidate(ctx context. } func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *ListArtifactCompatibleServicesDefaultBody) contextValidateDetails(ctx c return err } } + } return nil @@ -309,6 +315,7 @@ ListArtifactCompatibleServicesDefaultBodyDetailsItems0 list artifact compatible swagger:model ListArtifactCompatibleServicesDefaultBodyDetailsItems0 */ type ListArtifactCompatibleServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type ListArtifactCompatibleServicesDefaultBodyDetailsItems0 struct { func (o *ListArtifactCompatibleServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *ListArtifactCompatibleServicesDefaultBodyDetailsItems0) UnmarshalJSON(d // MarshalJSON marshals this object with additional properties into a JSON object func (o ListArtifactCompatibleServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ ListArtifactCompatibleServicesOKBody list artifact compatible services OK body swagger:model ListArtifactCompatibleServicesOKBody */ type ListArtifactCompatibleServicesOKBody struct { + // mysql Mysql []*ListArtifactCompatibleServicesOKBodyMysqlItems0 `json:"mysql"` @@ -524,7 +534,9 @@ func (o *ListArtifactCompatibleServicesOKBody) ContextValidate(ctx context.Conte } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mysql); i++ { + if o.Mysql[i] != nil { if swag.IsZero(o.Mysql[i]) { // not required @@ -544,13 +556,16 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMysql(ctx context. return err } } + } return nil } func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -570,6 +585,7 @@ func (o *ListArtifactCompatibleServicesOKBody) contextValidateMongodb(ctx contex return err } } + } return nil @@ -598,6 +614,7 @@ ListArtifactCompatibleServicesOKBodyMongodbItems0 MongoDBService represents a ge swagger:model ListArtifactCompatibleServicesOKBodyMongodbItems0 */ type ListArtifactCompatibleServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -668,6 +685,7 @@ ListArtifactCompatibleServicesOKBodyMysqlItems0 MySQLService represents a generi swagger:model ListArtifactCompatibleServicesOKBodyMysqlItems0 */ type ListArtifactCompatibleServicesOKBodyMysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go b/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go index c22d1264781..158ab869be0 100644 --- a/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_artifacts_parameters.go @@ -115,6 +115,7 @@ func (o *ListArtifactsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListArtifactsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_artifacts_responses.go b/api/backup/v1/json/client/backup_service/list_artifacts_responses.go index 36316157438..9fe3b844284 100644 --- a/api/backup/v1/json/client/backup_service/list_artifacts_responses.go +++ b/api/backup/v1/json/client/backup_service/list_artifacts_responses.go @@ -105,6 +105,7 @@ func (o *ListArtifactsOK) GetPayload() *ListArtifactsOKBody { } func (o *ListArtifactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListArtifactsDefault) GetPayload() *ListArtifactsDefaultBody { } func (o *ListArtifactsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListArtifactsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListArtifactsDefaultBody list artifacts default body swagger:model ListArtifactsDefaultBody */ type ListArtifactsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListArtifactsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListArtifactsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -310,6 +316,7 @@ ListArtifactsDefaultBodyDetailsItems0 list artifacts default body details items0 swagger:model ListArtifactsDefaultBodyDetailsItems0 */ type ListArtifactsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListArtifactsDefaultBodyDetailsItems0 struct { func (o *ListArtifactsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListArtifactsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListArtifactsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListArtifactsOKBody list artifacts OK body swagger:model ListArtifactsOKBody */ type ListArtifactsOKBody struct { + // artifacts Artifacts []*ListArtifactsOKBodyArtifactsItems0 `json:"artifacts"` } @@ -484,7 +494,9 @@ func (o *ListArtifactsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Artifacts); i++ { + if o.Artifacts[i] != nil { if swag.IsZero(o.Artifacts[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListArtifactsOKBody) contextValidateArtifacts(ctx context.Context, form return err } } + } return nil @@ -532,6 +545,7 @@ ListArtifactsOKBodyArtifactsItems0 Artifact represents single backup artifact. swagger:model ListArtifactsOKBodyArtifactsItems0 */ type ListArtifactsOKBodyArtifactsItems0 struct { + // Machine-readable artifact ID. ArtifactID string `json:"artifact_id,omitempty"` @@ -822,7 +836,9 @@ func (o *ListArtifactsOKBodyArtifactsItems0) ContextValidate(ctx context.Context } func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MetadataList); i++ { + if o.MetadataList[i] != nil { if swag.IsZero(o.MetadataList[i]) { // not required @@ -842,6 +858,7 @@ func (o *ListArtifactsOKBodyArtifactsItems0) contextValidateMetadataList(ctx con return err } } + } return nil @@ -870,6 +887,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0 Metadata contains extra art swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0 struct { + // List of files backup consists of. FileList []*ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 `json:"file_list"` @@ -987,7 +1005,9 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) ContextValidate(c } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFileList(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.FileList); i++ { + if o.FileList[i] != nil { if swag.IsZero(o.FileList[i]) { // not required @@ -1007,12 +1027,14 @@ func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidateFi return err } } + } return nil } func (o *ListArtifactsOKBodyArtifactsItems0MetadataListItems0) contextValidatePbmMetadata(ctx context.Context, formats strfmt.Registry) error { + if o.PbmMetadata != nil { if swag.IsZero(o.PbmMetadata) { // not required @@ -1059,6 +1081,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 File represen swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0FileListItems0 struct { + // name Name string `json:"name,omitempty"` @@ -1099,6 +1122,7 @@ ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata PbmMetadata cont swagger:model ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata */ type ListArtifactsOKBodyArtifactsItems0MetadataListItems0PbmMetadata struct { + // Name of backup in backup tool representation. Name string `json:"name,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go index 069308b4635..9e5c9057658 100644 --- a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_parameters.go @@ -60,6 +60,7 @@ ListPitrTimerangesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListPitrTimerangesParams struct { + /* ArtifactID. Artifact ID represents artifact whose location has PITR timeranges to be retrieved. @@ -132,6 +133,7 @@ func (o *ListPitrTimerangesParams) SetArtifactID(artifactID string) { // WriteToRequest writes these params to a swagger request func (o *ListPitrTimerangesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go index f67370539e5..d6ad2cb6e78 100644 --- a/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go +++ b/api/backup/v1/json/client/backup_service/list_pitr_timeranges_responses.go @@ -105,6 +105,7 @@ func (o *ListPitrTimerangesOK) GetPayload() *ListPitrTimerangesOKBody { } func (o *ListPitrTimerangesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListPitrTimerangesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListPitrTimerangesDefault) GetPayload() *ListPitrTimerangesDefaultBody } func (o *ListPitrTimerangesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListPitrTimerangesDefaultBody) // response payload @@ -193,6 +195,7 @@ ListPitrTimerangesDefaultBody list pitr timeranges default body swagger:model ListPitrTimerangesDefaultBody */ type ListPitrTimerangesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListPitrTimerangesDefaultBody) ContextValidate(ctx context.Context, for } func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListPitrTimerangesDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -310,6 +316,7 @@ ListPitrTimerangesDefaultBodyDetailsItems0 list pitr timeranges default body det swagger:model ListPitrTimerangesDefaultBodyDetailsItems0 */ type ListPitrTimerangesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListPitrTimerangesDefaultBodyDetailsItems0 struct { func (o *ListPitrTimerangesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListPitrTimerangesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o ListPitrTimerangesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListPitrTimerangesOKBody list pitr timeranges OK body swagger:model ListPitrTimerangesOKBody */ type ListPitrTimerangesOKBody struct { + // timeranges Timeranges []*ListPitrTimerangesOKBodyTimerangesItems0 `json:"timeranges"` } @@ -484,7 +494,9 @@ func (o *ListPitrTimerangesOKBody) ContextValidate(ctx context.Context, formats } func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Timeranges); i++ { + if o.Timeranges[i] != nil { if swag.IsZero(o.Timeranges[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListPitrTimerangesOKBody) contextValidateTimeranges(ctx context.Context return err } } + } return nil @@ -532,6 +545,7 @@ ListPitrTimerangesOKBodyTimerangesItems0 list pitr timeranges OK body timeranges swagger:model ListPitrTimerangesOKBodyTimerangesItems0 */ type ListPitrTimerangesOKBodyTimerangesItems0 struct { + // start_timestamp is the time of the first event in the PITR chunk. // Format: date-time StartTimestamp strfmt.DateTime `json:"start_timestamp,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go b/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go index e87207a6d84..43c3c9b0fc6 100644 --- a/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go +++ b/api/backup/v1/json/client/backup_service/list_scheduled_backups_parameters.go @@ -115,6 +115,7 @@ func (o *ListScheduledBackupsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListScheduledBackupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go b/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go index 838aafb1637..ae84e5111a9 100644 --- a/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go +++ b/api/backup/v1/json/client/backup_service/list_scheduled_backups_responses.go @@ -105,6 +105,7 @@ func (o *ListScheduledBackupsOK) GetPayload() *ListScheduledBackupsOKBody { } func (o *ListScheduledBackupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListScheduledBackupsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListScheduledBackupsDefault) GetPayload() *ListScheduledBackupsDefaultB } func (o *ListScheduledBackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListScheduledBackupsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListScheduledBackupsDefaultBody list scheduled backups default body swagger:model ListScheduledBackupsDefaultBody */ type ListScheduledBackupsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListScheduledBackupsDefaultBody) ContextValidate(ctx context.Context, f } func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListScheduledBackupsDefaultBody) contextValidateDetails(ctx context.Con return err } } + } return nil @@ -310,6 +316,7 @@ ListScheduledBackupsDefaultBodyDetailsItems0 list scheduled backups default body swagger:model ListScheduledBackupsDefaultBodyDetailsItems0 */ type ListScheduledBackupsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListScheduledBackupsDefaultBodyDetailsItems0 struct { func (o *ListScheduledBackupsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListScheduledBackupsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte // MarshalJSON marshals this object with additional properties into a JSON object func (o ListScheduledBackupsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListScheduledBackupsOKBody list scheduled backups OK body swagger:model ListScheduledBackupsOKBody */ type ListScheduledBackupsOKBody struct { + // scheduled backups ScheduledBackups []*ListScheduledBackupsOKBodyScheduledBackupsItems0 `json:"scheduled_backups"` } @@ -484,7 +494,9 @@ func (o *ListScheduledBackupsOKBody) ContextValidate(ctx context.Context, format } func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ScheduledBackups); i++ { + if o.ScheduledBackups[i] != nil { if swag.IsZero(o.ScheduledBackups[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListScheduledBackupsOKBody) contextValidateScheduledBackups(ctx context return err } } + } return nil @@ -532,6 +545,7 @@ ListScheduledBackupsOKBodyScheduledBackupsItems0 ScheduledBackup represents sche swagger:model ListScheduledBackupsOKBodyScheduledBackupsItems0 */ type ListScheduledBackupsOKBodyScheduledBackupsItems0 struct { + // Machine-readable ID. ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` diff --git a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go index d1848495013..5e16fc7570a 100644 --- a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_parameters.go @@ -60,6 +60,7 @@ RemoveScheduledBackupParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type RemoveScheduledBackupParams struct { + // ScheduledBackupID. ScheduledBackupID string @@ -129,6 +130,7 @@ func (o *RemoveScheduledBackupParams) SetScheduledBackupID(scheduledBackupID str // WriteToRequest writes these params to a swagger request func (o *RemoveScheduledBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go index 0a157b49f34..09788a97680 100644 --- a/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/remove_scheduled_backup_responses.go @@ -104,6 +104,7 @@ func (o *RemoveScheduledBackupOK) GetPayload() any { } func (o *RemoveScheduledBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *RemoveScheduledBackupDefault) GetPayload() *RemoveScheduledBackupDefaul } func (o *RemoveScheduledBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveScheduledBackupDefaultBody) // response payload @@ -190,6 +192,7 @@ RemoveScheduledBackupDefaultBody remove scheduled backup default body swagger:model RemoveScheduledBackupDefaultBody */ type RemoveScheduledBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *RemoveScheduledBackupDefaultBody) ContextValidate(ctx context.Context, } func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *RemoveScheduledBackupDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -307,6 +313,7 @@ RemoveScheduledBackupDefaultBodyDetailsItems0 remove scheduled backup default bo swagger:model RemoveScheduledBackupDefaultBodyDetailsItems0 */ type RemoveScheduledBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type RemoveScheduledBackupDefaultBodyDetailsItems0 struct { func (o *RemoveScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *RemoveScheduledBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveScheduledBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go b/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go index 843f97f8cdb..3a9140d3469 100644 --- a/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/schedule_backup_parameters.go @@ -60,6 +60,7 @@ ScheduleBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ScheduleBackupParams struct { + // Body. Body ScheduleBackupBody @@ -129,6 +130,7 @@ func (o *ScheduleBackupParams) SetBody(body ScheduleBackupBody) { // WriteToRequest writes these params to a swagger request func (o *ScheduleBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/schedule_backup_responses.go b/api/backup/v1/json/client/backup_service/schedule_backup_responses.go index 84b170cf30d..1c650b7bde2 100644 --- a/api/backup/v1/json/client/backup_service/schedule_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/schedule_backup_responses.go @@ -105,6 +105,7 @@ func (o *ScheduleBackupOK) GetPayload() *ScheduleBackupOKBody { } func (o *ScheduleBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ScheduleBackupOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ScheduleBackupDefault) GetPayload() *ScheduleBackupDefaultBody { } func (o *ScheduleBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ScheduleBackupDefaultBody) // response payload @@ -193,6 +195,7 @@ ScheduleBackupBody schedule backup body swagger:model ScheduleBackupBody */ type ScheduleBackupBody struct { + // Service identifier where backup should be performed. ServiceID string `json:"service_id,omitempty"` @@ -392,6 +395,7 @@ ScheduleBackupDefaultBody schedule backup default body swagger:model ScheduleBackupDefaultBody */ type ScheduleBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -461,7 +465,9 @@ func (o *ScheduleBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -481,6 +487,7 @@ func (o *ScheduleBackupDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -509,6 +516,7 @@ ScheduleBackupDefaultBodyDetailsItems0 schedule backup default body details item swagger:model ScheduleBackupDefaultBodyDetailsItems0 */ type ScheduleBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -520,6 +528,7 @@ type ScheduleBackupDefaultBodyDetailsItems0 struct { func (o *ScheduleBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -557,6 +566,7 @@ func (o *ScheduleBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ScheduleBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -620,6 +630,7 @@ ScheduleBackupOKBody schedule backup OK body swagger:model ScheduleBackupOKBody */ type ScheduleBackupOKBody struct { + // scheduled backup id ScheduledBackupID string `json:"scheduled_backup_id,omitempty"` } diff --git a/api/backup/v1/json/client/backup_service/start_backup_parameters.go b/api/backup/v1/json/client/backup_service/start_backup_parameters.go index c886e6520d6..f6b1b4020ea 100644 --- a/api/backup/v1/json/client/backup_service/start_backup_parameters.go +++ b/api/backup/v1/json/client/backup_service/start_backup_parameters.go @@ -60,6 +60,7 @@ StartBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartBackupParams struct { + // Body. Body StartBackupBody @@ -129,6 +130,7 @@ func (o *StartBackupParams) SetBody(body StartBackupBody) { // WriteToRequest writes these params to a swagger request func (o *StartBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/backup_service/start_backup_responses.go b/api/backup/v1/json/client/backup_service/start_backup_responses.go index 3137ce1bc85..466948a9ce6 100644 --- a/api/backup/v1/json/client/backup_service/start_backup_responses.go +++ b/api/backup/v1/json/client/backup_service/start_backup_responses.go @@ -105,6 +105,7 @@ func (o *StartBackupOK) GetPayload() *StartBackupOKBody { } func (o *StartBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartBackupOKBody) // response payload @@ -178,6 +179,7 @@ func (o *StartBackupDefault) GetPayload() *StartBackupDefaultBody { } func (o *StartBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartBackupDefaultBody) // response payload @@ -193,6 +195,7 @@ StartBackupBody start backup body swagger:model StartBackupBody */ type StartBackupBody struct { + // Service identifier. ServiceID string `json:"service_id,omitempty"` @@ -306,6 +309,7 @@ StartBackupDefaultBody start backup default body swagger:model StartBackupDefaultBody */ type StartBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -375,7 +379,9 @@ func (o *StartBackupDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -395,6 +401,7 @@ func (o *StartBackupDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -423,6 +430,7 @@ StartBackupDefaultBodyDetailsItems0 start backup default body details items0 swagger:model StartBackupDefaultBodyDetailsItems0 */ type StartBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -434,6 +442,7 @@ type StartBackupDefaultBodyDetailsItems0 struct { func (o *StartBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -471,6 +480,7 @@ func (o *StartBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -534,6 +544,7 @@ StartBackupOKBody start backup OK body swagger:model StartBackupOKBody */ type StartBackupOKBody struct { + // Unique identifier. ArtifactID string `json:"artifact_id,omitempty"` } diff --git a/api/backup/v1/json/client/locations_service/add_location_parameters.go b/api/backup/v1/json/client/locations_service/add_location_parameters.go index a6fe1c12370..f79768e1d20 100644 --- a/api/backup/v1/json/client/locations_service/add_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/add_location_parameters.go @@ -60,6 +60,7 @@ AddLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddLocationParams struct { + // Body. Body AddLocationBody @@ -129,6 +130,7 @@ func (o *AddLocationParams) SetBody(body AddLocationBody) { // WriteToRequest writes these params to a swagger request func (o *AddLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/add_location_responses.go b/api/backup/v1/json/client/locations_service/add_location_responses.go index fc373eed126..7f936c3868e 100644 --- a/api/backup/v1/json/client/locations_service/add_location_responses.go +++ b/api/backup/v1/json/client/locations_service/add_location_responses.go @@ -104,6 +104,7 @@ func (o *AddLocationOK) GetPayload() *AddLocationOKBody { } func (o *AddLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddLocationOKBody) // response payload @@ -177,6 +178,7 @@ func (o *AddLocationDefault) GetPayload() *AddLocationDefaultBody { } func (o *AddLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddLocationDefaultBody) // response payload @@ -192,6 +194,7 @@ AddLocationBody add location body swagger:model AddLocationBody */ type AddLocationBody struct { + // Location name Name string `json:"name,omitempty"` @@ -288,6 +291,7 @@ func (o *AddLocationBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -312,6 +316,7 @@ func (o *AddLocationBody) contextValidateFilesystemConfig(ctx context.Context, f } func (o *AddLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -358,6 +363,7 @@ AddLocationDefaultBody add location default body swagger:model AddLocationDefaultBody */ type AddLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -427,7 +433,9 @@ func (o *AddLocationDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -447,6 +455,7 @@ func (o *AddLocationDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -475,6 +484,7 @@ AddLocationDefaultBodyDetailsItems0 add location default body details items0 swagger:model AddLocationDefaultBodyDetailsItems0 */ type AddLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -486,6 +496,7 @@ type AddLocationDefaultBodyDetailsItems0 struct { func (o *AddLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -523,6 +534,7 @@ func (o *AddLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -586,6 +598,7 @@ AddLocationOKBody add location OK body swagger:model AddLocationOKBody */ type AddLocationOKBody struct { + // Machine-readable ID. LocationID string `json:"location_id,omitempty"` } @@ -623,6 +636,7 @@ AddLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents file s swagger:model AddLocationParamsBodyFilesystemConfig */ type AddLocationParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -660,6 +674,7 @@ AddLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configuratio swagger:model AddLocationParamsBodyS3Config */ type AddLocationParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/change_location_parameters.go b/api/backup/v1/json/client/locations_service/change_location_parameters.go index 1b0e5bef6b0..7c817aec1b0 100644 --- a/api/backup/v1/json/client/locations_service/change_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/change_location_parameters.go @@ -60,6 +60,7 @@ ChangeLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeLocationParams struct { + // Body. Body ChangeLocationBody @@ -146,6 +147,7 @@ func (o *ChangeLocationParams) SetLocationID(locationID string) { // WriteToRequest writes these params to a swagger request func (o *ChangeLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/change_location_responses.go b/api/backup/v1/json/client/locations_service/change_location_responses.go index 54f0b55f31b..c2d4b96dcb0 100644 --- a/api/backup/v1/json/client/locations_service/change_location_responses.go +++ b/api/backup/v1/json/client/locations_service/change_location_responses.go @@ -104,6 +104,7 @@ func (o *ChangeLocationOK) GetPayload() any { } func (o *ChangeLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *ChangeLocationDefault) GetPayload() *ChangeLocationDefaultBody { } func (o *ChangeLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeLocationDefaultBody) // response payload @@ -190,6 +192,7 @@ ChangeLocationBody change location body swagger:model ChangeLocationBody */ type ChangeLocationBody struct { + // Location name Name string `json:"name,omitempty"` @@ -286,6 +289,7 @@ func (o *ChangeLocationBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -310,6 +314,7 @@ func (o *ChangeLocationBody) contextValidateFilesystemConfig(ctx context.Context } func (o *ChangeLocationBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -356,6 +361,7 @@ ChangeLocationDefaultBody change location default body swagger:model ChangeLocationDefaultBody */ type ChangeLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -425,7 +431,9 @@ func (o *ChangeLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -445,6 +453,7 @@ func (o *ChangeLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -473,6 +482,7 @@ ChangeLocationDefaultBodyDetailsItems0 change location default body details item swagger:model ChangeLocationDefaultBodyDetailsItems0 */ type ChangeLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -484,6 +494,7 @@ type ChangeLocationDefaultBodyDetailsItems0 struct { func (o *ChangeLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -521,6 +532,7 @@ func (o *ChangeLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -584,6 +596,7 @@ ChangeLocationParamsBodyFilesystemConfig FilesystemLocationConfig represents fil swagger:model ChangeLocationParamsBodyFilesystemConfig */ type ChangeLocationParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -621,6 +634,7 @@ ChangeLocationParamsBodyS3Config S3LocationConfig represents S3 bucket configura swagger:model ChangeLocationParamsBodyS3Config */ type ChangeLocationParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/list_locations_parameters.go b/api/backup/v1/json/client/locations_service/list_locations_parameters.go index 263117d982d..eb22d06cbc9 100644 --- a/api/backup/v1/json/client/locations_service/list_locations_parameters.go +++ b/api/backup/v1/json/client/locations_service/list_locations_parameters.go @@ -115,6 +115,7 @@ func (o *ListLocationsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListLocationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/list_locations_responses.go b/api/backup/v1/json/client/locations_service/list_locations_responses.go index 8d799fec0df..34c2600a41e 100644 --- a/api/backup/v1/json/client/locations_service/list_locations_responses.go +++ b/api/backup/v1/json/client/locations_service/list_locations_responses.go @@ -104,6 +104,7 @@ func (o *ListLocationsOK) GetPayload() *ListLocationsOKBody { } func (o *ListLocationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListLocationsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListLocationsDefault) GetPayload() *ListLocationsDefaultBody { } func (o *ListLocationsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListLocationsDefaultBody) // response payload @@ -192,6 +194,7 @@ ListLocationsDefaultBody list locations default body swagger:model ListLocationsDefaultBody */ type ListLocationsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *ListLocationsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *ListLocationsDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -309,6 +315,7 @@ ListLocationsDefaultBodyDetailsItems0 list locations default body details items0 swagger:model ListLocationsDefaultBodyDetailsItems0 */ type ListLocationsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type ListLocationsDefaultBodyDetailsItems0 struct { func (o *ListLocationsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *ListLocationsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListLocationsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ ListLocationsOKBody list locations OK body swagger:model ListLocationsOKBody */ type ListLocationsOKBody struct { + // locations Locations []*ListLocationsOKBodyLocationsItems0 `json:"locations"` } @@ -483,7 +493,9 @@ func (o *ListLocationsOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Locations); i++ { + if o.Locations[i] != nil { if swag.IsZero(o.Locations[i]) { // not required @@ -503,6 +515,7 @@ func (o *ListLocationsOKBody) contextValidateLocations(ctx context.Context, form return err } } + } return nil @@ -531,6 +544,7 @@ ListLocationsOKBodyLocationsItems0 Location represents single Backup Location. swagger:model ListLocationsOKBodyLocationsItems0 */ type ListLocationsOKBodyLocationsItems0 struct { + // Machine-readable ID. LocationID string `json:"location_id,omitempty"` @@ -630,6 +644,7 @@ func (o *ListLocationsOKBodyLocationsItems0) ContextValidate(ctx context.Context } func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -654,6 +669,7 @@ func (o *ListLocationsOKBodyLocationsItems0) contextValidateFilesystemConfig(ctx } func (o *ListLocationsOKBodyLocationsItems0) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -700,6 +716,7 @@ ListLocationsOKBodyLocationsItems0FilesystemConfig FilesystemLocationConfig repr swagger:model ListLocationsOKBodyLocationsItems0FilesystemConfig */ type ListLocationsOKBodyLocationsItems0FilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -737,6 +754,7 @@ ListLocationsOKBodyLocationsItems0S3Config S3LocationConfig represents S3 bucket swagger:model ListLocationsOKBodyLocationsItems0S3Config */ type ListLocationsOKBodyLocationsItems0S3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/locations_service/remove_location_parameters.go b/api/backup/v1/json/client/locations_service/remove_location_parameters.go index 3a4a644edd2..f806c18bdc1 100644 --- a/api/backup/v1/json/client/locations_service/remove_location_parameters.go +++ b/api/backup/v1/json/client/locations_service/remove_location_parameters.go @@ -61,6 +61,7 @@ RemoveLocationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveLocationParams struct { + /* Force. Force mode @@ -150,6 +151,7 @@ func (o *RemoveLocationParams) SetLocationID(locationID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *RemoveLocationParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/remove_location_responses.go b/api/backup/v1/json/client/locations_service/remove_location_responses.go index 7ae1a7821fc..c1506cb9753 100644 --- a/api/backup/v1/json/client/locations_service/remove_location_responses.go +++ b/api/backup/v1/json/client/locations_service/remove_location_responses.go @@ -104,6 +104,7 @@ func (o *RemoveLocationOK) GetPayload() any { } func (o *RemoveLocationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *RemoveLocationDefault) GetPayload() *RemoveLocationDefaultBody { } func (o *RemoveLocationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveLocationDefaultBody) // response payload @@ -190,6 +192,7 @@ RemoveLocationDefaultBody remove location default body swagger:model RemoveLocationDefaultBody */ type RemoveLocationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *RemoveLocationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *RemoveLocationDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -307,6 +313,7 @@ RemoveLocationDefaultBodyDetailsItems0 remove location default body details item swagger:model RemoveLocationDefaultBodyDetailsItems0 */ type RemoveLocationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type RemoveLocationDefaultBodyDetailsItems0 struct { func (o *RemoveLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *RemoveLocationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveLocationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/backup/v1/json/client/locations_service/test_location_config_parameters.go b/api/backup/v1/json/client/locations_service/test_location_config_parameters.go index 1856fe0f364..c930393f8cc 100644 --- a/api/backup/v1/json/client/locations_service/test_location_config_parameters.go +++ b/api/backup/v1/json/client/locations_service/test_location_config_parameters.go @@ -60,6 +60,7 @@ TestLocationConfigParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type TestLocationConfigParams struct { + // Body. Body TestLocationConfigBody @@ -129,6 +130,7 @@ func (o *TestLocationConfigParams) SetBody(body TestLocationConfigBody) { // WriteToRequest writes these params to a swagger request func (o *TestLocationConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/locations_service/test_location_config_responses.go b/api/backup/v1/json/client/locations_service/test_location_config_responses.go index 70d3fc4eca0..d7daaa0f33a 100644 --- a/api/backup/v1/json/client/locations_service/test_location_config_responses.go +++ b/api/backup/v1/json/client/locations_service/test_location_config_responses.go @@ -104,6 +104,7 @@ func (o *TestLocationConfigOK) GetPayload() any { } func (o *TestLocationConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *TestLocationConfigDefault) GetPayload() *TestLocationConfigDefaultBody } func (o *TestLocationConfigDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(TestLocationConfigDefaultBody) // response payload @@ -190,6 +192,7 @@ TestLocationConfigBody test location config body swagger:model TestLocationConfigBody */ type TestLocationConfigBody struct { + // filesystem config FilesystemConfig *TestLocationConfigParamsBodyFilesystemConfig `json:"filesystem_config,omitempty"` @@ -280,6 +283,7 @@ func (o *TestLocationConfigBody) ContextValidate(ctx context.Context, formats st } func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Context, formats strfmt.Registry) error { + if o.FilesystemConfig != nil { if swag.IsZero(o.FilesystemConfig) { // not required @@ -304,6 +308,7 @@ func (o *TestLocationConfigBody) contextValidateFilesystemConfig(ctx context.Con } func (o *TestLocationConfigBody) contextValidateS3Config(ctx context.Context, formats strfmt.Registry) error { + if o.S3Config != nil { if swag.IsZero(o.S3Config) { // not required @@ -350,6 +355,7 @@ TestLocationConfigDefaultBody test location config default body swagger:model TestLocationConfigDefaultBody */ type TestLocationConfigDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -419,7 +425,9 @@ func (o *TestLocationConfigDefaultBody) ContextValidate(ctx context.Context, for } func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -439,6 +447,7 @@ func (o *TestLocationConfigDefaultBody) contextValidateDetails(ctx context.Conte return err } } + } return nil @@ -467,6 +476,7 @@ TestLocationConfigDefaultBodyDetailsItems0 test location config default body det swagger:model TestLocationConfigDefaultBodyDetailsItems0 */ type TestLocationConfigDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -478,6 +488,7 @@ type TestLocationConfigDefaultBodyDetailsItems0 struct { func (o *TestLocationConfigDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -515,6 +526,7 @@ func (o *TestLocationConfigDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o TestLocationConfigDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -578,6 +590,7 @@ TestLocationConfigParamsBodyFilesystemConfig FilesystemLocationConfig represents swagger:model TestLocationConfigParamsBodyFilesystemConfig */ type TestLocationConfigParamsBodyFilesystemConfig struct { + // path Path string `json:"path,omitempty"` } @@ -615,6 +628,7 @@ TestLocationConfigParamsBodyS3Config S3LocationConfig represents S3 bucket confi swagger:model TestLocationConfigParamsBodyS3Config */ type TestLocationConfigParamsBodyS3Config struct { + // endpoint Endpoint string `json:"endpoint,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go b/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go index b621fbb6800..0e417604cc6 100644 --- a/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go +++ b/api/backup/v1/json/client/restore_service/get_logs_mixin5_parameters.go @@ -61,6 +61,7 @@ GetLogsMixin5Params contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLogsMixin5Params struct { + // Limit. // // Format: int64 @@ -162,6 +163,7 @@ func (o *GetLogsMixin5Params) SetRestoreID(restoreID string) { // WriteToRequest writes these params to a swagger request func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -177,6 +179,7 @@ func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -193,6 +196,7 @@ func (o *GetLogsMixin5Params) WriteToRequest(r runtime.ClientRequest, reg strfmt } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go b/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go index 8adf159cd53..52f8f8982a4 100644 --- a/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go +++ b/api/backup/v1/json/client/restore_service/get_logs_mixin5_responses.go @@ -104,6 +104,7 @@ func (o *GetLogsMixin5OK) GetPayload() *GetLogsMixin5OKBody { } func (o *GetLogsMixin5OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsMixin5OKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetLogsMixin5Default) GetPayload() *GetLogsMixin5DefaultBody { } func (o *GetLogsMixin5Default) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLogsMixin5DefaultBody) // response payload @@ -192,6 +194,7 @@ GetLogsMixin5DefaultBody get logs mixin5 default body swagger:model GetLogsMixin5DefaultBody */ type GetLogsMixin5DefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetLogsMixin5DefaultBody) ContextValidate(ctx context.Context, formats } func (o *GetLogsMixin5DefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetLogsMixin5DefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -309,6 +315,7 @@ GetLogsMixin5DefaultBodyDetailsItems0 get logs mixin5 default body details items swagger:model GetLogsMixin5DefaultBodyDetailsItems0 */ type GetLogsMixin5DefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetLogsMixin5DefaultBodyDetailsItems0 struct { func (o *GetLogsMixin5DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetLogsMixin5DefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLogsMixin5DefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetLogsMixin5OKBody get logs mixin5 OK body swagger:model GetLogsMixin5OKBody */ type GetLogsMixin5OKBody struct { + // logs Logs []*GetLogsMixin5OKBodyLogsItems0 `json:"logs"` @@ -486,7 +496,9 @@ func (o *GetLogsMixin5OKBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetLogsMixin5OKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Logs); i++ { + if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -506,6 +518,7 @@ func (o *GetLogsMixin5OKBody) contextValidateLogs(ctx context.Context, formats s return err } } + } return nil @@ -534,6 +547,7 @@ GetLogsMixin5OKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetLogsMixin5OKBodyLogsItems0 */ type GetLogsMixin5OKBodyLogsItems0 struct { + // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/list_restores_parameters.go b/api/backup/v1/json/client/restore_service/list_restores_parameters.go index d46fd70f9e4..fd958787b8b 100644 --- a/api/backup/v1/json/client/restore_service/list_restores_parameters.go +++ b/api/backup/v1/json/client/restore_service/list_restores_parameters.go @@ -115,6 +115,7 @@ func (o *ListRestoresParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListRestoresParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/list_restores_responses.go b/api/backup/v1/json/client/restore_service/list_restores_responses.go index d3b45468b2f..472aa2e11aa 100644 --- a/api/backup/v1/json/client/restore_service/list_restores_responses.go +++ b/api/backup/v1/json/client/restore_service/list_restores_responses.go @@ -105,6 +105,7 @@ func (o *ListRestoresOK) GetPayload() *ListRestoresOKBody { } func (o *ListRestoresOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRestoresOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListRestoresDefault) GetPayload() *ListRestoresDefaultBody { } func (o *ListRestoresDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListRestoresDefaultBody) // response payload @@ -193,6 +195,7 @@ ListRestoresDefaultBody list restores default body swagger:model ListRestoresDefaultBody */ type ListRestoresDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListRestoresDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListRestoresDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListRestoresDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -310,6 +316,7 @@ ListRestoresDefaultBodyDetailsItems0 list restores default body details items0 swagger:model ListRestoresDefaultBodyDetailsItems0 */ type ListRestoresDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListRestoresDefaultBodyDetailsItems0 struct { func (o *ListRestoresDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListRestoresDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListRestoresDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListRestoresOKBody list restores OK body swagger:model ListRestoresOKBody */ type ListRestoresOKBody struct { + // items Items []*ListRestoresOKBodyItemsItems0 `json:"items"` } @@ -484,7 +494,9 @@ func (o *ListRestoresOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListRestoresOKBody) contextValidateItems(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Items); i++ { + if o.Items[i] != nil { if swag.IsZero(o.Items[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListRestoresOKBody) contextValidateItems(ctx context.Context, formats s return err } } + } return nil @@ -532,6 +545,7 @@ ListRestoresOKBodyItemsItems0 RestoreHistoryItem represents single backup restor swagger:model ListRestoresOKBodyItemsItems0 */ type ListRestoresOKBodyItemsItems0 struct { + // Machine-readable restore id. RestoreID string `json:"restore_id,omitempty"` diff --git a/api/backup/v1/json/client/restore_service/restore_backup_parameters.go b/api/backup/v1/json/client/restore_service/restore_backup_parameters.go index 4d6b7d7f955..343407b6017 100644 --- a/api/backup/v1/json/client/restore_service/restore_backup_parameters.go +++ b/api/backup/v1/json/client/restore_service/restore_backup_parameters.go @@ -60,6 +60,7 @@ RestoreBackupParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RestoreBackupParams struct { + // Body. Body RestoreBackupBody @@ -129,6 +130,7 @@ func (o *RestoreBackupParams) SetBody(body RestoreBackupBody) { // WriteToRequest writes these params to a swagger request func (o *RestoreBackupParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/backup/v1/json/client/restore_service/restore_backup_responses.go b/api/backup/v1/json/client/restore_service/restore_backup_responses.go index 1aa57a61322..7392970ae81 100644 --- a/api/backup/v1/json/client/restore_service/restore_backup_responses.go +++ b/api/backup/v1/json/client/restore_service/restore_backup_responses.go @@ -105,6 +105,7 @@ func (o *RestoreBackupOK) GetPayload() *RestoreBackupOKBody { } func (o *RestoreBackupOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RestoreBackupOKBody) // response payload @@ -178,6 +179,7 @@ func (o *RestoreBackupDefault) GetPayload() *RestoreBackupDefaultBody { } func (o *RestoreBackupDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RestoreBackupDefaultBody) // response payload @@ -193,6 +195,7 @@ RestoreBackupBody restore backup body swagger:model RestoreBackupBody */ type RestoreBackupBody struct { + // Service identifier where backup should be restored. ServiceID string `json:"service_id,omitempty"` @@ -258,6 +261,7 @@ RestoreBackupDefaultBody restore backup default body swagger:model RestoreBackupDefaultBody */ type RestoreBackupDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -327,7 +331,9 @@ func (o *RestoreBackupDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -347,6 +353,7 @@ func (o *RestoreBackupDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -375,6 +382,7 @@ RestoreBackupDefaultBodyDetailsItems0 restore backup default body details items0 swagger:model RestoreBackupDefaultBodyDetailsItems0 */ type RestoreBackupDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -386,6 +394,7 @@ type RestoreBackupDefaultBodyDetailsItems0 struct { func (o *RestoreBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -423,6 +432,7 @@ func (o *RestoreBackupDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RestoreBackupDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -486,6 +496,7 @@ RestoreBackupOKBody restore backup OK body swagger:model RestoreBackupOKBody */ type RestoreBackupOKBody struct { + // Unique restore identifier. RestoreID string `json:"restore_id,omitempty"` } diff --git a/api/backup/v1/locations.pb.go b/api/backup/v1/locations.pb.go index 808bad5ba2a..f0f1c7b8280 100644 --- a/api/backup/v1/locations.pb.go +++ b/api/backup/v1/locations.pb.go @@ -7,15 +7,14 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -813,25 +812,22 @@ func file_backup_v1_locations_proto_rawDescGZIP() []byte { return file_backup_v1_locations_proto_rawDescData } -var ( - file_backup_v1_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) - file_backup_v1_locations_proto_goTypes = []any{ - (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig - (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig - (*Location)(nil), // 2: backup.v1.Location - (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest - (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse - (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest - (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse - (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest - (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse - (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest - (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse - (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest - (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse - } -) - +var file_backup_v1_locations_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_backup_v1_locations_proto_goTypes = []any{ + (*FilesystemLocationConfig)(nil), // 0: backup.v1.FilesystemLocationConfig + (*S3LocationConfig)(nil), // 1: backup.v1.S3LocationConfig + (*Location)(nil), // 2: backup.v1.Location + (*ListLocationsRequest)(nil), // 3: backup.v1.ListLocationsRequest + (*ListLocationsResponse)(nil), // 4: backup.v1.ListLocationsResponse + (*AddLocationRequest)(nil), // 5: backup.v1.AddLocationRequest + (*AddLocationResponse)(nil), // 6: backup.v1.AddLocationResponse + (*ChangeLocationRequest)(nil), // 7: backup.v1.ChangeLocationRequest + (*ChangeLocationResponse)(nil), // 8: backup.v1.ChangeLocationResponse + (*RemoveLocationRequest)(nil), // 9: backup.v1.RemoveLocationRequest + (*RemoveLocationResponse)(nil), // 10: backup.v1.RemoveLocationResponse + (*TestLocationConfigRequest)(nil), // 11: backup.v1.TestLocationConfigRequest + (*TestLocationConfigResponse)(nil), // 12: backup.v1.TestLocationConfigResponse +} var file_backup_v1_locations_proto_depIdxs = []int32{ 0, // 0: backup.v1.Location.filesystem_config:type_name -> backup.v1.FilesystemLocationConfig 1, // 1: backup.v1.Location.s3_config:type_name -> backup.v1.S3LocationConfig diff --git a/api/backup/v1/locations.swagger.json b/api/backup/v1/locations.swagger.json new file mode 100644 index 00000000000..26f36fcb836 --- /dev/null +++ b/api/backup/v1/locations.swagger.json @@ -0,0 +1,353 @@ +{ + "swagger": "2.0", + "info": { + "title": "backup/v1/locations.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "LocationsService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/backups/locations": { + "get": { + "summary": "List Backup Locations", + "description": "List backup locations.", + "operationId": "ListLocations", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListLocationsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "LocationsService" + ] + }, + "post": { + "summary": "Add a Backup Location", + "description": "Add a backup location.", + "operationId": "AddLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddLocationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddLocationRequest" + } + } + ], + "tags": [ + "LocationsService" + ] + } + }, + "/v1/backups/locations/{location_id}": { + "delete": { + "summary": "Remove a Scheduled Backup", + "description": "Remove a backup location.", + "operationId": "RemoveLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveLocationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "location_id", + "description": "Machine-readable ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "force", + "description": "Force mode", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "LocationsService" + ] + }, + "put": { + "summary": "Change a Backup Location", + "description": "Change a backup location.", + "operationId": "ChangeLocation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeLocationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "location_id", + "description": "Machine-readable ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/LocationsServiceChangeLocationBody" + } + } + ], + "tags": [ + "LocationsService" + ] + } + }, + "/v1/backups/locations:testConfig": { + "post": { + "summary": "Test a Backup Location and Credentials", + "description": "Test a backup location and credentials.", + "operationId": "TestLocationConfig", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1TestLocationConfigResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1TestLocationConfigRequest" + } + } + ], + "tags": [ + "LocationsService" + ] + } + } + }, + "definitions": { + "LocationsServiceChangeLocationBody": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Location name" + }, + "description": { + "type": "string" + }, + "filesystem_config": { + "$ref": "#/definitions/v1FilesystemLocationConfig", + "description": "Filesystem location configuration. Exactly one config should be set." + }, + "s3_config": { + "$ref": "#/definitions/v1S3LocationConfig", + "description": "S3 Bucket configuration. Exactly one config should be set." + } + } + }, + "backupV1Location": { + "type": "object", + "properties": { + "location_id": { + "type": "string", + "description": "Machine-readable ID." + }, + "name": { + "type": "string", + "title": "Location name" + }, + "description": { + "type": "string", + "title": "Short description" + }, + "filesystem_config": { + "$ref": "#/definitions/v1FilesystemLocationConfig" + }, + "s3_config": { + "$ref": "#/definitions/v1S3LocationConfig" + } + }, + "description": "Location represents single Backup Location." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1AddLocationRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Location name" + }, + "description": { + "type": "string" + }, + "filesystem_config": { + "$ref": "#/definitions/v1FilesystemLocationConfig", + "description": "Filesystem location configuration. Exactly one config should be set." + }, + "s3_config": { + "$ref": "#/definitions/v1S3LocationConfig", + "description": "S3 Bucket configuration. Exactly one config should be set." + } + } + }, + "v1AddLocationResponse": { + "type": "object", + "properties": { + "location_id": { + "type": "string", + "description": "Machine-readable ID." + } + } + }, + "v1ChangeLocationResponse": { + "type": "object" + }, + "v1FilesystemLocationConfig": { + "type": "object", + "properties": { + "path": { + "type": "string" + } + }, + "description": "FilesystemLocationConfig represents file system location config." + }, + "v1ListLocationsResponse": { + "type": "object", + "properties": { + "locations": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/backupV1Location" + } + } + } + }, + "v1RemoveLocationResponse": { + "type": "object" + }, + "v1S3LocationConfig": { + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "access_key": { + "type": "string" + }, + "secret_key": { + "type": "string" + }, + "bucket_name": { + "type": "string" + } + }, + "description": "S3LocationConfig represents S3 bucket configuration." + }, + "v1TestLocationConfigRequest": { + "type": "object", + "properties": { + "filesystem_config": { + "$ref": "#/definitions/v1FilesystemLocationConfig", + "description": "Filesystem location configuration. Exactly one config should be set." + }, + "s3_config": { + "$ref": "#/definitions/v1S3LocationConfig", + "description": "S3 Bucket configuration. Exactly one config should be set." + } + } + }, + "v1TestLocationConfigResponse": { + "type": "object" + } + } +} diff --git a/api/backup/v1/locations_grpc.pb.go b/api/backup/v1/locations_grpc.pb.go index 15b1c781046..628344a5a7c 100644 --- a/api/backup/v1/locations_grpc.pb.go +++ b/api/backup/v1/locations_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -132,19 +131,15 @@ type UnimplementedLocationsServiceServer struct{} func (UnimplementedLocationsServiceServer) ListLocations(context.Context, *ListLocationsRequest) (*ListLocationsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListLocations not implemented") } - func (UnimplementedLocationsServiceServer) AddLocation(context.Context, *AddLocationRequest) (*AddLocationResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddLocation not implemented") } - func (UnimplementedLocationsServiceServer) ChangeLocation(context.Context, *ChangeLocationRequest) (*ChangeLocationResponse, error) { return nil, status.Error(codes.Unimplemented, "method ChangeLocation not implemented") } - func (UnimplementedLocationsServiceServer) RemoveLocation(context.Context, *RemoveLocationRequest) (*RemoveLocationResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveLocation not implemented") } - func (UnimplementedLocationsServiceServer) TestLocationConfig(context.Context, *TestLocationConfigRequest) (*TestLocationConfigResponse, error) { return nil, status.Error(codes.Unimplemented, "method TestLocationConfig not implemented") } diff --git a/api/backup/v1/restores.pb.go b/api/backup/v1/restores.pb.go index 272b5255d28..04d7b270102 100644 --- a/api/backup/v1/restores.pb.go +++ b/api/backup/v1/restores.pb.go @@ -7,16 +7,15 @@ package backupv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -608,24 +607,21 @@ func file_backup_v1_restores_proto_rawDescGZIP() []byte { return file_backup_v1_restores_proto_rawDescData } -var ( - file_backup_v1_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_backup_v1_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_backup_v1_restores_proto_goTypes = []any{ - (RestoreStatus)(0), // 0: backup.v1.RestoreStatus - (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem - (*ListRestoresRequest)(nil), // 2: backup.v1.ListRestoresRequest - (*ListRestoresResponse)(nil), // 3: backup.v1.ListRestoresResponse - (*RestoreServiceGetLogsRequest)(nil), // 4: backup.v1.RestoreServiceGetLogsRequest - (*RestoreServiceGetLogsResponse)(nil), // 5: backup.v1.RestoreServiceGetLogsResponse - (*RestoreBackupRequest)(nil), // 6: backup.v1.RestoreBackupRequest - (*RestoreBackupResponse)(nil), // 7: backup.v1.RestoreBackupResponse - (DataModel)(0), // 8: backup.v1.DataModel - (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp - (*LogChunk)(nil), // 10: backup.v1.LogChunk - } -) - +var file_backup_v1_restores_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_backup_v1_restores_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_backup_v1_restores_proto_goTypes = []any{ + (RestoreStatus)(0), // 0: backup.v1.RestoreStatus + (*RestoreHistoryItem)(nil), // 1: backup.v1.RestoreHistoryItem + (*ListRestoresRequest)(nil), // 2: backup.v1.ListRestoresRequest + (*ListRestoresResponse)(nil), // 3: backup.v1.ListRestoresResponse + (*RestoreServiceGetLogsRequest)(nil), // 4: backup.v1.RestoreServiceGetLogsRequest + (*RestoreServiceGetLogsResponse)(nil), // 5: backup.v1.RestoreServiceGetLogsResponse + (*RestoreBackupRequest)(nil), // 6: backup.v1.RestoreBackupRequest + (*RestoreBackupResponse)(nil), // 7: backup.v1.RestoreBackupResponse + (DataModel)(0), // 8: backup.v1.DataModel + (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp + (*LogChunk)(nil), // 10: backup.v1.LogChunk +} var file_backup_v1_restores_proto_depIdxs = []int32{ 8, // 0: backup.v1.RestoreHistoryItem.data_model:type_name -> backup.v1.DataModel 0, // 1: backup.v1.RestoreHistoryItem.status:type_name -> backup.v1.RestoreStatus diff --git a/api/backup/v1/restores.swagger.json b/api/backup/v1/restores.swagger.json new file mode 100644 index 00000000000..e7089206289 --- /dev/null +++ b/api/backup/v1/restores.swagger.json @@ -0,0 +1,303 @@ +{ + "swagger": "2.0", + "info": { + "title": "backup/v1/restores.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "RestoreService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/backups/restores": { + "get": { + "summary": "List Restore History", + "description": "List all backup restore history items", + "operationId": "ListRestores", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListRestoresResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "RestoreService" + ] + } + }, + "/v1/backups/restores/{restore_id}/logs": { + "get": { + "summary": "Get Logs", + "description": "Get logs from the underlying tools for a restore job", + "operationId": "GetLogs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RestoreServiceGetLogsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "restore_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + } + ], + "tags": [ + "RestoreService" + ] + } + }, + "/v1/backups/restores:start": { + "post": { + "summary": "Restore from a Backup", + "description": "Could return the Error message in the details containing specific ErrorCode indicating failure reason:\nERROR_CODE_XTRABACKUP_NOT_INSTALLED - xtrabackup is not installed on the service\nERROR_CODE_INVALID_XTRABACKUP - different versions of xtrabackup and xbcloud\nERROR_CODE_INCOMPATIBLE_XTRABACKUP - xtrabackup is not compatible with MySQL for taking a backup\nERROR_CODE_INCOMPATIBLE_TARGET_MYSQL - target MySQL version is not compatible with the artifact for performing a restore of the backup", + "operationId": "RestoreBackup", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RestoreBackupResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RestoreBackupRequest" + } + } + ], + "tags": [ + "RestoreService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1DataModel": { + "type": "string", + "enum": [ + "DATA_MODEL_UNSPECIFIED", + "DATA_MODEL_PHYSICAL", + "DATA_MODEL_LOGICAL" + ], + "default": "DATA_MODEL_UNSPECIFIED", + "description": "DataModel is a model used for performing a backup." + }, + "v1ListRestoresResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1RestoreHistoryItem" + } + } + } + }, + "v1LogChunk": { + "type": "object", + "properties": { + "chunk_id": { + "type": "integer", + "format": "int64" + }, + "data": { + "type": "string" + } + }, + "description": "LogChunk represent one chunk of logs." + }, + "v1RestoreBackupRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Service identifier where backup should be restored." + }, + "artifact_id": { + "type": "string", + "description": "Artifact id to restore." + }, + "pitr_timestamp": { + "type": "string", + "format": "date-time", + "title": "Timestamp of PITR to restore to" + } + } + }, + "v1RestoreBackupResponse": { + "type": "object", + "properties": { + "restore_id": { + "type": "string", + "description": "Unique restore identifier." + } + } + }, + "v1RestoreHistoryItem": { + "type": "object", + "properties": { + "restore_id": { + "type": "string", + "description": "Machine-readable restore id." + }, + "artifact_id": { + "type": "string", + "description": "ID of the artifact used for restore." + }, + "name": { + "type": "string", + "description": "Artifact name used for restore." + }, + "vendor": { + "type": "string", + "description": "Database vendor e.g. PostgreSQL, MongoDB, MySQL." + }, + "location_id": { + "type": "string", + "description": "Machine-readable location ID." + }, + "location_name": { + "type": "string", + "description": "Location name." + }, + "service_id": { + "type": "string", + "description": "Machine-readable service ID." + }, + "service_name": { + "type": "string", + "description": "Service name." + }, + "data_model": { + "$ref": "#/definitions/v1DataModel", + "description": "Backup data model." + }, + "status": { + "$ref": "#/definitions/v1RestoreStatus", + "description": "Restore status." + }, + "started_at": { + "type": "string", + "format": "date-time", + "description": "Restore start time." + }, + "finished_at": { + "type": "string", + "format": "date-time", + "description": "Restore finish time." + }, + "pitr_timestamp": { + "type": "string", + "format": "date-time", + "description": "PITR timestamp is filled for PITR restores, empty otherwise." + } + }, + "description": "RestoreHistoryItem represents single backup restore item." + }, + "v1RestoreServiceGetLogsResponse": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1LogChunk" + } + }, + "end": { + "type": "boolean" + } + } + }, + "v1RestoreStatus": { + "type": "string", + "enum": [ + "RESTORE_STATUS_UNSPECIFIED", + "RESTORE_STATUS_IN_PROGRESS", + "RESTORE_STATUS_SUCCESS", + "RESTORE_STATUS_ERROR" + ], + "default": "RESTORE_STATUS_UNSPECIFIED", + "description": "RestoreStatus shows the current status of execution of restore." + } + } +} diff --git a/api/backup/v1/restores_grpc.pb.go b/api/backup/v1/restores_grpc.pb.go index c27c45e9f4e..a7fdce1c5f0 100644 --- a/api/backup/v1/restores_grpc.pb.go +++ b/api/backup/v1/restores_grpc.pb.go @@ -8,7 +8,6 @@ package backupv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -102,11 +101,9 @@ type UnimplementedRestoreServiceServer struct{} func (UnimplementedRestoreServiceServer) ListRestores(context.Context, *ListRestoresRequest) (*ListRestoresResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListRestores not implemented") } - func (UnimplementedRestoreServiceServer) GetLogs(context.Context, *RestoreServiceGetLogsRequest) (*RestoreServiceGetLogsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetLogs not implemented") } - func (UnimplementedRestoreServiceServer) RestoreBackup(context.Context, *RestoreBackupRequest) (*RestoreBackupResponse, error) { return nil, status.Error(codes.Unimplemented, "method RestoreBackup not implemented") } diff --git a/api/common/common.pb.go b/api/common/common.pb.go index 0d05883daa1..5c809939700 100644 --- a/api/common/common.pb.go +++ b/api/common/common.pb.go @@ -7,12 +7,11 @@ package common import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -139,15 +138,12 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var ( - file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_common_common_proto_goTypes = []any{ - (*StringArray)(nil), // 0: common.StringArray - (*StringMap)(nil), // 1: common.StringMap - nil, // 2: common.StringMap.ValuesEntry - } -) - +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_common_common_proto_goTypes = []any{ + (*StringArray)(nil), // 0: common.StringArray + (*StringMap)(nil), // 1: common.StringMap + nil, // 2: common.StringMap.ValuesEntry +} var file_common_common_proto_depIdxs = []int32{ 2, // 0: common.StringMap.values:type_name -> common.StringMap.ValuesEntry 1, // [1:1] is the sub-list for method output_type diff --git a/api/common/common.swagger.json b/api/common/common.swagger.json new file mode 100644 index 00000000000..613dea17f41 --- /dev/null +++ b/api/common/common.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "common/common.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/common/metrics_resolutions.pb.go b/api/common/metrics_resolutions.pb.go index 75e587ba9a5..30e99f3894f 100644 --- a/api/common/metrics_resolutions.pb.go +++ b/api/common/metrics_resolutions.pb.go @@ -7,13 +7,12 @@ package common import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -111,14 +110,11 @@ func file_common_metrics_resolutions_proto_rawDescGZIP() []byte { return file_common_metrics_resolutions_proto_rawDescData } -var ( - file_common_metrics_resolutions_proto_msgTypes = make([]protoimpl.MessageInfo, 1) - file_common_metrics_resolutions_proto_goTypes = []any{ - (*MetricsResolutions)(nil), // 0: common.MetricsResolutions - (*durationpb.Duration)(nil), // 1: google.protobuf.Duration - } -) - +var file_common_metrics_resolutions_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_common_metrics_resolutions_proto_goTypes = []any{ + (*MetricsResolutions)(nil), // 0: common.MetricsResolutions + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration +} var file_common_metrics_resolutions_proto_depIdxs = []int32{ 1, // 0: common.MetricsResolutions.hr:type_name -> google.protobuf.Duration 1, // 1: common.MetricsResolutions.mr:type_name -> google.protobuf.Duration diff --git a/api/common/metrics_resolutions.swagger.json b/api/common/metrics_resolutions.swagger.json new file mode 100644 index 00000000000..995cc971e4a --- /dev/null +++ b/api/common/metrics_resolutions.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "common/metrics_resolutions.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/descriptor.bin b/api/descriptor.bin index 1f953aa3c76..f97efa0ac4d 100644 Binary files a/api/descriptor.bin and b/api/descriptor.bin differ diff --git a/api/dump/v1beta1/dump.pb.go b/api/dump/v1beta1/dump.pb.go index 3cd88013859..e9e73ce9e7d 100644 --- a/api/dump/v1beta1/dump.pb.go +++ b/api/dump/v1beta1/dump.pb.go @@ -7,16 +7,15 @@ package dumpv1beta1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -844,28 +843,25 @@ func file_dump_v1beta1_dump_proto_rawDescGZIP() []byte { return file_dump_v1beta1_dump_proto_rawDescData } -var ( - file_dump_v1beta1_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_dump_v1beta1_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 13) - file_dump_v1beta1_dump_proto_goTypes = []any{ - (DumpStatus)(0), // 0: dump.v1beta1.DumpStatus - (*Dump)(nil), // 1: dump.v1beta1.Dump - (*StartDumpRequest)(nil), // 2: dump.v1beta1.StartDumpRequest - (*StartDumpResponse)(nil), // 3: dump.v1beta1.StartDumpResponse - (*ListDumpsRequest)(nil), // 4: dump.v1beta1.ListDumpsRequest - (*ListDumpsResponse)(nil), // 5: dump.v1beta1.ListDumpsResponse - (*DeleteDumpRequest)(nil), // 6: dump.v1beta1.DeleteDumpRequest - (*DeleteDumpResponse)(nil), // 7: dump.v1beta1.DeleteDumpResponse - (*GetDumpLogsRequest)(nil), // 8: dump.v1beta1.GetDumpLogsRequest - (*GetDumpLogsResponse)(nil), // 9: dump.v1beta1.GetDumpLogsResponse - (*LogChunk)(nil), // 10: dump.v1beta1.LogChunk - (*SFTPParameters)(nil), // 11: dump.v1beta1.SFTPParameters - (*UploadDumpRequest)(nil), // 12: dump.v1beta1.UploadDumpRequest - (*UploadDumpResponse)(nil), // 13: dump.v1beta1.UploadDumpResponse - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp - } -) - +var file_dump_v1beta1_dump_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_dump_v1beta1_dump_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_dump_v1beta1_dump_proto_goTypes = []any{ + (DumpStatus)(0), // 0: dump.v1beta1.DumpStatus + (*Dump)(nil), // 1: dump.v1beta1.Dump + (*StartDumpRequest)(nil), // 2: dump.v1beta1.StartDumpRequest + (*StartDumpResponse)(nil), // 3: dump.v1beta1.StartDumpResponse + (*ListDumpsRequest)(nil), // 4: dump.v1beta1.ListDumpsRequest + (*ListDumpsResponse)(nil), // 5: dump.v1beta1.ListDumpsResponse + (*DeleteDumpRequest)(nil), // 6: dump.v1beta1.DeleteDumpRequest + (*DeleteDumpResponse)(nil), // 7: dump.v1beta1.DeleteDumpResponse + (*GetDumpLogsRequest)(nil), // 8: dump.v1beta1.GetDumpLogsRequest + (*GetDumpLogsResponse)(nil), // 9: dump.v1beta1.GetDumpLogsResponse + (*LogChunk)(nil), // 10: dump.v1beta1.LogChunk + (*SFTPParameters)(nil), // 11: dump.v1beta1.SFTPParameters + (*UploadDumpRequest)(nil), // 12: dump.v1beta1.UploadDumpRequest + (*UploadDumpResponse)(nil), // 13: dump.v1beta1.UploadDumpResponse + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp +} var file_dump_v1beta1_dump_proto_depIdxs = []int32{ 0, // 0: dump.v1beta1.Dump.status:type_name -> dump.v1beta1.DumpStatus 14, // 1: dump.v1beta1.Dump.start_time:type_name -> google.protobuf.Timestamp diff --git a/api/dump/v1beta1/dump.swagger.json b/api/dump/v1beta1/dump.swagger.json new file mode 100644 index 00000000000..a8f75c5d21d --- /dev/null +++ b/api/dump/v1beta1/dump.swagger.json @@ -0,0 +1,383 @@ +{ + "swagger": "2.0", + "info": { + "title": "dump/v1beta1/dump.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "DumpService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/dumps": { + "get": { + "summary": "List All Dumps", + "description": "List all dumps", + "operationId": "ListDumps", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListDumpsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "DumpService" + ] + } + }, + "/v1/dumps/{dump_id}/logs": { + "get": { + "summary": "Get Dump Logs", + "description": "Get logs of a selected dump.", + "operationId": "GetDumpLogs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1GetDumpLogsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "dump_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "offset", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + }, + { + "name": "limit", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + } + ], + "tags": [ + "DumpService" + ] + } + }, + "/v1/dumps:batchDelete": { + "post": { + "summary": "Delete Dumps", + "description": "Delete selected dumps.", + "operationId": "DeleteDump", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1DeleteDumpResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1DeleteDumpRequest" + } + } + ], + "tags": [ + "DumpService" + ] + } + }, + "/v1/dumps:start": { + "post": { + "summary": "Start a New Dump", + "description": "Start a new dump.", + "operationId": "StartDump", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1StartDumpResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1StartDumpRequest" + } + } + ], + "tags": [ + "DumpService" + ] + } + }, + "/v1/dumps:upload": { + "post": { + "summary": "Upload Dumps", + "description": "Upload selected dumps to a remote server.", + "operationId": "UploadDump", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1UploadDumpResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1beta1UploadDumpRequest" + } + } + ], + "tags": [ + "DumpService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1beta1DeleteDumpRequest": { + "type": "object", + "properties": { + "dump_ids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1beta1DeleteDumpResponse": { + "type": "object" + }, + "v1beta1Dump": { + "type": "object", + "properties": { + "dump_id": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/v1beta1DumpStatus" + }, + "service_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "start_time": { + "type": "string", + "format": "date-time" + }, + "end_time": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + } + }, + "v1beta1DumpStatus": { + "type": "string", + "enum": [ + "DUMP_STATUS_UNSPECIFIED", + "DUMP_STATUS_IN_PROGRESS", + "DUMP_STATUS_SUCCESS", + "DUMP_STATUS_ERROR" + ], + "default": "DUMP_STATUS_UNSPECIFIED" + }, + "v1beta1GetDumpLogsResponse": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1LogChunk" + } + }, + "end": { + "type": "boolean" + } + } + }, + "v1beta1ListDumpsResponse": { + "type": "object", + "properties": { + "dumps": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1Dump" + } + } + } + }, + "v1beta1LogChunk": { + "type": "object", + "properties": { + "chunk_id": { + "type": "integer", + "format": "int64" + }, + "data": { + "type": "string" + } + }, + "description": "LogChunk represent one chunk of logs." + }, + "v1beta1SFTPParameters": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "user": { + "type": "string" + }, + "password": { + "type": "string" + }, + "directory": { + "type": "string" + } + } + }, + "v1beta1StartDumpRequest": { + "type": "object", + "properties": { + "service_names": { + "type": "array", + "items": { + "type": "string" + } + }, + "start_time": { + "type": "string", + "format": "date-time" + }, + "end_time": { + "type": "string", + "format": "date-time" + }, + "export_qan": { + "type": "boolean" + }, + "ignore_load": { + "type": "boolean" + } + } + }, + "v1beta1StartDumpResponse": { + "type": "object", + "properties": { + "dump_id": { + "type": "string" + } + } + }, + "v1beta1UploadDumpRequest": { + "type": "object", + "properties": { + "dump_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "sftp_parameters": { + "$ref": "#/definitions/v1beta1SFTPParameters", + "description": "SFTP upload parameters." + } + } + }, + "v1beta1UploadDumpResponse": { + "type": "object" + } + } +} diff --git a/api/dump/v1beta1/dump_grpc.pb.go b/api/dump/v1beta1/dump_grpc.pb.go index 987f75bd579..bb65b07cc1b 100644 --- a/api/dump/v1beta1/dump_grpc.pb.go +++ b/api/dump/v1beta1/dump_grpc.pb.go @@ -8,7 +8,6 @@ package dumpv1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -128,19 +127,15 @@ type UnimplementedDumpServiceServer struct{} func (UnimplementedDumpServiceServer) StartDump(context.Context, *StartDumpRequest) (*StartDumpResponse, error) { return nil, status.Error(codes.Unimplemented, "method StartDump not implemented") } - func (UnimplementedDumpServiceServer) ListDumps(context.Context, *ListDumpsRequest) (*ListDumpsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListDumps not implemented") } - func (UnimplementedDumpServiceServer) DeleteDump(context.Context, *DeleteDumpRequest) (*DeleteDumpResponse, error) { return nil, status.Error(codes.Unimplemented, "method DeleteDump not implemented") } - func (UnimplementedDumpServiceServer) GetDumpLogs(context.Context, *GetDumpLogsRequest) (*GetDumpLogsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetDumpLogs not implemented") } - func (UnimplementedDumpServiceServer) UploadDump(context.Context, *UploadDumpRequest) (*UploadDumpResponse, error) { return nil, status.Error(codes.Unimplemented, "method UploadDump not implemented") } diff --git a/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go index 0c83d67b573..733240643c1 100644 --- a/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/delete_dump_parameters.go @@ -60,6 +60,7 @@ DeleteDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DeleteDumpParams struct { + // Body. Body DeleteDumpBody @@ -129,6 +130,7 @@ func (o *DeleteDumpParams) SetBody(body DeleteDumpBody) { // WriteToRequest writes these params to a swagger request func (o *DeleteDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go index d703d60a325..551a20314ae 100644 --- a/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/delete_dump_responses.go @@ -104,6 +104,7 @@ func (o *DeleteDumpOK) GetPayload() any { } func (o *DeleteDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *DeleteDumpDefault) GetPayload() *DeleteDumpDefaultBody { } func (o *DeleteDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DeleteDumpDefaultBody) // response payload @@ -190,6 +192,7 @@ DeleteDumpBody delete dump body swagger:model DeleteDumpBody */ type DeleteDumpBody struct { + // dump ids DumpIds []string `json:"dump_ids"` } @@ -227,6 +230,7 @@ DeleteDumpDefaultBody delete dump default body swagger:model DeleteDumpDefaultBody */ type DeleteDumpDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *DeleteDumpDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *DeleteDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,6 +322,7 @@ func (o *DeleteDumpDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -344,6 +351,7 @@ DeleteDumpDefaultBodyDetailsItems0 delete dump default body details items0 swagger:model DeleteDumpDefaultBodyDetailsItems0 */ type DeleteDumpDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -355,6 +363,7 @@ type DeleteDumpDefaultBodyDetailsItems0 struct { func (o *DeleteDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -392,6 +401,7 @@ func (o *DeleteDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DeleteDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go index 82ed2997d2d..4be2f03898b 100644 --- a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_parameters.go @@ -61,6 +61,7 @@ GetDumpLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetDumpLogsParams struct { + // DumpID. DumpID string @@ -162,6 +163,7 @@ func (o *GetDumpLogsParams) SetOffset(offset *int64) { // WriteToRequest writes these params to a swagger request func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -182,6 +184,7 @@ func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } @@ -198,6 +201,7 @@ func (o *GetDumpLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qOffset := swag.FormatInt64(qrOffset) if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go index 8a0e0c45bef..a8749604dc0 100644 --- a/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/get_dump_logs_responses.go @@ -104,6 +104,7 @@ func (o *GetDumpLogsOK) GetPayload() *GetDumpLogsOKBody { } func (o *GetDumpLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetDumpLogsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetDumpLogsDefault) GetPayload() *GetDumpLogsDefaultBody { } func (o *GetDumpLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetDumpLogsDefaultBody) // response payload @@ -192,6 +194,7 @@ GetDumpLogsDefaultBody get dump logs default body swagger:model GetDumpLogsDefaultBody */ type GetDumpLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetDumpLogsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *GetDumpLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetDumpLogsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -309,6 +315,7 @@ GetDumpLogsDefaultBodyDetailsItems0 get dump logs default body details items0 swagger:model GetDumpLogsDefaultBodyDetailsItems0 */ type GetDumpLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetDumpLogsDefaultBodyDetailsItems0 struct { func (o *GetDumpLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetDumpLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetDumpLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetDumpLogsOKBody get dump logs OK body swagger:model GetDumpLogsOKBody */ type GetDumpLogsOKBody struct { + // logs Logs []*GetDumpLogsOKBodyLogsItems0 `json:"logs"` @@ -486,7 +496,9 @@ func (o *GetDumpLogsOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetDumpLogsOKBody) contextValidateLogs(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Logs); i++ { + if o.Logs[i] != nil { if swag.IsZero(o.Logs[i]) { // not required @@ -506,6 +518,7 @@ func (o *GetDumpLogsOKBody) contextValidateLogs(ctx context.Context, formats str return err } } + } return nil @@ -534,6 +547,7 @@ GetDumpLogsOKBodyLogsItems0 LogChunk represent one chunk of logs. swagger:model GetDumpLogsOKBodyLogsItems0 */ type GetDumpLogsOKBodyLogsItems0 struct { + // chunk id ChunkID int64 `json:"chunk_id,omitempty"` diff --git a/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go b/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go index dc28a36ad42..3ca0caf159f 100644 --- a/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/list_dumps_parameters.go @@ -115,6 +115,7 @@ func (o *ListDumpsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListDumpsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go b/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go index 6e37793be89..edf749c4f40 100644 --- a/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/list_dumps_responses.go @@ -105,6 +105,7 @@ func (o *ListDumpsOK) GetPayload() *ListDumpsOKBody { } func (o *ListDumpsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListDumpsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListDumpsDefault) GetPayload() *ListDumpsDefaultBody { } func (o *ListDumpsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListDumpsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListDumpsDefaultBody list dumps default body swagger:model ListDumpsDefaultBody */ type ListDumpsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListDumpsDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListDumpsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListDumpsDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -310,6 +316,7 @@ ListDumpsDefaultBodyDetailsItems0 list dumps default body details items0 swagger:model ListDumpsDefaultBodyDetailsItems0 */ type ListDumpsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListDumpsDefaultBodyDetailsItems0 struct { func (o *ListDumpsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListDumpsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListDumpsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListDumpsOKBody list dumps OK body swagger:model ListDumpsOKBody */ type ListDumpsOKBody struct { + // dumps Dumps []*ListDumpsOKBodyDumpsItems0 `json:"dumps"` } @@ -484,7 +494,9 @@ func (o *ListDumpsOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListDumpsOKBody) contextValidateDumps(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Dumps); i++ { + if o.Dumps[i] != nil { if swag.IsZero(o.Dumps[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListDumpsOKBody) contextValidateDumps(ctx context.Context, formats strf return err } } + } return nil @@ -532,6 +545,7 @@ ListDumpsOKBodyDumpsItems0 list dumps OK body dumps items0 swagger:model ListDumpsOKBodyDumpsItems0 */ type ListDumpsOKBodyDumpsItems0 struct { + // dump id DumpID string `json:"dump_id,omitempty"` diff --git a/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go index ac9f2ba90e8..c456e5f494f 100644 --- a/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/start_dump_parameters.go @@ -60,6 +60,7 @@ StartDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartDumpParams struct { + // Body. Body StartDumpBody @@ -129,6 +130,7 @@ func (o *StartDumpParams) SetBody(body StartDumpBody) { // WriteToRequest writes these params to a swagger request func (o *StartDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go index 4e34e022214..5bf88e94483 100644 --- a/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/start_dump_responses.go @@ -105,6 +105,7 @@ func (o *StartDumpOK) GetPayload() *StartDumpOKBody { } func (o *StartDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartDumpOKBody) // response payload @@ -178,6 +179,7 @@ func (o *StartDumpDefault) GetPayload() *StartDumpDefaultBody { } func (o *StartDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartDumpDefaultBody) // response payload @@ -193,6 +195,7 @@ StartDumpBody start dump body swagger:model StartDumpBody */ type StartDumpBody struct { + // service names ServiceNames []string `json:"service_names"` @@ -281,6 +284,7 @@ StartDumpDefaultBody start dump default body swagger:model StartDumpDefaultBody */ type StartDumpDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -350,7 +354,9 @@ func (o *StartDumpDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *StartDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -370,6 +376,7 @@ func (o *StartDumpDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -398,6 +405,7 @@ StartDumpDefaultBodyDetailsItems0 start dump default body details items0 swagger:model StartDumpDefaultBodyDetailsItems0 */ type StartDumpDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -409,6 +417,7 @@ type StartDumpDefaultBodyDetailsItems0 struct { func (o *StartDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -446,6 +455,7 @@ func (o *StartDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -509,6 +519,7 @@ StartDumpOKBody start dump OK body swagger:model StartDumpOKBody */ type StartDumpOKBody struct { + // dump id DumpID string `json:"dump_id,omitempty"` } diff --git a/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go b/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go index 0be24f481a8..0073c54dd7a 100644 --- a/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go +++ b/api/dump/v1beta1/json/client/dump_service/upload_dump_parameters.go @@ -60,6 +60,7 @@ UploadDumpParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UploadDumpParams struct { + // Body. Body UploadDumpBody @@ -129,6 +130,7 @@ func (o *UploadDumpParams) SetBody(body UploadDumpBody) { // WriteToRequest writes these params to a swagger request func (o *UploadDumpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go b/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go index 19cdb3631ac..96ff7aa4145 100644 --- a/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go +++ b/api/dump/v1beta1/json/client/dump_service/upload_dump_responses.go @@ -104,6 +104,7 @@ func (o *UploadDumpOK) GetPayload() any { } func (o *UploadDumpOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *UploadDumpDefault) GetPayload() *UploadDumpDefaultBody { } func (o *UploadDumpDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UploadDumpDefaultBody) // response payload @@ -190,6 +192,7 @@ UploadDumpBody upload dump body swagger:model UploadDumpBody */ type UploadDumpBody struct { + // dump ids DumpIds []string `json:"dump_ids"` @@ -249,6 +252,7 @@ func (o *UploadDumpBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *UploadDumpBody) contextValidateSftpParameters(ctx context.Context, formats strfmt.Registry) error { + if o.SftpParameters != nil { if swag.IsZero(o.SftpParameters) { // not required @@ -295,6 +299,7 @@ UploadDumpDefaultBody upload dump default body swagger:model UploadDumpDefaultBody */ type UploadDumpDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -364,7 +369,9 @@ func (o *UploadDumpDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UploadDumpDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -384,6 +391,7 @@ func (o *UploadDumpDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -412,6 +420,7 @@ UploadDumpDefaultBodyDetailsItems0 upload dump default body details items0 swagger:model UploadDumpDefaultBodyDetailsItems0 */ type UploadDumpDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -423,6 +432,7 @@ type UploadDumpDefaultBodyDetailsItems0 struct { func (o *UploadDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -460,6 +470,7 @@ func (o *UploadDumpDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UploadDumpDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -523,6 +534,7 @@ UploadDumpParamsBodySftpParameters upload dump params body sftp parameters swagger:model UploadDumpParamsBodySftpParameters */ type UploadDumpParamsBodySftpParameters struct { + // address Address string `json:"address,omitempty"` diff --git a/api/ha/v1beta1/ha.pb.go b/api/ha/v1beta1/ha.pb.go index 5b2c2efaf36..c592f717052 100644 --- a/api/ha/v1beta1/ha.pb.go +++ b/api/ha/v1beta1/ha.pb.go @@ -7,14 +7,13 @@ package hav1beta1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -339,19 +338,16 @@ func file_ha_v1beta1_ha_proto_rawDescGZIP() []byte { return file_ha_v1beta1_ha_proto_rawDescData } -var ( - file_ha_v1beta1_ha_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_ha_v1beta1_ha_proto_msgTypes = make([]protoimpl.MessageInfo, 5) - file_ha_v1beta1_ha_proto_goTypes = []any{ - (NodeRole)(0), // 0: ha.v1beta1.NodeRole - (*ListNodesRequest)(nil), // 1: ha.v1beta1.ListNodesRequest - (*HANode)(nil), // 2: ha.v1beta1.HANode - (*ListNodesResponse)(nil), // 3: ha.v1beta1.ListNodesResponse - (*StatusRequest)(nil), // 4: ha.v1beta1.StatusRequest - (*StatusResponse)(nil), // 5: ha.v1beta1.StatusResponse - } -) - +var file_ha_v1beta1_ha_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_ha_v1beta1_ha_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_ha_v1beta1_ha_proto_goTypes = []any{ + (NodeRole)(0), // 0: ha.v1beta1.NodeRole + (*ListNodesRequest)(nil), // 1: ha.v1beta1.ListNodesRequest + (*HANode)(nil), // 2: ha.v1beta1.HANode + (*ListNodesResponse)(nil), // 3: ha.v1beta1.ListNodesResponse + (*StatusRequest)(nil), // 4: ha.v1beta1.StatusRequest + (*StatusResponse)(nil), // 5: ha.v1beta1.StatusResponse +} var file_ha_v1beta1_ha_proto_depIdxs = []int32{ 0, // 0: ha.v1beta1.HANode.role:type_name -> ha.v1beta1.NodeRole 2, // 1: ha.v1beta1.ListNodesResponse.nodes:type_name -> ha.v1beta1.HANode diff --git a/api/ha/v1beta1/ha.swagger.json b/api/ha/v1beta1/ha.swagger.json new file mode 100644 index 00000000000..eab5d5f5d2f --- /dev/null +++ b/api/ha/v1beta1/ha.swagger.json @@ -0,0 +1,148 @@ +{ + "swagger": "2.0", + "info": { + "title": "ha/v1beta1/ha.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "HAService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/ha/nodes": { + "get": { + "summary": "List HA Nodes", + "description": "Returns a list of all nodes in the High Availability cluster with their current status and roles.", + "operationId": "ListNodes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1ListNodesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "tags": [ + "HAService" + ] + } + }, + "/v1/ha/status": { + "get": { + "summary": "HA Status", + "description": "Returns whether High Availability mode is enabled or disabled.", + "operationId": "Status", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1StatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "tags": [ + "HAService" + ] + } + } + }, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v1beta1HANode": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Human-readable name of the node." + }, + "role": { + "$ref": "#/definitions/v1beta1NodeRole", + "description": "Role of the node in the cluster." + }, + "status": { + "type": "string", + "description": "Current status of the node from MemberList." + } + }, + "description": "HANode represents a single node in the HA cluster." + }, + "v1beta1ListNodesResponse": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1beta1HANode" + }, + "description": "List of nodes in the HA cluster." + } + } + }, + "v1beta1NodeRole": { + "type": "string", + "enum": [ + "NODE_ROLE_UNSPECIFIED", + "NODE_ROLE_LEADER", + "NODE_ROLE_FOLLOWER" + ], + "default": "NODE_ROLE_UNSPECIFIED", + "description": "NodeRole represents the role of a node in the HA cluster." + }, + "v1beta1StatusResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Status of HA mode: \"Enabled\" or \"Disabled\"." + } + } + } + } +} diff --git a/api/ha/v1beta1/ha_grpc.pb.go b/api/ha/v1beta1/ha_grpc.pb.go index 75e664a29e5..c723d8996be 100644 --- a/api/ha/v1beta1/ha_grpc.pb.go +++ b/api/ha/v1beta1/ha_grpc.pb.go @@ -8,7 +8,6 @@ package hav1beta1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -87,7 +86,6 @@ type UnimplementedHAServiceServer struct{} func (UnimplementedHAServiceServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method Status not implemented") } - func (UnimplementedHAServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListNodes not implemented") } diff --git a/api/ha/v1beta1/json/client/ha_service/list_nodes_parameters.go b/api/ha/v1beta1/json/client/ha_service/list_nodes_parameters.go index c74ca68dd4e..1e3652130cf 100644 --- a/api/ha/v1beta1/json/client/ha_service/list_nodes_parameters.go +++ b/api/ha/v1beta1/json/client/ha_service/list_nodes_parameters.go @@ -115,6 +115,7 @@ func (o *ListNodesParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/ha/v1beta1/json/client/ha_service/list_nodes_responses.go b/api/ha/v1beta1/json/client/ha_service/list_nodes_responses.go index 8661938e936..0a686180710 100644 --- a/api/ha/v1beta1/json/client/ha_service/list_nodes_responses.go +++ b/api/ha/v1beta1/json/client/ha_service/list_nodes_responses.go @@ -105,6 +105,7 @@ func (o *ListNodesOK) GetPayload() *ListNodesOKBody { } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesDefaultBody) // response payload @@ -193,6 +195,7 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -310,6 +316,7 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListNodesDefaultBodyDetailsItems0 struct { func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListNodesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { + // List of nodes in the HA cluster. Nodes []*ListNodesOKBodyNodesItems0 `json:"nodes"` } @@ -484,7 +494,9 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Nodes); i++ { + if o.Nodes[i] != nil { if swag.IsZero(o.Nodes[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strf return err } } + } return nil @@ -532,6 +545,7 @@ ListNodesOKBodyNodesItems0 HANode represents a single node in the HA cluster. swagger:model ListNodesOKBodyNodesItems0 */ type ListNodesOKBodyNodesItems0 struct { + // Human-readable name of the node. NodeName string `json:"node_name,omitempty"` diff --git a/api/ha/v1beta1/json/client/ha_service/status_parameters.go b/api/ha/v1beta1/json/client/ha_service/status_parameters.go index 161ac87d1e0..1d287a5e4c0 100644 --- a/api/ha/v1beta1/json/client/ha_service/status_parameters.go +++ b/api/ha/v1beta1/json/client/ha_service/status_parameters.go @@ -115,6 +115,7 @@ func (o *StatusParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *StatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/ha/v1beta1/json/client/ha_service/status_responses.go b/api/ha/v1beta1/json/client/ha_service/status_responses.go index 4530572e2ba..f2384b30038 100644 --- a/api/ha/v1beta1/json/client/ha_service/status_responses.go +++ b/api/ha/v1beta1/json/client/ha_service/status_responses.go @@ -104,6 +104,7 @@ func (o *StatusOK) GetPayload() *StatusOKBody { } func (o *StatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StatusOKBody) // response payload @@ -177,6 +178,7 @@ func (o *StatusDefault) GetPayload() *StatusDefaultBody { } func (o *StatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StatusDefaultBody) // response payload @@ -192,6 +194,7 @@ StatusDefaultBody status default body swagger:model StatusDefaultBody */ type StatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *StatusDefaultBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *StatusDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -309,6 +315,7 @@ StatusDefaultBodyDetailsItems0 status default body details items0 swagger:model StatusDefaultBodyDetailsItems0 */ type StatusDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type StatusDefaultBodyDetailsItems0 struct { func (o *StatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *StatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ StatusOKBody status OK body swagger:model StatusOKBody */ type StatusOKBody struct { + // Status of HA mode: "Enabled" or "Disabled". Status string `json:"status,omitempty"` } diff --git a/api/inventory/v1/agent_status.pb.go b/api/inventory/v1/agent_status.pb.go index 01af45754b1..025bb50c788 100644 --- a/api/inventory/v1/agent_status.pb.go +++ b/api/inventory/v1/agent_status.pb.go @@ -7,12 +7,11 @@ package inventoryv1 import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -122,13 +121,10 @@ func file_inventory_v1_agent_status_proto_rawDescGZIP() []byte { return file_inventory_v1_agent_status_proto_rawDescData } -var ( - file_inventory_v1_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_agent_status_proto_goTypes = []any{ - (AgentStatus)(0), // 0: inventory.v1.AgentStatus - } -) - +var file_inventory_v1_agent_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_agent_status_proto_goTypes = []any{ + (AgentStatus)(0), // 0: inventory.v1.AgentStatus +} var file_inventory_v1_agent_status_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventory/v1/agent_status.swagger.json b/api/inventory/v1/agent_status.swagger.json new file mode 100644 index 00000000000..2e9902fb83f --- /dev/null +++ b/api/inventory/v1/agent_status.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventory/v1/agent_status.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/inventory/v1/agents.go b/api/inventory/v1/agents.go index d601b1784c7..2e45a579009 100644 --- a/api/inventory/v1/agents.go +++ b/api/inventory/v1/agents.go @@ -44,3 +44,4 @@ func (*ExternalExporter) sealedAgent() {} func (*AzureDatabaseExporter) sealedAgent() {} func (*ValkeyExporter) sealedAgent() {} func (*RTAMongoDBAgent) sealedAgent() {} +func (*OtelCollector) sealedAgent() {} diff --git a/api/inventory/v1/agents.pb.go b/api/inventory/v1/agents.pb.go index e619a04e91a..49178abe807 100644 --- a/api/inventory/v1/agents.pb.go +++ b/api/inventory/v1/agents.pb.go @@ -7,18 +7,16 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" - - common "github.com/percona/pmm/api/common" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -52,6 +50,7 @@ const ( AgentType_AGENT_TYPE_AZURE_DATABASE_EXPORTER AgentType = 15 AgentType_AGENT_TYPE_NOMAD_AGENT AgentType = 16 AgentType_AGENT_TYPE_RTA_MONGODB_AGENT AgentType = 19 + AgentType_AGENT_TYPE_OTEL_COLLECTOR AgentType = 20 ) // Enum value maps for AgentType. @@ -77,6 +76,7 @@ var ( 15: "AGENT_TYPE_AZURE_DATABASE_EXPORTER", 16: "AGENT_TYPE_NOMAD_AGENT", 19: "AGENT_TYPE_RTA_MONGODB_AGENT", + 20: "AGENT_TYPE_OTEL_COLLECTOR", } AgentType_value = map[string]int32{ "AGENT_TYPE_UNSPECIFIED": 0, @@ -99,6 +99,7 @@ var ( "AGENT_TYPE_AZURE_DATABASE_EXPORTER": 15, "AGENT_TYPE_NOMAD_AGENT": 16, "AGENT_TYPE_RTA_MONGODB_AGENT": 19, + "AGENT_TYPE_OTEL_COLLECTOR": 20, } ) @@ -385,6 +386,91 @@ func (x *NomadAgent) GetListenPort() uint32 { return 0 } +// OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL. +type OtelCollector struct { + state protoimpl.MessageState `protogen:"open.v1"` + AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` + PmmAgentId string `protobuf:"bytes,2,opt,name=pmm_agent_id,json=pmmAgentId,proto3" json:"pmm_agent_id,omitempty"` + Disabled bool `protobuf:"varint,3,opt,name=disabled,proto3" json:"disabled,omitempty"` + CustomLabels map[string]string `protobuf:"bytes,4,rep,name=custom_labels,json=customLabels,proto3" json:"custom_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Status AgentStatus `protobuf:"varint,10,opt,name=status,proto3,enum=inventory.v1.AgentStatus" json:"status,omitempty"` + ProcessExecPath string `protobuf:"bytes,11,opt,name=process_exec_path,json=processExecPath,proto3" json:"process_exec_path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OtelCollector) Reset() { + *x = OtelCollector{} + mi := &file_inventory_v1_agents_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OtelCollector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OtelCollector) ProtoMessage() {} + +func (x *OtelCollector) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OtelCollector.ProtoReflect.Descriptor instead. +func (*OtelCollector) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{3} +} + +func (x *OtelCollector) GetAgentId() string { + if x != nil { + return x.AgentId + } + return "" +} + +func (x *OtelCollector) GetPmmAgentId() string { + if x != nil { + return x.PmmAgentId + } + return "" +} + +func (x *OtelCollector) GetDisabled() bool { + if x != nil { + return x.Disabled + } + return false +} + +func (x *OtelCollector) GetCustomLabels() map[string]string { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *OtelCollector) GetStatus() AgentStatus { + if x != nil { + return x.Status + } + return AgentStatus_AGENT_STATUS_UNSPECIFIED +} + +func (x *OtelCollector) GetProcessExecPath() string { + if x != nil { + return x.ProcessExecPath + } + return "" +} + // NodeExporter runs on Generic or Container Node and exposes its metrics. type NodeExporter struct { state protoimpl.MessageState `protogen:"open.v1"` @@ -418,7 +504,7 @@ type NodeExporter struct { func (x *NodeExporter) Reset() { *x = NodeExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[3] + mi := &file_inventory_v1_agents_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -430,7 +516,7 @@ func (x *NodeExporter) String() string { func (*NodeExporter) ProtoMessage() {} func (x *NodeExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[3] + mi := &file_inventory_v1_agents_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -443,7 +529,7 @@ func (x *NodeExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use NodeExporter.ProtoReflect.Descriptor instead. func (*NodeExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{3} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{4} } func (x *NodeExporter) GetAgentId() string { @@ -587,7 +673,7 @@ type MySQLdExporter struct { func (x *MySQLdExporter) Reset() { *x = MySQLdExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[4] + mi := &file_inventory_v1_agents_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -599,7 +685,7 @@ func (x *MySQLdExporter) String() string { func (*MySQLdExporter) ProtoMessage() {} func (x *MySQLdExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[4] + mi := &file_inventory_v1_agents_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -612,7 +698,7 @@ func (x *MySQLdExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use MySQLdExporter.ProtoReflect.Descriptor instead. func (*MySQLdExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{4} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{5} } func (x *MySQLdExporter) GetAgentId() string { @@ -826,7 +912,7 @@ type MongoDBExporter struct { func (x *MongoDBExporter) Reset() { *x = MongoDBExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[5] + mi := &file_inventory_v1_agents_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -838,7 +924,7 @@ func (x *MongoDBExporter) String() string { func (*MongoDBExporter) ProtoMessage() {} func (x *MongoDBExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[5] + mi := &file_inventory_v1_agents_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -851,7 +937,7 @@ func (x *MongoDBExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use MongoDBExporter.ProtoReflect.Descriptor instead. func (*MongoDBExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{5} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{6} } func (x *MongoDBExporter) GetAgentId() string { @@ -1039,7 +1125,7 @@ type PostgresExporter struct { func (x *PostgresExporter) Reset() { *x = PostgresExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[6] + mi := &file_inventory_v1_agents_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1051,7 +1137,7 @@ func (x *PostgresExporter) String() string { func (*PostgresExporter) ProtoMessage() {} func (x *PostgresExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[6] + mi := &file_inventory_v1_agents_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1064,7 +1150,7 @@ func (x *PostgresExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use PostgresExporter.ProtoReflect.Descriptor instead. func (*PostgresExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{6} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{7} } func (x *PostgresExporter) GetAgentId() string { @@ -1234,7 +1320,7 @@ type ProxySQLExporter struct { func (x *ProxySQLExporter) Reset() { *x = ProxySQLExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[7] + mi := &file_inventory_v1_agents_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1246,7 +1332,7 @@ func (x *ProxySQLExporter) String() string { func (*ProxySQLExporter) ProtoMessage() {} func (x *ProxySQLExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[7] + mi := &file_inventory_v1_agents_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1259,7 +1345,7 @@ func (x *ProxySQLExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use ProxySQLExporter.ProtoReflect.Descriptor instead. func (*ProxySQLExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{7} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{8} } func (x *ProxySQLExporter) GetAgentId() string { @@ -1413,7 +1499,7 @@ type ValkeyExporter struct { func (x *ValkeyExporter) Reset() { *x = ValkeyExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[8] + mi := &file_inventory_v1_agents_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1425,7 +1511,7 @@ func (x *ValkeyExporter) String() string { func (*ValkeyExporter) ProtoMessage() {} func (x *ValkeyExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[8] + mi := &file_inventory_v1_agents_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1438,7 +1524,7 @@ func (x *ValkeyExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use ValkeyExporter.ProtoReflect.Descriptor instead. func (*ValkeyExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{8} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{9} } func (x *ValkeyExporter) GetAgentId() string { @@ -1591,7 +1677,7 @@ type QANMySQLPerfSchemaAgent struct { func (x *QANMySQLPerfSchemaAgent) Reset() { *x = QANMySQLPerfSchemaAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[9] + mi := &file_inventory_v1_agents_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1603,7 +1689,7 @@ func (x *QANMySQLPerfSchemaAgent) String() string { func (*QANMySQLPerfSchemaAgent) ProtoMessage() {} func (x *QANMySQLPerfSchemaAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[9] + mi := &file_inventory_v1_agents_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1616,7 +1702,7 @@ func (x *QANMySQLPerfSchemaAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use QANMySQLPerfSchemaAgent.ProtoReflect.Descriptor instead. func (*QANMySQLPerfSchemaAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{9} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{10} } func (x *QANMySQLPerfSchemaAgent) GetAgentId() string { @@ -1792,7 +1878,7 @@ type QANMySQLSlowlogAgent struct { func (x *QANMySQLSlowlogAgent) Reset() { *x = QANMySQLSlowlogAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[10] + mi := &file_inventory_v1_agents_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1804,7 +1890,7 @@ func (x *QANMySQLSlowlogAgent) String() string { func (*QANMySQLSlowlogAgent) ProtoMessage() {} func (x *QANMySQLSlowlogAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[10] + mi := &file_inventory_v1_agents_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1817,7 +1903,7 @@ func (x *QANMySQLSlowlogAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use QANMySQLSlowlogAgent.ProtoReflect.Descriptor instead. func (*QANMySQLSlowlogAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{10} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{11} } func (x *QANMySQLSlowlogAgent) GetAgentId() string { @@ -1986,7 +2072,7 @@ type QANMongoDBProfilerAgent struct { func (x *QANMongoDBProfilerAgent) Reset() { *x = QANMongoDBProfilerAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[11] + mi := &file_inventory_v1_agents_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1998,7 +2084,7 @@ func (x *QANMongoDBProfilerAgent) String() string { func (*QANMongoDBProfilerAgent) ProtoMessage() {} func (x *QANMongoDBProfilerAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[11] + mi := &file_inventory_v1_agents_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2011,7 +2097,7 @@ func (x *QANMongoDBProfilerAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use QANMongoDBProfilerAgent.ProtoReflect.Descriptor instead. func (*QANMongoDBProfilerAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{11} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{12} } func (x *QANMongoDBProfilerAgent) GetAgentId() string { @@ -2131,7 +2217,7 @@ type QANMongoDBMongologAgent struct { func (x *QANMongoDBMongologAgent) Reset() { *x = QANMongoDBMongologAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[12] + mi := &file_inventory_v1_agents_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2143,7 +2229,7 @@ func (x *QANMongoDBMongologAgent) String() string { func (*QANMongoDBMongologAgent) ProtoMessage() {} func (x *QANMongoDBMongologAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[12] + mi := &file_inventory_v1_agents_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2156,7 +2242,7 @@ func (x *QANMongoDBMongologAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use QANMongoDBMongologAgent.ProtoReflect.Descriptor instead. func (*QANMongoDBMongologAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{12} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{13} } func (x *QANMongoDBMongologAgent) GetAgentId() string { @@ -2254,7 +2340,7 @@ type RTAOptions struct { func (x *RTAOptions) Reset() { *x = RTAOptions{} - mi := &file_inventory_v1_agents_proto_msgTypes[13] + mi := &file_inventory_v1_agents_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2266,7 +2352,7 @@ func (x *RTAOptions) String() string { func (*RTAOptions) ProtoMessage() {} func (x *RTAOptions) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[13] + mi := &file_inventory_v1_agents_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2279,7 +2365,7 @@ func (x *RTAOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use RTAOptions.ProtoReflect.Descriptor instead. func (*RTAOptions) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{13} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{14} } func (x *RTAOptions) GetCollectInterval() *durationpb.Duration { @@ -2320,7 +2406,7 @@ type RTAMongoDBAgent struct { func (x *RTAMongoDBAgent) Reset() { *x = RTAMongoDBAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[14] + mi := &file_inventory_v1_agents_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2332,7 +2418,7 @@ func (x *RTAMongoDBAgent) String() string { func (*RTAMongoDBAgent) ProtoMessage() {} func (x *RTAMongoDBAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[14] + mi := &file_inventory_v1_agents_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2345,7 +2431,7 @@ func (x *RTAMongoDBAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use RTAMongoDBAgent.ProtoReflect.Descriptor instead. func (*RTAMongoDBAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{14} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{15} } func (x *RTAMongoDBAgent) GetAgentId() string { @@ -2460,7 +2546,7 @@ type QANPostgreSQLPgStatementsAgent struct { func (x *QANPostgreSQLPgStatementsAgent) Reset() { *x = QANPostgreSQLPgStatementsAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[15] + mi := &file_inventory_v1_agents_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2472,7 +2558,7 @@ func (x *QANPostgreSQLPgStatementsAgent) String() string { func (*QANPostgreSQLPgStatementsAgent) ProtoMessage() {} func (x *QANPostgreSQLPgStatementsAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[15] + mi := &file_inventory_v1_agents_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2485,7 +2571,7 @@ func (x *QANPostgreSQLPgStatementsAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use QANPostgreSQLPgStatementsAgent.ProtoReflect.Descriptor instead. func (*QANPostgreSQLPgStatementsAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{15} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{16} } func (x *QANPostgreSQLPgStatementsAgent) GetAgentId() string { @@ -2616,7 +2702,7 @@ type QANPostgreSQLPgStatMonitorAgent struct { func (x *QANPostgreSQLPgStatMonitorAgent) Reset() { *x = QANPostgreSQLPgStatMonitorAgent{} - mi := &file_inventory_v1_agents_proto_msgTypes[16] + mi := &file_inventory_v1_agents_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2628,7 +2714,7 @@ func (x *QANPostgreSQLPgStatMonitorAgent) String() string { func (*QANPostgreSQLPgStatMonitorAgent) ProtoMessage() {} func (x *QANPostgreSQLPgStatMonitorAgent) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[16] + mi := &file_inventory_v1_agents_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2641,7 +2727,7 @@ func (x *QANPostgreSQLPgStatMonitorAgent) ProtoReflect() protoreflect.Message { // Deprecated: Use QANPostgreSQLPgStatMonitorAgent.ProtoReflect.Descriptor instead. func (*QANPostgreSQLPgStatMonitorAgent) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{16} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{17} } func (x *QANPostgreSQLPgStatMonitorAgent) GetAgentId() string { @@ -2781,7 +2867,7 @@ type RDSExporter struct { func (x *RDSExporter) Reset() { *x = RDSExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[17] + mi := &file_inventory_v1_agents_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2793,7 +2879,7 @@ func (x *RDSExporter) String() string { func (*RDSExporter) ProtoMessage() {} func (x *RDSExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[17] + mi := &file_inventory_v1_agents_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2806,7 +2892,7 @@ func (x *RDSExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use RDSExporter.ProtoReflect.Descriptor instead. func (*RDSExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{17} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{18} } func (x *RDSExporter) GetAgentId() string { @@ -2951,7 +3037,7 @@ type ExternalExporter struct { func (x *ExternalExporter) Reset() { *x = ExternalExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[18] + mi := &file_inventory_v1_agents_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2963,7 +3049,7 @@ func (x *ExternalExporter) String() string { func (*ExternalExporter) ProtoMessage() {} func (x *ExternalExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[18] + mi := &file_inventory_v1_agents_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2976,7 +3062,7 @@ func (x *ExternalExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use ExternalExporter.ProtoReflect.Descriptor instead. func (*ExternalExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{18} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{19} } func (x *ExternalExporter) GetAgentId() string { @@ -3112,7 +3198,7 @@ type AzureDatabaseExporter struct { func (x *AzureDatabaseExporter) Reset() { *x = AzureDatabaseExporter{} - mi := &file_inventory_v1_agents_proto_msgTypes[19] + mi := &file_inventory_v1_agents_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3124,7 +3210,7 @@ func (x *AzureDatabaseExporter) String() string { func (*AzureDatabaseExporter) ProtoMessage() {} func (x *AzureDatabaseExporter) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[19] + mi := &file_inventory_v1_agents_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3137,7 +3223,7 @@ func (x *AzureDatabaseExporter) ProtoReflect() protoreflect.Message { // Deprecated: Use AzureDatabaseExporter.ProtoReflect.Descriptor instead. func (*AzureDatabaseExporter) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{19} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{20} } func (x *AzureDatabaseExporter) GetAgentId() string { @@ -3248,7 +3334,7 @@ type ChangeCommonAgentParams struct { func (x *ChangeCommonAgentParams) Reset() { *x = ChangeCommonAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[20] + mi := &file_inventory_v1_agents_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3260,7 +3346,7 @@ func (x *ChangeCommonAgentParams) String() string { func (*ChangeCommonAgentParams) ProtoMessage() {} func (x *ChangeCommonAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[20] + mi := &file_inventory_v1_agents_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3273,7 +3359,7 @@ func (x *ChangeCommonAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeCommonAgentParams.ProtoReflect.Descriptor instead. func (*ChangeCommonAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{20} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{21} } func (x *ChangeCommonAgentParams) GetEnable() bool { @@ -3323,7 +3409,7 @@ type ListAgentsRequest struct { func (x *ListAgentsRequest) Reset() { *x = ListAgentsRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[21] + mi := &file_inventory_v1_agents_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3335,7 +3421,7 @@ func (x *ListAgentsRequest) String() string { func (*ListAgentsRequest) ProtoMessage() {} func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[21] + mi := &file_inventory_v1_agents_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3348,7 +3434,7 @@ func (x *ListAgentsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAgentsRequest.ProtoReflect.Descriptor instead. func (*ListAgentsRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{21} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{22} } func (x *ListAgentsRequest) GetPmmAgentId() string { @@ -3400,13 +3486,14 @@ type ListAgentsResponse struct { NomadAgent []*NomadAgent `protobuf:"bytes,16,rep,name=nomad_agent,json=nomadAgent,proto3" json:"nomad_agent,omitempty"` ValkeyExporter []*ValkeyExporter `protobuf:"bytes,17,rep,name=valkey_exporter,json=valkeyExporter,proto3" json:"valkey_exporter,omitempty"` RtaMongodbAgent []*RTAMongoDBAgent `protobuf:"bytes,19,rep,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3" json:"rta_mongodb_agent,omitempty"` + OtelCollector []*OtelCollector `protobuf:"bytes,20,rep,name=otel_collector,json=otelCollector,proto3" json:"otel_collector,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ListAgentsResponse) Reset() { *x = ListAgentsResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[22] + mi := &file_inventory_v1_agents_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3418,7 +3505,7 @@ func (x *ListAgentsResponse) String() string { func (*ListAgentsResponse) ProtoMessage() {} func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[22] + mi := &file_inventory_v1_agents_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3431,7 +3518,7 @@ func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListAgentsResponse.ProtoReflect.Descriptor instead. func (*ListAgentsResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{22} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{23} } func (x *ListAgentsResponse) GetPmmAgent() []*PMMAgent { @@ -3567,6 +3654,13 @@ func (x *ListAgentsResponse) GetRtaMongodbAgent() []*RTAMongoDBAgent { return nil } +func (x *ListAgentsResponse) GetOtelCollector() []*OtelCollector { + if x != nil { + return x.OtelCollector + } + return nil +} + type GetAgentRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Unique randomly generated instance identifier. @@ -3577,7 +3671,7 @@ type GetAgentRequest struct { func (x *GetAgentRequest) Reset() { *x = GetAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[23] + mi := &file_inventory_v1_agents_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3589,7 +3683,7 @@ func (x *GetAgentRequest) String() string { func (*GetAgentRequest) ProtoMessage() {} func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[23] + mi := &file_inventory_v1_agents_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3602,7 +3696,7 @@ func (x *GetAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentRequest.ProtoReflect.Descriptor instead. func (*GetAgentRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{23} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{24} } func (x *GetAgentRequest) GetAgentId() string { @@ -3635,6 +3729,7 @@ type GetAgentResponse struct { // *GetAgentResponse_NomadAgent // *GetAgentResponse_ValkeyExporter // *GetAgentResponse_RtaMongodbAgent + // *GetAgentResponse_OtelCollector Agent isGetAgentResponse_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -3642,7 +3737,7 @@ type GetAgentResponse struct { func (x *GetAgentResponse) Reset() { *x = GetAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[24] + mi := &file_inventory_v1_agents_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3654,7 +3749,7 @@ func (x *GetAgentResponse) String() string { func (*GetAgentResponse) ProtoMessage() {} func (x *GetAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[24] + mi := &file_inventory_v1_agents_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3667,7 +3762,7 @@ func (x *GetAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentResponse.ProtoReflect.Descriptor instead. func (*GetAgentResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{24} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{25} } func (x *GetAgentResponse) GetAgent() isGetAgentResponse_Agent { @@ -3848,6 +3943,15 @@ func (x *GetAgentResponse) GetRtaMongodbAgent() *RTAMongoDBAgent { return nil } +func (x *GetAgentResponse) GetOtelCollector() *OtelCollector { + if x != nil { + if x, ok := x.Agent.(*GetAgentResponse_OtelCollector); ok { + return x.OtelCollector + } + } + return nil +} + type isGetAgentResponse_Agent interface { isGetAgentResponse_Agent() } @@ -3928,6 +4032,10 @@ type GetAgentResponse_RtaMongodbAgent struct { RtaMongodbAgent *RTAMongoDBAgent `protobuf:"bytes,19,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type GetAgentResponse_OtelCollector struct { + OtelCollector *OtelCollector `protobuf:"bytes,20,opt,name=otel_collector,json=otelCollector,proto3,oneof"` +} + func (*GetAgentResponse_PmmAgent) isGetAgentResponse_Agent() {} func (*GetAgentResponse_Vmagent) isGetAgentResponse_Agent() {} @@ -3966,6 +4074,8 @@ func (*GetAgentResponse_ValkeyExporter) isGetAgentResponse_Agent() {} func (*GetAgentResponse_RtaMongodbAgent) isGetAgentResponse_Agent() {} +func (*GetAgentResponse_OtelCollector) isGetAgentResponse_Agent() {} + type GetAgentLogsRequest struct { state protoimpl.MessageState `protogen:"open.v1"` // Unique randomly generated instance identifier. @@ -3978,7 +4088,7 @@ type GetAgentLogsRequest struct { func (x *GetAgentLogsRequest) Reset() { *x = GetAgentLogsRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[25] + mi := &file_inventory_v1_agents_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3990,7 +4100,7 @@ func (x *GetAgentLogsRequest) String() string { func (*GetAgentLogsRequest) ProtoMessage() {} func (x *GetAgentLogsRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[25] + mi := &file_inventory_v1_agents_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4003,7 +4113,7 @@ func (x *GetAgentLogsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentLogsRequest.ProtoReflect.Descriptor instead. func (*GetAgentLogsRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{25} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{26} } func (x *GetAgentLogsRequest) GetAgentId() string { @@ -4030,7 +4140,7 @@ type GetAgentLogsResponse struct { func (x *GetAgentLogsResponse) Reset() { *x = GetAgentLogsResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[26] + mi := &file_inventory_v1_agents_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4042,7 +4152,7 @@ func (x *GetAgentLogsResponse) String() string { func (*GetAgentLogsResponse) ProtoMessage() {} func (x *GetAgentLogsResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[26] + mi := &file_inventory_v1_agents_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4055,7 +4165,7 @@ func (x *GetAgentLogsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAgentLogsResponse.ProtoReflect.Descriptor instead. func (*GetAgentLogsResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{26} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{27} } func (x *GetAgentLogsResponse) GetLogs() []string { @@ -4093,6 +4203,7 @@ type AddAgentRequest struct { // *AddAgentRequest_QanPostgresqlPgstatmonitorAgent // *AddAgentRequest_ValkeyExporter // *AddAgentRequest_RtaMongodbAgent + // *AddAgentRequest_OtelCollector Agent isAddAgentRequest_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -4100,7 +4211,7 @@ type AddAgentRequest struct { func (x *AddAgentRequest) Reset() { *x = AddAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[27] + mi := &file_inventory_v1_agents_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4112,7 +4223,7 @@ func (x *AddAgentRequest) String() string { func (*AddAgentRequest) ProtoMessage() {} func (x *AddAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[27] + mi := &file_inventory_v1_agents_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4125,7 +4236,7 @@ func (x *AddAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddAgentRequest.ProtoReflect.Descriptor instead. func (*AddAgentRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{27} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{28} } func (x *AddAgentRequest) GetAgent() isAddAgentRequest_Agent { @@ -4288,6 +4399,15 @@ func (x *AddAgentRequest) GetRtaMongodbAgent() *AddRTAMongoDBAgentParams { return nil } +func (x *AddAgentRequest) GetOtelCollector() *AddOtelCollectorParams { + if x != nil { + if x, ok := x.Agent.(*AddAgentRequest_OtelCollector); ok { + return x.OtelCollector + } + } + return nil +} + type isAddAgentRequest_Agent interface { isAddAgentRequest_Agent() } @@ -4360,6 +4480,10 @@ type AddAgentRequest_RtaMongodbAgent struct { RtaMongodbAgent *AddRTAMongoDBAgentParams `protobuf:"bytes,17,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type AddAgentRequest_OtelCollector struct { + OtelCollector *AddOtelCollectorParams `protobuf:"bytes,18,opt,name=otel_collector,json=otelCollector,proto3,oneof"` +} + func (*AddAgentRequest_PmmAgent) isAddAgentRequest_Agent() {} func (*AddAgentRequest_NodeExporter) isAddAgentRequest_Agent() {} @@ -4394,6 +4518,8 @@ func (*AddAgentRequest_ValkeyExporter) isAddAgentRequest_Agent() {} func (*AddAgentRequest_RtaMongodbAgent) isAddAgentRequest_Agent() {} +func (*AddAgentRequest_OtelCollector) isAddAgentRequest_Agent() {} + type AddAgentResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Agent: @@ -4415,6 +4541,7 @@ type AddAgentResponse struct { // *AddAgentResponse_QanPostgresqlPgstatmonitorAgent // *AddAgentResponse_ValkeyExporter // *AddAgentResponse_RtaMongodbAgent + // *AddAgentResponse_OtelCollector Agent isAddAgentResponse_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -4422,7 +4549,7 @@ type AddAgentResponse struct { func (x *AddAgentResponse) Reset() { *x = AddAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[28] + mi := &file_inventory_v1_agents_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4434,7 +4561,7 @@ func (x *AddAgentResponse) String() string { func (*AddAgentResponse) ProtoMessage() {} func (x *AddAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[28] + mi := &file_inventory_v1_agents_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4447,7 +4574,7 @@ func (x *AddAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddAgentResponse.ProtoReflect.Descriptor instead. func (*AddAgentResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{28} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{29} } func (x *AddAgentResponse) GetAgent() isAddAgentResponse_Agent { @@ -4610,10 +4737,19 @@ func (x *AddAgentResponse) GetRtaMongodbAgent() *RTAMongoDBAgent { return nil } -type isAddAgentResponse_Agent interface { - isAddAgentResponse_Agent() -} - +func (x *AddAgentResponse) GetOtelCollector() *OtelCollector { + if x != nil { + if x, ok := x.Agent.(*AddAgentResponse_OtelCollector); ok { + return x.OtelCollector + } + } + return nil +} + +type isAddAgentResponse_Agent interface { + isAddAgentResponse_Agent() +} + type AddAgentResponse_PmmAgent struct { PmmAgent *PMMAgent `protobuf:"bytes,1,opt,name=pmm_agent,json=pmmAgent,proto3,oneof"` } @@ -4682,6 +4818,10 @@ type AddAgentResponse_RtaMongodbAgent struct { RtaMongodbAgent *RTAMongoDBAgent `protobuf:"bytes,17,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type AddAgentResponse_OtelCollector struct { + OtelCollector *OtelCollector `protobuf:"bytes,18,opt,name=otel_collector,json=otelCollector,proto3,oneof"` +} + func (*AddAgentResponse_PmmAgent) isAddAgentResponse_Agent() {} func (*AddAgentResponse_NodeExporter) isAddAgentResponse_Agent() {} @@ -4716,6 +4856,8 @@ func (*AddAgentResponse_ValkeyExporter) isAddAgentResponse_Agent() {} func (*AddAgentResponse_RtaMongodbAgent) isAddAgentResponse_Agent() {} +func (*AddAgentResponse_OtelCollector) isAddAgentResponse_Agent() {} + type ChangeAgentRequest struct { state protoimpl.MessageState `protogen:"open.v1"` AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` @@ -4738,6 +4880,7 @@ type ChangeAgentRequest struct { // *ChangeAgentRequest_NomadAgent // *ChangeAgentRequest_ValkeyExporter // *ChangeAgentRequest_RtaMongodbAgent + // *ChangeAgentRequest_OtelCollector Agent isChangeAgentRequest_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -4745,7 +4888,7 @@ type ChangeAgentRequest struct { func (x *ChangeAgentRequest) Reset() { *x = ChangeAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[29] + mi := &file_inventory_v1_agents_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4757,7 +4900,7 @@ func (x *ChangeAgentRequest) String() string { func (*ChangeAgentRequest) ProtoMessage() {} func (x *ChangeAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[29] + mi := &file_inventory_v1_agents_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4770,7 +4913,7 @@ func (x *ChangeAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeAgentRequest.ProtoReflect.Descriptor instead. func (*ChangeAgentRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{29} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{30} } func (x *ChangeAgentRequest) GetAgentId() string { @@ -4940,6 +5083,15 @@ func (x *ChangeAgentRequest) GetRtaMongodbAgent() *ChangeRTAMongoDBAgentParams { return nil } +func (x *ChangeAgentRequest) GetOtelCollector() *ChangeOtelCollectorParams { + if x != nil { + if x, ok := x.Agent.(*ChangeAgentRequest_OtelCollector); ok { + return x.OtelCollector + } + } + return nil +} + type isChangeAgentRequest_Agent interface { isChangeAgentRequest_Agent() } @@ -5012,6 +5164,10 @@ type ChangeAgentRequest_RtaMongodbAgent struct { RtaMongodbAgent *ChangeRTAMongoDBAgentParams `protobuf:"bytes,18,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type ChangeAgentRequest_OtelCollector struct { + OtelCollector *ChangeOtelCollectorParams `protobuf:"bytes,19,opt,name=otel_collector,json=otelCollector,proto3,oneof"` +} + func (*ChangeAgentRequest_NodeExporter) isChangeAgentRequest_Agent() {} func (*ChangeAgentRequest_MysqldExporter) isChangeAgentRequest_Agent() {} @@ -5046,6 +5202,8 @@ func (*ChangeAgentRequest_ValkeyExporter) isChangeAgentRequest_Agent() {} func (*ChangeAgentRequest_RtaMongodbAgent) isChangeAgentRequest_Agent() {} +func (*ChangeAgentRequest_OtelCollector) isChangeAgentRequest_Agent() {} + type ChangeAgentResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // Types that are valid to be assigned to Agent: @@ -5067,6 +5225,7 @@ type ChangeAgentResponse struct { // *ChangeAgentResponse_NomadAgent // *ChangeAgentResponse_ValkeyExporter // *ChangeAgentResponse_RtaMongodbAgent + // *ChangeAgentResponse_OtelCollector Agent isChangeAgentResponse_Agent `protobuf_oneof:"agent"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -5074,7 +5233,7 @@ type ChangeAgentResponse struct { func (x *ChangeAgentResponse) Reset() { *x = ChangeAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[30] + mi := &file_inventory_v1_agents_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5086,7 +5245,7 @@ func (x *ChangeAgentResponse) String() string { func (*ChangeAgentResponse) ProtoMessage() {} func (x *ChangeAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[30] + mi := &file_inventory_v1_agents_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5099,7 +5258,7 @@ func (x *ChangeAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeAgentResponse.ProtoReflect.Descriptor instead. func (*ChangeAgentResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{30} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{31} } func (x *ChangeAgentResponse) GetAgent() isChangeAgentResponse_Agent { @@ -5262,6 +5421,15 @@ func (x *ChangeAgentResponse) GetRtaMongodbAgent() *RTAMongoDBAgent { return nil } +func (x *ChangeAgentResponse) GetOtelCollector() *OtelCollector { + if x != nil { + if x, ok := x.Agent.(*ChangeAgentResponse_OtelCollector); ok { + return x.OtelCollector + } + } + return nil +} + type isChangeAgentResponse_Agent interface { isChangeAgentResponse_Agent() } @@ -5334,6 +5502,10 @@ type ChangeAgentResponse_RtaMongodbAgent struct { RtaMongodbAgent *RTAMongoDBAgent `protobuf:"bytes,18,opt,name=rta_mongodb_agent,json=rtaMongodbAgent,proto3,oneof"` } +type ChangeAgentResponse_OtelCollector struct { + OtelCollector *OtelCollector `protobuf:"bytes,19,opt,name=otel_collector,json=otelCollector,proto3,oneof"` +} + func (*ChangeAgentResponse_NodeExporter) isChangeAgentResponse_Agent() {} func (*ChangeAgentResponse_MysqldExporter) isChangeAgentResponse_Agent() {} @@ -5368,6 +5540,8 @@ func (*ChangeAgentResponse_ValkeyExporter) isChangeAgentResponse_Agent() {} func (*ChangeAgentResponse_RtaMongodbAgent) isChangeAgentResponse_Agent() {} +func (*ChangeAgentResponse_OtelCollector) isChangeAgentResponse_Agent() {} + type AddPMMAgentParams struct { state protoimpl.MessageState `protogen:"open.v1"` // Node identifier where this instance runs. @@ -5380,7 +5554,7 @@ type AddPMMAgentParams struct { func (x *AddPMMAgentParams) Reset() { *x = AddPMMAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[31] + mi := &file_inventory_v1_agents_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5392,7 +5566,7 @@ func (x *AddPMMAgentParams) String() string { func (*AddPMMAgentParams) ProtoMessage() {} func (x *AddPMMAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[31] + mi := &file_inventory_v1_agents_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5405,7 +5579,7 @@ func (x *AddPMMAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddPMMAgentParams.ProtoReflect.Descriptor instead. func (*AddPMMAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{31} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{32} } func (x *AddPMMAgentParams) GetRunsOnNodeId() string { @@ -5442,7 +5616,7 @@ type AddNodeExporterParams struct { func (x *AddNodeExporterParams) Reset() { *x = AddNodeExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[32] + mi := &file_inventory_v1_agents_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5454,7 +5628,7 @@ func (x *AddNodeExporterParams) String() string { func (*AddNodeExporterParams) ProtoMessage() {} func (x *AddNodeExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[32] + mi := &file_inventory_v1_agents_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5467,7 +5641,7 @@ func (x *AddNodeExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddNodeExporterParams.ProtoReflect.Descriptor instead. func (*AddNodeExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{32} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{33} } func (x *AddNodeExporterParams) GetPmmAgentId() string { @@ -5534,7 +5708,7 @@ type ChangeNodeExporterParams struct { func (x *ChangeNodeExporterParams) Reset() { *x = ChangeNodeExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[33] + mi := &file_inventory_v1_agents_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5546,7 +5720,7 @@ func (x *ChangeNodeExporterParams) String() string { func (*ChangeNodeExporterParams) ProtoMessage() {} func (x *ChangeNodeExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[33] + mi := &file_inventory_v1_agents_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5559,7 +5733,7 @@ func (x *ChangeNodeExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeNodeExporterParams.ProtoReflect.Descriptor instead. func (*ChangeNodeExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{33} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{34} } func (x *ChangeNodeExporterParams) GetEnable() bool { @@ -5657,7 +5831,7 @@ type AddMySQLdExporterParams struct { func (x *AddMySQLdExporterParams) Reset() { *x = AddMySQLdExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[34] + mi := &file_inventory_v1_agents_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5669,7 +5843,7 @@ func (x *AddMySQLdExporterParams) String() string { func (*AddMySQLdExporterParams) ProtoMessage() {} func (x *AddMySQLdExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[34] + mi := &file_inventory_v1_agents_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5682,7 +5856,7 @@ func (x *AddMySQLdExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddMySQLdExporterParams.ProtoReflect.Descriptor instead. func (*AddMySQLdExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{34} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{35} } func (x *AddMySQLdExporterParams) GetPmmAgentId() string { @@ -5853,7 +6027,7 @@ type ChangeMySQLdExporterParams struct { func (x *ChangeMySQLdExporterParams) Reset() { *x = ChangeMySQLdExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[35] + mi := &file_inventory_v1_agents_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5865,7 +6039,7 @@ func (x *ChangeMySQLdExporterParams) String() string { func (*ChangeMySQLdExporterParams) ProtoMessage() {} func (x *ChangeMySQLdExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[35] + mi := &file_inventory_v1_agents_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5878,7 +6052,7 @@ func (x *ChangeMySQLdExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeMySQLdExporterParams.ProtoReflect.Descriptor instead. func (*ChangeMySQLdExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{35} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{36} } func (x *ChangeMySQLdExporterParams) GetEnable() bool { @@ -6056,7 +6230,7 @@ type AddMongoDBExporterParams struct { func (x *AddMongoDBExporterParams) Reset() { *x = AddMongoDBExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[36] + mi := &file_inventory_v1_agents_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6068,7 +6242,7 @@ func (x *AddMongoDBExporterParams) String() string { func (*AddMongoDBExporterParams) ProtoMessage() {} func (x *AddMongoDBExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[36] + mi := &file_inventory_v1_agents_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6081,7 +6255,7 @@ func (x *AddMongoDBExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddMongoDBExporterParams.ProtoReflect.Descriptor instead. func (*AddMongoDBExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{36} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{37} } func (x *AddMongoDBExporterParams) GetPmmAgentId() string { @@ -6288,7 +6462,7 @@ type ChangeMongoDBExporterParams struct { func (x *ChangeMongoDBExporterParams) Reset() { *x = ChangeMongoDBExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[37] + mi := &file_inventory_v1_agents_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6300,7 +6474,7 @@ func (x *ChangeMongoDBExporterParams) String() string { func (*ChangeMongoDBExporterParams) ProtoMessage() {} func (x *ChangeMongoDBExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[37] + mi := &file_inventory_v1_agents_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6313,7 +6487,7 @@ func (x *ChangeMongoDBExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeMongoDBExporterParams.ProtoReflect.Descriptor instead. func (*ChangeMongoDBExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{37} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{38} } func (x *ChangeMongoDBExporterParams) GetEnable() bool { @@ -6507,7 +6681,7 @@ type AddPostgresExporterParams struct { func (x *AddPostgresExporterParams) Reset() { *x = AddPostgresExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[38] + mi := &file_inventory_v1_agents_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6519,7 +6693,7 @@ func (x *AddPostgresExporterParams) String() string { func (*AddPostgresExporterParams) ProtoMessage() {} func (x *AddPostgresExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[38] + mi := &file_inventory_v1_agents_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6532,7 +6706,7 @@ func (x *AddPostgresExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddPostgresExporterParams.ProtoReflect.Descriptor instead. func (*AddPostgresExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{38} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{39} } func (x *AddPostgresExporterParams) GetPmmAgentId() string { @@ -6705,7 +6879,7 @@ type ChangePostgresExporterParams struct { func (x *ChangePostgresExporterParams) Reset() { *x = ChangePostgresExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[39] + mi := &file_inventory_v1_agents_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6717,7 +6891,7 @@ func (x *ChangePostgresExporterParams) String() string { func (*ChangePostgresExporterParams) ProtoMessage() {} func (x *ChangePostgresExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[39] + mi := &file_inventory_v1_agents_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6730,7 +6904,7 @@ func (x *ChangePostgresExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangePostgresExporterParams.ProtoReflect.Descriptor instead. func (*ChangePostgresExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{39} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{40} } func (x *ChangePostgresExporterParams) GetEnable() bool { @@ -6893,7 +7067,7 @@ type AddProxySQLExporterParams struct { func (x *AddProxySQLExporterParams) Reset() { *x = AddProxySQLExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[40] + mi := &file_inventory_v1_agents_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6905,7 +7079,7 @@ func (x *AddProxySQLExporterParams) String() string { func (*AddProxySQLExporterParams) ProtoMessage() {} func (x *AddProxySQLExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[40] + mi := &file_inventory_v1_agents_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6918,7 +7092,7 @@ func (x *AddProxySQLExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddProxySQLExporterParams.ProtoReflect.Descriptor instead. func (*AddProxySQLExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{40} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{41} } func (x *AddProxySQLExporterParams) GetPmmAgentId() string { @@ -7044,7 +7218,7 @@ type ChangeProxySQLExporterParams struct { func (x *ChangeProxySQLExporterParams) Reset() { *x = ChangeProxySQLExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[41] + mi := &file_inventory_v1_agents_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7056,7 +7230,7 @@ func (x *ChangeProxySQLExporterParams) String() string { func (*ChangeProxySQLExporterParams) ProtoMessage() {} func (x *ChangeProxySQLExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[41] + mi := &file_inventory_v1_agents_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7069,7 +7243,7 @@ func (x *ChangeProxySQLExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeProxySQLExporterParams.ProtoReflect.Descriptor instead. func (*ChangeProxySQLExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{41} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{42} } func (x *ChangeProxySQLExporterParams) GetEnable() bool { @@ -7196,7 +7370,7 @@ type AddQANMySQLPerfSchemaAgentParams struct { func (x *AddQANMySQLPerfSchemaAgentParams) Reset() { *x = AddQANMySQLPerfSchemaAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[42] + mi := &file_inventory_v1_agents_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7208,7 +7382,7 @@ func (x *AddQANMySQLPerfSchemaAgentParams) String() string { func (*AddQANMySQLPerfSchemaAgentParams) ProtoMessage() {} func (x *AddQANMySQLPerfSchemaAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[42] + mi := &file_inventory_v1_agents_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7221,7 +7395,7 @@ func (x *AddQANMySQLPerfSchemaAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddQANMySQLPerfSchemaAgentParams.ProtoReflect.Descriptor instead. func (*AddQANMySQLPerfSchemaAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{42} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{43} } func (x *AddQANMySQLPerfSchemaAgentParams) GetPmmAgentId() string { @@ -7376,7 +7550,7 @@ type ChangeQANMySQLPerfSchemaAgentParams struct { func (x *ChangeQANMySQLPerfSchemaAgentParams) Reset() { *x = ChangeQANMySQLPerfSchemaAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[43] + mi := &file_inventory_v1_agents_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7388,7 +7562,7 @@ func (x *ChangeQANMySQLPerfSchemaAgentParams) String() string { func (*ChangeQANMySQLPerfSchemaAgentParams) ProtoMessage() {} func (x *ChangeQANMySQLPerfSchemaAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[43] + mi := &file_inventory_v1_agents_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7401,7 +7575,7 @@ func (x *ChangeQANMySQLPerfSchemaAgentParams) ProtoReflect() protoreflect.Messag // Deprecated: Use ChangeQANMySQLPerfSchemaAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANMySQLPerfSchemaAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{43} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{44} } func (x *ChangeQANMySQLPerfSchemaAgentParams) GetEnable() bool { @@ -7559,7 +7733,7 @@ type AddQANMySQLSlowlogAgentParams struct { func (x *AddQANMySQLSlowlogAgentParams) Reset() { *x = AddQANMySQLSlowlogAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[44] + mi := &file_inventory_v1_agents_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7571,7 +7745,7 @@ func (x *AddQANMySQLSlowlogAgentParams) String() string { func (*AddQANMySQLSlowlogAgentParams) ProtoMessage() {} func (x *AddQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[44] + mi := &file_inventory_v1_agents_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7584,7 +7758,7 @@ func (x *AddQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddQANMySQLSlowlogAgentParams.ProtoReflect.Descriptor instead. func (*AddQANMySQLSlowlogAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{44} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{45} } func (x *AddQANMySQLSlowlogAgentParams) GetPmmAgentId() string { @@ -7748,7 +7922,7 @@ type ChangeQANMySQLSlowlogAgentParams struct { func (x *ChangeQANMySQLSlowlogAgentParams) Reset() { *x = ChangeQANMySQLSlowlogAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[45] + mi := &file_inventory_v1_agents_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7760,7 +7934,7 @@ func (x *ChangeQANMySQLSlowlogAgentParams) String() string { func (*ChangeQANMySQLSlowlogAgentParams) ProtoMessage() {} func (x *ChangeQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[45] + mi := &file_inventory_v1_agents_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7773,7 +7947,7 @@ func (x *ChangeQANMySQLSlowlogAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeQANMySQLSlowlogAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANMySQLSlowlogAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{45} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{46} } func (x *ChangeQANMySQLSlowlogAgentParams) GetEnable() bool { @@ -7935,7 +8109,7 @@ type AddQANMongoDBProfilerAgentParams struct { func (x *AddQANMongoDBProfilerAgentParams) Reset() { *x = AddQANMongoDBProfilerAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[46] + mi := &file_inventory_v1_agents_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7947,7 +8121,7 @@ func (x *AddQANMongoDBProfilerAgentParams) String() string { func (*AddQANMongoDBProfilerAgentParams) ProtoMessage() {} func (x *AddQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[46] + mi := &file_inventory_v1_agents_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7960,7 +8134,7 @@ func (x *AddQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddQANMongoDBProfilerAgentParams.ProtoReflect.Descriptor instead. func (*AddQANMongoDBProfilerAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{46} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{47} } func (x *AddQANMongoDBProfilerAgentParams) GetPmmAgentId() string { @@ -8106,7 +8280,7 @@ type ChangeQANMongoDBProfilerAgentParams struct { func (x *ChangeQANMongoDBProfilerAgentParams) Reset() { *x = ChangeQANMongoDBProfilerAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[47] + mi := &file_inventory_v1_agents_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8118,7 +8292,7 @@ func (x *ChangeQANMongoDBProfilerAgentParams) String() string { func (*ChangeQANMongoDBProfilerAgentParams) ProtoMessage() {} func (x *ChangeQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[47] + mi := &file_inventory_v1_agents_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8131,7 +8305,7 @@ func (x *ChangeQANMongoDBProfilerAgentParams) ProtoReflect() protoreflect.Messag // Deprecated: Use ChangeQANMongoDBProfilerAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANMongoDBProfilerAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{47} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{48} } func (x *ChangeQANMongoDBProfilerAgentParams) GetEnable() bool { @@ -8279,7 +8453,7 @@ type AddQANMongoDBMongologAgentParams struct { func (x *AddQANMongoDBMongologAgentParams) Reset() { *x = AddQANMongoDBMongologAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[48] + mi := &file_inventory_v1_agents_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8291,7 +8465,7 @@ func (x *AddQANMongoDBMongologAgentParams) String() string { func (*AddQANMongoDBMongologAgentParams) ProtoMessage() {} func (x *AddQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[48] + mi := &file_inventory_v1_agents_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8304,7 +8478,7 @@ func (x *AddQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddQANMongoDBMongologAgentParams.ProtoReflect.Descriptor instead. func (*AddQANMongoDBMongologAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{48} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{49} } func (x *AddQANMongoDBMongologAgentParams) GetPmmAgentId() string { @@ -8450,7 +8624,7 @@ type ChangeQANMongoDBMongologAgentParams struct { func (x *ChangeQANMongoDBMongologAgentParams) Reset() { *x = ChangeQANMongoDBMongologAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[49] + mi := &file_inventory_v1_agents_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8462,7 +8636,7 @@ func (x *ChangeQANMongoDBMongologAgentParams) String() string { func (*ChangeQANMongoDBMongologAgentParams) ProtoMessage() {} func (x *ChangeQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[49] + mi := &file_inventory_v1_agents_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8475,7 +8649,7 @@ func (x *ChangeQANMongoDBMongologAgentParams) ProtoReflect() protoreflect.Messag // Deprecated: Use ChangeQANMongoDBMongologAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANMongoDBMongologAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{49} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{50} } func (x *ChangeQANMongoDBMongologAgentParams) GetEnable() bool { @@ -8619,7 +8793,7 @@ type AddQANPostgreSQLPgStatementsAgentParams struct { func (x *AddQANPostgreSQLPgStatementsAgentParams) Reset() { *x = AddQANPostgreSQLPgStatementsAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[50] + mi := &file_inventory_v1_agents_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8631,7 +8805,7 @@ func (x *AddQANPostgreSQLPgStatementsAgentParams) String() string { func (*AddQANPostgreSQLPgStatementsAgentParams) ProtoMessage() {} func (x *AddQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[50] + mi := &file_inventory_v1_agents_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8644,7 +8818,7 @@ func (x *AddQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect.Me // Deprecated: Use AddQANPostgreSQLPgStatementsAgentParams.ProtoReflect.Descriptor instead. func (*AddQANPostgreSQLPgStatementsAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{50} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{51} } func (x *AddQANPostgreSQLPgStatementsAgentParams) GetPmmAgentId() string { @@ -8781,7 +8955,7 @@ type ChangeQANPostgreSQLPgStatementsAgentParams struct { func (x *ChangeQANPostgreSQLPgStatementsAgentParams) Reset() { *x = ChangeQANPostgreSQLPgStatementsAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[51] + mi := &file_inventory_v1_agents_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8793,7 +8967,7 @@ func (x *ChangeQANPostgreSQLPgStatementsAgentParams) String() string { func (*ChangeQANPostgreSQLPgStatementsAgentParams) ProtoMessage() {} func (x *ChangeQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[51] + mi := &file_inventory_v1_agents_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8806,7 +8980,7 @@ func (x *ChangeQANPostgreSQLPgStatementsAgentParams) ProtoReflect() protoreflect // Deprecated: Use ChangeQANPostgreSQLPgStatementsAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANPostgreSQLPgStatementsAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{51} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{52} } func (x *ChangeQANPostgreSQLPgStatementsAgentParams) GetEnable() bool { @@ -8945,7 +9119,7 @@ type AddQANPostgreSQLPgStatMonitorAgentParams struct { func (x *AddQANPostgreSQLPgStatMonitorAgentParams) Reset() { *x = AddQANPostgreSQLPgStatMonitorAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[52] + mi := &file_inventory_v1_agents_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -8957,7 +9131,7 @@ func (x *AddQANPostgreSQLPgStatMonitorAgentParams) String() string { func (*AddQANPostgreSQLPgStatMonitorAgentParams) ProtoMessage() {} func (x *AddQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[52] + mi := &file_inventory_v1_agents_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -8970,7 +9144,7 @@ func (x *AddQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflect.M // Deprecated: Use AddQANPostgreSQLPgStatMonitorAgentParams.ProtoReflect.Descriptor instead. func (*AddQANPostgreSQLPgStatMonitorAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{52} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{53} } func (x *AddQANPostgreSQLPgStatMonitorAgentParams) GetPmmAgentId() string { @@ -9116,7 +9290,7 @@ type ChangeQANPostgreSQLPgStatMonitorAgentParams struct { func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) Reset() { *x = ChangeQANPostgreSQLPgStatMonitorAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[53] + mi := &file_inventory_v1_agents_proto_msgTypes[54] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9128,7 +9302,7 @@ func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) String() string { func (*ChangeQANPostgreSQLPgStatMonitorAgentParams) ProtoMessage() {} func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[53] + mi := &file_inventory_v1_agents_proto_msgTypes[54] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9141,7 +9315,7 @@ func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) ProtoReflect() protoreflec // Deprecated: Use ChangeQANPostgreSQLPgStatMonitorAgentParams.ProtoReflect.Descriptor instead. func (*ChangeQANPostgreSQLPgStatMonitorAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{53} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{54} } func (x *ChangeQANPostgreSQLPgStatMonitorAgentParams) GetEnable() bool { @@ -9277,7 +9451,7 @@ type AddRDSExporterParams struct { func (x *AddRDSExporterParams) Reset() { *x = AddRDSExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[54] + mi := &file_inventory_v1_agents_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9289,7 +9463,7 @@ func (x *AddRDSExporterParams) String() string { func (*AddRDSExporterParams) ProtoMessage() {} func (x *AddRDSExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[54] + mi := &file_inventory_v1_agents_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9302,7 +9476,7 @@ func (x *AddRDSExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRDSExporterParams.ProtoReflect.Descriptor instead. func (*AddRDSExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{54} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{55} } func (x *AddRDSExporterParams) GetPmmAgentId() string { @@ -9401,7 +9575,7 @@ type ChangeRDSExporterParams struct { func (x *ChangeRDSExporterParams) Reset() { *x = ChangeRDSExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[55] + mi := &file_inventory_v1_agents_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9413,7 +9587,7 @@ func (x *ChangeRDSExporterParams) String() string { func (*ChangeRDSExporterParams) ProtoMessage() {} func (x *ChangeRDSExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[55] + mi := &file_inventory_v1_agents_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9426,7 +9600,7 @@ func (x *ChangeRDSExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeRDSExporterParams.ProtoReflect.Descriptor instead. func (*ChangeRDSExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{55} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{56} } func (x *ChangeRDSExporterParams) GetEnable() bool { @@ -9520,7 +9694,7 @@ type AddExternalExporterParams struct { func (x *AddExternalExporterParams) Reset() { *x = AddExternalExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[56] + mi := &file_inventory_v1_agents_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9532,7 +9706,7 @@ func (x *AddExternalExporterParams) String() string { func (*AddExternalExporterParams) ProtoMessage() {} func (x *AddExternalExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[56] + mi := &file_inventory_v1_agents_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9545,7 +9719,7 @@ func (x *AddExternalExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddExternalExporterParams.ProtoReflect.Descriptor instead. func (*AddExternalExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{56} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{57} } func (x *AddExternalExporterParams) GetRunsOnNodeId() string { @@ -9642,7 +9816,7 @@ type ChangeExternalExporterParams struct { func (x *ChangeExternalExporterParams) Reset() { *x = ChangeExternalExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[57] + mi := &file_inventory_v1_agents_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9654,7 +9828,7 @@ func (x *ChangeExternalExporterParams) String() string { func (*ChangeExternalExporterParams) ProtoMessage() {} func (x *ChangeExternalExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[57] + mi := &file_inventory_v1_agents_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9667,7 +9841,7 @@ func (x *ChangeExternalExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeExternalExporterParams.ProtoReflect.Descriptor instead. func (*ChangeExternalExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{57} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{58} } func (x *ChangeExternalExporterParams) GetEnable() bool { @@ -9758,7 +9932,7 @@ type AddAzureDatabaseExporterParams struct { func (x *AddAzureDatabaseExporterParams) Reset() { *x = AddAzureDatabaseExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[58] + mi := &file_inventory_v1_agents_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9770,7 +9944,7 @@ func (x *AddAzureDatabaseExporterParams) String() string { func (*AddAzureDatabaseExporterParams) ProtoMessage() {} func (x *AddAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[58] + mi := &file_inventory_v1_agents_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9783,7 +9957,7 @@ func (x *AddAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddAzureDatabaseExporterParams.ProtoReflect.Descriptor instead. func (*AddAzureDatabaseExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{58} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{59} } func (x *AddAzureDatabaseExporterParams) GetPmmAgentId() string { @@ -9898,7 +10072,7 @@ type ChangeAzureDatabaseExporterParams struct { func (x *ChangeAzureDatabaseExporterParams) Reset() { *x = ChangeAzureDatabaseExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[59] + mi := &file_inventory_v1_agents_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -9910,7 +10084,7 @@ func (x *ChangeAzureDatabaseExporterParams) String() string { func (*ChangeAzureDatabaseExporterParams) ProtoMessage() {} func (x *ChangeAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[59] + mi := &file_inventory_v1_agents_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -9923,7 +10097,7 @@ func (x *ChangeAzureDatabaseExporterParams) ProtoReflect() protoreflect.Message // Deprecated: Use ChangeAzureDatabaseExporterParams.ProtoReflect.Descriptor instead. func (*ChangeAzureDatabaseExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{59} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{60} } func (x *ChangeAzureDatabaseExporterParams) GetEnable() bool { @@ -10006,7 +10180,7 @@ type ChangeNomadAgentParams struct { func (x *ChangeNomadAgentParams) Reset() { *x = ChangeNomadAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[60] + mi := &file_inventory_v1_agents_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10018,7 +10192,7 @@ func (x *ChangeNomadAgentParams) String() string { func (*ChangeNomadAgentParams) ProtoMessage() {} func (x *ChangeNomadAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[60] + mi := &file_inventory_v1_agents_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10031,7 +10205,7 @@ func (x *ChangeNomadAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeNomadAgentParams.ProtoReflect.Descriptor instead. func (*ChangeNomadAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{60} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{61} } func (x *ChangeNomadAgentParams) GetEnable() bool { @@ -10081,7 +10255,7 @@ type AddValkeyExporterParams struct { func (x *AddValkeyExporterParams) Reset() { *x = AddValkeyExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[61] + mi := &file_inventory_v1_agents_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10093,7 +10267,7 @@ func (x *AddValkeyExporterParams) String() string { func (*AddValkeyExporterParams) ProtoMessage() {} func (x *AddValkeyExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[61] + mi := &file_inventory_v1_agents_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10106,7 +10280,7 @@ func (x *AddValkeyExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddValkeyExporterParams.ProtoReflect.Descriptor instead. func (*AddValkeyExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{61} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{62} } func (x *AddValkeyExporterParams) GetPmmAgentId() string { @@ -10259,7 +10433,7 @@ type ChangeValkeyExporterParams struct { func (x *ChangeValkeyExporterParams) Reset() { *x = ChangeValkeyExporterParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[62] + mi := &file_inventory_v1_agents_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10271,7 +10445,7 @@ func (x *ChangeValkeyExporterParams) String() string { func (*ChangeValkeyExporterParams) ProtoMessage() {} func (x *ChangeValkeyExporterParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[62] + mi := &file_inventory_v1_agents_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10284,7 +10458,7 @@ func (x *ChangeValkeyExporterParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeValkeyExporterParams.ProtoReflect.Descriptor instead. func (*ChangeValkeyExporterParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{62} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{63} } func (x *ChangeValkeyExporterParams) GetEnable() bool { @@ -10431,7 +10605,7 @@ type AddRTAMongoDBAgentParams struct { func (x *AddRTAMongoDBAgentParams) Reset() { *x = AddRTAMongoDBAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[63] + mi := &file_inventory_v1_agents_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10443,7 +10617,7 @@ func (x *AddRTAMongoDBAgentParams) String() string { func (*AddRTAMongoDBAgentParams) ProtoMessage() {} func (x *AddRTAMongoDBAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[63] + mi := &file_inventory_v1_agents_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10456,7 +10630,7 @@ func (x *AddRTAMongoDBAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use AddRTAMongoDBAgentParams.ProtoReflect.Descriptor instead. func (*AddRTAMongoDBAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{63} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{64} } func (x *AddRTAMongoDBAgentParams) GetPmmAgentId() string { @@ -10557,6 +10731,200 @@ func (x *AddRTAMongoDBAgentParams) GetRtaOptions() *RTAOptions { return nil } +// LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing). +type LogSource struct { + state protoimpl.MessageState `protogen:"open.v1"` + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + Preset string `protobuf:"bytes,2,opt,name=preset,proto3" json:"preset,omitempty"` // Preset name from log_parser_presets table, or "raw" for no operators. + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LogSource) Reset() { + *x = LogSource{} + mi := &file_inventory_v1_agents_proto_msgTypes[65] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogSource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogSource) ProtoMessage() {} + +func (x *LogSource) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[65] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogSource.ProtoReflect.Descriptor instead. +func (*LogSource) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{65} +} + +func (x *LogSource) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *LogSource) GetPreset() string { + if x != nil { + return x.Preset + } + return "" +} + +type AddOtelCollectorParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + PmmAgentId string `protobuf:"bytes,1,opt,name=pmm_agent_id,json=pmmAgentId,proto3" json:"pmm_agent_id,omitempty"` + CustomLabels map[string]string `protobuf:"bytes,2,rep,name=custom_labels,json=customLabels,proto3" json:"custom_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + LogFilePaths []string `protobuf:"bytes,3,rep,name=log_file_paths,json=logFilePaths,proto3" json:"log_file_paths,omitempty"` // Deprecated: use log_sources for per-path preset. If log_sources is empty, these are used with preset "raw". + LogSources []*LogSource `protobuf:"bytes,4,rep,name=log_sources,json=logSources,proto3" json:"log_sources,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddOtelCollectorParams) Reset() { + *x = AddOtelCollectorParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[66] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddOtelCollectorParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddOtelCollectorParams) ProtoMessage() {} + +func (x *AddOtelCollectorParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[66] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddOtelCollectorParams.ProtoReflect.Descriptor instead. +func (*AddOtelCollectorParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{66} +} + +func (x *AddOtelCollectorParams) GetPmmAgentId() string { + if x != nil { + return x.PmmAgentId + } + return "" +} + +func (x *AddOtelCollectorParams) GetCustomLabels() map[string]string { + if x != nil { + return x.CustomLabels + } + return nil +} + +func (x *AddOtelCollectorParams) GetLogFilePaths() []string { + if x != nil { + return x.LogFilePaths + } + return nil +} + +func (x *AddOtelCollectorParams) GetLogSources() []*LogSource { + if x != nil { + return x.LogSources + } + return nil +} + +// ChangeOtelCollectorParams patches the single otel_collector agent per pmm-agent (merge_labels must not use keys log_sources or log_file_paths). +type ChangeOtelCollectorParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Enable this Agent. Agents are enabled by default when they get added. + Enable *bool `protobuf:"varint,1,opt,name=enable,proto3,oneof" json:"enable,omitempty"` + // Keys to merge into custom labels (overwrite per key). Reserved keys log_sources and log_file_paths are rejected. + MergeLabels map[string]string `protobuf:"bytes,2,rep,name=merge_labels,json=mergeLabels,proto3" json:"merge_labels,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Append or update log sources; same path appears twice — last preset wins. + AddLogSources []*LogSource `protobuf:"bytes,3,rep,name=add_log_sources,json=addLogSources,proto3" json:"add_log_sources,omitempty"` + // If true, remove legacy log_file_paths label when present. + RemoveLegacyLogFilePaths bool `protobuf:"varint,4,opt,name=remove_legacy_log_file_paths,json=removeLegacyLogFilePaths,proto3" json:"remove_legacy_log_file_paths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeOtelCollectorParams) Reset() { + *x = ChangeOtelCollectorParams{} + mi := &file_inventory_v1_agents_proto_msgTypes[67] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeOtelCollectorParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeOtelCollectorParams) ProtoMessage() {} + +func (x *ChangeOtelCollectorParams) ProtoReflect() protoreflect.Message { + mi := &file_inventory_v1_agents_proto_msgTypes[67] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeOtelCollectorParams.ProtoReflect.Descriptor instead. +func (*ChangeOtelCollectorParams) Descriptor() ([]byte, []int) { + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{67} +} + +func (x *ChangeOtelCollectorParams) GetEnable() bool { + if x != nil && x.Enable != nil { + return *x.Enable + } + return false +} + +func (x *ChangeOtelCollectorParams) GetMergeLabels() map[string]string { + if x != nil { + return x.MergeLabels + } + return nil +} + +func (x *ChangeOtelCollectorParams) GetAddLogSources() []*LogSource { + if x != nil { + return x.AddLogSources + } + return nil +} + +func (x *ChangeOtelCollectorParams) GetRemoveLegacyLogFilePaths() bool { + if x != nil { + return x.RemoveLegacyLogFilePaths + } + return false +} + type ChangeRTAMongoDBAgentParams struct { state protoimpl.MessageState `protogen:"open.v1"` // Enable this Agent. Agents are enabled by default when they get added. @@ -10589,7 +10957,7 @@ type ChangeRTAMongoDBAgentParams struct { func (x *ChangeRTAMongoDBAgentParams) Reset() { *x = ChangeRTAMongoDBAgentParams{} - mi := &file_inventory_v1_agents_proto_msgTypes[64] + mi := &file_inventory_v1_agents_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10601,7 +10969,7 @@ func (x *ChangeRTAMongoDBAgentParams) String() string { func (*ChangeRTAMongoDBAgentParams) ProtoMessage() {} func (x *ChangeRTAMongoDBAgentParams) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[64] + mi := &file_inventory_v1_agents_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10614,7 +10982,7 @@ func (x *ChangeRTAMongoDBAgentParams) ProtoReflect() protoreflect.Message { // Deprecated: Use ChangeRTAMongoDBAgentParams.ProtoReflect.Descriptor instead. func (*ChangeRTAMongoDBAgentParams) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{64} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{68} } func (x *ChangeRTAMongoDBAgentParams) GetEnable() bool { @@ -10712,7 +11080,7 @@ type RemoveAgentRequest struct { func (x *RemoveAgentRequest) Reset() { *x = RemoveAgentRequest{} - mi := &file_inventory_v1_agents_proto_msgTypes[65] + mi := &file_inventory_v1_agents_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10724,7 +11092,7 @@ func (x *RemoveAgentRequest) String() string { func (*RemoveAgentRequest) ProtoMessage() {} func (x *RemoveAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[65] + mi := &file_inventory_v1_agents_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10737,7 +11105,7 @@ func (x *RemoveAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveAgentRequest.ProtoReflect.Descriptor instead. func (*RemoveAgentRequest) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{65} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{69} } func (x *RemoveAgentRequest) GetAgentId() string { @@ -10762,7 +11130,7 @@ type RemoveAgentResponse struct { func (x *RemoveAgentResponse) Reset() { *x = RemoveAgentResponse{} - mi := &file_inventory_v1_agents_proto_msgTypes[66] + mi := &file_inventory_v1_agents_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -10774,7 +11142,7 @@ func (x *RemoveAgentResponse) String() string { func (*RemoveAgentResponse) ProtoMessage() {} func (x *RemoveAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_inventory_v1_agents_proto_msgTypes[66] + mi := &file_inventory_v1_agents_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -10787,7 +11155,7 @@ func (x *RemoveAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveAgentResponse.ProtoReflect.Descriptor instead. func (*RemoveAgentResponse) Descriptor() ([]byte, []int) { - return file_inventory_v1_agents_proto_rawDescGZIP(), []int{66} + return file_inventory_v1_agents_proto_rawDescGZIP(), []int{70} } var File_inventory_v1_agents_proto protoreflect.FileDescriptor @@ -10824,7 +11192,19 @@ const file_inventory_v1_agents_proto_rawDesc = "" + " \x01(\x0e2\x19.inventory.v1.AgentStatusR\x06status\x12*\n" + "\x11process_exec_path\x18\v \x01(\tR\x0fprocessExecPath\x12\x1f\n" + "\vlisten_port\x18\f \x01(\rR\n" + - "listenPortJ\x04\b\x04\x10\x05\"\x89\x05\n" + + "listenPortJ\x04\b\x04\x10\x05\"\xdc\x02\n" + + "\rOtelCollector\x12\x19\n" + + "\bagent_id\x18\x01 \x01(\tR\aagentId\x12 \n" + + "\fpmm_agent_id\x18\x02 \x01(\tR\n" + + "pmmAgentId\x12\x1a\n" + + "\bdisabled\x18\x03 \x01(\bR\bdisabled\x12R\n" + + "\rcustom_labels\x18\x04 \x03(\v2-.inventory.v1.OtelCollector.CustomLabelsEntryR\fcustomLabels\x121\n" + + "\x06status\x18\n" + + " \x01(\x0e2\x19.inventory.v1.AgentStatusR\x06status\x12*\n" + + "\x11process_exec_path\x18\v \x01(\tR\x0fprocessExecPath\x1a?\n" + + "\x11CustomLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x89\x05\n" + "\fNodeExporter\x12\x19\n" + "\bagent_id\x18\x01 \x01(\tR\aagentId\x12 \n" + "\fpmm_agent_id\x18\x02 \x01(\tR\n" + @@ -11217,7 +11597,7 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\n" + "service_id\x18\x03 \x01(\tR\tserviceId\x126\n" + "\n" + - "agent_type\x18\x04 \x01(\x0e2\x17.inventory.v1.AgentTypeR\tagentType\"\x98\f\n" + + "agent_type\x18\x04 \x01(\x0e2\x17.inventory.v1.AgentTypeR\tagentType\"\xdc\f\n" + "\x12ListAgentsResponse\x123\n" + "\tpmm_agent\x18\x01 \x03(\v2\x16.inventory.v1.PMMAgentR\bpmmAgent\x120\n" + "\bvm_agent\x18\x02 \x03(\v2\x15.inventory.v1.VMAgentR\avmAgent\x12?\n" + @@ -11239,9 +11619,10 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\vnomad_agent\x18\x10 \x03(\v2\x18.inventory.v1.NomadAgentR\n" + "nomadAgent\x12E\n" + "\x0fvalkey_exporter\x18\x11 \x03(\v2\x1c.inventory.v1.ValkeyExporterR\x0evalkeyExporter\x12I\n" + - "\x11rta_mongodb_agent\x18\x13 \x03(\v2\x1d.inventory.v1.RTAMongoDBAgentR\x0frtaMongodbAgent\"5\n" + + "\x11rta_mongodb_agent\x18\x13 \x03(\v2\x1d.inventory.v1.RTAMongoDBAgentR\x0frtaMongodbAgent\x12B\n" + + "\x0eotel_collector\x18\x14 \x03(\v2\x1b.inventory.v1.OtelCollectorR\rotelCollector\"5\n" + "\x0fGetAgentRequest\x12\"\n" + - "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10$R\aagentId\"\xc4\f\n" + + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10$R\aagentId\"\x8a\r\n" + "\x10GetAgentResponse\x125\n" + "\tpmm_agent\x18\x01 \x01(\v2\x16.inventory.v1.PMMAgentH\x00R\bpmmAgent\x121\n" + "\avmagent\x18\x02 \x01(\v2\x15.inventory.v1.VMAgentH\x00R\avmagent\x12A\n" + @@ -11263,14 +11644,15 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\vnomad_agent\x18\x10 \x01(\v2\x18.inventory.v1.NomadAgentH\x00R\n" + "nomadAgent\x12G\n" + "\x0fvalkey_exporter\x18\x11 \x01(\v2\x1c.inventory.v1.ValkeyExporterH\x00R\x0evalkeyExporter\x12K\n" + - "\x11rta_mongodb_agent\x18\x13 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgentB\a\n" + + "\x11rta_mongodb_agent\x18\x13 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgent\x12D\n" + + "\x0eotel_collector\x18\x14 \x01(\v2\x1b.inventory.v1.OtelCollectorH\x00R\rotelCollectorB\a\n" + "\x05agent\"O\n" + "\x13GetAgentLogsRequest\x12\"\n" + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10$R\aagentId\x12\x14\n" + "\x05limit\x18\x02 \x01(\rR\x05limit\"j\n" + "\x14GetAgentLogsResponse\x12\x12\n" + "\x04logs\x18\x01 \x03(\tR\x04logs\x12>\n" + - "\x1cagent_config_log_lines_count\x18\x02 \x01(\rR\x18agentConfigLogLinesCount\"\xee\f\n" + + "\x1cagent_config_log_lines_count\x18\x02 \x01(\rR\x18agentConfigLogLinesCount\"\xbd\r\n" + "\x0fAddAgentRequest\x12>\n" + "\tpmm_agent\x18\x01 \x01(\v2\x1f.inventory.v1.AddPMMAgentParamsH\x00R\bpmmAgent\x12J\n" + "\rnode_exporter\x18\x02 \x01(\v2#.inventory.v1.AddNodeExporterParamsH\x00R\fnodeExporter\x12P\n" + @@ -11289,8 +11671,9 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "!qan_postgresql_pgstatements_agent\x18\r \x01(\v25.inventory.v1.AddQANPostgreSQLPgStatementsAgentParamsH\x00R\x1eqanPostgresqlPgstatementsAgent\x12\x85\x01\n" + "\"qan_postgresql_pgstatmonitor_agent\x18\x0e \x01(\v26.inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParamsH\x00R\x1fqanPostgresqlPgstatmonitorAgent\x12P\n" + "\x0fvalkey_exporter\x18\x0f \x01(\v2%.inventory.v1.AddValkeyExporterParamsH\x00R\x0evalkeyExporter\x12T\n" + - "\x11rta_mongodb_agent\x18\x11 \x01(\v2&.inventory.v1.AddRTAMongoDBAgentParamsH\x00R\x0frtaMongodbAgentB\a\n" + - "\x05agent\"\xd4\v\n" + + "\x11rta_mongodb_agent\x18\x11 \x01(\v2&.inventory.v1.AddRTAMongoDBAgentParamsH\x00R\x0frtaMongodbAgent\x12M\n" + + "\x0eotel_collector\x18\x12 \x01(\v2$.inventory.v1.AddOtelCollectorParamsH\x00R\rotelCollectorB\a\n" + + "\x05agent\"\x9a\f\n" + "\x10AddAgentResponse\x125\n" + "\tpmm_agent\x18\x01 \x01(\v2\x16.inventory.v1.PMMAgentH\x00R\bpmmAgent\x12A\n" + "\rnode_exporter\x18\x02 \x01(\v2\x1a.inventory.v1.NodeExporterH\x00R\fnodeExporter\x12G\n" + @@ -11309,8 +11692,9 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "!qan_postgresql_pgstatements_agent\x18\r \x01(\v2,.inventory.v1.QANPostgreSQLPgStatementsAgentH\x00R\x1eqanPostgresqlPgstatementsAgent\x12|\n" + "\"qan_postgresql_pgstatmonitor_agent\x18\x0e \x01(\v2-.inventory.v1.QANPostgreSQLPgStatMonitorAgentH\x00R\x1fqanPostgresqlPgstatmonitorAgent\x12G\n" + "\x0fvalkey_exporter\x18\x0f \x01(\v2\x1c.inventory.v1.ValkeyExporterH\x00R\x0evalkeyExporter\x12K\n" + - "\x11rta_mongodb_agent\x18\x11 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgentB\a\n" + - "\x05agent\"\xce\r\n" + + "\x11rta_mongodb_agent\x18\x11 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgent\x12D\n" + + "\x0eotel_collector\x18\x12 \x01(\v2\x1b.inventory.v1.OtelCollectorH\x00R\rotelCollectorB\a\n" + + "\x05agent\"\xa0\x0e\n" + "\x12ChangeAgentRequest\x12\"\n" + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\aagentId\x12M\n" + "\rnode_exporter\x18\x02 \x01(\v2&.inventory.v1.ChangeNodeExporterParamsH\x00R\fnodeExporter\x12S\n" + @@ -11331,8 +11715,9 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\vnomad_agent\x18\x0f \x01(\v2$.inventory.v1.ChangeNomadAgentParamsH\x00R\n" + "nomadAgent\x12S\n" + "\x0fvalkey_exporter\x18\x10 \x01(\v2(.inventory.v1.ChangeValkeyExporterParamsH\x00R\x0evalkeyExporter\x12W\n" + - "\x11rta_mongodb_agent\x18\x12 \x01(\v2).inventory.v1.ChangeRTAMongoDBAgentParamsH\x00R\x0frtaMongodbAgentB\a\n" + - "\x05agent\"\xdd\v\n" + + "\x11rta_mongodb_agent\x18\x12 \x01(\v2).inventory.v1.ChangeRTAMongoDBAgentParamsH\x00R\x0frtaMongodbAgent\x12P\n" + + "\x0eotel_collector\x18\x13 \x01(\v2'.inventory.v1.ChangeOtelCollectorParamsH\x00R\rotelCollectorB\a\n" + + "\x05agent\"\xa3\f\n" + "\x13ChangeAgentResponse\x12A\n" + "\rnode_exporter\x18\x02 \x01(\v2\x1a.inventory.v1.NodeExporterH\x00R\fnodeExporter\x12G\n" + "\x0fmysqld_exporter\x18\x03 \x01(\v2\x1c.inventory.v1.MySQLdExporterH\x00R\x0emysqldExporter\x12J\n" + @@ -11352,7 +11737,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\vnomad_agent\x18\x0f \x01(\v2\x18.inventory.v1.NomadAgentH\x00R\n" + "nomadAgent\x12G\n" + "\x0fvalkey_exporter\x18\x10 \x01(\v2\x1c.inventory.v1.ValkeyExporterH\x00R\x0evalkeyExporter\x12K\n" + - "\x11rta_mongodb_agent\x18\x12 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgentB\a\n" + + "\x11rta_mongodb_agent\x18\x12 \x01(\v2\x1d.inventory.v1.RTAMongoDBAgentH\x00R\x0frtaMongodbAgent\x12D\n" + + "\x0eotel_collector\x18\x13 \x01(\v2\x1b.inventory.v1.OtelCollectorH\x00R\rotelCollectorB\a\n" + "\x05agent\"\xdc\x01\n" + "\x11AddPMMAgentParams\x12.\n" + "\x0fruns_on_node_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\frunsOnNodeId\x12V\n" + @@ -12165,7 +12551,29 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "rtaOptions\x1a?\n" + "\x11CustomLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xae\x06\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"@\n" + + "\tLogSource\x12\x1b\n" + + "\x04path\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\x04path\x12\x16\n" + + "\x06preset\x18\x02 \x01(\tR\x06preset\"\xc1\x02\n" + + "\x16AddOtelCollectorParams\x12)\n" + + "\fpmm_agent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\n" + + "pmmAgentId\x12[\n" + + "\rcustom_labels\x18\x02 \x03(\v26.inventory.v1.AddOtelCollectorParams.CustomLabelsEntryR\fcustomLabels\x12$\n" + + "\x0elog_file_paths\x18\x03 \x03(\tR\flogFilePaths\x128\n" + + "\vlog_sources\x18\x04 \x03(\v2\x17.inventory.v1.LogSourceR\n" + + "logSources\x1a?\n" + + "\x11CustomLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xe1\x02\n" + + "\x19ChangeOtelCollectorParams\x12\x1b\n" + + "\x06enable\x18\x01 \x01(\bH\x00R\x06enable\x88\x01\x01\x12[\n" + + "\fmerge_labels\x18\x02 \x03(\v28.inventory.v1.ChangeOtelCollectorParams.MergeLabelsEntryR\vmergeLabels\x12?\n" + + "\x0fadd_log_sources\x18\x03 \x03(\v2\x17.inventory.v1.LogSourceR\raddLogSources\x12>\n" + + "\x1cremove_legacy_log_file_paths\x18\x04 \x01(\bR\x18removeLegacyLogFilePaths\x1a>\n" + + "\x10MergeLabelsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\t\n" + + "\a_enable\"\xae\x06\n" + "\x1bChangeRTAMongoDBAgentParams\x12\x1b\n" + "\x06enable\x18\x01 \x01(\bH\x00R\x06enable\x88\x01\x01\x12;\n" + "\rcustom_labels\x18\x02 \x01(\v2\x11.common.StringMapH\x01R\fcustomLabels\x88\x01\x01\x128\n" + @@ -12198,7 +12606,7 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x12RemoveAgentRequest\x12\"\n" + "\bagent_id\x18\x01 \x01(\tB\a\xfaB\x04r\x02\x10\x01R\aagentId\x12\x14\n" + "\x05force\x18\x02 \x01(\bR\x05force\"\x15\n" + - "\x13RemoveAgentResponse*\xd0\x05\n" + + "\x13RemoveAgentResponse*\xef\x05\n" + "\tAgentType\x12\x1a\n" + "\x16AGENT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n" + "\x14AGENT_TYPE_PMM_AGENT\x10\x01\x12\x17\n" + @@ -12220,7 +12628,8 @@ const file_inventory_v1_agents_proto_rawDesc = "" + "\x17AGENT_TYPE_RDS_EXPORTER\x10\v\x12&\n" + "\"AGENT_TYPE_AZURE_DATABASE_EXPORTER\x10\x0f\x12\x1a\n" + "\x16AGENT_TYPE_NOMAD_AGENT\x10\x10\x12 \n" + - "\x1cAGENT_TYPE_RTA_MONGODB_AGENT\x10\x132\x83\t\n" + + "\x1cAGENT_TYPE_RTA_MONGODB_AGENT\x10\x13\x12\x1d\n" + + "\x19AGENT_TYPE_OTEL_COLLECTOR\x10\x142\x83\t\n" + "\rAgentsService\x12\x9c\x01\n" + "\n" + "ListAgents\x12\x1f.inventory.v1.ListAgentsRequest\x1a .inventory.v1.ListAgentsResponse\"K\x92A,\x12\vList Agents\x1a\x1dReturns a list of all Agents.\x82\xd3\xe4\x93\x02\x16\x12\x14/v1/inventory/agents\x12\x9f\x01\n" + @@ -12243,399 +12652,415 @@ func file_inventory_v1_agents_proto_rawDescGZIP() []byte { return file_inventory_v1_agents_proto_rawDescData } -var ( - file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 107) - file_inventory_v1_agents_proto_goTypes = []any{ - (AgentType)(0), // 0: inventory.v1.AgentType - (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent - (*VMAgent)(nil), // 2: inventory.v1.VMAgent - (*NomadAgent)(nil), // 3: inventory.v1.NomadAgent - (*NodeExporter)(nil), // 4: inventory.v1.NodeExporter - (*MySQLdExporter)(nil), // 5: inventory.v1.MySQLdExporter - (*MongoDBExporter)(nil), // 6: inventory.v1.MongoDBExporter - (*PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter - (*ProxySQLExporter)(nil), // 8: inventory.v1.ProxySQLExporter - (*ValkeyExporter)(nil), // 9: inventory.v1.ValkeyExporter - (*QANMySQLPerfSchemaAgent)(nil), // 10: inventory.v1.QANMySQLPerfSchemaAgent - (*QANMySQLSlowlogAgent)(nil), // 11: inventory.v1.QANMySQLSlowlogAgent - (*QANMongoDBProfilerAgent)(nil), // 12: inventory.v1.QANMongoDBProfilerAgent - (*QANMongoDBMongologAgent)(nil), // 13: inventory.v1.QANMongoDBMongologAgent - (*RTAOptions)(nil), // 14: inventory.v1.RTAOptions - (*RTAMongoDBAgent)(nil), // 15: inventory.v1.RTAMongoDBAgent - (*QANPostgreSQLPgStatementsAgent)(nil), // 16: inventory.v1.QANPostgreSQLPgStatementsAgent - (*QANPostgreSQLPgStatMonitorAgent)(nil), // 17: inventory.v1.QANPostgreSQLPgStatMonitorAgent - (*RDSExporter)(nil), // 18: inventory.v1.RDSExporter - (*ExternalExporter)(nil), // 19: inventory.v1.ExternalExporter - (*AzureDatabaseExporter)(nil), // 20: inventory.v1.AzureDatabaseExporter - (*ChangeCommonAgentParams)(nil), // 21: inventory.v1.ChangeCommonAgentParams - (*ListAgentsRequest)(nil), // 22: inventory.v1.ListAgentsRequest - (*ListAgentsResponse)(nil), // 23: inventory.v1.ListAgentsResponse - (*GetAgentRequest)(nil), // 24: inventory.v1.GetAgentRequest - (*GetAgentResponse)(nil), // 25: inventory.v1.GetAgentResponse - (*GetAgentLogsRequest)(nil), // 26: inventory.v1.GetAgentLogsRequest - (*GetAgentLogsResponse)(nil), // 27: inventory.v1.GetAgentLogsResponse - (*AddAgentRequest)(nil), // 28: inventory.v1.AddAgentRequest - (*AddAgentResponse)(nil), // 29: inventory.v1.AddAgentResponse - (*ChangeAgentRequest)(nil), // 30: inventory.v1.ChangeAgentRequest - (*ChangeAgentResponse)(nil), // 31: inventory.v1.ChangeAgentResponse - (*AddPMMAgentParams)(nil), // 32: inventory.v1.AddPMMAgentParams - (*AddNodeExporterParams)(nil), // 33: inventory.v1.AddNodeExporterParams - (*ChangeNodeExporterParams)(nil), // 34: inventory.v1.ChangeNodeExporterParams - (*AddMySQLdExporterParams)(nil), // 35: inventory.v1.AddMySQLdExporterParams - (*ChangeMySQLdExporterParams)(nil), // 36: inventory.v1.ChangeMySQLdExporterParams - (*AddMongoDBExporterParams)(nil), // 37: inventory.v1.AddMongoDBExporterParams - (*ChangeMongoDBExporterParams)(nil), // 38: inventory.v1.ChangeMongoDBExporterParams - (*AddPostgresExporterParams)(nil), // 39: inventory.v1.AddPostgresExporterParams - (*ChangePostgresExporterParams)(nil), // 40: inventory.v1.ChangePostgresExporterParams - (*AddProxySQLExporterParams)(nil), // 41: inventory.v1.AddProxySQLExporterParams - (*ChangeProxySQLExporterParams)(nil), // 42: inventory.v1.ChangeProxySQLExporterParams - (*AddQANMySQLPerfSchemaAgentParams)(nil), // 43: inventory.v1.AddQANMySQLPerfSchemaAgentParams - (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 44: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams - (*AddQANMySQLSlowlogAgentParams)(nil), // 45: inventory.v1.AddQANMySQLSlowlogAgentParams - (*ChangeQANMySQLSlowlogAgentParams)(nil), // 46: inventory.v1.ChangeQANMySQLSlowlogAgentParams - (*AddQANMongoDBProfilerAgentParams)(nil), // 47: inventory.v1.AddQANMongoDBProfilerAgentParams - (*ChangeQANMongoDBProfilerAgentParams)(nil), // 48: inventory.v1.ChangeQANMongoDBProfilerAgentParams - (*AddQANMongoDBMongologAgentParams)(nil), // 49: inventory.v1.AddQANMongoDBMongologAgentParams - (*ChangeQANMongoDBMongologAgentParams)(nil), // 50: inventory.v1.ChangeQANMongoDBMongologAgentParams - (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 51: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams - (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 52: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams - (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 53: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams - (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 54: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams - (*AddRDSExporterParams)(nil), // 55: inventory.v1.AddRDSExporterParams - (*ChangeRDSExporterParams)(nil), // 56: inventory.v1.ChangeRDSExporterParams - (*AddExternalExporterParams)(nil), // 57: inventory.v1.AddExternalExporterParams - (*ChangeExternalExporterParams)(nil), // 58: inventory.v1.ChangeExternalExporterParams - (*AddAzureDatabaseExporterParams)(nil), // 59: inventory.v1.AddAzureDatabaseExporterParams - (*ChangeAzureDatabaseExporterParams)(nil), // 60: inventory.v1.ChangeAzureDatabaseExporterParams - (*ChangeNomadAgentParams)(nil), // 61: inventory.v1.ChangeNomadAgentParams - (*AddValkeyExporterParams)(nil), // 62: inventory.v1.AddValkeyExporterParams - (*ChangeValkeyExporterParams)(nil), // 63: inventory.v1.ChangeValkeyExporterParams - (*AddRTAMongoDBAgentParams)(nil), // 64: inventory.v1.AddRTAMongoDBAgentParams - (*ChangeRTAMongoDBAgentParams)(nil), // 65: inventory.v1.ChangeRTAMongoDBAgentParams - (*RemoveAgentRequest)(nil), // 66: inventory.v1.RemoveAgentRequest - (*RemoveAgentResponse)(nil), // 67: inventory.v1.RemoveAgentResponse - nil, // 68: inventory.v1.PMMAgent.CustomLabelsEntry - nil, // 69: inventory.v1.NodeExporter.CustomLabelsEntry - nil, // 70: inventory.v1.MySQLdExporter.CustomLabelsEntry - nil, // 71: inventory.v1.MySQLdExporter.ExtraDsnParamsEntry - nil, // 72: inventory.v1.MongoDBExporter.CustomLabelsEntry - nil, // 73: inventory.v1.PostgresExporter.CustomLabelsEntry - nil, // 74: inventory.v1.ProxySQLExporter.CustomLabelsEntry - nil, // 75: inventory.v1.ValkeyExporter.CustomLabelsEntry - nil, // 76: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry - nil, // 77: inventory.v1.QANMySQLPerfSchemaAgent.ExtraDsnParamsEntry - nil, // 78: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry - nil, // 79: inventory.v1.QANMySQLSlowlogAgent.ExtraDsnParamsEntry - nil, // 80: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry - nil, // 81: inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry - nil, // 82: inventory.v1.RTAMongoDBAgent.CustomLabelsEntry - nil, // 83: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - nil, // 84: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - nil, // 85: inventory.v1.RDSExporter.CustomLabelsEntry - nil, // 86: inventory.v1.ExternalExporter.CustomLabelsEntry - nil, // 87: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry - nil, // 88: inventory.v1.AddPMMAgentParams.CustomLabelsEntry - nil, // 89: inventory.v1.AddNodeExporterParams.CustomLabelsEntry - nil, // 90: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry - nil, // 91: inventory.v1.AddMySQLdExporterParams.ExtraDsnParamsEntry - nil, // 92: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry - nil, // 93: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry - nil, // 94: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry - nil, // 95: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry - nil, // 96: inventory.v1.AddQANMySQLPerfSchemaAgentParams.ExtraDsnParamsEntry - nil, // 97: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry - nil, // 98: inventory.v1.AddQANMySQLSlowlogAgentParams.ExtraDsnParamsEntry - nil, // 99: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry - nil, // 100: inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry - nil, // 101: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry - nil, // 102: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry - nil, // 103: inventory.v1.AddRDSExporterParams.CustomLabelsEntry - nil, // 104: inventory.v1.AddExternalExporterParams.CustomLabelsEntry - nil, // 105: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry - nil, // 106: inventory.v1.AddValkeyExporterParams.CustomLabelsEntry - nil, // 107: inventory.v1.AddRTAMongoDBAgentParams.CustomLabelsEntry - (AgentStatus)(0), // 108: inventory.v1.AgentStatus - (LogLevel)(0), // 109: inventory.v1.LogLevel - (*common.MetricsResolutions)(nil), // 110: common.MetricsResolutions - (*durationpb.Duration)(nil), // 111: google.protobuf.Duration - (*common.StringMap)(nil), // 112: common.StringMap - } -) - +var file_inventory_v1_agents_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_agents_proto_msgTypes = make([]protoimpl.MessageInfo, 114) +var file_inventory_v1_agents_proto_goTypes = []any{ + (AgentType)(0), // 0: inventory.v1.AgentType + (*PMMAgent)(nil), // 1: inventory.v1.PMMAgent + (*VMAgent)(nil), // 2: inventory.v1.VMAgent + (*NomadAgent)(nil), // 3: inventory.v1.NomadAgent + (*OtelCollector)(nil), // 4: inventory.v1.OtelCollector + (*NodeExporter)(nil), // 5: inventory.v1.NodeExporter + (*MySQLdExporter)(nil), // 6: inventory.v1.MySQLdExporter + (*MongoDBExporter)(nil), // 7: inventory.v1.MongoDBExporter + (*PostgresExporter)(nil), // 8: inventory.v1.PostgresExporter + (*ProxySQLExporter)(nil), // 9: inventory.v1.ProxySQLExporter + (*ValkeyExporter)(nil), // 10: inventory.v1.ValkeyExporter + (*QANMySQLPerfSchemaAgent)(nil), // 11: inventory.v1.QANMySQLPerfSchemaAgent + (*QANMySQLSlowlogAgent)(nil), // 12: inventory.v1.QANMySQLSlowlogAgent + (*QANMongoDBProfilerAgent)(nil), // 13: inventory.v1.QANMongoDBProfilerAgent + (*QANMongoDBMongologAgent)(nil), // 14: inventory.v1.QANMongoDBMongologAgent + (*RTAOptions)(nil), // 15: inventory.v1.RTAOptions + (*RTAMongoDBAgent)(nil), // 16: inventory.v1.RTAMongoDBAgent + (*QANPostgreSQLPgStatementsAgent)(nil), // 17: inventory.v1.QANPostgreSQLPgStatementsAgent + (*QANPostgreSQLPgStatMonitorAgent)(nil), // 18: inventory.v1.QANPostgreSQLPgStatMonitorAgent + (*RDSExporter)(nil), // 19: inventory.v1.RDSExporter + (*ExternalExporter)(nil), // 20: inventory.v1.ExternalExporter + (*AzureDatabaseExporter)(nil), // 21: inventory.v1.AzureDatabaseExporter + (*ChangeCommonAgentParams)(nil), // 22: inventory.v1.ChangeCommonAgentParams + (*ListAgentsRequest)(nil), // 23: inventory.v1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 24: inventory.v1.ListAgentsResponse + (*GetAgentRequest)(nil), // 25: inventory.v1.GetAgentRequest + (*GetAgentResponse)(nil), // 26: inventory.v1.GetAgentResponse + (*GetAgentLogsRequest)(nil), // 27: inventory.v1.GetAgentLogsRequest + (*GetAgentLogsResponse)(nil), // 28: inventory.v1.GetAgentLogsResponse + (*AddAgentRequest)(nil), // 29: inventory.v1.AddAgentRequest + (*AddAgentResponse)(nil), // 30: inventory.v1.AddAgentResponse + (*ChangeAgentRequest)(nil), // 31: inventory.v1.ChangeAgentRequest + (*ChangeAgentResponse)(nil), // 32: inventory.v1.ChangeAgentResponse + (*AddPMMAgentParams)(nil), // 33: inventory.v1.AddPMMAgentParams + (*AddNodeExporterParams)(nil), // 34: inventory.v1.AddNodeExporterParams + (*ChangeNodeExporterParams)(nil), // 35: inventory.v1.ChangeNodeExporterParams + (*AddMySQLdExporterParams)(nil), // 36: inventory.v1.AddMySQLdExporterParams + (*ChangeMySQLdExporterParams)(nil), // 37: inventory.v1.ChangeMySQLdExporterParams + (*AddMongoDBExporterParams)(nil), // 38: inventory.v1.AddMongoDBExporterParams + (*ChangeMongoDBExporterParams)(nil), // 39: inventory.v1.ChangeMongoDBExporterParams + (*AddPostgresExporterParams)(nil), // 40: inventory.v1.AddPostgresExporterParams + (*ChangePostgresExporterParams)(nil), // 41: inventory.v1.ChangePostgresExporterParams + (*AddProxySQLExporterParams)(nil), // 42: inventory.v1.AddProxySQLExporterParams + (*ChangeProxySQLExporterParams)(nil), // 43: inventory.v1.ChangeProxySQLExporterParams + (*AddQANMySQLPerfSchemaAgentParams)(nil), // 44: inventory.v1.AddQANMySQLPerfSchemaAgentParams + (*ChangeQANMySQLPerfSchemaAgentParams)(nil), // 45: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams + (*AddQANMySQLSlowlogAgentParams)(nil), // 46: inventory.v1.AddQANMySQLSlowlogAgentParams + (*ChangeQANMySQLSlowlogAgentParams)(nil), // 47: inventory.v1.ChangeQANMySQLSlowlogAgentParams + (*AddQANMongoDBProfilerAgentParams)(nil), // 48: inventory.v1.AddQANMongoDBProfilerAgentParams + (*ChangeQANMongoDBProfilerAgentParams)(nil), // 49: inventory.v1.ChangeQANMongoDBProfilerAgentParams + (*AddQANMongoDBMongologAgentParams)(nil), // 50: inventory.v1.AddQANMongoDBMongologAgentParams + (*ChangeQANMongoDBMongologAgentParams)(nil), // 51: inventory.v1.ChangeQANMongoDBMongologAgentParams + (*AddQANPostgreSQLPgStatementsAgentParams)(nil), // 52: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams + (*ChangeQANPostgreSQLPgStatementsAgentParams)(nil), // 53: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams + (*AddQANPostgreSQLPgStatMonitorAgentParams)(nil), // 54: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams + (*ChangeQANPostgreSQLPgStatMonitorAgentParams)(nil), // 55: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams + (*AddRDSExporterParams)(nil), // 56: inventory.v1.AddRDSExporterParams + (*ChangeRDSExporterParams)(nil), // 57: inventory.v1.ChangeRDSExporterParams + (*AddExternalExporterParams)(nil), // 58: inventory.v1.AddExternalExporterParams + (*ChangeExternalExporterParams)(nil), // 59: inventory.v1.ChangeExternalExporterParams + (*AddAzureDatabaseExporterParams)(nil), // 60: inventory.v1.AddAzureDatabaseExporterParams + (*ChangeAzureDatabaseExporterParams)(nil), // 61: inventory.v1.ChangeAzureDatabaseExporterParams + (*ChangeNomadAgentParams)(nil), // 62: inventory.v1.ChangeNomadAgentParams + (*AddValkeyExporterParams)(nil), // 63: inventory.v1.AddValkeyExporterParams + (*ChangeValkeyExporterParams)(nil), // 64: inventory.v1.ChangeValkeyExporterParams + (*AddRTAMongoDBAgentParams)(nil), // 65: inventory.v1.AddRTAMongoDBAgentParams + (*LogSource)(nil), // 66: inventory.v1.LogSource + (*AddOtelCollectorParams)(nil), // 67: inventory.v1.AddOtelCollectorParams + (*ChangeOtelCollectorParams)(nil), // 68: inventory.v1.ChangeOtelCollectorParams + (*ChangeRTAMongoDBAgentParams)(nil), // 69: inventory.v1.ChangeRTAMongoDBAgentParams + (*RemoveAgentRequest)(nil), // 70: inventory.v1.RemoveAgentRequest + (*RemoveAgentResponse)(nil), // 71: inventory.v1.RemoveAgentResponse + nil, // 72: inventory.v1.PMMAgent.CustomLabelsEntry + nil, // 73: inventory.v1.OtelCollector.CustomLabelsEntry + nil, // 74: inventory.v1.NodeExporter.CustomLabelsEntry + nil, // 75: inventory.v1.MySQLdExporter.CustomLabelsEntry + nil, // 76: inventory.v1.MySQLdExporter.ExtraDsnParamsEntry + nil, // 77: inventory.v1.MongoDBExporter.CustomLabelsEntry + nil, // 78: inventory.v1.PostgresExporter.CustomLabelsEntry + nil, // 79: inventory.v1.ProxySQLExporter.CustomLabelsEntry + nil, // 80: inventory.v1.ValkeyExporter.CustomLabelsEntry + nil, // 81: inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry + nil, // 82: inventory.v1.QANMySQLPerfSchemaAgent.ExtraDsnParamsEntry + nil, // 83: inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry + nil, // 84: inventory.v1.QANMySQLSlowlogAgent.ExtraDsnParamsEntry + nil, // 85: inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry + nil, // 86: inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry + nil, // 87: inventory.v1.RTAMongoDBAgent.CustomLabelsEntry + nil, // 88: inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + nil, // 89: inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + nil, // 90: inventory.v1.RDSExporter.CustomLabelsEntry + nil, // 91: inventory.v1.ExternalExporter.CustomLabelsEntry + nil, // 92: inventory.v1.AzureDatabaseExporter.CustomLabelsEntry + nil, // 93: inventory.v1.AddPMMAgentParams.CustomLabelsEntry + nil, // 94: inventory.v1.AddNodeExporterParams.CustomLabelsEntry + nil, // 95: inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry + nil, // 96: inventory.v1.AddMySQLdExporterParams.ExtraDsnParamsEntry + nil, // 97: inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry + nil, // 98: inventory.v1.AddPostgresExporterParams.CustomLabelsEntry + nil, // 99: inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry + nil, // 100: inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry + nil, // 101: inventory.v1.AddQANMySQLPerfSchemaAgentParams.ExtraDsnParamsEntry + nil, // 102: inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry + nil, // 103: inventory.v1.AddQANMySQLSlowlogAgentParams.ExtraDsnParamsEntry + nil, // 104: inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry + nil, // 105: inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry + nil, // 106: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry + nil, // 107: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry + nil, // 108: inventory.v1.AddRDSExporterParams.CustomLabelsEntry + nil, // 109: inventory.v1.AddExternalExporterParams.CustomLabelsEntry + nil, // 110: inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry + nil, // 111: inventory.v1.AddValkeyExporterParams.CustomLabelsEntry + nil, // 112: inventory.v1.AddRTAMongoDBAgentParams.CustomLabelsEntry + nil, // 113: inventory.v1.AddOtelCollectorParams.CustomLabelsEntry + nil, // 114: inventory.v1.ChangeOtelCollectorParams.MergeLabelsEntry + (AgentStatus)(0), // 115: inventory.v1.AgentStatus + (LogLevel)(0), // 116: inventory.v1.LogLevel + (*common.MetricsResolutions)(nil), // 117: common.MetricsResolutions + (*durationpb.Duration)(nil), // 118: google.protobuf.Duration + (*common.StringMap)(nil), // 119: common.StringMap +} var file_inventory_v1_agents_proto_depIdxs = []int32{ - 68, // 0: inventory.v1.PMMAgent.custom_labels:type_name -> inventory.v1.PMMAgent.CustomLabelsEntry - 108, // 1: inventory.v1.VMAgent.status:type_name -> inventory.v1.AgentStatus - 108, // 2: inventory.v1.NomadAgent.status:type_name -> inventory.v1.AgentStatus - 69, // 3: inventory.v1.NodeExporter.custom_labels:type_name -> inventory.v1.NodeExporter.CustomLabelsEntry - 108, // 4: inventory.v1.NodeExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 5: inventory.v1.NodeExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 6: inventory.v1.NodeExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 70, // 7: inventory.v1.MySQLdExporter.custom_labels:type_name -> inventory.v1.MySQLdExporter.CustomLabelsEntry - 108, // 8: inventory.v1.MySQLdExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 9: inventory.v1.MySQLdExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 10: inventory.v1.MySQLdExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 71, // 11: inventory.v1.MySQLdExporter.extra_dsn_params:type_name -> inventory.v1.MySQLdExporter.ExtraDsnParamsEntry - 72, // 12: inventory.v1.MongoDBExporter.custom_labels:type_name -> inventory.v1.MongoDBExporter.CustomLabelsEntry - 108, // 13: inventory.v1.MongoDBExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 14: inventory.v1.MongoDBExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 15: inventory.v1.MongoDBExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 73, // 16: inventory.v1.PostgresExporter.custom_labels:type_name -> inventory.v1.PostgresExporter.CustomLabelsEntry - 108, // 17: inventory.v1.PostgresExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 18: inventory.v1.PostgresExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 19: inventory.v1.PostgresExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 74, // 20: inventory.v1.ProxySQLExporter.custom_labels:type_name -> inventory.v1.ProxySQLExporter.CustomLabelsEntry - 108, // 21: inventory.v1.ProxySQLExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 22: inventory.v1.ProxySQLExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 23: inventory.v1.ProxySQLExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 75, // 24: inventory.v1.ValkeyExporter.custom_labels:type_name -> inventory.v1.ValkeyExporter.CustomLabelsEntry - 108, // 25: inventory.v1.ValkeyExporter.status:type_name -> inventory.v1.AgentStatus - 110, // 26: inventory.v1.ValkeyExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 76, // 27: inventory.v1.QANMySQLPerfSchemaAgent.custom_labels:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry - 108, // 28: inventory.v1.QANMySQLPerfSchemaAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 29: inventory.v1.QANMySQLPerfSchemaAgent.log_level:type_name -> inventory.v1.LogLevel - 77, // 30: inventory.v1.QANMySQLPerfSchemaAgent.extra_dsn_params:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.ExtraDsnParamsEntry - 78, // 31: inventory.v1.QANMySQLSlowlogAgent.custom_labels:type_name -> inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry - 108, // 32: inventory.v1.QANMySQLSlowlogAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 33: inventory.v1.QANMySQLSlowlogAgent.log_level:type_name -> inventory.v1.LogLevel - 79, // 34: inventory.v1.QANMySQLSlowlogAgent.extra_dsn_params:type_name -> inventory.v1.QANMySQLSlowlogAgent.ExtraDsnParamsEntry - 80, // 35: inventory.v1.QANMongoDBProfilerAgent.custom_labels:type_name -> inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry - 108, // 36: inventory.v1.QANMongoDBProfilerAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 37: inventory.v1.QANMongoDBProfilerAgent.log_level:type_name -> inventory.v1.LogLevel - 81, // 38: inventory.v1.QANMongoDBMongologAgent.custom_labels:type_name -> inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry - 108, // 39: inventory.v1.QANMongoDBMongologAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 40: inventory.v1.QANMongoDBMongologAgent.log_level:type_name -> inventory.v1.LogLevel - 111, // 41: inventory.v1.RTAOptions.collect_interval:type_name -> google.protobuf.Duration - 82, // 42: inventory.v1.RTAMongoDBAgent.custom_labels:type_name -> inventory.v1.RTAMongoDBAgent.CustomLabelsEntry - 14, // 43: inventory.v1.RTAMongoDBAgent.rta_options:type_name -> inventory.v1.RTAOptions - 108, // 44: inventory.v1.RTAMongoDBAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 45: inventory.v1.RTAMongoDBAgent.log_level:type_name -> inventory.v1.LogLevel - 83, // 46: inventory.v1.QANPostgreSQLPgStatementsAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry - 108, // 47: inventory.v1.QANPostgreSQLPgStatementsAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 48: inventory.v1.QANPostgreSQLPgStatementsAgent.log_level:type_name -> inventory.v1.LogLevel - 84, // 49: inventory.v1.QANPostgreSQLPgStatMonitorAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry - 108, // 50: inventory.v1.QANPostgreSQLPgStatMonitorAgent.status:type_name -> inventory.v1.AgentStatus - 109, // 51: inventory.v1.QANPostgreSQLPgStatMonitorAgent.log_level:type_name -> inventory.v1.LogLevel - 85, // 52: inventory.v1.RDSExporter.custom_labels:type_name -> inventory.v1.RDSExporter.CustomLabelsEntry - 108, // 53: inventory.v1.RDSExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 54: inventory.v1.RDSExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 55: inventory.v1.RDSExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 86, // 56: inventory.v1.ExternalExporter.custom_labels:type_name -> inventory.v1.ExternalExporter.CustomLabelsEntry - 110, // 57: inventory.v1.ExternalExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 108, // 58: inventory.v1.ExternalExporter.status:type_name -> inventory.v1.AgentStatus - 87, // 59: inventory.v1.AzureDatabaseExporter.custom_labels:type_name -> inventory.v1.AzureDatabaseExporter.CustomLabelsEntry - 108, // 60: inventory.v1.AzureDatabaseExporter.status:type_name -> inventory.v1.AgentStatus - 109, // 61: inventory.v1.AzureDatabaseExporter.log_level:type_name -> inventory.v1.LogLevel - 110, // 62: inventory.v1.AzureDatabaseExporter.metrics_resolutions:type_name -> common.MetricsResolutions - 112, // 63: inventory.v1.ChangeCommonAgentParams.custom_labels:type_name -> common.StringMap - 110, // 64: inventory.v1.ChangeCommonAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 0, // 65: inventory.v1.ListAgentsRequest.agent_type:type_name -> inventory.v1.AgentType - 1, // 66: inventory.v1.ListAgentsResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 2, // 67: inventory.v1.ListAgentsResponse.vm_agent:type_name -> inventory.v1.VMAgent - 4, // 68: inventory.v1.ListAgentsResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 69: inventory.v1.ListAgentsResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 70: inventory.v1.ListAgentsResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 71: inventory.v1.ListAgentsResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 72: inventory.v1.ListAgentsResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 10, // 73: inventory.v1.ListAgentsResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 74: inventory.v1.ListAgentsResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 75: inventory.v1.ListAgentsResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 76: inventory.v1.ListAgentsResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent - 16, // 77: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 17, // 78: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 19, // 79: inventory.v1.ListAgentsResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 18, // 80: inventory.v1.ListAgentsResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 20, // 81: inventory.v1.ListAgentsResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 3, // 82: inventory.v1.ListAgentsResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 83: inventory.v1.ListAgentsResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 15, // 84: inventory.v1.ListAgentsResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent - 1, // 85: inventory.v1.GetAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 2, // 86: inventory.v1.GetAgentResponse.vmagent:type_name -> inventory.v1.VMAgent - 4, // 87: inventory.v1.GetAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 88: inventory.v1.GetAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 89: inventory.v1.GetAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 90: inventory.v1.GetAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 91: inventory.v1.GetAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 10, // 92: inventory.v1.GetAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 93: inventory.v1.GetAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 94: inventory.v1.GetAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 95: inventory.v1.GetAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent - 16, // 96: inventory.v1.GetAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 17, // 97: inventory.v1.GetAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 19, // 98: inventory.v1.GetAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 18, // 99: inventory.v1.GetAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 20, // 100: inventory.v1.GetAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 3, // 101: inventory.v1.GetAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 102: inventory.v1.GetAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 15, // 103: inventory.v1.GetAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent - 32, // 104: inventory.v1.AddAgentRequest.pmm_agent:type_name -> inventory.v1.AddPMMAgentParams - 33, // 105: inventory.v1.AddAgentRequest.node_exporter:type_name -> inventory.v1.AddNodeExporterParams - 35, // 106: inventory.v1.AddAgentRequest.mysqld_exporter:type_name -> inventory.v1.AddMySQLdExporterParams - 37, // 107: inventory.v1.AddAgentRequest.mongodb_exporter:type_name -> inventory.v1.AddMongoDBExporterParams - 39, // 108: inventory.v1.AddAgentRequest.postgres_exporter:type_name -> inventory.v1.AddPostgresExporterParams - 41, // 109: inventory.v1.AddAgentRequest.proxysql_exporter:type_name -> inventory.v1.AddProxySQLExporterParams - 57, // 110: inventory.v1.AddAgentRequest.external_exporter:type_name -> inventory.v1.AddExternalExporterParams - 55, // 111: inventory.v1.AddAgentRequest.rds_exporter:type_name -> inventory.v1.AddRDSExporterParams - 59, // 112: inventory.v1.AddAgentRequest.azure_database_exporter:type_name -> inventory.v1.AddAzureDatabaseExporterParams - 43, // 113: inventory.v1.AddAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams - 45, // 114: inventory.v1.AddAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams - 47, // 115: inventory.v1.AddAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams - 49, // 116: inventory.v1.AddAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams - 51, // 117: inventory.v1.AddAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams - 53, // 118: inventory.v1.AddAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams - 62, // 119: inventory.v1.AddAgentRequest.valkey_exporter:type_name -> inventory.v1.AddValkeyExporterParams - 64, // 120: inventory.v1.AddAgentRequest.rta_mongodb_agent:type_name -> inventory.v1.AddRTAMongoDBAgentParams - 1, // 121: inventory.v1.AddAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 4, // 122: inventory.v1.AddAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 123: inventory.v1.AddAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 124: inventory.v1.AddAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 125: inventory.v1.AddAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 126: inventory.v1.AddAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 19, // 127: inventory.v1.AddAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 18, // 128: inventory.v1.AddAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 20, // 129: inventory.v1.AddAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 10, // 130: inventory.v1.AddAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 131: inventory.v1.AddAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 132: inventory.v1.AddAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 133: inventory.v1.AddAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent - 16, // 134: inventory.v1.AddAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 17, // 135: inventory.v1.AddAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 9, // 136: inventory.v1.AddAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 15, // 137: inventory.v1.AddAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent - 34, // 138: inventory.v1.ChangeAgentRequest.node_exporter:type_name -> inventory.v1.ChangeNodeExporterParams - 36, // 139: inventory.v1.ChangeAgentRequest.mysqld_exporter:type_name -> inventory.v1.ChangeMySQLdExporterParams - 38, // 140: inventory.v1.ChangeAgentRequest.mongodb_exporter:type_name -> inventory.v1.ChangeMongoDBExporterParams - 40, // 141: inventory.v1.ChangeAgentRequest.postgres_exporter:type_name -> inventory.v1.ChangePostgresExporterParams - 42, // 142: inventory.v1.ChangeAgentRequest.proxysql_exporter:type_name -> inventory.v1.ChangeProxySQLExporterParams - 58, // 143: inventory.v1.ChangeAgentRequest.external_exporter:type_name -> inventory.v1.ChangeExternalExporterParams - 56, // 144: inventory.v1.ChangeAgentRequest.rds_exporter:type_name -> inventory.v1.ChangeRDSExporterParams - 60, // 145: inventory.v1.ChangeAgentRequest.azure_database_exporter:type_name -> inventory.v1.ChangeAzureDatabaseExporterParams - 44, // 146: inventory.v1.ChangeAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.ChangeQANMySQLPerfSchemaAgentParams - 46, // 147: inventory.v1.ChangeAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.ChangeQANMySQLSlowlogAgentParams - 48, // 148: inventory.v1.ChangeAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.ChangeQANMongoDBProfilerAgentParams - 50, // 149: inventory.v1.ChangeAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.ChangeQANMongoDBMongologAgentParams - 52, // 150: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams - 54, // 151: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams - 61, // 152: inventory.v1.ChangeAgentRequest.nomad_agent:type_name -> inventory.v1.ChangeNomadAgentParams - 63, // 153: inventory.v1.ChangeAgentRequest.valkey_exporter:type_name -> inventory.v1.ChangeValkeyExporterParams - 65, // 154: inventory.v1.ChangeAgentRequest.rta_mongodb_agent:type_name -> inventory.v1.ChangeRTAMongoDBAgentParams - 4, // 155: inventory.v1.ChangeAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter - 5, // 156: inventory.v1.ChangeAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter - 6, // 157: inventory.v1.ChangeAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter - 7, // 158: inventory.v1.ChangeAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter - 8, // 159: inventory.v1.ChangeAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter - 19, // 160: inventory.v1.ChangeAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter - 18, // 161: inventory.v1.ChangeAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter - 20, // 162: inventory.v1.ChangeAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter - 10, // 163: inventory.v1.ChangeAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent - 11, // 164: inventory.v1.ChangeAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent - 12, // 165: inventory.v1.ChangeAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent - 13, // 166: inventory.v1.ChangeAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent - 16, // 167: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent - 17, // 168: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent - 3, // 169: inventory.v1.ChangeAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent - 9, // 170: inventory.v1.ChangeAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter - 15, // 171: inventory.v1.ChangeAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent - 88, // 172: inventory.v1.AddPMMAgentParams.custom_labels:type_name -> inventory.v1.AddPMMAgentParams.CustomLabelsEntry - 89, // 173: inventory.v1.AddNodeExporterParams.custom_labels:type_name -> inventory.v1.AddNodeExporterParams.CustomLabelsEntry - 109, // 174: inventory.v1.AddNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 175: inventory.v1.ChangeNodeExporterParams.custom_labels:type_name -> common.StringMap - 110, // 176: inventory.v1.ChangeNodeExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 177: inventory.v1.ChangeNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel - 90, // 178: inventory.v1.AddMySQLdExporterParams.custom_labels:type_name -> inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry - 109, // 179: inventory.v1.AddMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel - 91, // 180: inventory.v1.AddMySQLdExporterParams.extra_dsn_params:type_name -> inventory.v1.AddMySQLdExporterParams.ExtraDsnParamsEntry - 112, // 181: inventory.v1.ChangeMySQLdExporterParams.custom_labels:type_name -> common.StringMap - 110, // 182: inventory.v1.ChangeMySQLdExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 183: inventory.v1.ChangeMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel - 92, // 184: inventory.v1.AddMongoDBExporterParams.custom_labels:type_name -> inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry - 109, // 185: inventory.v1.AddMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 186: inventory.v1.ChangeMongoDBExporterParams.custom_labels:type_name -> common.StringMap - 110, // 187: inventory.v1.ChangeMongoDBExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 188: inventory.v1.ChangeMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel - 93, // 189: inventory.v1.AddPostgresExporterParams.custom_labels:type_name -> inventory.v1.AddPostgresExporterParams.CustomLabelsEntry - 109, // 190: inventory.v1.AddPostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 191: inventory.v1.ChangePostgresExporterParams.custom_labels:type_name -> common.StringMap - 110, // 192: inventory.v1.ChangePostgresExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 193: inventory.v1.ChangePostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel - 94, // 194: inventory.v1.AddProxySQLExporterParams.custom_labels:type_name -> inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry - 109, // 195: inventory.v1.AddProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 196: inventory.v1.ChangeProxySQLExporterParams.custom_labels:type_name -> common.StringMap - 110, // 197: inventory.v1.ChangeProxySQLExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 198: inventory.v1.ChangeProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel - 95, // 199: inventory.v1.AddQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry - 109, // 200: inventory.v1.AddQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel - 96, // 201: inventory.v1.AddQANMySQLPerfSchemaAgentParams.extra_dsn_params:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.ExtraDsnParamsEntry - 112, // 202: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> common.StringMap - 110, // 203: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 204: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel - 97, // 205: inventory.v1.AddQANMySQLSlowlogAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry - 109, // 206: inventory.v1.AddQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel - 98, // 207: inventory.v1.AddQANMySQLSlowlogAgentParams.extra_dsn_params:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.ExtraDsnParamsEntry - 112, // 208: inventory.v1.ChangeQANMySQLSlowlogAgentParams.custom_labels:type_name -> common.StringMap - 110, // 209: inventory.v1.ChangeQANMySQLSlowlogAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 210: inventory.v1.ChangeQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel - 99, // 211: inventory.v1.AddQANMongoDBProfilerAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry - 109, // 212: inventory.v1.AddQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 213: inventory.v1.ChangeQANMongoDBProfilerAgentParams.custom_labels:type_name -> common.StringMap - 110, // 214: inventory.v1.ChangeQANMongoDBProfilerAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 215: inventory.v1.ChangeQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel - 100, // 216: inventory.v1.AddQANMongoDBMongologAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry - 109, // 217: inventory.v1.AddQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 218: inventory.v1.ChangeQANMongoDBMongologAgentParams.custom_labels:type_name -> common.StringMap - 110, // 219: inventory.v1.ChangeQANMongoDBMongologAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 220: inventory.v1.ChangeQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel - 101, // 221: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry - 109, // 222: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 223: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> common.StringMap - 110, // 224: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 225: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel - 102, // 226: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry - 109, // 227: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 228: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> common.StringMap - 110, // 229: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 230: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel - 103, // 231: inventory.v1.AddRDSExporterParams.custom_labels:type_name -> inventory.v1.AddRDSExporterParams.CustomLabelsEntry - 109, // 232: inventory.v1.AddRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 233: inventory.v1.ChangeRDSExporterParams.custom_labels:type_name -> common.StringMap - 110, // 234: inventory.v1.ChangeRDSExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 235: inventory.v1.ChangeRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel - 104, // 236: inventory.v1.AddExternalExporterParams.custom_labels:type_name -> inventory.v1.AddExternalExporterParams.CustomLabelsEntry - 112, // 237: inventory.v1.ChangeExternalExporterParams.custom_labels:type_name -> common.StringMap - 110, // 238: inventory.v1.ChangeExternalExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 105, // 239: inventory.v1.AddAzureDatabaseExporterParams.custom_labels:type_name -> inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry - 109, // 240: inventory.v1.AddAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 241: inventory.v1.ChangeAzureDatabaseExporterParams.custom_labels:type_name -> common.StringMap - 110, // 242: inventory.v1.ChangeAzureDatabaseExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 243: inventory.v1.ChangeAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel - 106, // 244: inventory.v1.AddValkeyExporterParams.custom_labels:type_name -> inventory.v1.AddValkeyExporterParams.CustomLabelsEntry - 109, // 245: inventory.v1.AddValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel - 112, // 246: inventory.v1.ChangeValkeyExporterParams.custom_labels:type_name -> common.StringMap - 110, // 247: inventory.v1.ChangeValkeyExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions - 109, // 248: inventory.v1.ChangeValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel - 107, // 249: inventory.v1.AddRTAMongoDBAgentParams.custom_labels:type_name -> inventory.v1.AddRTAMongoDBAgentParams.CustomLabelsEntry - 109, // 250: inventory.v1.AddRTAMongoDBAgentParams.log_level:type_name -> inventory.v1.LogLevel - 14, // 251: inventory.v1.AddRTAMongoDBAgentParams.rta_options:type_name -> inventory.v1.RTAOptions - 112, // 252: inventory.v1.ChangeRTAMongoDBAgentParams.custom_labels:type_name -> common.StringMap - 109, // 253: inventory.v1.ChangeRTAMongoDBAgentParams.log_level:type_name -> inventory.v1.LogLevel - 14, // 254: inventory.v1.ChangeRTAMongoDBAgentParams.rta_options:type_name -> inventory.v1.RTAOptions - 22, // 255: inventory.v1.AgentsService.ListAgents:input_type -> inventory.v1.ListAgentsRequest - 24, // 256: inventory.v1.AgentsService.GetAgent:input_type -> inventory.v1.GetAgentRequest - 26, // 257: inventory.v1.AgentsService.GetAgentLogs:input_type -> inventory.v1.GetAgentLogsRequest - 28, // 258: inventory.v1.AgentsService.AddAgent:input_type -> inventory.v1.AddAgentRequest - 30, // 259: inventory.v1.AgentsService.ChangeAgent:input_type -> inventory.v1.ChangeAgentRequest - 66, // 260: inventory.v1.AgentsService.RemoveAgent:input_type -> inventory.v1.RemoveAgentRequest - 23, // 261: inventory.v1.AgentsService.ListAgents:output_type -> inventory.v1.ListAgentsResponse - 25, // 262: inventory.v1.AgentsService.GetAgent:output_type -> inventory.v1.GetAgentResponse - 27, // 263: inventory.v1.AgentsService.GetAgentLogs:output_type -> inventory.v1.GetAgentLogsResponse - 29, // 264: inventory.v1.AgentsService.AddAgent:output_type -> inventory.v1.AddAgentResponse - 31, // 265: inventory.v1.AgentsService.ChangeAgent:output_type -> inventory.v1.ChangeAgentResponse - 67, // 266: inventory.v1.AgentsService.RemoveAgent:output_type -> inventory.v1.RemoveAgentResponse - 261, // [261:267] is the sub-list for method output_type - 255, // [255:261] is the sub-list for method input_type - 255, // [255:255] is the sub-list for extension type_name - 255, // [255:255] is the sub-list for extension extendee - 0, // [0:255] is the sub-list for field type_name + 72, // 0: inventory.v1.PMMAgent.custom_labels:type_name -> inventory.v1.PMMAgent.CustomLabelsEntry + 115, // 1: inventory.v1.VMAgent.status:type_name -> inventory.v1.AgentStatus + 115, // 2: inventory.v1.NomadAgent.status:type_name -> inventory.v1.AgentStatus + 73, // 3: inventory.v1.OtelCollector.custom_labels:type_name -> inventory.v1.OtelCollector.CustomLabelsEntry + 115, // 4: inventory.v1.OtelCollector.status:type_name -> inventory.v1.AgentStatus + 74, // 5: inventory.v1.NodeExporter.custom_labels:type_name -> inventory.v1.NodeExporter.CustomLabelsEntry + 115, // 6: inventory.v1.NodeExporter.status:type_name -> inventory.v1.AgentStatus + 116, // 7: inventory.v1.NodeExporter.log_level:type_name -> inventory.v1.LogLevel + 117, // 8: inventory.v1.NodeExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 75, // 9: inventory.v1.MySQLdExporter.custom_labels:type_name -> inventory.v1.MySQLdExporter.CustomLabelsEntry + 115, // 10: inventory.v1.MySQLdExporter.status:type_name -> inventory.v1.AgentStatus + 116, // 11: inventory.v1.MySQLdExporter.log_level:type_name -> inventory.v1.LogLevel + 117, // 12: inventory.v1.MySQLdExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 76, // 13: inventory.v1.MySQLdExporter.extra_dsn_params:type_name -> inventory.v1.MySQLdExporter.ExtraDsnParamsEntry + 77, // 14: inventory.v1.MongoDBExporter.custom_labels:type_name -> inventory.v1.MongoDBExporter.CustomLabelsEntry + 115, // 15: inventory.v1.MongoDBExporter.status:type_name -> inventory.v1.AgentStatus + 116, // 16: inventory.v1.MongoDBExporter.log_level:type_name -> inventory.v1.LogLevel + 117, // 17: inventory.v1.MongoDBExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 78, // 18: inventory.v1.PostgresExporter.custom_labels:type_name -> inventory.v1.PostgresExporter.CustomLabelsEntry + 115, // 19: inventory.v1.PostgresExporter.status:type_name -> inventory.v1.AgentStatus + 116, // 20: inventory.v1.PostgresExporter.log_level:type_name -> inventory.v1.LogLevel + 117, // 21: inventory.v1.PostgresExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 79, // 22: inventory.v1.ProxySQLExporter.custom_labels:type_name -> inventory.v1.ProxySQLExporter.CustomLabelsEntry + 115, // 23: inventory.v1.ProxySQLExporter.status:type_name -> inventory.v1.AgentStatus + 116, // 24: inventory.v1.ProxySQLExporter.log_level:type_name -> inventory.v1.LogLevel + 117, // 25: inventory.v1.ProxySQLExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 80, // 26: inventory.v1.ValkeyExporter.custom_labels:type_name -> inventory.v1.ValkeyExporter.CustomLabelsEntry + 115, // 27: inventory.v1.ValkeyExporter.status:type_name -> inventory.v1.AgentStatus + 117, // 28: inventory.v1.ValkeyExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 81, // 29: inventory.v1.QANMySQLPerfSchemaAgent.custom_labels:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.CustomLabelsEntry + 115, // 30: inventory.v1.QANMySQLPerfSchemaAgent.status:type_name -> inventory.v1.AgentStatus + 116, // 31: inventory.v1.QANMySQLPerfSchemaAgent.log_level:type_name -> inventory.v1.LogLevel + 82, // 32: inventory.v1.QANMySQLPerfSchemaAgent.extra_dsn_params:type_name -> inventory.v1.QANMySQLPerfSchemaAgent.ExtraDsnParamsEntry + 83, // 33: inventory.v1.QANMySQLSlowlogAgent.custom_labels:type_name -> inventory.v1.QANMySQLSlowlogAgent.CustomLabelsEntry + 115, // 34: inventory.v1.QANMySQLSlowlogAgent.status:type_name -> inventory.v1.AgentStatus + 116, // 35: inventory.v1.QANMySQLSlowlogAgent.log_level:type_name -> inventory.v1.LogLevel + 84, // 36: inventory.v1.QANMySQLSlowlogAgent.extra_dsn_params:type_name -> inventory.v1.QANMySQLSlowlogAgent.ExtraDsnParamsEntry + 85, // 37: inventory.v1.QANMongoDBProfilerAgent.custom_labels:type_name -> inventory.v1.QANMongoDBProfilerAgent.CustomLabelsEntry + 115, // 38: inventory.v1.QANMongoDBProfilerAgent.status:type_name -> inventory.v1.AgentStatus + 116, // 39: inventory.v1.QANMongoDBProfilerAgent.log_level:type_name -> inventory.v1.LogLevel + 86, // 40: inventory.v1.QANMongoDBMongologAgent.custom_labels:type_name -> inventory.v1.QANMongoDBMongologAgent.CustomLabelsEntry + 115, // 41: inventory.v1.QANMongoDBMongologAgent.status:type_name -> inventory.v1.AgentStatus + 116, // 42: inventory.v1.QANMongoDBMongologAgent.log_level:type_name -> inventory.v1.LogLevel + 118, // 43: inventory.v1.RTAOptions.collect_interval:type_name -> google.protobuf.Duration + 87, // 44: inventory.v1.RTAMongoDBAgent.custom_labels:type_name -> inventory.v1.RTAMongoDBAgent.CustomLabelsEntry + 15, // 45: inventory.v1.RTAMongoDBAgent.rta_options:type_name -> inventory.v1.RTAOptions + 115, // 46: inventory.v1.RTAMongoDBAgent.status:type_name -> inventory.v1.AgentStatus + 116, // 47: inventory.v1.RTAMongoDBAgent.log_level:type_name -> inventory.v1.LogLevel + 88, // 48: inventory.v1.QANPostgreSQLPgStatementsAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent.CustomLabelsEntry + 115, // 49: inventory.v1.QANPostgreSQLPgStatementsAgent.status:type_name -> inventory.v1.AgentStatus + 116, // 50: inventory.v1.QANPostgreSQLPgStatementsAgent.log_level:type_name -> inventory.v1.LogLevel + 89, // 51: inventory.v1.QANPostgreSQLPgStatMonitorAgent.custom_labels:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent.CustomLabelsEntry + 115, // 52: inventory.v1.QANPostgreSQLPgStatMonitorAgent.status:type_name -> inventory.v1.AgentStatus + 116, // 53: inventory.v1.QANPostgreSQLPgStatMonitorAgent.log_level:type_name -> inventory.v1.LogLevel + 90, // 54: inventory.v1.RDSExporter.custom_labels:type_name -> inventory.v1.RDSExporter.CustomLabelsEntry + 115, // 55: inventory.v1.RDSExporter.status:type_name -> inventory.v1.AgentStatus + 116, // 56: inventory.v1.RDSExporter.log_level:type_name -> inventory.v1.LogLevel + 117, // 57: inventory.v1.RDSExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 91, // 58: inventory.v1.ExternalExporter.custom_labels:type_name -> inventory.v1.ExternalExporter.CustomLabelsEntry + 117, // 59: inventory.v1.ExternalExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 115, // 60: inventory.v1.ExternalExporter.status:type_name -> inventory.v1.AgentStatus + 92, // 61: inventory.v1.AzureDatabaseExporter.custom_labels:type_name -> inventory.v1.AzureDatabaseExporter.CustomLabelsEntry + 115, // 62: inventory.v1.AzureDatabaseExporter.status:type_name -> inventory.v1.AgentStatus + 116, // 63: inventory.v1.AzureDatabaseExporter.log_level:type_name -> inventory.v1.LogLevel + 117, // 64: inventory.v1.AzureDatabaseExporter.metrics_resolutions:type_name -> common.MetricsResolutions + 119, // 65: inventory.v1.ChangeCommonAgentParams.custom_labels:type_name -> common.StringMap + 117, // 66: inventory.v1.ChangeCommonAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 0, // 67: inventory.v1.ListAgentsRequest.agent_type:type_name -> inventory.v1.AgentType + 1, // 68: inventory.v1.ListAgentsResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 2, // 69: inventory.v1.ListAgentsResponse.vm_agent:type_name -> inventory.v1.VMAgent + 5, // 70: inventory.v1.ListAgentsResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 6, // 71: inventory.v1.ListAgentsResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 7, // 72: inventory.v1.ListAgentsResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 8, // 73: inventory.v1.ListAgentsResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 9, // 74: inventory.v1.ListAgentsResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 11, // 75: inventory.v1.ListAgentsResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 12, // 76: inventory.v1.ListAgentsResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 13, // 77: inventory.v1.ListAgentsResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 14, // 78: inventory.v1.ListAgentsResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 17, // 79: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 18, // 80: inventory.v1.ListAgentsResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 20, // 81: inventory.v1.ListAgentsResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 19, // 82: inventory.v1.ListAgentsResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 21, // 83: inventory.v1.ListAgentsResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 3, // 84: inventory.v1.ListAgentsResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 10, // 85: inventory.v1.ListAgentsResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 16, // 86: inventory.v1.ListAgentsResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent + 4, // 87: inventory.v1.ListAgentsResponse.otel_collector:type_name -> inventory.v1.OtelCollector + 1, // 88: inventory.v1.GetAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 2, // 89: inventory.v1.GetAgentResponse.vmagent:type_name -> inventory.v1.VMAgent + 5, // 90: inventory.v1.GetAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 6, // 91: inventory.v1.GetAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 7, // 92: inventory.v1.GetAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 8, // 93: inventory.v1.GetAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 9, // 94: inventory.v1.GetAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 11, // 95: inventory.v1.GetAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 12, // 96: inventory.v1.GetAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 13, // 97: inventory.v1.GetAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 14, // 98: inventory.v1.GetAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 17, // 99: inventory.v1.GetAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 18, // 100: inventory.v1.GetAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 20, // 101: inventory.v1.GetAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 19, // 102: inventory.v1.GetAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 21, // 103: inventory.v1.GetAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 3, // 104: inventory.v1.GetAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 10, // 105: inventory.v1.GetAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 16, // 106: inventory.v1.GetAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent + 4, // 107: inventory.v1.GetAgentResponse.otel_collector:type_name -> inventory.v1.OtelCollector + 33, // 108: inventory.v1.AddAgentRequest.pmm_agent:type_name -> inventory.v1.AddPMMAgentParams + 34, // 109: inventory.v1.AddAgentRequest.node_exporter:type_name -> inventory.v1.AddNodeExporterParams + 36, // 110: inventory.v1.AddAgentRequest.mysqld_exporter:type_name -> inventory.v1.AddMySQLdExporterParams + 38, // 111: inventory.v1.AddAgentRequest.mongodb_exporter:type_name -> inventory.v1.AddMongoDBExporterParams + 40, // 112: inventory.v1.AddAgentRequest.postgres_exporter:type_name -> inventory.v1.AddPostgresExporterParams + 42, // 113: inventory.v1.AddAgentRequest.proxysql_exporter:type_name -> inventory.v1.AddProxySQLExporterParams + 58, // 114: inventory.v1.AddAgentRequest.external_exporter:type_name -> inventory.v1.AddExternalExporterParams + 56, // 115: inventory.v1.AddAgentRequest.rds_exporter:type_name -> inventory.v1.AddRDSExporterParams + 60, // 116: inventory.v1.AddAgentRequest.azure_database_exporter:type_name -> inventory.v1.AddAzureDatabaseExporterParams + 44, // 117: inventory.v1.AddAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams + 46, // 118: inventory.v1.AddAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams + 48, // 119: inventory.v1.AddAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams + 50, // 120: inventory.v1.AddAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams + 52, // 121: inventory.v1.AddAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams + 54, // 122: inventory.v1.AddAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams + 63, // 123: inventory.v1.AddAgentRequest.valkey_exporter:type_name -> inventory.v1.AddValkeyExporterParams + 65, // 124: inventory.v1.AddAgentRequest.rta_mongodb_agent:type_name -> inventory.v1.AddRTAMongoDBAgentParams + 67, // 125: inventory.v1.AddAgentRequest.otel_collector:type_name -> inventory.v1.AddOtelCollectorParams + 1, // 126: inventory.v1.AddAgentResponse.pmm_agent:type_name -> inventory.v1.PMMAgent + 5, // 127: inventory.v1.AddAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 6, // 128: inventory.v1.AddAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 7, // 129: inventory.v1.AddAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 8, // 130: inventory.v1.AddAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 9, // 131: inventory.v1.AddAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 20, // 132: inventory.v1.AddAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 19, // 133: inventory.v1.AddAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 21, // 134: inventory.v1.AddAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 11, // 135: inventory.v1.AddAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 12, // 136: inventory.v1.AddAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 13, // 137: inventory.v1.AddAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 14, // 138: inventory.v1.AddAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 17, // 139: inventory.v1.AddAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 18, // 140: inventory.v1.AddAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 10, // 141: inventory.v1.AddAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 16, // 142: inventory.v1.AddAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent + 4, // 143: inventory.v1.AddAgentResponse.otel_collector:type_name -> inventory.v1.OtelCollector + 35, // 144: inventory.v1.ChangeAgentRequest.node_exporter:type_name -> inventory.v1.ChangeNodeExporterParams + 37, // 145: inventory.v1.ChangeAgentRequest.mysqld_exporter:type_name -> inventory.v1.ChangeMySQLdExporterParams + 39, // 146: inventory.v1.ChangeAgentRequest.mongodb_exporter:type_name -> inventory.v1.ChangeMongoDBExporterParams + 41, // 147: inventory.v1.ChangeAgentRequest.postgres_exporter:type_name -> inventory.v1.ChangePostgresExporterParams + 43, // 148: inventory.v1.ChangeAgentRequest.proxysql_exporter:type_name -> inventory.v1.ChangeProxySQLExporterParams + 59, // 149: inventory.v1.ChangeAgentRequest.external_exporter:type_name -> inventory.v1.ChangeExternalExporterParams + 57, // 150: inventory.v1.ChangeAgentRequest.rds_exporter:type_name -> inventory.v1.ChangeRDSExporterParams + 61, // 151: inventory.v1.ChangeAgentRequest.azure_database_exporter:type_name -> inventory.v1.ChangeAzureDatabaseExporterParams + 45, // 152: inventory.v1.ChangeAgentRequest.qan_mysql_perfschema_agent:type_name -> inventory.v1.ChangeQANMySQLPerfSchemaAgentParams + 47, // 153: inventory.v1.ChangeAgentRequest.qan_mysql_slowlog_agent:type_name -> inventory.v1.ChangeQANMySQLSlowlogAgentParams + 49, // 154: inventory.v1.ChangeAgentRequest.qan_mongodb_profiler_agent:type_name -> inventory.v1.ChangeQANMongoDBProfilerAgentParams + 51, // 155: inventory.v1.ChangeAgentRequest.qan_mongodb_mongolog_agent:type_name -> inventory.v1.ChangeQANMongoDBMongologAgentParams + 53, // 156: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams + 55, // 157: inventory.v1.ChangeAgentRequest.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams + 62, // 158: inventory.v1.ChangeAgentRequest.nomad_agent:type_name -> inventory.v1.ChangeNomadAgentParams + 64, // 159: inventory.v1.ChangeAgentRequest.valkey_exporter:type_name -> inventory.v1.ChangeValkeyExporterParams + 69, // 160: inventory.v1.ChangeAgentRequest.rta_mongodb_agent:type_name -> inventory.v1.ChangeRTAMongoDBAgentParams + 68, // 161: inventory.v1.ChangeAgentRequest.otel_collector:type_name -> inventory.v1.ChangeOtelCollectorParams + 5, // 162: inventory.v1.ChangeAgentResponse.node_exporter:type_name -> inventory.v1.NodeExporter + 6, // 163: inventory.v1.ChangeAgentResponse.mysqld_exporter:type_name -> inventory.v1.MySQLdExporter + 7, // 164: inventory.v1.ChangeAgentResponse.mongodb_exporter:type_name -> inventory.v1.MongoDBExporter + 8, // 165: inventory.v1.ChangeAgentResponse.postgres_exporter:type_name -> inventory.v1.PostgresExporter + 9, // 166: inventory.v1.ChangeAgentResponse.proxysql_exporter:type_name -> inventory.v1.ProxySQLExporter + 20, // 167: inventory.v1.ChangeAgentResponse.external_exporter:type_name -> inventory.v1.ExternalExporter + 19, // 168: inventory.v1.ChangeAgentResponse.rds_exporter:type_name -> inventory.v1.RDSExporter + 21, // 169: inventory.v1.ChangeAgentResponse.azure_database_exporter:type_name -> inventory.v1.AzureDatabaseExporter + 11, // 170: inventory.v1.ChangeAgentResponse.qan_mysql_perfschema_agent:type_name -> inventory.v1.QANMySQLPerfSchemaAgent + 12, // 171: inventory.v1.ChangeAgentResponse.qan_mysql_slowlog_agent:type_name -> inventory.v1.QANMySQLSlowlogAgent + 13, // 172: inventory.v1.ChangeAgentResponse.qan_mongodb_profiler_agent:type_name -> inventory.v1.QANMongoDBProfilerAgent + 14, // 173: inventory.v1.ChangeAgentResponse.qan_mongodb_mongolog_agent:type_name -> inventory.v1.QANMongoDBMongologAgent + 17, // 174: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatements_agent:type_name -> inventory.v1.QANPostgreSQLPgStatementsAgent + 18, // 175: inventory.v1.ChangeAgentResponse.qan_postgresql_pgstatmonitor_agent:type_name -> inventory.v1.QANPostgreSQLPgStatMonitorAgent + 3, // 176: inventory.v1.ChangeAgentResponse.nomad_agent:type_name -> inventory.v1.NomadAgent + 10, // 177: inventory.v1.ChangeAgentResponse.valkey_exporter:type_name -> inventory.v1.ValkeyExporter + 16, // 178: inventory.v1.ChangeAgentResponse.rta_mongodb_agent:type_name -> inventory.v1.RTAMongoDBAgent + 4, // 179: inventory.v1.ChangeAgentResponse.otel_collector:type_name -> inventory.v1.OtelCollector + 93, // 180: inventory.v1.AddPMMAgentParams.custom_labels:type_name -> inventory.v1.AddPMMAgentParams.CustomLabelsEntry + 94, // 181: inventory.v1.AddNodeExporterParams.custom_labels:type_name -> inventory.v1.AddNodeExporterParams.CustomLabelsEntry + 116, // 182: inventory.v1.AddNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 183: inventory.v1.ChangeNodeExporterParams.custom_labels:type_name -> common.StringMap + 117, // 184: inventory.v1.ChangeNodeExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 185: inventory.v1.ChangeNodeExporterParams.log_level:type_name -> inventory.v1.LogLevel + 95, // 186: inventory.v1.AddMySQLdExporterParams.custom_labels:type_name -> inventory.v1.AddMySQLdExporterParams.CustomLabelsEntry + 116, // 187: inventory.v1.AddMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel + 96, // 188: inventory.v1.AddMySQLdExporterParams.extra_dsn_params:type_name -> inventory.v1.AddMySQLdExporterParams.ExtraDsnParamsEntry + 119, // 189: inventory.v1.ChangeMySQLdExporterParams.custom_labels:type_name -> common.StringMap + 117, // 190: inventory.v1.ChangeMySQLdExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 191: inventory.v1.ChangeMySQLdExporterParams.log_level:type_name -> inventory.v1.LogLevel + 97, // 192: inventory.v1.AddMongoDBExporterParams.custom_labels:type_name -> inventory.v1.AddMongoDBExporterParams.CustomLabelsEntry + 116, // 193: inventory.v1.AddMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 194: inventory.v1.ChangeMongoDBExporterParams.custom_labels:type_name -> common.StringMap + 117, // 195: inventory.v1.ChangeMongoDBExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 196: inventory.v1.ChangeMongoDBExporterParams.log_level:type_name -> inventory.v1.LogLevel + 98, // 197: inventory.v1.AddPostgresExporterParams.custom_labels:type_name -> inventory.v1.AddPostgresExporterParams.CustomLabelsEntry + 116, // 198: inventory.v1.AddPostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 199: inventory.v1.ChangePostgresExporterParams.custom_labels:type_name -> common.StringMap + 117, // 200: inventory.v1.ChangePostgresExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 201: inventory.v1.ChangePostgresExporterParams.log_level:type_name -> inventory.v1.LogLevel + 99, // 202: inventory.v1.AddProxySQLExporterParams.custom_labels:type_name -> inventory.v1.AddProxySQLExporterParams.CustomLabelsEntry + 116, // 203: inventory.v1.AddProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 204: inventory.v1.ChangeProxySQLExporterParams.custom_labels:type_name -> common.StringMap + 117, // 205: inventory.v1.ChangeProxySQLExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 206: inventory.v1.ChangeProxySQLExporterParams.log_level:type_name -> inventory.v1.LogLevel + 100, // 207: inventory.v1.AddQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.CustomLabelsEntry + 116, // 208: inventory.v1.AddQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel + 101, // 209: inventory.v1.AddQANMySQLPerfSchemaAgentParams.extra_dsn_params:type_name -> inventory.v1.AddQANMySQLPerfSchemaAgentParams.ExtraDsnParamsEntry + 119, // 210: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.custom_labels:type_name -> common.StringMap + 117, // 211: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 212: inventory.v1.ChangeQANMySQLPerfSchemaAgentParams.log_level:type_name -> inventory.v1.LogLevel + 102, // 213: inventory.v1.AddQANMySQLSlowlogAgentParams.custom_labels:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.CustomLabelsEntry + 116, // 214: inventory.v1.AddQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel + 103, // 215: inventory.v1.AddQANMySQLSlowlogAgentParams.extra_dsn_params:type_name -> inventory.v1.AddQANMySQLSlowlogAgentParams.ExtraDsnParamsEntry + 119, // 216: inventory.v1.ChangeQANMySQLSlowlogAgentParams.custom_labels:type_name -> common.StringMap + 117, // 217: inventory.v1.ChangeQANMySQLSlowlogAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 218: inventory.v1.ChangeQANMySQLSlowlogAgentParams.log_level:type_name -> inventory.v1.LogLevel + 104, // 219: inventory.v1.AddQANMongoDBProfilerAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBProfilerAgentParams.CustomLabelsEntry + 116, // 220: inventory.v1.AddQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 221: inventory.v1.ChangeQANMongoDBProfilerAgentParams.custom_labels:type_name -> common.StringMap + 117, // 222: inventory.v1.ChangeQANMongoDBProfilerAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 223: inventory.v1.ChangeQANMongoDBProfilerAgentParams.log_level:type_name -> inventory.v1.LogLevel + 105, // 224: inventory.v1.AddQANMongoDBMongologAgentParams.custom_labels:type_name -> inventory.v1.AddQANMongoDBMongologAgentParams.CustomLabelsEntry + 116, // 225: inventory.v1.AddQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 226: inventory.v1.ChangeQANMongoDBMongologAgentParams.custom_labels:type_name -> common.StringMap + 117, // 227: inventory.v1.ChangeQANMongoDBMongologAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 228: inventory.v1.ChangeQANMongoDBMongologAgentParams.log_level:type_name -> inventory.v1.LogLevel + 106, // 229: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.CustomLabelsEntry + 116, // 230: inventory.v1.AddQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 231: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.custom_labels:type_name -> common.StringMap + 117, // 232: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 233: inventory.v1.ChangeQANPostgreSQLPgStatementsAgentParams.log_level:type_name -> inventory.v1.LogLevel + 107, // 234: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.CustomLabelsEntry + 116, // 235: inventory.v1.AddQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 236: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.custom_labels:type_name -> common.StringMap + 117, // 237: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 238: inventory.v1.ChangeQANPostgreSQLPgStatMonitorAgentParams.log_level:type_name -> inventory.v1.LogLevel + 108, // 239: inventory.v1.AddRDSExporterParams.custom_labels:type_name -> inventory.v1.AddRDSExporterParams.CustomLabelsEntry + 116, // 240: inventory.v1.AddRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 241: inventory.v1.ChangeRDSExporterParams.custom_labels:type_name -> common.StringMap + 117, // 242: inventory.v1.ChangeRDSExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 243: inventory.v1.ChangeRDSExporterParams.log_level:type_name -> inventory.v1.LogLevel + 109, // 244: inventory.v1.AddExternalExporterParams.custom_labels:type_name -> inventory.v1.AddExternalExporterParams.CustomLabelsEntry + 119, // 245: inventory.v1.ChangeExternalExporterParams.custom_labels:type_name -> common.StringMap + 117, // 246: inventory.v1.ChangeExternalExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 110, // 247: inventory.v1.AddAzureDatabaseExporterParams.custom_labels:type_name -> inventory.v1.AddAzureDatabaseExporterParams.CustomLabelsEntry + 116, // 248: inventory.v1.AddAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 249: inventory.v1.ChangeAzureDatabaseExporterParams.custom_labels:type_name -> common.StringMap + 117, // 250: inventory.v1.ChangeAzureDatabaseExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 251: inventory.v1.ChangeAzureDatabaseExporterParams.log_level:type_name -> inventory.v1.LogLevel + 111, // 252: inventory.v1.AddValkeyExporterParams.custom_labels:type_name -> inventory.v1.AddValkeyExporterParams.CustomLabelsEntry + 116, // 253: inventory.v1.AddValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel + 119, // 254: inventory.v1.ChangeValkeyExporterParams.custom_labels:type_name -> common.StringMap + 117, // 255: inventory.v1.ChangeValkeyExporterParams.metrics_resolutions:type_name -> common.MetricsResolutions + 116, // 256: inventory.v1.ChangeValkeyExporterParams.log_level:type_name -> inventory.v1.LogLevel + 112, // 257: inventory.v1.AddRTAMongoDBAgentParams.custom_labels:type_name -> inventory.v1.AddRTAMongoDBAgentParams.CustomLabelsEntry + 116, // 258: inventory.v1.AddRTAMongoDBAgentParams.log_level:type_name -> inventory.v1.LogLevel + 15, // 259: inventory.v1.AddRTAMongoDBAgentParams.rta_options:type_name -> inventory.v1.RTAOptions + 113, // 260: inventory.v1.AddOtelCollectorParams.custom_labels:type_name -> inventory.v1.AddOtelCollectorParams.CustomLabelsEntry + 66, // 261: inventory.v1.AddOtelCollectorParams.log_sources:type_name -> inventory.v1.LogSource + 114, // 262: inventory.v1.ChangeOtelCollectorParams.merge_labels:type_name -> inventory.v1.ChangeOtelCollectorParams.MergeLabelsEntry + 66, // 263: inventory.v1.ChangeOtelCollectorParams.add_log_sources:type_name -> inventory.v1.LogSource + 119, // 264: inventory.v1.ChangeRTAMongoDBAgentParams.custom_labels:type_name -> common.StringMap + 116, // 265: inventory.v1.ChangeRTAMongoDBAgentParams.log_level:type_name -> inventory.v1.LogLevel + 15, // 266: inventory.v1.ChangeRTAMongoDBAgentParams.rta_options:type_name -> inventory.v1.RTAOptions + 23, // 267: inventory.v1.AgentsService.ListAgents:input_type -> inventory.v1.ListAgentsRequest + 25, // 268: inventory.v1.AgentsService.GetAgent:input_type -> inventory.v1.GetAgentRequest + 27, // 269: inventory.v1.AgentsService.GetAgentLogs:input_type -> inventory.v1.GetAgentLogsRequest + 29, // 270: inventory.v1.AgentsService.AddAgent:input_type -> inventory.v1.AddAgentRequest + 31, // 271: inventory.v1.AgentsService.ChangeAgent:input_type -> inventory.v1.ChangeAgentRequest + 70, // 272: inventory.v1.AgentsService.RemoveAgent:input_type -> inventory.v1.RemoveAgentRequest + 24, // 273: inventory.v1.AgentsService.ListAgents:output_type -> inventory.v1.ListAgentsResponse + 26, // 274: inventory.v1.AgentsService.GetAgent:output_type -> inventory.v1.GetAgentResponse + 28, // 275: inventory.v1.AgentsService.GetAgentLogs:output_type -> inventory.v1.GetAgentLogsResponse + 30, // 276: inventory.v1.AgentsService.AddAgent:output_type -> inventory.v1.AddAgentResponse + 32, // 277: inventory.v1.AgentsService.ChangeAgent:output_type -> inventory.v1.ChangeAgentResponse + 71, // 278: inventory.v1.AgentsService.RemoveAgent:output_type -> inventory.v1.RemoveAgentResponse + 273, // [273:279] is the sub-list for method output_type + 267, // [267:273] is the sub-list for method input_type + 267, // [267:267] is the sub-list for extension type_name + 267, // [267:267] is the sub-list for extension extendee + 0, // [0:267] is the sub-list for field type_name } func init() { file_inventory_v1_agents_proto_init() } @@ -12645,8 +13070,8 @@ func file_inventory_v1_agents_proto_init() { } file_inventory_v1_agent_status_proto_init() file_inventory_v1_log_level_proto_init() - file_inventory_v1_agents_proto_msgTypes[20].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[24].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[21].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[25].OneofWrappers = []any{ (*GetAgentResponse_PmmAgent)(nil), (*GetAgentResponse_Vmagent)(nil), (*GetAgentResponse_NodeExporter)(nil), @@ -12666,8 +13091,9 @@ func file_inventory_v1_agents_proto_init() { (*GetAgentResponse_NomadAgent)(nil), (*GetAgentResponse_ValkeyExporter)(nil), (*GetAgentResponse_RtaMongodbAgent)(nil), + (*GetAgentResponse_OtelCollector)(nil), } - file_inventory_v1_agents_proto_msgTypes[27].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[28].OneofWrappers = []any{ (*AddAgentRequest_PmmAgent)(nil), (*AddAgentRequest_NodeExporter)(nil), (*AddAgentRequest_MysqldExporter)(nil), @@ -12685,8 +13111,9 @@ func file_inventory_v1_agents_proto_init() { (*AddAgentRequest_QanPostgresqlPgstatmonitorAgent)(nil), (*AddAgentRequest_ValkeyExporter)(nil), (*AddAgentRequest_RtaMongodbAgent)(nil), + (*AddAgentRequest_OtelCollector)(nil), } - file_inventory_v1_agents_proto_msgTypes[28].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[29].OneofWrappers = []any{ (*AddAgentResponse_PmmAgent)(nil), (*AddAgentResponse_NodeExporter)(nil), (*AddAgentResponse_MysqldExporter)(nil), @@ -12704,8 +13131,9 @@ func file_inventory_v1_agents_proto_init() { (*AddAgentResponse_QanPostgresqlPgstatmonitorAgent)(nil), (*AddAgentResponse_ValkeyExporter)(nil), (*AddAgentResponse_RtaMongodbAgent)(nil), + (*AddAgentResponse_OtelCollector)(nil), } - file_inventory_v1_agents_proto_msgTypes[29].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[30].OneofWrappers = []any{ (*ChangeAgentRequest_NodeExporter)(nil), (*ChangeAgentRequest_MysqldExporter)(nil), (*ChangeAgentRequest_MongodbExporter)(nil), @@ -12723,8 +13151,9 @@ func file_inventory_v1_agents_proto_init() { (*ChangeAgentRequest_NomadAgent)(nil), (*ChangeAgentRequest_ValkeyExporter)(nil), (*ChangeAgentRequest_RtaMongodbAgent)(nil), + (*ChangeAgentRequest_OtelCollector)(nil), } - file_inventory_v1_agents_proto_msgTypes[30].OneofWrappers = []any{ + file_inventory_v1_agents_proto_msgTypes[31].OneofWrappers = []any{ (*ChangeAgentResponse_NodeExporter)(nil), (*ChangeAgentResponse_MysqldExporter)(nil), (*ChangeAgentResponse_MongodbExporter)(nil), @@ -12742,31 +13171,33 @@ func file_inventory_v1_agents_proto_init() { (*ChangeAgentResponse_NomadAgent)(nil), (*ChangeAgentResponse_ValkeyExporter)(nil), (*ChangeAgentResponse_RtaMongodbAgent)(nil), - } - file_inventory_v1_agents_proto_msgTypes[33].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[35].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[37].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[39].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[41].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[43].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[45].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[47].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[49].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[51].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[53].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[55].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[57].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[59].OneofWrappers = []any{} + (*ChangeAgentResponse_OtelCollector)(nil), + } + file_inventory_v1_agents_proto_msgTypes[34].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[36].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[38].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[40].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[42].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[44].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[46].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[48].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[50].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[52].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[54].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[56].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[58].OneofWrappers = []any{} file_inventory_v1_agents_proto_msgTypes[60].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[62].OneofWrappers = []any{} - file_inventory_v1_agents_proto_msgTypes[64].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[61].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[63].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[67].OneofWrappers = []any{} + file_inventory_v1_agents_proto_msgTypes[68].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_inventory_v1_agents_proto_rawDesc), len(file_inventory_v1_agents_proto_rawDesc)), NumEnums: 1, - NumMessages: 107, + NumMessages: 114, NumExtensions: 0, NumServices: 1, }, diff --git a/api/inventory/v1/agents.pb.validate.go b/api/inventory/v1/agents.pb.validate.go index 7e45f186227..fd31540590e 100644 --- a/api/inventory/v1/agents.pb.validate.go +++ b/api/inventory/v1/agents.pb.validate.go @@ -366,6 +366,118 @@ var _ interface { ErrorName() string } = NomadAgentValidationError{} +// Validate checks the field values on OtelCollector 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 *OtelCollector) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on OtelCollector 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 OtelCollectorMultiError, or +// nil if none found. +func (m *OtelCollector) ValidateAll() error { + return m.validate(true) +} + +func (m *OtelCollector) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for AgentId + + // no validation rules for PmmAgentId + + // no validation rules for Disabled + + // no validation rules for CustomLabels + + // no validation rules for Status + + // no validation rules for ProcessExecPath + + if len(errors) > 0 { + return OtelCollectorMultiError(errors) + } + + return nil +} + +// OtelCollectorMultiError is an error wrapping multiple validation errors +// returned by OtelCollector.ValidateAll() if the designated constraints +// aren't met. +type OtelCollectorMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m OtelCollectorMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m OtelCollectorMultiError) AllErrors() []error { return m } + +// OtelCollectorValidationError is the validation error returned by +// OtelCollector.Validate if the designated constraints aren't met. +type OtelCollectorValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e OtelCollectorValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e OtelCollectorValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e OtelCollectorValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e OtelCollectorValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e OtelCollectorValidationError) ErrorName() string { return "OtelCollectorValidationError" } + +// Error satisfies the builtin error interface +func (e OtelCollectorValidationError) 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 %sOtelCollector.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = OtelCollectorValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = OtelCollectorValidationError{} + // Validate checks the field values on NodeExporter 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. @@ -2909,6 +3021,7 @@ func (m *ChangeCommonAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -2937,6 +3050,7 @@ func (m *ChangeCommonAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -3801,6 +3915,40 @@ func (m *ListAgentsResponse) validate(all bool) error { } + for idx, item := range m.GetOtelCollector() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListAgentsResponseValidationError{ + field: fmt.Sprintf("OtelCollector[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListAgentsResponseValidationError{ + field: fmt.Sprintf("OtelCollector[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListAgentsResponseValidationError{ + field: fmt.Sprintf("OtelCollector[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + if len(errors) > 0 { return ListAgentsResponseMultiError(errors) } @@ -4794,6 +4942,47 @@ func (m *GetAgentResponse) validate(all bool) error { } } + case *GetAgentResponse_OtelCollector: + if v == nil { + err := GetAgentResponseValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOtelCollector()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOtelCollector()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -5815,6 +6004,47 @@ func (m *AddAgentRequest) validate(all bool) error { } } + case *AddAgentRequest_OtelCollector: + if v == nil { + err := AddAgentRequestValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOtelCollector()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddAgentRequestValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddAgentRequestValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOtelCollector()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddAgentRequestValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -6617,6 +6847,47 @@ func (m *AddAgentResponse) validate(all bool) error { } } + case *AddAgentResponse_OtelCollector: + if v == nil { + err := AddAgentResponseValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOtelCollector()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOtelCollector()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -7430,28 +7701,69 @@ func (m *ChangeAgentRequest) validate(all bool) error { } } - default: - _ = v // ensures v is used - } - - if len(errors) > 0 { - return ChangeAgentRequestMultiError(errors) - } - - return nil -} - -// ChangeAgentRequestMultiError is an error wrapping multiple validation errors -// returned by ChangeAgentRequest.ValidateAll() if the designated constraints -// aren't met. -type ChangeAgentRequestMultiError []error + case *ChangeAgentRequest_OtelCollector: + if v == nil { + err := ChangeAgentRequestValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } -// Error returns a concatenation of all the error messages it wraps. -func (m ChangeAgentRequestMultiError) Error() string { - msgs := make([]string, 0, len(m)) - for _, err := range m { - msgs = append(msgs, err.Error()) - } + if all { + switch v := interface{}(m.GetOtelCollector()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeAgentRequestValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeAgentRequestValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOtelCollector()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeAgentRequestValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + } + } + } + + default: + _ = v // ensures v is used + } + + if len(errors) > 0 { + return ChangeAgentRequestMultiError(errors) + } + + return nil +} + +// ChangeAgentRequestMultiError is an error wrapping multiple validation errors +// returned by ChangeAgentRequest.ValidateAll() if the designated constraints +// aren't met. +type ChangeAgentRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ChangeAgentRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } return strings.Join(msgs, "; ") } @@ -8234,6 +8546,47 @@ func (m *ChangeAgentResponse) validate(all bool) error { } } + case *ChangeAgentResponse_OtelCollector: + if v == nil { + err := ChangeAgentResponseValidationError{ + field: "Agent", + reason: "oneof value cannot be a typed-nil", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(m.GetOtelCollector()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetOtelCollector()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeAgentResponseValidationError{ + field: "OtelCollector", + reason: "embedded message failed validation", + cause: err, + } + } + } + default: _ = v // ensures v is used } @@ -8610,6 +8963,7 @@ func (m *ChangeNodeExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8638,6 +8992,7 @@ func (m *ChangeNodeExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -8951,6 +9306,7 @@ func (m *ChangeMySQLdExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -8979,6 +9335,7 @@ func (m *ChangeMySQLdExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -9327,6 +9684,7 @@ func (m *ChangeMongoDBExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9355,6 +9713,7 @@ func (m *ChangeMongoDBExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -9721,6 +10080,7 @@ func (m *ChangePostgresExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -9749,6 +10109,7 @@ func (m *ChangePostgresExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10097,6 +10458,7 @@ func (m *ChangeProxySQLExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10125,6 +10487,7 @@ func (m *ChangeProxySQLExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10461,6 +10824,7 @@ func (m *ChangeQANMySQLPerfSchemaAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10489,6 +10853,7 @@ func (m *ChangeQANMySQLPerfSchemaAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -10846,6 +11211,7 @@ func (m *ChangeQANMySQLSlowlogAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -10874,6 +11240,7 @@ func (m *ChangeQANMySQLSlowlogAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -11224,6 +11591,7 @@ func (m *ChangeQANMongoDBProfilerAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -11252,6 +11620,7 @@ func (m *ChangeQANMongoDBProfilerAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -11594,6 +11963,7 @@ func (m *ChangeQANMongoDBMongologAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -11622,6 +11992,7 @@ func (m *ChangeQANMongoDBMongologAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -11973,6 +12344,7 @@ func (m *ChangeQANPostgreSQLPgStatementsAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -12001,6 +12373,7 @@ func (m *ChangeQANPostgreSQLPgStatementsAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -12350,6 +12723,7 @@ func (m *ChangeQANPostgreSQLPgStatMonitorAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -12378,6 +12752,7 @@ func (m *ChangeQANPostgreSQLPgStatMonitorAgentParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -12706,6 +13081,7 @@ func (m *ChangeRDSExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -12734,6 +13110,7 @@ func (m *ChangeRDSExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -13036,6 +13413,7 @@ func (m *ChangeExternalExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -13064,6 +13442,7 @@ func (m *ChangeExternalExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -13378,6 +13757,7 @@ func (m *ChangeAzureDatabaseExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -13406,6 +13786,7 @@ func (m *ChangeAzureDatabaseExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -13848,6 +14229,7 @@ func (m *ChangeValkeyExporterParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -13876,6 +14258,7 @@ func (m *ChangeValkeyExporterParams) validate(all bool) error { } } } + } if m.EnablePushMetrics != nil { @@ -13883,6 +14266,7 @@ func (m *ChangeValkeyExporterParams) validate(all bool) error { } if m.Username != nil { + if utf8.RuneCountInString(m.GetUsername()) < 1 { err := ChangeValkeyExporterParamsValidationError{ field: "Username", @@ -13893,6 +14277,7 @@ func (m *ChangeValkeyExporterParams) validate(all bool) error { } errors = append(errors, err) } + } if m.Password != nil { @@ -14186,6 +14571,411 @@ var _ interface { ErrorName() string } = AddRTAMongoDBAgentParamsValidationError{} +// Validate checks the field values on LogSource 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 *LogSource) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LogSource 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 LogSourceMultiError, or nil +// if none found. +func (m *LogSource) ValidateAll() error { + return m.validate(true) +} + +func (m *LogSource) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPath()) < 1 { + err := LogSourceValidationError{ + field: "Path", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for Preset + + if len(errors) > 0 { + return LogSourceMultiError(errors) + } + + return nil +} + +// LogSourceMultiError is an error wrapping multiple validation errors returned +// by LogSource.ValidateAll() if the designated constraints aren't met. +type LogSourceMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LogSourceMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LogSourceMultiError) AllErrors() []error { return m } + +// LogSourceValidationError is the validation error returned by +// LogSource.Validate if the designated constraints aren't met. +type LogSourceValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LogSourceValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LogSourceValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LogSourceValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LogSourceValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LogSourceValidationError) ErrorName() string { return "LogSourceValidationError" } + +// Error satisfies the builtin error interface +func (e LogSourceValidationError) 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 %sLogSource.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LogSourceValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LogSourceValidationError{} + +// Validate checks the field values on AddOtelCollectorParams 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 *AddOtelCollectorParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddOtelCollectorParams 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 +// AddOtelCollectorParamsMultiError, or nil if none found. +func (m *AddOtelCollectorParams) ValidateAll() error { + return m.validate(true) +} + +func (m *AddOtelCollectorParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if utf8.RuneCountInString(m.GetPmmAgentId()) < 1 { + err := AddOtelCollectorParamsValidationError{ + field: "PmmAgentId", + reason: "value length must be at least 1 runes", + } + if !all { + return err + } + errors = append(errors, err) + } + + // no validation rules for CustomLabels + + for idx, item := range m.GetLogSources() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddOtelCollectorParamsValidationError{ + field: fmt.Sprintf("LogSources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddOtelCollectorParamsValidationError{ + field: fmt.Sprintf("LogSources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddOtelCollectorParamsValidationError{ + field: fmt.Sprintf("LogSources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return AddOtelCollectorParamsMultiError(errors) + } + + return nil +} + +// AddOtelCollectorParamsMultiError is an error wrapping multiple validation +// errors returned by AddOtelCollectorParams.ValidateAll() if the designated +// constraints aren't met. +type AddOtelCollectorParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddOtelCollectorParamsMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddOtelCollectorParamsMultiError) AllErrors() []error { return m } + +// AddOtelCollectorParamsValidationError is the validation error returned by +// AddOtelCollectorParams.Validate if the designated constraints aren't met. +type AddOtelCollectorParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddOtelCollectorParamsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddOtelCollectorParamsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddOtelCollectorParamsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddOtelCollectorParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddOtelCollectorParamsValidationError) ErrorName() string { + return "AddOtelCollectorParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e AddOtelCollectorParamsValidationError) 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 %sAddOtelCollectorParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddOtelCollectorParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddOtelCollectorParamsValidationError{} + +// Validate checks the field values on ChangeOtelCollectorParams 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 *ChangeOtelCollectorParams) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ChangeOtelCollectorParams 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 +// ChangeOtelCollectorParamsMultiError, or nil if none found. +func (m *ChangeOtelCollectorParams) ValidateAll() error { + return m.validate(true) +} + +func (m *ChangeOtelCollectorParams) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for MergeLabels + + for idx, item := range m.GetAddLogSources() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeOtelCollectorParamsValidationError{ + field: fmt.Sprintf("AddLogSources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeOtelCollectorParamsValidationError{ + field: fmt.Sprintf("AddLogSources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeOtelCollectorParamsValidationError{ + field: fmt.Sprintf("AddLogSources[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + // no validation rules for RemoveLegacyLogFilePaths + + if m.Enable != nil { + // no validation rules for Enable + } + + if len(errors) > 0 { + return ChangeOtelCollectorParamsMultiError(errors) + } + + return nil +} + +// ChangeOtelCollectorParamsMultiError is an error wrapping multiple validation +// errors returned by ChangeOtelCollectorParams.ValidateAll() if the +// designated constraints aren't met. +type ChangeOtelCollectorParamsMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ChangeOtelCollectorParamsMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ChangeOtelCollectorParamsMultiError) AllErrors() []error { return m } + +// ChangeOtelCollectorParamsValidationError is the validation error returned by +// ChangeOtelCollectorParams.Validate if the designated constraints aren't met. +type ChangeOtelCollectorParamsValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ChangeOtelCollectorParamsValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ChangeOtelCollectorParamsValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ChangeOtelCollectorParamsValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ChangeOtelCollectorParamsValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ChangeOtelCollectorParamsValidationError) ErrorName() string { + return "ChangeOtelCollectorParamsValidationError" +} + +// Error satisfies the builtin error interface +func (e ChangeOtelCollectorParamsValidationError) 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 %sChangeOtelCollectorParams.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ChangeOtelCollectorParamsValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ChangeOtelCollectorParamsValidationError{} + // Validate checks the field values on ChangeRTAMongoDBAgentParams 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. @@ -14213,6 +15003,7 @@ func (m *ChangeRTAMongoDBAgentParams) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -14241,6 +15032,7 @@ func (m *ChangeRTAMongoDBAgentParams) validate(all bool) error { } } } + } if m.LogLevel != nil { @@ -14280,6 +15072,7 @@ func (m *ChangeRTAMongoDBAgentParams) validate(all bool) error { } if m.RtaOptions != nil { + if all { switch v := interface{}(m.GetRtaOptions()).(type) { case interface{ ValidateAll() error }: @@ -14308,6 +15101,7 @@ func (m *ChangeRTAMongoDBAgentParams) validate(all bool) error { } } } + } if len(errors) > 0 { diff --git a/api/inventory/v1/agents.proto b/api/inventory/v1/agents.proto index 05cd9b11959..dc42cdbe5a2 100644 --- a/api/inventory/v1/agents.proto +++ b/api/inventory/v1/agents.proto @@ -33,6 +33,7 @@ enum AgentType { AGENT_TYPE_AZURE_DATABASE_EXPORTER = 15; AGENT_TYPE_NOMAD_AGENT = 16; AGENT_TYPE_RTA_MONGODB_AGENT = 19; + AGENT_TYPE_OTEL_COLLECTOR = 20; } // PMMAgent runs on Generic or Container Node. @@ -97,6 +98,16 @@ message NomadAgent { uint32 listen_port = 12; } +// OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL. +message OtelCollector { + string agent_id = 1; + string pmm_agent_id = 2; + bool disabled = 3; + map custom_labels = 4; + AgentStatus status = 10; + string process_exec_path = 11; +} + // NodeExporter runs on Generic or Container Node and exposes its metrics. message NodeExporter { // Unique randomly generated instance identifier. @@ -794,6 +805,7 @@ message ListAgentsResponse { repeated NomadAgent nomad_agent = 16; repeated ValkeyExporter valkey_exporter = 17; repeated RTAMongoDBAgent rta_mongodb_agent = 19; + repeated OtelCollector otel_collector = 20; } // Get @@ -824,6 +836,7 @@ message GetAgentResponse { NomadAgent nomad_agent = 16; ValkeyExporter valkey_exporter = 17; RTAMongoDBAgent rta_mongodb_agent = 19; + OtelCollector otel_collector = 20; } } @@ -864,6 +877,7 @@ message AddAgentRequest { AddQANPostgreSQLPgStatMonitorAgentParams qan_postgresql_pgstatmonitor_agent = 14; AddValkeyExporterParams valkey_exporter = 15; AddRTAMongoDBAgentParams rta_mongodb_agent = 17; + AddOtelCollectorParams otel_collector = 18; } } @@ -886,6 +900,7 @@ message AddAgentResponse { QANPostgreSQLPgStatMonitorAgent qan_postgresql_pgstatmonitor_agent = 14; ValkeyExporter valkey_exporter = 15; RTAMongoDBAgent rta_mongodb_agent = 17; + OtelCollector otel_collector = 18; } } @@ -912,6 +927,7 @@ message ChangeAgentRequest { ChangeNomadAgentParams nomad_agent = 15; ChangeValkeyExporterParams valkey_exporter = 16; ChangeRTAMongoDBAgentParams rta_mongodb_agent = 18; + ChangeOtelCollectorParams otel_collector = 19; } } @@ -936,6 +952,7 @@ message ChangeAgentResponse { NomadAgent nomad_agent = 15; ValkeyExporter valkey_exporter = 16; RTAMongoDBAgent rta_mongodb_agent = 18; + OtelCollector otel_collector = 19; } } @@ -1976,6 +1993,31 @@ message AddRTAMongoDBAgentParams { RTAOptions rta_options = 14; } +// LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing). +message LogSource { + string path = 1 [(validate.rules).string.min_len = 1]; + string preset = 2; // Preset name from log_parser_presets table, or "raw" for no operators. +} + +message AddOtelCollectorParams { + string pmm_agent_id = 1 [(validate.rules).string.min_len = 1]; + map custom_labels = 2; + repeated string log_file_paths = 3; // Deprecated: use log_sources for per-path preset. If log_sources is empty, these are used with preset "raw". + repeated LogSource log_sources = 4; +} + +// ChangeOtelCollectorParams patches the single otel_collector agent per pmm-agent (merge_labels must not use keys log_sources or log_file_paths). +message ChangeOtelCollectorParams { + // Enable this Agent. Agents are enabled by default when they get added. + optional bool enable = 1; + // Keys to merge into custom labels (overwrite per key). Reserved keys log_sources and log_file_paths are rejected. + map merge_labels = 2; + // Append or update log sources; same path appears twice — last preset wins. + repeated LogSource add_log_sources = 3; + // If true, remove legacy log_file_paths label when present. + bool remove_legacy_log_file_paths = 4; +} + message ChangeRTAMongoDBAgentParams { // Enable this Agent. Agents are enabled by default when they get added. optional bool enable = 1; diff --git a/api/inventory/v1/agents.swagger.json b/api/inventory/v1/agents.swagger.json new file mode 100644 index 00000000000..d2bb62349db --- /dev/null +++ b/api/inventory/v1/agents.swagger.json @@ -0,0 +1,4552 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventory/v1/agents.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "AgentsService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/inventory/agents": { + "get": { + "summary": "List Agents", + "description": "Returns a list of all Agents.", + "operationId": "ListAgents", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListAgentsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "pmm_agent_id", + "description": "Return only Agents started by this pmm-agent.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "node_id", + "description": "Return only Agents that provide insights for that Node.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "service_id", + "description": "Return only Agents that provide insights for that Service.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "agent_type", + "description": "Return only agents of a particular type.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "AGENT_TYPE_UNSPECIFIED", + "AGENT_TYPE_PMM_AGENT", + "AGENT_TYPE_VM_AGENT", + "AGENT_TYPE_NODE_EXPORTER", + "AGENT_TYPE_MYSQLD_EXPORTER", + "AGENT_TYPE_MONGODB_EXPORTER", + "AGENT_TYPE_POSTGRES_EXPORTER", + "AGENT_TYPE_PROXYSQL_EXPORTER", + "AGENT_TYPE_VALKEY_EXPORTER", + "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", + "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", + "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "AGENT_TYPE_EXTERNAL_EXPORTER", + "AGENT_TYPE_RDS_EXPORTER", + "AGENT_TYPE_AZURE_DATABASE_EXPORTER", + "AGENT_TYPE_NOMAD_AGENT", + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_OTEL_COLLECTOR" + ], + "default": "AGENT_TYPE_UNSPECIFIED" + } + ], + "tags": [ + "AgentsService" + ] + }, + "post": { + "summary": "Add an Agent to Inventory", + "description": "Adds an Agent to Inventory. Only one agent at a time can be passed.", + "operationId": "AddAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddAgentRequest" + } + } + ], + "tags": [ + "AgentsService" + ] + } + }, + "/v1/inventory/agents/{agent_id}": { + "get": { + "summary": "Get Agent", + "description": "Returns a single Agent by ID.", + "operationId": "GetAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "agent_id", + "description": "Unique randomly generated instance identifier.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "AgentsService" + ] + }, + "delete": { + "summary": "Remove an Agent from Inventory", + "description": "Removes an Agent from Inventory.", + "operationId": "RemoveAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "force", + "description": "Remove agent with all dependencies.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "AgentsService" + ] + }, + "put": { + "summary": "Update an Agent in Inventory", + "description": "Updates an Agent in Inventory. Only one agent at a time can be passed.", + "operationId": "ChangeAgent", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeAgentResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AgentsServiceChangeAgentBody" + } + } + ], + "tags": [ + "AgentsService" + ] + } + }, + "/v1/inventory/agents/{agent_id}/logs": { + "get": { + "summary": "Get Agent logs", + "description": "Returns Agent logs by ID.", + "operationId": "GetAgentLogs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetAgentLogsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "agent_id", + "description": "Unique randomly generated instance identifier.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "limit", + "description": "Limit the number of log lines to this value. Pass 0 for no limit.", + "in": "query", + "required": false, + "type": "integer", + "format": "int64" + } + ], + "tags": [ + "AgentsService" + ] + } + } + }, + "definitions": { + "AgentsServiceChangeAgentBody": { + "type": "object", + "properties": { + "node_exporter": { + "$ref": "#/definitions/v1ChangeNodeExporterParams" + }, + "mysqld_exporter": { + "$ref": "#/definitions/v1ChangeMySQLdExporterParams" + }, + "mongodb_exporter": { + "$ref": "#/definitions/v1ChangeMongoDBExporterParams" + }, + "postgres_exporter": { + "$ref": "#/definitions/v1ChangePostgresExporterParams" + }, + "proxysql_exporter": { + "$ref": "#/definitions/v1ChangeProxySQLExporterParams" + }, + "external_exporter": { + "$ref": "#/definitions/v1ChangeExternalExporterParams" + }, + "rds_exporter": { + "$ref": "#/definitions/v1ChangeRDSExporterParams" + }, + "azure_database_exporter": { + "$ref": "#/definitions/v1ChangeAzureDatabaseExporterParams" + }, + "qan_mysql_perfschema_agent": { + "$ref": "#/definitions/v1ChangeQANMySQLPerfSchemaAgentParams" + }, + "qan_mysql_slowlog_agent": { + "$ref": "#/definitions/v1ChangeQANMySQLSlowlogAgentParams" + }, + "qan_mongodb_profiler_agent": { + "$ref": "#/definitions/v1ChangeQANMongoDBProfilerAgentParams" + }, + "qan_mongodb_mongolog_agent": { + "$ref": "#/definitions/v1ChangeQANMongoDBMongologAgentParams" + }, + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/v1ChangeQANPostgreSQLPgStatementsAgentParams" + }, + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/v1ChangeQANPostgreSQLPgStatMonitorAgentParams" + }, + "nomad_agent": { + "$ref": "#/definitions/v1ChangeNomadAgentParams" + }, + "valkey_exporter": { + "$ref": "#/definitions/v1ChangeValkeyExporterParams" + }, + "rta_mongodb_agent": { + "$ref": "#/definitions/v1ChangeRTAMongoDBAgentParams" + }, + "otel_collector": { + "$ref": "#/definitions/v1ChangeOtelCollectorParams" + } + } + }, + "commonMetricsResolutions": { + "type": "object", + "properties": { + "hr": { + "type": "string", + "description": "High resolution. In JSON should be represented as a string with number of seconds with `s` suffix." + }, + "mr": { + "type": "string", + "description": "Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix." + }, + "lr": { + "type": "string", + "description": "Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix." + } + }, + "description": "MetricsResolutions represents Prometheus exporters metrics resolutions." + }, + "commonStringMap": { + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1AddAgentRequest": { + "type": "object", + "properties": { + "pmm_agent": { + "$ref": "#/definitions/v1AddPMMAgentParams" + }, + "node_exporter": { + "$ref": "#/definitions/v1AddNodeExporterParams" + }, + "mysqld_exporter": { + "$ref": "#/definitions/v1AddMySQLdExporterParams" + }, + "mongodb_exporter": { + "$ref": "#/definitions/v1AddMongoDBExporterParams" + }, + "postgres_exporter": { + "$ref": "#/definitions/v1AddPostgresExporterParams" + }, + "proxysql_exporter": { + "$ref": "#/definitions/v1AddProxySQLExporterParams" + }, + "external_exporter": { + "$ref": "#/definitions/v1AddExternalExporterParams" + }, + "rds_exporter": { + "$ref": "#/definitions/v1AddRDSExporterParams" + }, + "azure_database_exporter": { + "$ref": "#/definitions/v1AddAzureDatabaseExporterParams" + }, + "qan_mysql_perfschema_agent": { + "$ref": "#/definitions/v1AddQANMySQLPerfSchemaAgentParams" + }, + "qan_mysql_slowlog_agent": { + "$ref": "#/definitions/v1AddQANMySQLSlowlogAgentParams" + }, + "qan_mongodb_profiler_agent": { + "$ref": "#/definitions/v1AddQANMongoDBProfilerAgentParams" + }, + "qan_mongodb_mongolog_agent": { + "$ref": "#/definitions/v1AddQANMongoDBMongologAgentParams" + }, + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/v1AddQANPostgreSQLPgStatementsAgentParams" + }, + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/v1AddQANPostgreSQLPgStatMonitorAgentParams" + }, + "valkey_exporter": { + "$ref": "#/definitions/v1AddValkeyExporterParams" + }, + "rta_mongodb_agent": { + "$ref": "#/definitions/v1AddRTAMongoDBAgentParams" + }, + "otel_collector": { + "$ref": "#/definitions/v1AddOtelCollectorParams" + } + } + }, + "v1AddAgentResponse": { + "type": "object", + "properties": { + "pmm_agent": { + "$ref": "#/definitions/v1PMMAgent" + }, + "node_exporter": { + "$ref": "#/definitions/v1NodeExporter" + }, + "mysqld_exporter": { + "$ref": "#/definitions/v1MySQLdExporter" + }, + "mongodb_exporter": { + "$ref": "#/definitions/v1MongoDBExporter" + }, + "postgres_exporter": { + "$ref": "#/definitions/v1PostgresExporter" + }, + "proxysql_exporter": { + "$ref": "#/definitions/v1ProxySQLExporter" + }, + "external_exporter": { + "$ref": "#/definitions/v1ExternalExporter" + }, + "rds_exporter": { + "$ref": "#/definitions/v1RDSExporter" + }, + "azure_database_exporter": { + "$ref": "#/definitions/v1AzureDatabaseExporter" + }, + "qan_mysql_perfschema_agent": { + "$ref": "#/definitions/v1QANMySQLPerfSchemaAgent" + }, + "qan_mysql_slowlog_agent": { + "$ref": "#/definitions/v1QANMySQLSlowlogAgent" + }, + "qan_mongodb_profiler_agent": { + "$ref": "#/definitions/v1QANMongoDBProfilerAgent" + }, + "qan_mongodb_mongolog_agent": { + "$ref": "#/definitions/v1QANMongoDBMongologAgent" + }, + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatementsAgent" + }, + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatMonitorAgent" + }, + "valkey_exporter": { + "$ref": "#/definitions/v1ValkeyExporter" + }, + "rta_mongodb_agent": { + "$ref": "#/definitions/v1RTAMongoDBAgent" + }, + "otel_collector": { + "$ref": "#/definitions/v1OtelCollector" + } + } + }, + "v1AddAzureDatabaseExporterParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "azure_client_id": { + "type": "string", + "title": "Azure client ID" + }, + "azure_client_secret": { + "type": "string", + "title": "Azure client secret" + }, + "azure_tenant_id": { + "type": "string", + "title": "Azure tanant ID" + }, + "azure_subscription_id": { + "type": "string", + "title": "Azure subscription ID" + }, + "azure_resource_group": { + "type": "string", + "description": "Azure resource group." + }, + "azure_database_resource_type": { + "type": "string", + "title": "Azure resource type (mysql, maria, postgres)" + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + } + }, + "v1AddExternalExporterParams": { + "type": "object", + "properties": { + "runs_on_node_id": { + "type": "string", + "description": "The node identifier where this instance is run." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "password": { + "type": "string", + "description": "HTTP basic auth password for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints(default: http)." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI(default: /metrics)." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname verification." + } + } + }, + "v1AddMongoDBExporterParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for scraping metrics." + }, + "password": { + "type": "string", + "description": "MongoDB password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "authentication_mechanism": { + "type": "string", + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." + }, + "authentication_database": { + "type": "string", + "description": "Authentication database." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of colletions to get stats from. Can use *" + }, + "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" + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "environment_variable_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Environment variable names to pass to the exporter.\nValues will be resolved from pmm-agent's environment when starting the exporter." + }, + "enable_all_collectors": { + "type": "boolean", + "description": "Enable all collectors." + } + } + }, + "v1AddMySQLdExporterParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "MySQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "description": "Tablestats group collectors will be 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." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + } + }, + "v1AddNodeExporterParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Expose the node_exporter process on all public interfaces" + } + } + }, + "v1AddOtelCollectorParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string" + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "log_file_paths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Deprecated: use log_sources for per-path preset. If log_sources is empty, these are used with preset \"raw\"." + }, + "log_sources": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1LogSource" + } + } + } + }, + "v1AddPMMAgentParams": { + "type": "object", + "properties": { + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1AddPostgresExporterParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "PostgreSQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "max_exporter_connections": { + "type": "integer", + "format": "int32", + "description": "Maximum number of connections that exporter can open to the database instance." + } + } + }, + "v1AddProxySQLExporterParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "ProxySQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "ProxySQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + } + } + }, + "v1AddQANMongoDBMongologAgentParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profile data." + }, + "password": { + "type": "string", + "description": "MongoDB password for getting profile data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "authentication_mechanism": { + "type": "string", + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." + }, + "authentication_database": { + "type": "string", + "description": "Authentication database." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for agent." + } + } + }, + "v1AddQANMongoDBProfilerAgentParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profile data." + }, + "password": { + "type": "string", + "description": "MongoDB password for getting profile data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "authentication_mechanism": { + "type": "string", + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." + }, + "authentication_database": { + "type": "string", + "description": "Authentication database." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for agent." + } + } + }, + "v1AddQANMySQLPerfSchemaAgentParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "password": { + "type": "string", + "description": "MySQL password for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + } + }, + "v1AddQANMySQLSlowlogAgentParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting slowlog data." + }, + "password": { + "type": "string", + "description": "MySQL password for getting slowlog data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "description": "Rotate slowlog file at this size if \u003e 0.\nUse zero or negative value to disable rotation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + } + }, + "v1AddQANPostgreSQLPgStatMonitorAgentParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat monitor data." + }, + "password": { + "type": "string", + "description": "PostgreSQL password for getting pg stat monitor data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + } + }, + "v1AddQANPostgreSQLPgStatementsAgentParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat statements data." + }, + "password": { + "type": "string", + "description": "PostgreSQL password for getting pg stat statements data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + } + }, + "v1AddRDSExporterParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "aws_secret_key": { + "type": "string", + "description": "AWS Secret Key." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_basic_metrics": { + "type": "boolean", + "description": "Disable basic metrics." + }, + "disable_enhanced_metrics": { + "type": "boolean", + "description": "Disable enhanced metrics." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + } + }, + "v1AddRTAMongoDBAgentParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting queries data." + }, + "password": { + "type": "string", + "description": "MongoDB password for getting queries data." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for agent." + }, + "tls": { + "type": "boolean", + "description": "MongoDB specific options.\nUse TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "authentication_mechanism": { + "type": "string", + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." + }, + "rta_options": { + "$ref": "#/definitions/v1RTAOptions", + "description": "Real-Time Analytics options." + } + } + }, + "v1AddValkeyExporterParams": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "Valkey username for scraping metrics." + }, + "password": { + "type": "string", + "description": "Valkey password for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "push_metrics": { + "type": "boolean", + "description": "Enables push metrics mode for exporter." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + } + }, + "v1AgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "default": "AGENT_STATUS_UNSPECIFIED", + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "v1AgentType": { + "type": "string", + "enum": [ + "AGENT_TYPE_UNSPECIFIED", + "AGENT_TYPE_PMM_AGENT", + "AGENT_TYPE_VM_AGENT", + "AGENT_TYPE_NODE_EXPORTER", + "AGENT_TYPE_MYSQLD_EXPORTER", + "AGENT_TYPE_MONGODB_EXPORTER", + "AGENT_TYPE_POSTGRES_EXPORTER", + "AGENT_TYPE_PROXYSQL_EXPORTER", + "AGENT_TYPE_VALKEY_EXPORTER", + "AGENT_TYPE_QAN_MYSQL_PERFSCHEMA_AGENT", + "AGENT_TYPE_QAN_MYSQL_SLOWLOG_AGENT", + "AGENT_TYPE_QAN_MONGODB_PROFILER_AGENT", + "AGENT_TYPE_QAN_MONGODB_MONGOLOG_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATEMENTS_AGENT", + "AGENT_TYPE_QAN_POSTGRESQL_PGSTATMONITOR_AGENT", + "AGENT_TYPE_EXTERNAL_EXPORTER", + "AGENT_TYPE_RDS_EXPORTER", + "AGENT_TYPE_AZURE_DATABASE_EXPORTER", + "AGENT_TYPE_NOMAD_AGENT", + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_OTEL_COLLECTOR" + ], + "default": "AGENT_TYPE_UNSPECIFIED", + "description": "AgentType describes supported Agent types." + }, + "v1AzureDatabaseExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "azure_database_subscription_id": { + "type": "string", + "description": "Azure database subscription ID." + }, + "azure_database_resource_type": { + "type": "string", + "title": "Azure database resource type (mysql, maria, postgres)" + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status (the same for several configurations)." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics (the same for several configurations)." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if the exporter operates in push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "AzureDatabaseExporter runs on Generic or Container Node and exposes RemoteAzure Node metrics." + }, + "v1ChangeAgentResponse": { + "type": "object", + "properties": { + "node_exporter": { + "$ref": "#/definitions/v1NodeExporter" + }, + "mysqld_exporter": { + "$ref": "#/definitions/v1MySQLdExporter" + }, + "mongodb_exporter": { + "$ref": "#/definitions/v1MongoDBExporter" + }, + "postgres_exporter": { + "$ref": "#/definitions/v1PostgresExporter" + }, + "proxysql_exporter": { + "$ref": "#/definitions/v1ProxySQLExporter" + }, + "external_exporter": { + "$ref": "#/definitions/v1ExternalExporter" + }, + "rds_exporter": { + "$ref": "#/definitions/v1RDSExporter" + }, + "azure_database_exporter": { + "$ref": "#/definitions/v1AzureDatabaseExporter" + }, + "qan_mysql_perfschema_agent": { + "$ref": "#/definitions/v1QANMySQLPerfSchemaAgent" + }, + "qan_mysql_slowlog_agent": { + "$ref": "#/definitions/v1QANMySQLSlowlogAgent" + }, + "qan_mongodb_profiler_agent": { + "$ref": "#/definitions/v1QANMongoDBProfilerAgent" + }, + "qan_mongodb_mongolog_agent": { + "$ref": "#/definitions/v1QANMongoDBMongologAgent" + }, + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatementsAgent" + }, + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatMonitorAgent" + }, + "nomad_agent": { + "$ref": "#/definitions/v1NomadAgent" + }, + "valkey_exporter": { + "$ref": "#/definitions/v1ValkeyExporter" + }, + "rta_mongodb_agent": { + "$ref": "#/definitions/v1RTAMongoDBAgent" + }, + "otel_collector": { + "$ref": "#/definitions/v1OtelCollector" + } + } + }, + "v1ChangeAzureDatabaseExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "azure_client_id": { + "type": "string", + "x-nullable": true, + "title": "Azure client ID" + }, + "azure_client_secret": { + "type": "string", + "x-nullable": true, + "title": "Azure client secret" + }, + "azure_tenant_id": { + "type": "string", + "x-nullable": true, + "title": "Azure tenant ID" + }, + "azure_subscription_id": { + "type": "string", + "x-nullable": true, + "title": "Azure subscription ID" + }, + "azure_resource_group": { + "type": "string", + "x-nullable": true, + "description": "Azure resource group." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ChangeExternalExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "HTTP basic auth username for collecting metrics." + }, + "scheme": { + "type": "string", + "x-nullable": true, + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "x-nullable": true, + "description": "Path under which metrics are exposed, used to generate URI." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "x-nullable": true, + "description": "Listen port for scraping metrics." + } + } + }, + "v1ChangeMongoDBExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "MongoDB username for scraping metrics." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "MongoDB password for scraping metrics." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "x-nullable": true, + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "x-nullable": true, + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "Certificate Authority certificate chain." + }, + "skip_connection_check": { + "type": "boolean", + "x-nullable": true, + "description": "Skip connection check." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "authentication_mechanism": { + "type": "string", + "x-nullable": true, + "description": "Authentication mechanism." + }, + "authentication_database": { + "type": "string", + "x-nullable": true, + "description": "Authentication database." + }, + "agent_password": { + "type": "string", + "x-nullable": true, + "description": "Custom password for exporter endpoint /metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of collections to get stats from. Can use *" + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "title": "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" + }, + "enable_all_collectors": { + "type": "boolean", + "x-nullable": true, + "description": "Enable all collectors." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "x-nullable": true, + "description": "Optionally expose the exporter process on all public interfaces." + } + } + }, + "v1ChangeMySQLdExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "MySQL username for scraping metrics." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "MySQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "x-nullable": true, + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "x-nullable": true, + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Tablestats group collectors will be disabled if there are more than that number of tables." + }, + "skip_connection_check": { + "type": "boolean", + "x-nullable": true, + "description": "Skip connection check." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "x-nullable": true, + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "x-nullable": true, + "description": "Optionally expose the exporter process on all public interfaces." + } + } + }, + "v1ChangeNodeExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "x-nullable": true, + "description": "Expose the node_exporter process on all public interfaces." + } + } + }, + "v1ChangeNomadAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + } + } + }, + "v1ChangeOtelCollectorParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "merge_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Keys to merge into custom labels (overwrite per key). Reserved keys log_sources and log_file_paths are rejected." + }, + "add_log_sources": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1LogSource" + }, + "description": "Append or update log sources; same path appears twice — last preset wins." + }, + "remove_legacy_log_file_paths": { + "type": "boolean", + "description": "If true, remove legacy log_file_paths label when present." + } + }, + "description": "ChangeOtelCollectorParams patches the single otel_collector agent per pmm-agent (merge_labels must not use keys log_sources or log_file_paths)." + }, + "v1ChangePostgresExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "PostgreSQL username for scraping metrics." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "PostgreSQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "skip_connection_check": { + "type": "boolean", + "x-nullable": true, + "description": "Skip connection check." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "x-nullable": true, + "description": "TLS Certificate." + }, + "tls_key": { + "type": "string", + "x-nullable": true, + "description": "TLS Certificate Key." + }, + "agent_password": { + "type": "string", + "x-nullable": true, + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Limit of databases for auto-discovery." + }, + "expose_exporter": { + "type": "boolean", + "x-nullable": true, + "description": "Optionally expose the exporter process on all public interfaces." + }, + "max_exporter_connections": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Maximum number of connections that exporter can open to the database instance." + } + } + }, + "v1ChangeProxySQLExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "ProxySQL username for scraping metrics." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "ProxySQL password for scraping metrics." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "x-nullable": true, + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "x-nullable": true, + "description": "Optionally expose the exporter process on all public interfaces." + } + } + }, + "v1ChangeQANMongoDBMongologAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "MongoDB username for getting mongolog data." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "MongoDB password for getting mongolog data." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "x-nullable": true, + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "x-nullable": true, + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "Certificate Authority certificate chain." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "authentication_mechanism": { + "type": "string", + "x-nullable": true, + "description": "Authentication mechanism." + }, + "authentication_database": { + "type": "string", + "x-nullable": true, + "description": "Authentication database." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ChangeQANMongoDBProfilerAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "MongoDB username for getting profile data." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "MongoDB password for getting profile data." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "x-nullable": true, + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "x-nullable": true, + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "Certificate Authority certificate chain." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "authentication_mechanism": { + "type": "string", + "x-nullable": true, + "description": "Authentication mechanism." + }, + "authentication_database": { + "type": "string", + "x-nullable": true, + "description": "Authentication database." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ChangeQANMySQLPerfSchemaAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "MySQL username for getting performance data." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "MySQL password for getting performance data." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "x-nullable": true, + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "x-nullable": true, + "description": "Password for decrypting tls_cert." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "x-nullable": true, + "description": "Disable query examples." + }, + "skip_connection_check": { + "type": "boolean", + "x-nullable": true, + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "x-nullable": true, + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ChangeQANMySQLSlowlogAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "MySQL username for getting slowlog data." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "MySQL password for getting slowlog data." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "x-nullable": true, + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "x-nullable": true, + "description": "Password for decrypting tls_cert." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "x-nullable": true, + "description": "Disable query examples." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "x-nullable": true, + "description": "Rotate slowlog file at this size if \u003e 0." + }, + "skip_connection_check": { + "type": "boolean", + "x-nullable": true, + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "x-nullable": true, + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ChangeQANPostgreSQLPgStatMonitorAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "PostgreSQL username for getting pg stat monitor data." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "PostgreSQL password for getting pg stat monitor data." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "x-nullable": true, + "description": "Disable query examples." + }, + "disable_comments_parsing": { + "type": "boolean", + "x-nullable": true, + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "x-nullable": true, + "description": "TLS Certificate." + }, + "tls_key": { + "type": "string", + "x-nullable": true, + "description": "TLS Certificate Key." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ChangeQANPostgreSQLPgStatementsAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "PostgreSQL username for getting pg stat statements data." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "PostgreSQL password for getting pg stat statements data." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "disable_comments_parsing": { + "type": "boolean", + "x-nullable": true, + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "x-nullable": true, + "description": "TLS Certificate." + }, + "tls_key": { + "type": "string", + "x-nullable": true, + "description": "TLS Certificate Key." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ChangeRDSExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "aws_access_key": { + "type": "string", + "x-nullable": true, + "description": "AWS Access Key." + }, + "aws_secret_key": { + "type": "string", + "x-nullable": true, + "description": "AWS Secret Key." + }, + "disable_basic_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Disable basic metrics." + }, + "disable_enhanced_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Disable enhanced metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ChangeRTAMongoDBAgentParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "MongoDB username for getting profile data." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "MongoDB password for getting profile data." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "x-nullable": true, + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "x-nullable": true, + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "Certificate Authority certificate chain." + }, + "authentication_mechanism": { + "type": "string", + "x-nullable": true, + "description": "Authentication mechanism." + }, + "rta_options": { + "$ref": "#/definitions/v1RTAOptions", + "x-nullable": true, + "description": "Real-Time Analytics options." + } + } + }, + "v1ChangeValkeyExporterParams": { + "type": "object", + "properties": { + "enable": { + "type": "boolean", + "x-nullable": true, + "description": "Enable this Agent. Agents are enabled by default when they get added." + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + }, + "enable_push_metrics": { + "type": "boolean", + "x-nullable": true, + "description": "Enables push metrics with vmagent." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "username": { + "type": "string", + "x-nullable": true, + "description": "Valkey username for scraping metrics." + }, + "password": { + "type": "string", + "x-nullable": true, + "description": "Valkey password for scraping metrics." + }, + "tls": { + "type": "boolean", + "x-nullable": true, + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "x-nullable": true, + "description": "Skip TLS certificate and hostname validation." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "tls_ca": { + "type": "string", + "x-nullable": true, + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "x-nullable": true, + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "x-nullable": true, + "description": "TLS Certificate Key." + }, + "agent_password": { + "type": "string", + "x-nullable": true, + "description": "Custom password for exporter endpoint /metrics." + }, + "expose_exporter": { + "type": "boolean", + "x-nullable": true, + "title": "Optionally expose the exporter process on all public interfaces" + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "x-nullable": true, + "description": "Log level for exporter." + } + } + }, + "v1ExternalExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "disabled": { + "type": "boolean", + "description": "If disabled, metrics from this exporter will not be collected." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname verification." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + } + }, + "description": "ExternalExporter runs on any Node type, including Remote Node." + }, + "v1GetAgentLogsResponse": { + "type": "object", + "properties": { + "logs": { + "type": "array", + "items": { + "type": "string" + } + }, + "agent_config_log_lines_count": { + "type": "integer", + "format": "int64" + } + } + }, + "v1GetAgentResponse": { + "type": "object", + "properties": { + "pmm_agent": { + "$ref": "#/definitions/v1PMMAgent" + }, + "vmagent": { + "$ref": "#/definitions/v1VMAgent" + }, + "node_exporter": { + "$ref": "#/definitions/v1NodeExporter" + }, + "mysqld_exporter": { + "$ref": "#/definitions/v1MySQLdExporter" + }, + "mongodb_exporter": { + "$ref": "#/definitions/v1MongoDBExporter" + }, + "postgres_exporter": { + "$ref": "#/definitions/v1PostgresExporter" + }, + "proxysql_exporter": { + "$ref": "#/definitions/v1ProxySQLExporter" + }, + "qan_mysql_perfschema_agent": { + "$ref": "#/definitions/v1QANMySQLPerfSchemaAgent" + }, + "qan_mysql_slowlog_agent": { + "$ref": "#/definitions/v1QANMySQLSlowlogAgent" + }, + "qan_mongodb_profiler_agent": { + "$ref": "#/definitions/v1QANMongoDBProfilerAgent" + }, + "qan_mongodb_mongolog_agent": { + "$ref": "#/definitions/v1QANMongoDBMongologAgent" + }, + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatementsAgent" + }, + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatMonitorAgent" + }, + "external_exporter": { + "$ref": "#/definitions/v1ExternalExporter" + }, + "rds_exporter": { + "$ref": "#/definitions/v1RDSExporter" + }, + "azure_database_exporter": { + "$ref": "#/definitions/v1AzureDatabaseExporter" + }, + "nomad_agent": { + "$ref": "#/definitions/v1NomadAgent" + }, + "valkey_exporter": { + "$ref": "#/definitions/v1ValkeyExporter" + }, + "rta_mongodb_agent": { + "$ref": "#/definitions/v1RTAMongoDBAgent" + }, + "otel_collector": { + "$ref": "#/definitions/v1OtelCollector" + } + } + }, + "v1ListAgentsResponse": { + "type": "object", + "properties": { + "pmm_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1PMMAgent" + } + }, + "vm_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1VMAgent" + } + }, + "node_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1NodeExporter" + } + }, + "mysqld_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MySQLdExporter" + } + }, + "mongodb_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MongoDBExporter" + } + }, + "postgres_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1PostgresExporter" + } + }, + "proxysql_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ProxySQLExporter" + } + }, + "qan_mysql_perfschema_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QANMySQLPerfSchemaAgent" + } + }, + "qan_mysql_slowlog_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QANMySQLSlowlogAgent" + } + }, + "qan_mongodb_profiler_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QANMongoDBProfilerAgent" + } + }, + "qan_mongodb_mongolog_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QANMongoDBMongologAgent" + } + }, + "qan_postgresql_pgstatements_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QANPostgreSQLPgStatementsAgent" + } + }, + "qan_postgresql_pgstatmonitor_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QANPostgreSQLPgStatMonitorAgent" + } + }, + "external_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ExternalExporter" + } + }, + "rds_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1RDSExporter" + } + }, + "azure_database_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AzureDatabaseExporter" + } + }, + "nomad_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1NomadAgent" + } + }, + "valkey_exporter": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ValkeyExporter" + } + }, + "rta_mongodb_agent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1RTAMongoDBAgent" + } + }, + "otel_collector": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1OtelCollector" + } + } + } + }, + "v1LogLevel": { + "type": "string", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "default": "LOG_LEVEL_UNSPECIFIED", + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "title": "Log level for exporters" + }, + "v1LogSource": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "preset": { + "type": "string", + "description": "Preset name from log_parser_presets table, or \"raw\" for no operators." + } + }, + "description": "LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing)." + }, + "v1MongoDBExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of colletions to get stats from. Can use *" + }, + "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" + }, + "enable_all_collectors": { + "type": "boolean", + "description": "Enable all collectors." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "environment_variable_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Environment variable names passed to the exporter." + } + }, + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics." + }, + "v1MySQLdExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "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." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Actual table count at the moment of adding." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "tablestats_group_disabled": { + "type": "boolean", + "description": "True if tablestats group collectors are currently disabled." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + }, + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics." + }, + "v1NodeExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "NodeExporter runs on Generic or Container Node and exposes its metrics." + }, + "v1NomadAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + } + } + }, + "v1OtelCollector": { + "type": "object", + "properties": { + "agent_id": { + "type": "string" + }, + "pmm_agent_id": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "status": { + "$ref": "#/definitions/v1AgentStatus" + }, + "process_exec_path": { + "type": "string" + } + }, + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL." + }, + "v1PMMAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + } + }, + "description": "PMMAgent runs on Generic or Container Node." + }, + "v1PostgresExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "max_exporter_connections": { + "type": "integer", + "format": "int32", + "description": "Maximum number of connections that exporter can open to the database instance." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics." + }, + "v1ProxySQLExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "ProxySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics." + }, + "v1QANMongoDBMongologAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profiler data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server." + }, + "v1QANMongoDBProfilerAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profiler data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server." + }, + "v1QANMySQLPerfSchemaAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + }, + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "v1QANMySQLSlowlogAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)" + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "description": "Slowlog file is rotated at this size if \u003e 0." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "title": "mod tidy" + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + }, + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "v1QANPostgreSQLPgStatMonitorAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat monitor data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "v1QANPostgreSQLPgStatementsAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat statements data." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "v1RDSExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status (the same for several configurations)." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics (the same for several configurations)." + }, + "basic_metrics_disabled": { + "type": "boolean", + "description": "Basic metrics are disabled." + }, + "enhanced_metrics_disabled": { + "type": "boolean", + "description": "Enhanced metrics are disabled." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics." + }, + "v1RTAMongoDBAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique agent identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profiler data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "rta_options": { + "$ref": "#/definitions/v1RTAOptions", + "description": "Real-Time Analytics options." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "RTAMongoDBAgent runs within pmm-agent and sends MongoDB Real-Time Query Analytics data to the PMM Server." + }, + "v1RTAOptions": { + "type": "object", + "properties": { + "collect_interval": { + "type": "string", + "description": "Query collect interval (default 2s is set by server)." + } + }, + "description": "RTAOptions holds Real-Time Query Analytics agent options." + }, + "v1RemoveAgentResponse": { + "type": "object" + }, + "v1VMAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + } + }, + "description": "VMAgent runs on Generic or Container Node alongside pmm-agent.\nIt scrapes other exporter Agents that are configured with push_metrics_enabled\nand uses Prometheus remote write protocol to push metrics to PMM Server." + }, + "v1ValkeyExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "Valkey username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname verification." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics." + } + } +} diff --git a/api/inventory/v1/agents_grpc.pb.go b/api/inventory/v1/agents_grpc.pb.go index 0b4c6fc63e1..bfb234718bc 100644 --- a/api/inventory/v1/agents_grpc.pb.go +++ b/api/inventory/v1/agents_grpc.pb.go @@ -8,7 +8,6 @@ package inventoryv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -147,23 +146,18 @@ type UnimplementedAgentsServiceServer struct{} func (UnimplementedAgentsServiceServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListAgents not implemented") } - func (UnimplementedAgentsServiceServer) GetAgent(context.Context, *GetAgentRequest) (*GetAgentResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAgent not implemented") } - func (UnimplementedAgentsServiceServer) GetAgentLogs(context.Context, *GetAgentLogsRequest) (*GetAgentLogsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetAgentLogs not implemented") } - func (UnimplementedAgentsServiceServer) AddAgent(context.Context, *AddAgentRequest) (*AddAgentResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddAgent not implemented") } - func (UnimplementedAgentsServiceServer) ChangeAgent(context.Context, *ChangeAgentRequest) (*ChangeAgentResponse, error) { return nil, status.Error(codes.Unimplemented, "method ChangeAgent not implemented") } - func (UnimplementedAgentsServiceServer) RemoveAgent(context.Context, *RemoveAgentRequest) (*RemoveAgentResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveAgent not implemented") } diff --git a/api/inventory/v1/json/client/agents_service/add_agent_parameters.go b/api/inventory/v1/json/client/agents_service/add_agent_parameters.go index eca45926526..cb8c62d2ad0 100644 --- a/api/inventory/v1/json/client/agents_service/add_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/add_agent_parameters.go @@ -60,6 +60,7 @@ AddAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAgentParams struct { + // Body. Body AddAgentBody @@ -129,6 +130,7 @@ func (o *AddAgentParams) SetBody(body AddAgentBody) { // WriteToRequest writes these params to a swagger request func (o *AddAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/add_agent_responses.go b/api/inventory/v1/json/client/agents_service/add_agent_responses.go index b11c2f86fc3..6f6227a2f2e 100644 --- a/api/inventory/v1/json/client/agents_service/add_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/add_agent_responses.go @@ -105,6 +105,7 @@ func (o *AddAgentOK) GetPayload() *AddAgentOKBody { } func (o *AddAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAgentOKBody) // response payload @@ -178,6 +179,7 @@ func (o *AddAgentDefault) GetPayload() *AddAgentDefaultBody { } func (o *AddAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAgentDefaultBody) // response payload @@ -193,6 +195,7 @@ AddAgentBody add agent body swagger:model AddAgentBody */ type AddAgentBody struct { + // azure database exporter AzureDatabaseExporter *AddAgentParamsBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -208,6 +211,9 @@ type AddAgentBody struct { // node exporter NodeExporter *AddAgentParamsBodyNodeExporter `json:"node_exporter,omitempty"` + // otel collector + OtelCollector *AddAgentParamsBodyOtelCollector `json:"otel_collector,omitempty"` + // pmm agent PMMAgent *AddAgentParamsBodyPMMAgent `json:"pmm_agent,omitempty"` @@ -269,6 +275,10 @@ func (o *AddAgentBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateOtelCollector(formats); err != nil { + res = append(res, err) + } + if err := o.validatePMMAgent(formats); err != nil { res = append(res, err) } @@ -438,6 +448,29 @@ func (o *AddAgentBody) validateNodeExporter(formats strfmt.Registry) error { return nil } +func (o *AddAgentBody) validateOtelCollector(formats strfmt.Registry) error { + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if o.OtelCollector != nil { + if err := o.OtelCollector.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *AddAgentBody) validatePMMAgent(formats strfmt.Registry) error { if swag.IsZero(o.PMMAgent) { // not required return nil @@ -738,6 +771,10 @@ func (o *AddAgentBody) ContextValidate(ctx context.Context, formats strfmt.Regis res = append(res, err) } + if err := o.contextValidateOtelCollector(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidatePMMAgent(ctx, formats); err != nil { res = append(res, err) } @@ -793,6 +830,7 @@ func (o *AddAgentBody) ContextValidate(ctx context.Context, formats strfmt.Regis } func (o *AddAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -817,6 +855,7 @@ func (o *AddAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, } func (o *AddAgentBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -841,6 +880,7 @@ func (o *AddAgentBody) contextValidateExternalExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -865,6 +905,7 @@ func (o *AddAgentBody) contextValidateMongodbExporter(ctx context.Context, forma } func (o *AddAgentBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -889,6 +930,7 @@ func (o *AddAgentBody) contextValidateMysqldExporter(ctx context.Context, format } func (o *AddAgentBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -912,7 +954,33 @@ func (o *AddAgentBody) contextValidateNodeExporter(ctx context.Context, formats return nil } +func (o *AddAgentBody) contextValidateOtelCollector(ctx context.Context, formats strfmt.Registry) error { + + if o.OtelCollector != nil { + + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if err := o.OtelCollector.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *AddAgentBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -937,6 +1005,7 @@ func (o *AddAgentBody) contextValidatePMMAgent(ctx context.Context, formats strf } func (o *AddAgentBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -961,6 +1030,7 @@ func (o *AddAgentBody) contextValidatePostgresExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -985,6 +1055,7 @@ func (o *AddAgentBody) contextValidateProxysqlExporter(ctx context.Context, form } func (o *AddAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -1009,6 +1080,7 @@ func (o *AddAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1033,6 +1105,7 @@ func (o *AddAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1057,6 +1130,7 @@ func (o *AddAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Contex } func (o *AddAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1081,6 +1155,7 @@ func (o *AddAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, } func (o *AddAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1105,6 +1180,7 @@ func (o *AddAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context } func (o *AddAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1129,6 +1205,7 @@ func (o *AddAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx contex } func (o *AddAgentBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1153,6 +1230,7 @@ func (o *AddAgentBody) contextValidateRDSExporter(ctx context.Context, formats s } func (o *AddAgentBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -1177,6 +1255,7 @@ func (o *AddAgentBody) contextValidateRtaMongodbAgent(ctx context.Context, forma } func (o *AddAgentBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -1223,6 +1302,7 @@ AddAgentDefaultBody add agent default body swagger:model AddAgentDefaultBody */ type AddAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -1292,7 +1372,9 @@ func (o *AddAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *AddAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -1312,6 +1394,7 @@ func (o *AddAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } + } return nil @@ -1340,6 +1423,7 @@ AddAgentDefaultBodyDetailsItems0 add agent default body details items0 swagger:model AddAgentDefaultBodyDetailsItems0 */ type AddAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -1351,6 +1435,7 @@ type AddAgentDefaultBodyDetailsItems0 struct { func (o *AddAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1388,6 +1473,7 @@ func (o *AddAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1451,6 +1537,7 @@ AddAgentOKBody add agent OK body swagger:model AddAgentOKBody */ type AddAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *AddAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -1466,6 +1553,9 @@ type AddAgentOKBody struct { // node exporter NodeExporter *AddAgentOKBodyNodeExporter `json:"node_exporter,omitempty"` + // otel collector + OtelCollector *AddAgentOKBodyOtelCollector `json:"otel_collector,omitempty"` + // pmm agent PMMAgent *AddAgentOKBodyPMMAgent `json:"pmm_agent,omitempty"` @@ -1527,6 +1617,10 @@ func (o *AddAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateOtelCollector(formats); err != nil { + res = append(res, err) + } + if err := o.validatePMMAgent(formats); err != nil { res = append(res, err) } @@ -1696,6 +1790,29 @@ func (o *AddAgentOKBody) validateNodeExporter(formats strfmt.Registry) error { return nil } +func (o *AddAgentOKBody) validateOtelCollector(formats strfmt.Registry) error { + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if o.OtelCollector != nil { + if err := o.OtelCollector.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addAgentOk" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addAgentOk" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *AddAgentOKBody) validatePMMAgent(formats strfmt.Registry) error { if swag.IsZero(o.PMMAgent) { // not required return nil @@ -1996,6 +2113,10 @@ func (o *AddAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := o.contextValidateOtelCollector(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidatePMMAgent(ctx, formats); err != nil { res = append(res, err) } @@ -2051,6 +2172,7 @@ func (o *AddAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -2075,6 +2197,7 @@ func (o *AddAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *AddAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -2099,6 +2222,7 @@ func (o *AddAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -2123,6 +2247,7 @@ func (o *AddAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *AddAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -2147,6 +2272,7 @@ func (o *AddAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *AddAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -2170,7 +2296,33 @@ func (o *AddAgentOKBody) contextValidateNodeExporter(ctx context.Context, format return nil } +func (o *AddAgentOKBody) contextValidateOtelCollector(ctx context.Context, formats strfmt.Registry) error { + + if o.OtelCollector != nil { + + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if err := o.OtelCollector.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addAgentOk" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addAgentOk" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *AddAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -2195,6 +2347,7 @@ func (o *AddAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *AddAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -2219,6 +2372,7 @@ func (o *AddAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -2243,6 +2397,7 @@ func (o *AddAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *AddAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -2267,6 +2422,7 @@ func (o *AddAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -2291,6 +2447,7 @@ func (o *AddAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -2315,6 +2472,7 @@ func (o *AddAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *AddAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -2339,6 +2497,7 @@ func (o *AddAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -2363,6 +2522,7 @@ func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -2387,6 +2547,7 @@ func (o *AddAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *AddAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -2411,6 +2572,7 @@ func (o *AddAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats } func (o *AddAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -2435,6 +2597,7 @@ func (o *AddAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, for } func (o *AddAgentOKBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -2481,6 +2644,7 @@ AddAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model AddAgentOKBodyAzureDatabaseExporter */ type AddAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2707,6 +2871,7 @@ func (o *AddAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Contex } func (o *AddAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2753,6 +2918,7 @@ AddAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represe swagger:model AddAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type AddAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2796,6 +2962,7 @@ AddAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model AddAgentOKBodyExternalExporter */ type AddAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2964,6 +3131,7 @@ func (o *AddAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3010,6 +3178,7 @@ AddAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyExternalExporterMetricsResolutions */ type AddAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3053,6 +3222,7 @@ AddAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model AddAgentOKBodyMongodbExporter */ type AddAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3301,6 +3471,7 @@ func (o *AddAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, for } func (o *AddAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3347,6 +3518,7 @@ AddAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents Pr swagger:model AddAgentOKBodyMongodbExporterMetricsResolutions */ type AddAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3390,6 +3562,7 @@ AddAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model AddAgentOKBodyMysqldExporter */ type AddAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3648,6 +3821,7 @@ func (o *AddAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, form } func (o *AddAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3694,6 +3868,7 @@ AddAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents Pro swagger:model AddAgentOKBodyMysqldExporterMetricsResolutions */ type AddAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3737,6 +3912,7 @@ AddAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model AddAgentOKBodyNodeExporter */ type AddAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3960,6 +4136,7 @@ func (o *AddAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, format } func (o *AddAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4006,6 +4183,7 @@ AddAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Prome swagger:model AddAgentOKBodyNodeExporterMetricsResolutions */ type AddAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4044,11 +4222,143 @@ func (o *AddAgentOKBodyNodeExporterMetricsResolutions) UnmarshalBinary(b []byte) return nil } +/* +AddAgentOKBodyOtelCollector OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL. +swagger:model AddAgentOKBodyOtelCollector +*/ +type AddAgentOKBodyOtelCollector struct { + + // agent id + AgentID string `json:"agent_id,omitempty"` + + // pmm agent id + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // disabled + Disabled bool `json:"disabled,omitempty"` + + // custom labels + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled. + // - 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_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] + Status *string `json:"status,omitempty"` + + // process exec path + ProcessExecPath string `json:"process_exec_path,omitempty"` +} + +// Validate validates this add agent OK body otel collector +func (o *AddAgentOKBodyOtelCollector) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var addAgentOkBodyOtelCollectorTypeStatusPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + addAgentOkBodyOtelCollectorTypeStatusPropEnum = append(addAgentOkBodyOtelCollectorTypeStatusPropEnum, v) + } +} + +const ( + + // AddAgentOKBodyOtelCollectorStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + AddAgentOKBodyOtelCollectorStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // AddAgentOKBodyOtelCollectorStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + AddAgentOKBodyOtelCollectorStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // AddAgentOKBodyOtelCollectorStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + AddAgentOKBodyOtelCollectorStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // AddAgentOKBodyOtelCollectorStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + AddAgentOKBodyOtelCollectorStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // AddAgentOKBodyOtelCollectorStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + AddAgentOKBodyOtelCollectorStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // AddAgentOKBodyOtelCollectorStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + AddAgentOKBodyOtelCollectorStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // AddAgentOKBodyOtelCollectorStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + AddAgentOKBodyOtelCollectorStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // AddAgentOKBodyOtelCollectorStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + AddAgentOKBodyOtelCollectorStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *AddAgentOKBodyOtelCollector) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, addAgentOkBodyOtelCollectorTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *AddAgentOKBodyOtelCollector) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("addAgentOk"+"."+"otel_collector"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add agent OK body otel collector based on context it is used +func (o *AddAgentOKBodyOtelCollector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentOKBodyOtelCollector) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentOKBodyOtelCollector) UnmarshalBinary(b []byte) error { + var res AddAgentOKBodyOtelCollector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* AddAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model AddAgentOKBodyPMMAgent */ type AddAgentOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4098,6 +4408,7 @@ AddAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model AddAgentOKBodyPostgresExporter */ type AddAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4339,6 +4650,7 @@ func (o *AddAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4385,6 +4697,7 @@ AddAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyPostgresExporterMetricsResolutions */ type AddAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4428,6 +4741,7 @@ AddAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model AddAgentOKBodyProxysqlExporter */ type AddAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4663,6 +4977,7 @@ func (o *AddAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, fo } func (o *AddAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4709,6 +5024,7 @@ AddAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represents P swagger:model AddAgentOKBodyProxysqlExporterMetricsResolutions */ type AddAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4752,6 +5068,7 @@ AddAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMongodbMongologAgent */ type AddAgentOKBodyQANMongodbMongologAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4961,6 +5278,7 @@ AddAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMongodbProfilerAgent */ type AddAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5170,6 +5488,7 @@ AddAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model AddAgentOKBodyQANMysqlPerfschemaAgent */ type AddAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5397,6 +5716,7 @@ AddAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model AddAgentOKBodyQANMysqlSlowlogAgent */ type AddAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5627,6 +5947,7 @@ AddAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model AddAgentOKBodyQANPostgresqlPgstatementsAgent */ type AddAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5839,6 +6160,7 @@ AddAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model AddAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type AddAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6054,6 +6376,7 @@ AddAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model AddAgentOKBodyRDSExporter */ type AddAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6286,6 +6609,7 @@ func (o *AddAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, formats } func (o *AddAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6332,6 +6656,7 @@ AddAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Promet swagger:model AddAgentOKBodyRDSExporterMetricsResolutions */ type AddAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6375,6 +6700,7 @@ AddAgentOKBodyRtaMongodbAgent RTAMongoDBAgent runs within pmm-agent and sends Mo swagger:model AddAgentOKBodyRtaMongodbAgent */ type AddAgentOKBodyRtaMongodbAgent struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -6595,6 +6921,7 @@ func (o *AddAgentOKBodyRtaMongodbAgent) ContextValidate(ctx context.Context, for } func (o *AddAgentOKBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -6641,6 +6968,7 @@ AddAgentOKBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Analyti swagger:model AddAgentOKBodyRtaMongodbAgentRtaOptions */ type AddAgentOKBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -6678,6 +7006,7 @@ AddAgentOKBodyValkeyExporter ValkeyExporter runs on Generic or Container Node an swagger:model AddAgentOKBodyValkeyExporter */ type AddAgentOKBodyValkeyExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6849,6 +7178,7 @@ func (o *AddAgentOKBodyValkeyExporter) ContextValidate(ctx context.Context, form } func (o *AddAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6895,6 +7225,7 @@ AddAgentOKBodyValkeyExporterMetricsResolutions MetricsResolutions represents Pro swagger:model AddAgentOKBodyValkeyExporterMetricsResolutions */ type AddAgentOKBodyValkeyExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6938,6 +7269,7 @@ AddAgentParamsBodyAzureDatabaseExporter add agent params body azure database exp swagger:model AddAgentParamsBodyAzureDatabaseExporter */ type AddAgentParamsBodyAzureDatabaseExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7074,6 +7406,7 @@ AddAgentParamsBodyExternalExporter add agent params body external exporter swagger:model AddAgentParamsBodyExternalExporter */ type AddAgentParamsBodyExternalExporter struct { + // The node identifier where this instance is run. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -7138,6 +7471,7 @@ AddAgentParamsBodyMongodbExporter add agent params body mongodb exporter swagger:model AddAgentParamsBodyMongodbExporter */ type AddAgentParamsBodyMongodbExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7308,6 +7642,7 @@ AddAgentParamsBodyMysqldExporter add agent params body mysqld exporter swagger:model AddAgentParamsBodyMysqldExporter */ type AddAgentParamsBodyMysqldExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7464,6 +7799,7 @@ AddAgentParamsBodyNodeExporter add agent params body node exporter swagger:model AddAgentParamsBodyNodeExporter */ type AddAgentParamsBodyNodeExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7577,11 +7913,177 @@ func (o *AddAgentParamsBodyNodeExporter) UnmarshalBinary(b []byte) error { return nil } +/* +AddAgentParamsBodyOtelCollector add agent params body otel collector +swagger:model AddAgentParamsBodyOtelCollector +*/ +type AddAgentParamsBodyOtelCollector struct { + + // pmm agent id + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // custom labels + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // Deprecated: use log_sources for per-path preset. If log_sources is empty, these are used with preset "raw". + LogFilePaths []string `json:"log_file_paths"` + + // log sources + LogSources []*AddAgentParamsBodyOtelCollectorLogSourcesItems0 `json:"log_sources"` +} + +// Validate validates this add agent params body otel collector +func (o *AddAgentParamsBodyOtelCollector) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateLogSources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddAgentParamsBodyOtelCollector) validateLogSources(formats strfmt.Registry) error { + if swag.IsZero(o.LogSources) { // not required + return nil + } + + for i := 0; i < len(o.LogSources); i++ { + if swag.IsZero(o.LogSources[i]) { // not required + continue + } + + if o.LogSources[i] != nil { + if err := o.LogSources[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "otel_collector" + "." + "log_sources" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "otel_collector" + "." + "log_sources" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this add agent params body otel collector based on the context it is used +func (o *AddAgentParamsBodyOtelCollector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateLogSources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddAgentParamsBodyOtelCollector) contextValidateLogSources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.LogSources); i++ { + + if o.LogSources[i] != nil { + + if swag.IsZero(o.LogSources[i]) { // not required + return nil + } + + if err := o.LogSources[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "otel_collector" + "." + "log_sources" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "otel_collector" + "." + "log_sources" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentParamsBodyOtelCollector) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentParamsBodyOtelCollector) UnmarshalBinary(b []byte) error { + var res AddAgentParamsBodyOtelCollector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddAgentParamsBodyOtelCollectorLogSourcesItems0 LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing). +swagger:model AddAgentParamsBodyOtelCollectorLogSourcesItems0 +*/ +type AddAgentParamsBodyOtelCollectorLogSourcesItems0 struct { + + // path + Path string `json:"path,omitempty"` + + // Preset name from log_parser_presets table, or "raw" for no operators. + Preset string `json:"preset,omitempty"` +} + +// Validate validates this add agent params body otel collector log sources items0 +func (o *AddAgentParamsBodyOtelCollectorLogSourcesItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add agent params body otel collector log sources items0 based on context it is used +func (o *AddAgentParamsBodyOtelCollectorLogSourcesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddAgentParamsBodyOtelCollectorLogSourcesItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddAgentParamsBodyOtelCollectorLogSourcesItems0) UnmarshalBinary(b []byte) error { + var res AddAgentParamsBodyOtelCollectorLogSourcesItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* AddAgentParamsBodyPMMAgent add agent params body PMM agent swagger:model AddAgentParamsBodyPMMAgent */ type AddAgentParamsBodyPMMAgent struct { + // Node identifier where this instance runs. RunsOnNodeID string `json:"runs_on_node_id,omitempty"` @@ -7622,6 +8124,7 @@ AddAgentParamsBodyPostgresExporter add agent params body postgres exporter swagger:model AddAgentParamsBodyPostgresExporter */ type AddAgentParamsBodyPostgresExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7776,6 +8279,7 @@ AddAgentParamsBodyProxysqlExporter add agent params body proxysql exporter swagger:model AddAgentParamsBodyProxysqlExporter */ type AddAgentParamsBodyProxysqlExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -7915,6 +8419,7 @@ AddAgentParamsBodyQANMongodbMongologAgent add agent params body QAN mongodb mong swagger:model AddAgentParamsBodyQANMongodbMongologAgent */ type AddAgentParamsBodyQANMongodbMongologAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8062,6 +8567,7 @@ AddAgentParamsBodyQANMongodbProfilerAgent add agent params body QAN mongodb prof swagger:model AddAgentParamsBodyQANMongodbProfilerAgent */ type AddAgentParamsBodyQANMongodbProfilerAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8209,6 +8715,7 @@ AddAgentParamsBodyQANMysqlPerfschemaAgent add agent params body QAN mysql perfsc swagger:model AddAgentParamsBodyQANMysqlPerfschemaAgent */ type AddAgentParamsBodyQANMysqlPerfschemaAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8357,6 +8864,7 @@ AddAgentParamsBodyQANMysqlSlowlogAgent add agent params body QAN mysql slowlog a swagger:model AddAgentParamsBodyQANMysqlSlowlogAgent */ type AddAgentParamsBodyQANMysqlSlowlogAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8509,6 +9017,7 @@ AddAgentParamsBodyQANPostgresqlPgstatementsAgent add agent params body QAN postg swagger:model AddAgentParamsBodyQANPostgresqlPgstatementsAgent */ type AddAgentParamsBodyQANPostgresqlPgstatementsAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8651,6 +9160,7 @@ AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent add agent params body QAN post swagger:model AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent */ type AddAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8796,6 +9306,7 @@ AddAgentParamsBodyRDSExporter add agent params body RDS exporter swagger:model AddAgentParamsBodyRDSExporter */ type AddAgentParamsBodyRDSExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -8926,6 +9437,7 @@ AddAgentParamsBodyRtaMongodbAgent add agent params body rta mongodb agent swagger:model AddAgentParamsBodyRtaMongodbAgent */ type AddAgentParamsBodyRtaMongodbAgent struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` @@ -9085,6 +9597,7 @@ func (o *AddAgentParamsBodyRtaMongodbAgent) ContextValidate(ctx context.Context, } func (o *AddAgentParamsBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -9131,6 +9644,7 @@ AddAgentParamsBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Ana swagger:model AddAgentParamsBodyRtaMongodbAgentRtaOptions */ type AddAgentParamsBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -9168,6 +9682,7 @@ AddAgentParamsBodyValkeyExporter add agent params body valkey exporter swagger:model AddAgentParamsBodyValkeyExporter */ type AddAgentParamsBodyValkeyExporter struct { + // The pmm-agent identifier which runs this instance. PMMAgentID string `json:"pmm_agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/change_agent_parameters.go b/api/inventory/v1/json/client/agents_service/change_agent_parameters.go index c683f8aeb08..142e0f54487 100644 --- a/api/inventory/v1/json/client/agents_service/change_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/change_agent_parameters.go @@ -60,6 +60,7 @@ ChangeAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeAgentParams struct { + // AgentID. AgentID string @@ -143,6 +144,7 @@ func (o *ChangeAgentParams) SetBody(body ChangeAgentBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/change_agent_responses.go b/api/inventory/v1/json/client/agents_service/change_agent_responses.go index efd1d7e7a74..227e4304368 100644 --- a/api/inventory/v1/json/client/agents_service/change_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/change_agent_responses.go @@ -105,6 +105,7 @@ func (o *ChangeAgentOK) GetPayload() *ChangeAgentOKBody { } func (o *ChangeAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAgentOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ChangeAgentDefault) GetPayload() *ChangeAgentDefaultBody { } func (o *ChangeAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeAgentDefaultBody) // response payload @@ -193,6 +195,7 @@ ChangeAgentBody change agent body swagger:model ChangeAgentBody */ type ChangeAgentBody struct { + // azure database exporter AzureDatabaseExporter *ChangeAgentParamsBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -211,6 +214,9 @@ type ChangeAgentBody struct { // nomad agent NomadAgent *ChangeAgentParamsBodyNomadAgent `json:"nomad_agent,omitempty"` + // otel collector + OtelCollector *ChangeAgentParamsBodyOtelCollector `json:"otel_collector,omitempty"` + // postgres exporter PostgresExporter *ChangeAgentParamsBodyPostgresExporter `json:"postgres_exporter,omitempty"` @@ -273,6 +279,10 @@ func (o *ChangeAgentBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateOtelCollector(formats); err != nil { + res = append(res, err) + } + if err := o.validatePostgresExporter(formats); err != nil { res = append(res, err) } @@ -461,6 +471,29 @@ func (o *ChangeAgentBody) validateNomadAgent(formats strfmt.Registry) error { return nil } +func (o *ChangeAgentBody) validateOtelCollector(formats strfmt.Registry) error { + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if o.OtelCollector != nil { + if err := o.OtelCollector.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *ChangeAgentBody) validatePostgresExporter(formats strfmt.Registry) error { if swag.IsZero(o.PostgresExporter) { // not required return nil @@ -742,6 +775,10 @@ func (o *ChangeAgentBody) ContextValidate(ctx context.Context, formats strfmt.Re res = append(res, err) } + if err := o.contextValidateOtelCollector(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidatePostgresExporter(ctx, formats); err != nil { res = append(res, err) } @@ -793,6 +830,7 @@ func (o *ChangeAgentBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ChangeAgentBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -817,6 +855,7 @@ func (o *ChangeAgentBody) contextValidateAzureDatabaseExporter(ctx context.Conte } func (o *ChangeAgentBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -841,6 +880,7 @@ func (o *ChangeAgentBody) contextValidateExternalExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -865,6 +905,7 @@ func (o *ChangeAgentBody) contextValidateMongodbExporter(ctx context.Context, fo } func (o *ChangeAgentBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -889,6 +930,7 @@ func (o *ChangeAgentBody) contextValidateMysqldExporter(ctx context.Context, for } func (o *ChangeAgentBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -913,6 +955,7 @@ func (o *ChangeAgentBody) contextValidateNodeExporter(ctx context.Context, forma } func (o *ChangeAgentBody) contextValidateNomadAgent(ctx context.Context, formats strfmt.Registry) error { + if o.NomadAgent != nil { if swag.IsZero(o.NomadAgent) { // not required @@ -936,7 +979,33 @@ func (o *ChangeAgentBody) contextValidateNomadAgent(ctx context.Context, formats return nil } +func (o *ChangeAgentBody) contextValidateOtelCollector(ctx context.Context, formats strfmt.Registry) error { + + if o.OtelCollector != nil { + + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if err := o.OtelCollector.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *ChangeAgentBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -961,6 +1030,7 @@ func (o *ChangeAgentBody) contextValidatePostgresExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -985,6 +1055,7 @@ func (o *ChangeAgentBody) contextValidateProxysqlExporter(ctx context.Context, f } func (o *ChangeAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -1009,6 +1080,7 @@ func (o *ChangeAgentBody) contextValidateQANMongodbMongologAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1033,6 +1105,7 @@ func (o *ChangeAgentBody) contextValidateQANMongodbProfilerAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1057,6 +1130,7 @@ func (o *ChangeAgentBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Con } func (o *ChangeAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1081,6 +1155,7 @@ func (o *ChangeAgentBody) contextValidateQANMysqlSlowlogAgent(ctx context.Contex } func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1105,6 +1180,7 @@ func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatementsAgent(ctx cont } func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1129,6 +1205,7 @@ func (o *ChangeAgentBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx con } func (o *ChangeAgentBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1153,6 +1230,7 @@ func (o *ChangeAgentBody) contextValidateRDSExporter(ctx context.Context, format } func (o *ChangeAgentBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -1177,6 +1255,7 @@ func (o *ChangeAgentBody) contextValidateRtaMongodbAgent(ctx context.Context, fo } func (o *ChangeAgentBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -1223,6 +1302,7 @@ ChangeAgentDefaultBody change agent default body swagger:model ChangeAgentDefaultBody */ type ChangeAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -1292,7 +1372,9 @@ func (o *ChangeAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *ChangeAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -1312,6 +1394,7 @@ func (o *ChangeAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -1340,6 +1423,7 @@ ChangeAgentDefaultBodyDetailsItems0 change agent default body details items0 swagger:model ChangeAgentDefaultBodyDetailsItems0 */ type ChangeAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -1351,6 +1435,7 @@ type ChangeAgentDefaultBodyDetailsItems0 struct { func (o *ChangeAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1388,6 +1473,7 @@ func (o *ChangeAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -1451,6 +1537,7 @@ ChangeAgentOKBody change agent OK body swagger:model ChangeAgentOKBody */ type ChangeAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *ChangeAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -1469,6 +1556,9 @@ type ChangeAgentOKBody struct { // nomad agent NomadAgent *ChangeAgentOKBodyNomadAgent `json:"nomad_agent,omitempty"` + // otel collector + OtelCollector *ChangeAgentOKBodyOtelCollector `json:"otel_collector,omitempty"` + // postgres exporter PostgresExporter *ChangeAgentOKBodyPostgresExporter `json:"postgres_exporter,omitempty"` @@ -1531,6 +1621,10 @@ func (o *ChangeAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateOtelCollector(formats); err != nil { + res = append(res, err) + } + if err := o.validatePostgresExporter(formats); err != nil { res = append(res, err) } @@ -1719,6 +1813,29 @@ func (o *ChangeAgentOKBody) validateNomadAgent(formats strfmt.Registry) error { return nil } +func (o *ChangeAgentOKBody) validateOtelCollector(formats strfmt.Registry) error { + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if o.OtelCollector != nil { + if err := o.OtelCollector.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeAgentOk" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeAgentOk" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *ChangeAgentOKBody) validatePostgresExporter(formats strfmt.Registry) error { if swag.IsZero(o.PostgresExporter) { // not required return nil @@ -2000,6 +2117,10 @@ func (o *ChangeAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. res = append(res, err) } + if err := o.contextValidateOtelCollector(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidatePostgresExporter(ctx, formats); err != nil { res = append(res, err) } @@ -2051,6 +2172,7 @@ func (o *ChangeAgentOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -2075,6 +2197,7 @@ func (o *ChangeAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Con } func (o *ChangeAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -2099,6 +2222,7 @@ func (o *ChangeAgentOKBody) contextValidateExternalExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -2123,6 +2247,7 @@ func (o *ChangeAgentOKBody) contextValidateMongodbExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -2147,6 +2272,7 @@ func (o *ChangeAgentOKBody) contextValidateMysqldExporter(ctx context.Context, f } func (o *ChangeAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -2171,6 +2297,7 @@ func (o *ChangeAgentOKBody) contextValidateNodeExporter(ctx context.Context, for } func (o *ChangeAgentOKBody) contextValidateNomadAgent(ctx context.Context, formats strfmt.Registry) error { + if o.NomadAgent != nil { if swag.IsZero(o.NomadAgent) { // not required @@ -2194,7 +2321,33 @@ func (o *ChangeAgentOKBody) contextValidateNomadAgent(ctx context.Context, forma return nil } +func (o *ChangeAgentOKBody) contextValidateOtelCollector(ctx context.Context, formats strfmt.Registry) error { + + if o.OtelCollector != nil { + + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if err := o.OtelCollector.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeAgentOk" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeAgentOk" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *ChangeAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -2219,6 +2372,7 @@ func (o *ChangeAgentOKBody) contextValidatePostgresExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -2243,6 +2397,7 @@ func (o *ChangeAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -2267,6 +2422,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -2291,6 +2447,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -2315,6 +2472,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.C } func (o *ChangeAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -2339,6 +2497,7 @@ func (o *ChangeAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Cont } func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -2363,6 +2522,7 @@ func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx co } func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -2387,6 +2547,7 @@ func (o *ChangeAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx c } func (o *ChangeAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -2411,6 +2572,7 @@ func (o *ChangeAgentOKBody) contextValidateRDSExporter(ctx context.Context, form } func (o *ChangeAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -2435,6 +2597,7 @@ func (o *ChangeAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, } func (o *ChangeAgentOKBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -2481,6 +2644,7 @@ ChangeAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or swagger:model ChangeAgentOKBodyAzureDatabaseExporter */ type ChangeAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2707,6 +2871,7 @@ func (o *ChangeAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Con } func (o *ChangeAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2753,6 +2918,7 @@ ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions repr swagger:model ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type ChangeAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2796,6 +2962,7 @@ ChangeAgentOKBodyExternalExporter ExternalExporter runs on any Node type, includ swagger:model ChangeAgentOKBodyExternalExporter */ type ChangeAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2964,6 +3131,7 @@ func (o *ChangeAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3010,6 +3178,7 @@ ChangeAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyExternalExporterMetricsResolutions */ type ChangeAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3053,6 +3222,7 @@ ChangeAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container No swagger:model ChangeAgentOKBodyMongodbExporter */ type ChangeAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3301,6 +3471,7 @@ func (o *ChangeAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3347,6 +3518,7 @@ ChangeAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyMongodbExporterMetricsResolutions */ type ChangeAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3390,6 +3562,7 @@ ChangeAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node swagger:model ChangeAgentOKBodyMysqldExporter */ type ChangeAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3648,6 +3821,7 @@ func (o *ChangeAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, f } func (o *ChangeAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3694,6 +3868,7 @@ ChangeAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyMysqldExporterMetricsResolutions */ type ChangeAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3737,6 +3912,7 @@ ChangeAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and swagger:model ChangeAgentOKBodyNodeExporter */ type ChangeAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3960,6 +4136,7 @@ func (o *ChangeAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, for } func (o *ChangeAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4006,6 +4183,7 @@ ChangeAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Pr swagger:model ChangeAgentOKBodyNodeExporterMetricsResolutions */ type ChangeAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4049,6 +4227,7 @@ ChangeAgentOKBodyNomadAgent change agent OK body nomad agent swagger:model ChangeAgentOKBodyNomadAgent */ type ChangeAgentOKBodyNomadAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4174,11 +4353,143 @@ func (o *ChangeAgentOKBodyNomadAgent) UnmarshalBinary(b []byte) error { return nil } +/* +ChangeAgentOKBodyOtelCollector OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL. +swagger:model ChangeAgentOKBodyOtelCollector +*/ +type ChangeAgentOKBodyOtelCollector struct { + + // agent id + AgentID string `json:"agent_id,omitempty"` + + // pmm agent id + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // disabled + Disabled bool `json:"disabled,omitempty"` + + // custom labels + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled. + // - 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_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] + Status *string `json:"status,omitempty"` + + // process exec path + ProcessExecPath string `json:"process_exec_path,omitempty"` +} + +// Validate validates this change agent OK body otel collector +func (o *ChangeAgentOKBodyOtelCollector) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var changeAgentOkBodyOtelCollectorTypeStatusPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + changeAgentOkBodyOtelCollectorTypeStatusPropEnum = append(changeAgentOkBodyOtelCollectorTypeStatusPropEnum, v) + } +} + +const ( + + // ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + ChangeAgentOKBodyOtelCollectorStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *ChangeAgentOKBodyOtelCollector) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, changeAgentOkBodyOtelCollectorTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ChangeAgentOKBodyOtelCollector) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("changeAgentOk"+"."+"otel_collector"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this change agent OK body otel collector based on context it is used +func (o *ChangeAgentOKBodyOtelCollector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentOKBodyOtelCollector) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentOKBodyOtelCollector) UnmarshalBinary(b []byte) error { + var res ChangeAgentOKBodyOtelCollector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* ChangeAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics. swagger:model ChangeAgentOKBodyPostgresExporter */ type ChangeAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4420,6 +4731,7 @@ func (o *ChangeAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4466,6 +4778,7 @@ ChangeAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyPostgresExporterMetricsResolutions */ type ChangeAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4509,6 +4822,7 @@ ChangeAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container swagger:model ChangeAgentOKBodyProxysqlExporter */ type ChangeAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4744,6 +5058,7 @@ func (o *ChangeAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4790,6 +5105,7 @@ ChangeAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentOKBodyProxysqlExporterMetricsResolutions */ type ChangeAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4833,6 +5149,7 @@ ChangeAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm swagger:model ChangeAgentOKBodyQANMongodbMongologAgent */ type ChangeAgentOKBodyQANMongodbMongologAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5042,6 +5359,7 @@ ChangeAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm swagger:model ChangeAgentOKBodyQANMongodbProfilerAgent */ type ChangeAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5251,6 +5569,7 @@ ChangeAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm swagger:model ChangeAgentOKBodyQANMysqlPerfschemaAgent */ type ChangeAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5478,6 +5797,7 @@ ChangeAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent swagger:model ChangeAgentOKBodyQANMysqlSlowlogAgent */ type ChangeAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5708,6 +6028,7 @@ ChangeAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent r swagger:model ChangeAgentOKBodyQANPostgresqlPgstatementsAgent */ type ChangeAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5920,6 +6241,7 @@ ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent swagger:model ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type ChangeAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6135,6 +6457,7 @@ ChangeAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and e swagger:model ChangeAgentOKBodyRDSExporter */ type ChangeAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6367,6 +6690,7 @@ func (o *ChangeAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, form } func (o *ChangeAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6413,6 +6737,7 @@ ChangeAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeAgentOKBodyRDSExporterMetricsResolutions */ type ChangeAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6456,6 +6781,7 @@ ChangeAgentOKBodyRtaMongodbAgent RTAMongoDBAgent runs within pmm-agent and sends swagger:model ChangeAgentOKBodyRtaMongodbAgent */ type ChangeAgentOKBodyRtaMongodbAgent struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -6676,6 +7002,7 @@ func (o *ChangeAgentOKBodyRtaMongodbAgent) ContextValidate(ctx context.Context, } func (o *ChangeAgentOKBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -6722,6 +7049,7 @@ ChangeAgentOKBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Anal swagger:model ChangeAgentOKBodyRtaMongodbAgentRtaOptions */ type ChangeAgentOKBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -6759,6 +7087,7 @@ ChangeAgentOKBodyValkeyExporter ValkeyExporter runs on Generic or Container Node swagger:model ChangeAgentOKBodyValkeyExporter */ type ChangeAgentOKBodyValkeyExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6930,6 +7259,7 @@ func (o *ChangeAgentOKBodyValkeyExporter) ContextValidate(ctx context.Context, f } func (o *ChangeAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6976,6 +7306,7 @@ ChangeAgentOKBodyValkeyExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentOKBodyValkeyExporterMetricsResolutions */ type ChangeAgentOKBodyValkeyExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7019,6 +7350,7 @@ ChangeAgentParamsBodyAzureDatabaseExporter change agent params body azure databa swagger:model ChangeAgentParamsBodyAzureDatabaseExporter */ type ChangeAgentParamsBodyAzureDatabaseExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7194,6 +7526,7 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) ContextValidate(ctx context } func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7218,6 +7551,7 @@ func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateCustomLabels } func (o *ChangeAgentParamsBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7264,6 +7598,7 @@ ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels A wrapper for map[string] swagger:model ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels */ type ChangeAgentParamsBodyAzureDatabaseExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -7301,6 +7636,7 @@ ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions swagger:model ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions */ type ChangeAgentParamsBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7344,6 +7680,7 @@ ChangeAgentParamsBodyExternalExporter change agent params body external exporter swagger:model ChangeAgentParamsBodyExternalExporter */ type ChangeAgentParamsBodyExternalExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7452,6 +7789,7 @@ func (o *ChangeAgentParamsBodyExternalExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7476,6 +7814,7 @@ func (o *ChangeAgentParamsBodyExternalExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7522,6 +7861,7 @@ ChangeAgentParamsBodyExternalExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyExternalExporterCustomLabels */ type ChangeAgentParamsBodyExternalExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -7559,6 +7899,7 @@ ChangeAgentParamsBodyExternalExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyExternalExporterMetricsResolutions */ type ChangeAgentParamsBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7602,6 +7943,7 @@ ChangeAgentParamsBodyMongodbExporter change agent params body mongodb exporter swagger:model ChangeAgentParamsBodyMongodbExporter */ type ChangeAgentParamsBodyMongodbExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -7810,6 +8152,7 @@ func (o *ChangeAgentParamsBodyMongodbExporter) ContextValidate(ctx context.Conte } func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -7834,6 +8177,7 @@ func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateCustomLabels(ctx c } func (o *ChangeAgentParamsBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7880,6 +8224,7 @@ ChangeAgentParamsBodyMongodbExporterCustomLabels A wrapper for map[string]string swagger:model ChangeAgentParamsBodyMongodbExporterCustomLabels */ type ChangeAgentParamsBodyMongodbExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -7917,6 +8262,7 @@ ChangeAgentParamsBodyMongodbExporterMetricsResolutions MetricsResolutions repres swagger:model ChangeAgentParamsBodyMongodbExporterMetricsResolutions */ type ChangeAgentParamsBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7960,6 +8306,7 @@ ChangeAgentParamsBodyMysqldExporter change agent params body mysqld exporter swagger:model ChangeAgentParamsBodyMysqldExporter */ type ChangeAgentParamsBodyMysqldExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -8156,6 +8503,7 @@ func (o *ChangeAgentParamsBodyMysqldExporter) ContextValidate(ctx context.Contex } func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8180,6 +8528,7 @@ func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateCustomLabels(ctx co } func (o *ChangeAgentParamsBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8226,6 +8575,7 @@ ChangeAgentParamsBodyMysqldExporterCustomLabels A wrapper for map[string]string. swagger:model ChangeAgentParamsBodyMysqldExporterCustomLabels */ type ChangeAgentParamsBodyMysqldExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -8263,6 +8613,7 @@ ChangeAgentParamsBodyMysqldExporterMetricsResolutions MetricsResolutions represe swagger:model ChangeAgentParamsBodyMysqldExporterMetricsResolutions */ type ChangeAgentParamsBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -8306,6 +8657,7 @@ ChangeAgentParamsBodyNodeExporter change agent params body node exporter swagger:model ChangeAgentParamsBodyNodeExporter */ type ChangeAgentParamsBodyNodeExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -8472,6 +8824,7 @@ func (o *ChangeAgentParamsBodyNodeExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8496,6 +8849,7 @@ func (o *ChangeAgentParamsBodyNodeExporter) contextValidateCustomLabels(ctx cont } func (o *ChangeAgentParamsBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8542,6 +8896,7 @@ ChangeAgentParamsBodyNodeExporterCustomLabels A wrapper for map[string]string. T swagger:model ChangeAgentParamsBodyNodeExporterCustomLabels */ type ChangeAgentParamsBodyNodeExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -8579,6 +8934,7 @@ ChangeAgentParamsBodyNodeExporterMetricsResolutions MetricsResolutions represent swagger:model ChangeAgentParamsBodyNodeExporterMetricsResolutions */ type ChangeAgentParamsBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -8622,6 +8978,7 @@ ChangeAgentParamsBodyNomadAgent change agent params body nomad agent swagger:model ChangeAgentParamsBodyNomadAgent */ type ChangeAgentParamsBodyNomadAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` } @@ -8654,11 +9011,177 @@ func (o *ChangeAgentParamsBodyNomadAgent) UnmarshalBinary(b []byte) error { return nil } +/* +ChangeAgentParamsBodyOtelCollector ChangeOtelCollectorParams patches the single otel_collector agent per pmm-agent (merge_labels must not use keys log_sources or log_file_paths). +swagger:model ChangeAgentParamsBodyOtelCollector +*/ +type ChangeAgentParamsBodyOtelCollector struct { + + // Enable this Agent. Agents are enabled by default when they get added. + Enable *bool `json:"enable,omitempty"` + + // Keys to merge into custom labels (overwrite per key). Reserved keys log_sources and log_file_paths are rejected. + MergeLabels map[string]string `json:"merge_labels,omitempty"` + + // Append or update log sources; same path appears twice — last preset wins. + AddLogSources []*ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0 `json:"add_log_sources"` + + // If true, remove legacy log_file_paths label when present. + RemoveLegacyLogFilePaths bool `json:"remove_legacy_log_file_paths,omitempty"` +} + +// Validate validates this change agent params body otel collector +func (o *ChangeAgentParamsBodyOtelCollector) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateAddLogSources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAgentParamsBodyOtelCollector) validateAddLogSources(formats strfmt.Registry) error { + if swag.IsZero(o.AddLogSources) { // not required + return nil + } + + for i := 0; i < len(o.AddLogSources); i++ { + if swag.IsZero(o.AddLogSources[i]) { // not required + continue + } + + if o.AddLogSources[i] != nil { + if err := o.AddLogSources[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "otel_collector" + "." + "add_log_sources" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "otel_collector" + "." + "add_log_sources" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this change agent params body otel collector based on the context it is used +func (o *ChangeAgentParamsBodyOtelCollector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateAddLogSources(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeAgentParamsBodyOtelCollector) contextValidateAddLogSources(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.AddLogSources); i++ { + + if o.AddLogSources[i] != nil { + + if swag.IsZero(o.AddLogSources[i]) { // not required + return nil + } + + if err := o.AddLogSources[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("body" + "." + "otel_collector" + "." + "add_log_sources" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("body" + "." + "otel_collector" + "." + "add_log_sources" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentParamsBodyOtelCollector) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentParamsBodyOtelCollector) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyOtelCollector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0 LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing). +swagger:model ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0 +*/ +type ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0 struct { + + // path + Path string `json:"path,omitempty"` + + // Preset name from log_parser_presets table, or "raw" for no operators. + Preset string `json:"preset,omitempty"` +} + +// Validate validates this change agent params body otel collector add log sources items0 +func (o *ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this change agent params body otel collector add log sources items0 based on context it is used +func (o *ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0) UnmarshalBinary(b []byte) error { + var res ChangeAgentParamsBodyOtelCollectorAddLogSourcesItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* ChangeAgentParamsBodyPostgresExporter change agent params body postgres exporter swagger:model ChangeAgentParamsBodyPostgresExporter */ type ChangeAgentParamsBodyPostgresExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -8858,6 +9381,7 @@ func (o *ChangeAgentParamsBodyPostgresExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -8882,6 +9406,7 @@ func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8928,6 +9453,7 @@ ChangeAgentParamsBodyPostgresExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyPostgresExporterCustomLabels */ type ChangeAgentParamsBodyPostgresExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -8965,6 +9491,7 @@ ChangeAgentParamsBodyPostgresExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyPostgresExporterMetricsResolutions */ type ChangeAgentParamsBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -9008,6 +9535,7 @@ ChangeAgentParamsBodyProxysqlExporter change agent params body proxysql exporter swagger:model ChangeAgentParamsBodyProxysqlExporter */ type ChangeAgentParamsBodyProxysqlExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -9189,6 +9717,7 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) ContextValidate(ctx context.Cont } func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -9213,6 +9742,7 @@ func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateCustomLabels(ctx } func (o *ChangeAgentParamsBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -9259,6 +9789,7 @@ ChangeAgentParamsBodyProxysqlExporterCustomLabels A wrapper for map[string]strin swagger:model ChangeAgentParamsBodyProxysqlExporterCustomLabels */ type ChangeAgentParamsBodyProxysqlExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -9296,6 +9827,7 @@ ChangeAgentParamsBodyProxysqlExporterMetricsResolutions MetricsResolutions repre swagger:model ChangeAgentParamsBodyProxysqlExporterMetricsResolutions */ type ChangeAgentParamsBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -9339,6 +9871,7 @@ ChangeAgentParamsBodyQANMongodbMongologAgent change agent params body QAN mongod swagger:model ChangeAgentParamsBodyQANMongodbMongologAgent */ type ChangeAgentParamsBodyQANMongodbMongologAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -9529,6 +10062,7 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) ContextValidate(ctx conte } func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -9553,6 +10087,7 @@ func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateCustomLabe } func (o *ChangeAgentParamsBodyQANMongodbMongologAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -9599,6 +10134,7 @@ ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels A wrapper for map[strin swagger:model ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels */ type ChangeAgentParamsBodyQANMongodbMongologAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -9636,6 +10172,7 @@ ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions MetricsResolution swagger:model ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMongodbMongologAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -9679,6 +10216,7 @@ ChangeAgentParamsBodyQANMongodbProfilerAgent change agent params body QAN mongod swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgent */ type ChangeAgentParamsBodyQANMongodbProfilerAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -9869,6 +10407,7 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) ContextValidate(ctx conte } func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -9893,6 +10432,7 @@ func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateCustomLabe } func (o *ChangeAgentParamsBodyQANMongodbProfilerAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -9939,6 +10479,7 @@ ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels A wrapper for map[strin swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels */ type ChangeAgentParamsBodyQANMongodbProfilerAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -9976,6 +10517,7 @@ ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions MetricsResolution swagger:model ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMongodbProfilerAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -10019,6 +10561,7 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgent change agent params body QAN mysql swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgent */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -10212,6 +10755,7 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) ContextValidate(ctx conte } func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -10236,6 +10780,7 @@ func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateCustomLabe } func (o *ChangeAgentParamsBodyQANMysqlPerfschemaAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -10282,6 +10827,7 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels A wrapper for map[strin swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -10319,6 +10865,7 @@ ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions MetricsResolution swagger:model ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMysqlPerfschemaAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -10362,6 +10909,7 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgent change agent params body QAN mysql slo swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgent */ type ChangeAgentParamsBodyQANMysqlSlowlogAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -10558,6 +11106,7 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) ContextValidate(ctx context. } func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -10582,6 +11131,7 @@ func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateCustomLabels( } func (o *ChangeAgentParamsBodyQANMysqlSlowlogAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -10628,6 +11178,7 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels A wrapper for map[string]s swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels */ type ChangeAgentParamsBodyQANMysqlSlowlogAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -10665,6 +11216,7 @@ ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions MetricsResolutions r swagger:model ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions */ type ChangeAgentParamsBodyQANMysqlSlowlogAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -10708,6 +11260,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent change agent params body QAN swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -10895,6 +11448,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) ContextValidate(ct } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -10919,6 +11473,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateCus } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatementsAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -10965,6 +11520,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels A wrapper for ma swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -11002,6 +11558,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions MetricsRes swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions */ type ChangeAgentParamsBodyQANPostgresqlPgstatementsAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -11045,6 +11602,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent change agent params body QA swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -11235,6 +11793,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) ContextValidate(c } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -11259,6 +11818,7 @@ func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateCu } func (o *ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgent) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -11305,6 +11865,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels A wrapper for m swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -11342,6 +11903,7 @@ ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions MetricsRe swagger:model ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions */ type ChangeAgentParamsBodyQANPostgresqlPgstatmonitorAgentMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -11385,6 +11947,7 @@ ChangeAgentParamsBodyRDSExporter change agent params body RDS exporter swagger:model ChangeAgentParamsBodyRDSExporter */ type ChangeAgentParamsBodyRDSExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -11557,6 +12120,7 @@ func (o *ChangeAgentParamsBodyRDSExporter) ContextValidate(ctx context.Context, } func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -11581,6 +12145,7 @@ func (o *ChangeAgentParamsBodyRDSExporter) contextValidateCustomLabels(ctx conte } func (o *ChangeAgentParamsBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -11627,6 +12192,7 @@ ChangeAgentParamsBodyRDSExporterCustomLabels A wrapper for map[string]string. Th swagger:model ChangeAgentParamsBodyRDSExporterCustomLabels */ type ChangeAgentParamsBodyRDSExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -11664,6 +12230,7 @@ ChangeAgentParamsBodyRDSExporterMetricsResolutions MetricsResolutions represents swagger:model ChangeAgentParamsBodyRDSExporterMetricsResolutions */ type ChangeAgentParamsBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -11707,6 +12274,7 @@ ChangeAgentParamsBodyRtaMongodbAgent change agent params body rta mongodb agent swagger:model ChangeAgentParamsBodyRtaMongodbAgent */ type ChangeAgentParamsBodyRtaMongodbAgent struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -11888,6 +12456,7 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) ContextValidate(ctx context.Conte } func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -11912,6 +12481,7 @@ func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateCustomLabels(ctx c } func (o *ChangeAgentParamsBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -11958,6 +12528,7 @@ ChangeAgentParamsBodyRtaMongodbAgentCustomLabels A wrapper for map[string]string swagger:model ChangeAgentParamsBodyRtaMongodbAgentCustomLabels */ type ChangeAgentParamsBodyRtaMongodbAgentCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -11995,6 +12566,7 @@ ChangeAgentParamsBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query swagger:model ChangeAgentParamsBodyRtaMongodbAgentRtaOptions */ type ChangeAgentParamsBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -12032,6 +12604,7 @@ ChangeAgentParamsBodyValkeyExporter change agent params body valkey exporter swagger:model ChangeAgentParamsBodyValkeyExporter */ type ChangeAgentParamsBodyValkeyExporter struct { + // Enable this Agent. Agents are enabled by default when they get added. Enable *bool `json:"enable,omitempty"` @@ -12222,6 +12795,7 @@ func (o *ChangeAgentParamsBodyValkeyExporter) ContextValidate(ctx context.Contex } func (o *ChangeAgentParamsBodyValkeyExporter) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -12246,6 +12820,7 @@ func (o *ChangeAgentParamsBodyValkeyExporter) contextValidateCustomLabels(ctx co } func (o *ChangeAgentParamsBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -12292,6 +12867,7 @@ ChangeAgentParamsBodyValkeyExporterCustomLabels A wrapper for map[string]string. swagger:model ChangeAgentParamsBodyValkeyExporterCustomLabels */ type ChangeAgentParamsBodyValkeyExporterCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } @@ -12329,6 +12905,7 @@ ChangeAgentParamsBodyValkeyExporterMetricsResolutions MetricsResolutions represe swagger:model ChangeAgentParamsBodyValkeyExporterMetricsResolutions */ type ChangeAgentParamsBodyValkeyExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go b/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go index 97651a5eab8..f62c8c34010 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_logs_parameters.go @@ -61,6 +61,7 @@ GetAgentLogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentLogsParams struct { + /* AgentID. Unique randomly generated instance identifier. @@ -152,6 +153,7 @@ func (o *GetAgentLogsParams) SetLimit(limit *int64) { // WriteToRequest writes these params to a swagger request func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -172,6 +174,7 @@ func (o *GetAgentLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qLimit := swag.FormatInt64(qrLimit) if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go b/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go index 4925d51c520..13fac0ab0c1 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_logs_responses.go @@ -104,6 +104,7 @@ func (o *GetAgentLogsOK) GetPayload() *GetAgentLogsOKBody { } func (o *GetAgentLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentLogsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetAgentLogsDefault) GetPayload() *GetAgentLogsDefaultBody { } func (o *GetAgentLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentLogsDefaultBody) // response payload @@ -192,6 +194,7 @@ GetAgentLogsDefaultBody get agent logs default body swagger:model GetAgentLogsDefaultBody */ type GetAgentLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetAgentLogsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetAgentLogsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -309,6 +315,7 @@ GetAgentLogsDefaultBodyDetailsItems0 get agent logs default body details items0 swagger:model GetAgentLogsDefaultBodyDetailsItems0 */ type GetAgentLogsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetAgentLogsDefaultBodyDetailsItems0 struct { func (o *GetAgentLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetAgentLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetAgentLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetAgentLogsOKBody get agent logs OK body swagger:model GetAgentLogsOKBody */ type GetAgentLogsOKBody struct { + // logs Logs []string `json:"logs"` diff --git a/api/inventory/v1/json/client/agents_service/get_agent_parameters.go b/api/inventory/v1/json/client/agents_service/get_agent_parameters.go index 05cb31a609f..8242239f60a 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_parameters.go @@ -60,6 +60,7 @@ GetAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetAgentParams struct { + /* AgentID. Unique randomly generated instance identifier. @@ -132,6 +133,7 @@ func (o *GetAgentParams) SetAgentID(agentID string) { // WriteToRequest writes these params to a swagger request func (o *GetAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/get_agent_responses.go b/api/inventory/v1/json/client/agents_service/get_agent_responses.go index f0befcd1b48..363fb2029a8 100644 --- a/api/inventory/v1/json/client/agents_service/get_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/get_agent_responses.go @@ -105,6 +105,7 @@ func (o *GetAgentOK) GetPayload() *GetAgentOKBody { } func (o *GetAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetAgentDefault) GetPayload() *GetAgentDefaultBody { } func (o *GetAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetAgentDefaultBody) // response payload @@ -193,6 +195,7 @@ GetAgentDefaultBody get agent default body swagger:model GetAgentDefaultBody */ type GetAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *GetAgentDefaultBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *GetAgentDefaultBody) contextValidateDetails(ctx context.Context, format return err } } + } return nil @@ -310,6 +316,7 @@ GetAgentDefaultBodyDetailsItems0 get agent default body details items0 swagger:model GetAgentDefaultBodyDetailsItems0 */ type GetAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type GetAgentDefaultBodyDetailsItems0 struct { func (o *GetAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *GetAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ GetAgentOKBody get agent OK body swagger:model GetAgentOKBody */ type GetAgentOKBody struct { + // azure database exporter AzureDatabaseExporter *GetAgentOKBodyAzureDatabaseExporter `json:"azure_database_exporter,omitempty"` @@ -439,6 +449,9 @@ type GetAgentOKBody struct { // nomad agent NomadAgent *GetAgentOKBodyNomadAgent `json:"nomad_agent,omitempty"` + // otel collector + OtelCollector *GetAgentOKBodyOtelCollector `json:"otel_collector,omitempty"` + // pmm agent PMMAgent *GetAgentOKBodyPMMAgent `json:"pmm_agent,omitempty"` @@ -507,6 +520,10 @@ func (o *GetAgentOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateOtelCollector(formats); err != nil { + res = append(res, err) + } + if err := o.validatePMMAgent(formats); err != nil { res = append(res, err) } @@ -703,6 +720,29 @@ func (o *GetAgentOKBody) validateNomadAgent(formats strfmt.Registry) error { return nil } +func (o *GetAgentOKBody) validateOtelCollector(formats strfmt.Registry) error { + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if o.OtelCollector != nil { + if err := o.OtelCollector.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("getAgentOk" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("getAgentOk" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *GetAgentOKBody) validatePMMAgent(formats strfmt.Registry) error { if swag.IsZero(o.PMMAgent) { // not required return nil @@ -1030,6 +1070,10 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg res = append(res, err) } + if err := o.contextValidateOtelCollector(ctx, formats); err != nil { + res = append(res, err) + } + if err := o.contextValidatePMMAgent(ctx, formats); err != nil { res = append(res, err) } @@ -1089,6 +1133,7 @@ func (o *GetAgentOKBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + if o.AzureDatabaseExporter != nil { if swag.IsZero(o.AzureDatabaseExporter) { // not required @@ -1113,6 +1158,7 @@ func (o *GetAgentOKBody) contextValidateAzureDatabaseExporter(ctx context.Contex } func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1137,6 +1183,7 @@ func (o *GetAgentOKBody) contextValidateExternalExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -1161,6 +1208,7 @@ func (o *GetAgentOKBody) contextValidateMongodbExporter(ctx context.Context, for } func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -1185,6 +1233,7 @@ func (o *GetAgentOKBody) contextValidateMysqldExporter(ctx context.Context, form } func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + if o.NodeExporter != nil { if swag.IsZero(o.NodeExporter) { // not required @@ -1209,6 +1258,7 @@ func (o *GetAgentOKBody) contextValidateNodeExporter(ctx context.Context, format } func (o *GetAgentOKBody) contextValidateNomadAgent(ctx context.Context, formats strfmt.Registry) error { + if o.NomadAgent != nil { if swag.IsZero(o.NomadAgent) { // not required @@ -1232,7 +1282,33 @@ func (o *GetAgentOKBody) contextValidateNomadAgent(ctx context.Context, formats return nil } +func (o *GetAgentOKBody) contextValidateOtelCollector(ctx context.Context, formats strfmt.Registry) error { + + if o.OtelCollector != nil { + + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + if err := o.OtelCollector.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("getAgentOk" + "." + "otel_collector") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("getAgentOk" + "." + "otel_collector") + } + + return err + } + } + + return nil +} + func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -1257,6 +1333,7 @@ func (o *GetAgentOKBody) contextValidatePMMAgent(ctx context.Context, formats st } func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -1281,6 +1358,7 @@ func (o *GetAgentOKBody) contextValidatePostgresExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -1305,6 +1383,7 @@ func (o *GetAgentOKBody) contextValidateProxysqlExporter(ctx context.Context, fo } func (o *GetAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongologAgent != nil { if swag.IsZero(o.QANMongodbMongologAgent) { // not required @@ -1329,6 +1408,7 @@ func (o *GetAgentOKBody) contextValidateQANMongodbMongologAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfilerAgent != nil { if swag.IsZero(o.QANMongodbProfilerAgent) { // not required @@ -1353,6 +1433,7 @@ func (o *GetAgentOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschemaAgent != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent) { // not required @@ -1377,6 +1458,7 @@ func (o *GetAgentOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Cont } func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlogAgent != nil { if swag.IsZero(o.QANMysqlSlowlogAgent) { // not required @@ -1401,6 +1483,7 @@ func (o *GetAgentOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -1425,6 +1508,7 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx conte } func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -1449,6 +1533,7 @@ func (o *GetAgentOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx cont } func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -1473,6 +1558,7 @@ func (o *GetAgentOKBody) contextValidateRDSExporter(ctx context.Context, formats } func (o *GetAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -1497,6 +1583,7 @@ func (o *GetAgentOKBody) contextValidateRtaMongodbAgent(ctx context.Context, for } func (o *GetAgentOKBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -1521,6 +1608,7 @@ func (o *GetAgentOKBody) contextValidateValkeyExporter(ctx context.Context, form } func (o *GetAgentOKBody) contextValidateVmagent(ctx context.Context, formats strfmt.Registry) error { + if o.Vmagent != nil { if swag.IsZero(o.Vmagent) { // not required @@ -1567,6 +1655,7 @@ GetAgentOKBodyAzureDatabaseExporter AzureDatabaseExporter runs on Generic or Con swagger:model GetAgentOKBodyAzureDatabaseExporter */ type GetAgentOKBodyAzureDatabaseExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1793,6 +1882,7 @@ func (o *GetAgentOKBodyAzureDatabaseExporter) ContextValidate(ctx context.Contex } func (o *GetAgentOKBodyAzureDatabaseExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1839,6 +1929,7 @@ GetAgentOKBodyAzureDatabaseExporterMetricsResolutions MetricsResolutions represe swagger:model GetAgentOKBodyAzureDatabaseExporterMetricsResolutions */ type GetAgentOKBodyAzureDatabaseExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1882,6 +1973,7 @@ GetAgentOKBodyExternalExporter ExternalExporter runs on any Node type, including swagger:model GetAgentOKBodyExternalExporter */ type GetAgentOKBodyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2050,6 +2142,7 @@ func (o *GetAgentOKBodyExternalExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2096,6 +2189,7 @@ GetAgentOKBodyExternalExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyExternalExporterMetricsResolutions */ type GetAgentOKBodyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2139,6 +2233,7 @@ GetAgentOKBodyMongodbExporter MongoDBExporter runs on Generic or Container Node swagger:model GetAgentOKBodyMongodbExporter */ type GetAgentOKBodyMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2387,6 +2482,7 @@ func (o *GetAgentOKBodyMongodbExporter) ContextValidate(ctx context.Context, for } func (o *GetAgentOKBodyMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2433,6 +2529,7 @@ GetAgentOKBodyMongodbExporterMetricsResolutions MetricsResolutions represents Pr swagger:model GetAgentOKBodyMongodbExporterMetricsResolutions */ type GetAgentOKBodyMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2476,6 +2573,7 @@ GetAgentOKBodyMysqldExporter MySQLdExporter runs on Generic or Container Node an swagger:model GetAgentOKBodyMysqldExporter */ type GetAgentOKBodyMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2734,6 +2832,7 @@ func (o *GetAgentOKBodyMysqldExporter) ContextValidate(ctx context.Context, form } func (o *GetAgentOKBodyMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2780,6 +2879,7 @@ GetAgentOKBodyMysqldExporterMetricsResolutions MetricsResolutions represents Pro swagger:model GetAgentOKBodyMysqldExporterMetricsResolutions */ type GetAgentOKBodyMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2823,6 +2923,7 @@ GetAgentOKBodyNodeExporter NodeExporter runs on Generic or Container Node and ex swagger:model GetAgentOKBodyNodeExporter */ type GetAgentOKBodyNodeExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3046,6 +3147,7 @@ func (o *GetAgentOKBodyNodeExporter) ContextValidate(ctx context.Context, format } func (o *GetAgentOKBodyNodeExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3092,6 +3194,7 @@ GetAgentOKBodyNodeExporterMetricsResolutions MetricsResolutions represents Prome swagger:model GetAgentOKBodyNodeExporterMetricsResolutions */ type GetAgentOKBodyNodeExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3135,6 +3238,7 @@ GetAgentOKBodyNomadAgent get agent OK body nomad agent swagger:model GetAgentOKBodyNomadAgent */ type GetAgentOKBodyNomadAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3260,11 +3364,143 @@ func (o *GetAgentOKBodyNomadAgent) UnmarshalBinary(b []byte) error { return nil } +/* +GetAgentOKBodyOtelCollector OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL. +swagger:model GetAgentOKBodyOtelCollector +*/ +type GetAgentOKBodyOtelCollector struct { + + // agent id + AgentID string `json:"agent_id,omitempty"` + + // pmm agent id + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // disabled + Disabled bool `json:"disabled,omitempty"` + + // custom labels + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled. + // - 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_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] + Status *string `json:"status,omitempty"` + + // process exec path + ProcessExecPath string `json:"process_exec_path,omitempty"` +} + +// Validate validates this get agent OK body otel collector +func (o *GetAgentOKBodyOtelCollector) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var getAgentOkBodyOtelCollectorTypeStatusPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + getAgentOkBodyOtelCollectorTypeStatusPropEnum = append(getAgentOkBodyOtelCollectorTypeStatusPropEnum, v) + } +} + +const ( + + // GetAgentOKBodyOtelCollectorStatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + GetAgentOKBodyOtelCollectorStatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // GetAgentOKBodyOtelCollectorStatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + GetAgentOKBodyOtelCollectorStatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // GetAgentOKBodyOtelCollectorStatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + GetAgentOKBodyOtelCollectorStatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // GetAgentOKBodyOtelCollectorStatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + GetAgentOKBodyOtelCollectorStatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // GetAgentOKBodyOtelCollectorStatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + GetAgentOKBodyOtelCollectorStatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // GetAgentOKBodyOtelCollectorStatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + GetAgentOKBodyOtelCollectorStatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // GetAgentOKBodyOtelCollectorStatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + GetAgentOKBodyOtelCollectorStatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // GetAgentOKBodyOtelCollectorStatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + GetAgentOKBodyOtelCollectorStatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *GetAgentOKBodyOtelCollector) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, getAgentOkBodyOtelCollectorTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *GetAgentOKBodyOtelCollector) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("getAgentOk"+"."+"otel_collector"+"."+"status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this get agent OK body otel collector based on context it is used +func (o *GetAgentOKBodyOtelCollector) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetAgentOKBodyOtelCollector) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetAgentOKBodyOtelCollector) UnmarshalBinary(b []byte) error { + var res GetAgentOKBodyOtelCollector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* GetAgentOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model GetAgentOKBodyPMMAgent */ type GetAgentOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3314,6 +3550,7 @@ GetAgentOKBodyPostgresExporter PostgresExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyPostgresExporter */ type GetAgentOKBodyPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3555,6 +3792,7 @@ func (o *GetAgentOKBodyPostgresExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3601,6 +3839,7 @@ GetAgentOKBodyPostgresExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyPostgresExporterMetricsResolutions */ type GetAgentOKBodyPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3644,6 +3883,7 @@ GetAgentOKBodyProxysqlExporter ProxySQLExporter runs on Generic or Container Nod swagger:model GetAgentOKBodyProxysqlExporter */ type GetAgentOKBodyProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3879,6 +4119,7 @@ func (o *GetAgentOKBodyProxysqlExporter) ContextValidate(ctx context.Context, fo } func (o *GetAgentOKBodyProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3925,6 +4166,7 @@ GetAgentOKBodyProxysqlExporterMetricsResolutions MetricsResolutions represents P swagger:model GetAgentOKBodyProxysqlExporterMetricsResolutions */ type GetAgentOKBodyProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3968,6 +4210,7 @@ GetAgentOKBodyQANMongodbMongologAgent QANMongoDBMongologAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMongodbMongologAgent */ type GetAgentOKBodyQANMongodbMongologAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4177,6 +4420,7 @@ GetAgentOKBodyQANMongodbProfilerAgent QANMongoDBProfilerAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMongodbProfilerAgent */ type GetAgentOKBodyQANMongodbProfilerAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4386,6 +4630,7 @@ GetAgentOKBodyQANMysqlPerfschemaAgent QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model GetAgentOKBodyQANMysqlPerfschemaAgent */ type GetAgentOKBodyQANMysqlPerfschemaAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4613,6 +4858,7 @@ GetAgentOKBodyQANMysqlSlowlogAgent QANMySQLSlowlogAgent runs within pmm-agent an swagger:model GetAgentOKBodyQANMysqlSlowlogAgent */ type GetAgentOKBodyQANMysqlSlowlogAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4843,6 +5089,7 @@ GetAgentOKBodyQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatementsAgent runs swagger:model GetAgentOKBodyQANPostgresqlPgstatementsAgent */ type GetAgentOKBodyQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5055,6 +5302,7 @@ GetAgentOKBodyQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMonitorAgent ru swagger:model GetAgentOKBodyQANPostgresqlPgstatmonitorAgent */ type GetAgentOKBodyQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5270,6 +5518,7 @@ GetAgentOKBodyRDSExporter RDSExporter runs on Generic or Container Node and expo swagger:model GetAgentOKBodyRDSExporter */ type GetAgentOKBodyRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5502,6 +5751,7 @@ func (o *GetAgentOKBodyRDSExporter) ContextValidate(ctx context.Context, formats } func (o *GetAgentOKBodyRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5548,6 +5798,7 @@ GetAgentOKBodyRDSExporterMetricsResolutions MetricsResolutions represents Promet swagger:model GetAgentOKBodyRDSExporterMetricsResolutions */ type GetAgentOKBodyRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5591,6 +5842,7 @@ GetAgentOKBodyRtaMongodbAgent RTAMongoDBAgent runs within pmm-agent and sends Mo swagger:model GetAgentOKBodyRtaMongodbAgent */ type GetAgentOKBodyRtaMongodbAgent struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -5811,6 +6063,7 @@ func (o *GetAgentOKBodyRtaMongodbAgent) ContextValidate(ctx context.Context, for } func (o *GetAgentOKBodyRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -5857,6 +6110,7 @@ GetAgentOKBodyRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Query Analyti swagger:model GetAgentOKBodyRtaMongodbAgentRtaOptions */ type GetAgentOKBodyRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -5894,6 +6148,7 @@ GetAgentOKBodyValkeyExporter ValkeyExporter runs on Generic or Container Node an swagger:model GetAgentOKBodyValkeyExporter */ type GetAgentOKBodyValkeyExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6065,6 +6320,7 @@ func (o *GetAgentOKBodyValkeyExporter) ContextValidate(ctx context.Context, form } func (o *GetAgentOKBodyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6111,6 +6367,7 @@ GetAgentOKBodyValkeyExporterMetricsResolutions MetricsResolutions represents Pro swagger:model GetAgentOKBodyValkeyExporterMetricsResolutions */ type GetAgentOKBodyValkeyExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6156,6 +6413,7 @@ GetAgentOKBodyVmagent VMAgent runs on Generic or Container Node alongside pmm-ag swagger:model GetAgentOKBodyVmagent */ type GetAgentOKBodyVmagent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/list_agents_parameters.go b/api/inventory/v1/json/client/agents_service/list_agents_parameters.go index 371c8f77c34..1836e25a8c4 100644 --- a/api/inventory/v1/json/client/agents_service/list_agents_parameters.go +++ b/api/inventory/v1/json/client/agents_service/list_agents_parameters.go @@ -60,6 +60,7 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { + /* AgentType. Return only agents of a particular type. @@ -106,7 +107,9 @@ func (o *ListAgentsParams) WithDefaults() *ListAgentsParams { // // All values with no default are reset to their zero value. func (o *ListAgentsParams) SetDefaults() { - agentTypeDefault := string("AGENT_TYPE_UNSPECIFIED") + var ( + agentTypeDefault = string("AGENT_TYPE_UNSPECIFIED") + ) val := ListAgentsParams{ AgentType: &agentTypeDefault, @@ -197,6 +200,7 @@ func (o *ListAgentsParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -212,6 +216,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qAgentType := qrAgentType if qAgentType != "" { + if err := r.SetQueryParam("agent_type", qAgentType); err != nil { return err } @@ -228,6 +233,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qNodeID := qrNodeID if qNodeID != "" { + if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -244,6 +250,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qPMMAgentID := qrPMMAgentID if qPMMAgentID != "" { + if err := r.SetQueryParam("pmm_agent_id", qPMMAgentID); err != nil { return err } @@ -260,6 +267,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qServiceID := qrServiceID if qServiceID != "" { + if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/list_agents_responses.go b/api/inventory/v1/json/client/agents_service/list_agents_responses.go index 33502ed0d27..a5974fafc7e 100644 --- a/api/inventory/v1/json/client/agents_service/list_agents_responses.go +++ b/api/inventory/v1/json/client/agents_service/list_agents_responses.go @@ -105,6 +105,7 @@ func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -310,6 +316,7 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListAgentsDefaultBodyDetailsItems0 struct { func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { + // pmm agent PMMAgent []*ListAgentsOKBodyPMMAgentItems0 `json:"pmm_agent"` @@ -477,6 +487,9 @@ type ListAgentsOKBody struct { // rta mongodb agent RtaMongodbAgent []*ListAgentsOKBodyRtaMongodbAgentItems0 `json:"rta_mongodb_agent"` + + // otel collector + OtelCollector []*ListAgentsOKBodyOtelCollectorItems0 `json:"otel_collector"` } // Validate validates this list agents OK body @@ -559,6 +572,10 @@ func (o *ListAgentsOKBody) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := o.validateOtelCollector(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -1135,6 +1152,36 @@ func (o *ListAgentsOKBody) validateRtaMongodbAgent(formats strfmt.Registry) erro return nil } +func (o *ListAgentsOKBody) validateOtelCollector(formats strfmt.Registry) error { + if swag.IsZero(o.OtelCollector) { // not required + return nil + } + + for i := 0; i < len(o.OtelCollector); i++ { + if swag.IsZero(o.OtelCollector[i]) { // not required + continue + } + + if o.OtelCollector[i] != nil { + if err := o.OtelCollector[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("listAgentsOk" + "." + "otel_collector" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("listAgentsOk" + "." + "otel_collector" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + // ContextValidate validate this list agents OK body based on the context it is used func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error @@ -1215,6 +1262,10 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R res = append(res, err) } + if err := o.contextValidateOtelCollector(ctx, formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -1222,7 +1273,9 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.PMMAgent); i++ { + if o.PMMAgent[i] != nil { if swag.IsZero(o.PMMAgent[i]) { // not required @@ -1242,13 +1295,16 @@ func (o *ListAgentsOKBody) contextValidatePMMAgent(ctx context.Context, formats return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.VMAgent); i++ { + if o.VMAgent[i] != nil { if swag.IsZero(o.VMAgent[i]) { // not required @@ -1268,13 +1324,16 @@ func (o *ListAgentsOKBody) contextValidateVMAgent(ctx context.Context, formats s return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.NodeExporter); i++ { + if o.NodeExporter[i] != nil { if swag.IsZero(o.NodeExporter[i]) { // not required @@ -1294,13 +1353,16 @@ func (o *ListAgentsOKBody) contextValidateNodeExporter(ctx context.Context, form return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MysqldExporter); i++ { + if o.MysqldExporter[i] != nil { if swag.IsZero(o.MysqldExporter[i]) { // not required @@ -1320,13 +1382,16 @@ func (o *ListAgentsOKBody) contextValidateMysqldExporter(ctx context.Context, fo return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.MongodbExporter); i++ { + if o.MongodbExporter[i] != nil { if swag.IsZero(o.MongodbExporter[i]) { // not required @@ -1346,13 +1411,16 @@ func (o *ListAgentsOKBody) contextValidateMongodbExporter(ctx context.Context, f return err } } + } return nil } func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.PostgresExporter); i++ { + if o.PostgresExporter[i] != nil { if swag.IsZero(o.PostgresExporter[i]) { // not required @@ -1372,13 +1440,16 @@ func (o *ListAgentsOKBody) contextValidatePostgresExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ProxysqlExporter); i++ { + if o.ProxysqlExporter[i] != nil { if swag.IsZero(o.ProxysqlExporter[i]) { // not required @@ -1398,13 +1469,16 @@ func (o *ListAgentsOKBody) contextValidateProxysqlExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMysqlPerfschemaAgent); i++ { + if o.QANMysqlPerfschemaAgent[i] != nil { if swag.IsZero(o.QANMysqlPerfschemaAgent[i]) { // not required @@ -1424,13 +1498,16 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlPerfschemaAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMysqlSlowlogAgent); i++ { + if o.QANMysqlSlowlogAgent[i] != nil { if swag.IsZero(o.QANMysqlSlowlogAgent[i]) { // not required @@ -1450,13 +1527,16 @@ func (o *ListAgentsOKBody) contextValidateQANMysqlSlowlogAgent(ctx context.Conte return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMongodbProfilerAgent); i++ { + if o.QANMongodbProfilerAgent[i] != nil { if swag.IsZero(o.QANMongodbProfilerAgent[i]) { // not required @@ -1476,13 +1556,16 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbProfilerAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANMongodbMongologAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANMongodbMongologAgent); i++ { + if o.QANMongodbMongologAgent[i] != nil { if swag.IsZero(o.QANMongodbMongologAgent[i]) { // not required @@ -1502,13 +1585,16 @@ func (o *ListAgentsOKBody) contextValidateQANMongodbMongologAgent(ctx context.Co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANPostgresqlPgstatementsAgent); i++ { + if o.QANPostgresqlPgstatementsAgent[i] != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent[i]) { // not required @@ -1528,13 +1614,16 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatementsAgent(ctx con return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QANPostgresqlPgstatmonitorAgent); i++ { + if o.QANPostgresqlPgstatmonitorAgent[i] != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent[i]) { // not required @@ -1554,13 +1643,16 @@ func (o *ListAgentsOKBody) contextValidateQANPostgresqlPgstatmonitorAgent(ctx co return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ExternalExporter); i++ { + if o.ExternalExporter[i] != nil { if swag.IsZero(o.ExternalExporter[i]) { // not required @@ -1580,13 +1672,16 @@ func (o *ListAgentsOKBody) contextValidateExternalExporter(ctx context.Context, return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RDSExporter); i++ { + if o.RDSExporter[i] != nil { if swag.IsZero(o.RDSExporter[i]) { // not required @@ -1606,13 +1701,16 @@ func (o *ListAgentsOKBody) contextValidateRDSExporter(ctx context.Context, forma return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AzureDatabaseExporter); i++ { + if o.AzureDatabaseExporter[i] != nil { if swag.IsZero(o.AzureDatabaseExporter[i]) { // not required @@ -1632,13 +1730,16 @@ func (o *ListAgentsOKBody) contextValidateAzureDatabaseExporter(ctx context.Cont return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateNomadAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.NomadAgent); i++ { + if o.NomadAgent[i] != nil { if swag.IsZero(o.NomadAgent[i]) { // not required @@ -1658,13 +1759,16 @@ func (o *ListAgentsOKBody) contextValidateNomadAgent(ctx context.Context, format return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.ValkeyExporter); i++ { + if o.ValkeyExporter[i] != nil { if swag.IsZero(o.ValkeyExporter[i]) { // not required @@ -1684,13 +1788,16 @@ func (o *ListAgentsOKBody) contextValidateValkeyExporter(ctx context.Context, fo return err } } + } return nil } func (o *ListAgentsOKBody) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RtaMongodbAgent); i++ { + if o.RtaMongodbAgent[i] != nil { if swag.IsZero(o.RtaMongodbAgent[i]) { // not required @@ -1710,6 +1817,36 @@ func (o *ListAgentsOKBody) contextValidateRtaMongodbAgent(ctx context.Context, f return err } } + + } + + return nil +} + +func (o *ListAgentsOKBody) contextValidateOtelCollector(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.OtelCollector); i++ { + + if o.OtelCollector[i] != nil { + + if swag.IsZero(o.OtelCollector[i]) { // not required + return nil + } + + if err := o.OtelCollector[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("listAgentsOk" + "." + "otel_collector" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("listAgentsOk" + "." + "otel_collector" + "." + strconv.Itoa(i)) + } + + return err + } + } + } return nil @@ -1738,6 +1875,7 @@ ListAgentsOKBodyAzureDatabaseExporterItems0 AzureDatabaseExporter runs on Generi swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0 */ type ListAgentsOKBodyAzureDatabaseExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1964,6 +2102,7 @@ func (o *ListAgentsOKBodyAzureDatabaseExporterItems0) ContextValidate(ctx contex } func (o *ListAgentsOKBodyAzureDatabaseExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2010,6 +2149,7 @@ ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions MetricsResolutions swagger:model ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions */ type ListAgentsOKBodyAzureDatabaseExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2053,6 +2193,7 @@ ListAgentsOKBodyExternalExporterItems0 ExternalExporter runs on any Node type, i swagger:model ListAgentsOKBodyExternalExporterItems0 */ type ListAgentsOKBodyExternalExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2221,6 +2362,7 @@ func (o *ListAgentsOKBodyExternalExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyExternalExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2267,6 +2409,7 @@ ListAgentsOKBodyExternalExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyExternalExporterItems0MetricsResolutions */ type ListAgentsOKBodyExternalExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2310,6 +2453,7 @@ ListAgentsOKBodyMongodbExporterItems0 MongoDBExporter runs on Generic or Contain swagger:model ListAgentsOKBodyMongodbExporterItems0 */ type ListAgentsOKBodyMongodbExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2558,6 +2702,7 @@ func (o *ListAgentsOKBodyMongodbExporterItems0) ContextValidate(ctx context.Cont } func (o *ListAgentsOKBodyMongodbExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2604,6 +2749,7 @@ ListAgentsOKBodyMongodbExporterItems0MetricsResolutions MetricsResolutions repre swagger:model ListAgentsOKBodyMongodbExporterItems0MetricsResolutions */ type ListAgentsOKBodyMongodbExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2647,6 +2793,7 @@ ListAgentsOKBodyMysqldExporterItems0 MySQLdExporter runs on Generic or Container swagger:model ListAgentsOKBodyMysqldExporterItems0 */ type ListAgentsOKBodyMysqldExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2905,6 +3052,7 @@ func (o *ListAgentsOKBodyMysqldExporterItems0) ContextValidate(ctx context.Conte } func (o *ListAgentsOKBodyMysqldExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2951,6 +3099,7 @@ ListAgentsOKBodyMysqldExporterItems0MetricsResolutions MetricsResolutions repres swagger:model ListAgentsOKBodyMysqldExporterItems0MetricsResolutions */ type ListAgentsOKBodyMysqldExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2994,6 +3143,7 @@ ListAgentsOKBodyNodeExporterItems0 NodeExporter runs on Generic or Container Nod swagger:model ListAgentsOKBodyNodeExporterItems0 */ type ListAgentsOKBodyNodeExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3217,6 +3367,7 @@ func (o *ListAgentsOKBodyNodeExporterItems0) ContextValidate(ctx context.Context } func (o *ListAgentsOKBodyNodeExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3263,6 +3414,7 @@ ListAgentsOKBodyNodeExporterItems0MetricsResolutions MetricsResolutions represen swagger:model ListAgentsOKBodyNodeExporterItems0MetricsResolutions */ type ListAgentsOKBodyNodeExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3306,6 +3458,7 @@ ListAgentsOKBodyNomadAgentItems0 list agents OK body nomad agent items0 swagger:model ListAgentsOKBodyNomadAgentItems0 */ type ListAgentsOKBodyNomadAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3431,11 +3584,143 @@ func (o *ListAgentsOKBodyNomadAgentItems0) UnmarshalBinary(b []byte) error { return nil } +/* +ListAgentsOKBodyOtelCollectorItems0 OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL. +swagger:model ListAgentsOKBodyOtelCollectorItems0 +*/ +type ListAgentsOKBodyOtelCollectorItems0 struct { + + // agent id + AgentID string `json:"agent_id,omitempty"` + + // pmm agent id + PMMAgentID string `json:"pmm_agent_id,omitempty"` + + // disabled + Disabled bool `json:"disabled,omitempty"` + + // custom labels + CustomLabels map[string]string `json:"custom_labels,omitempty"` + + // AgentStatus represents actual Agent status. + // + // - AGENT_STATUS_STARTING: Agent is starting. + // - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled. + // - 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_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"] + Status *string `json:"status,omitempty"` + + // process exec path + ProcessExecPath string `json:"process_exec_path,omitempty"` +} + +// Validate validates this list agents OK body otel collector items0 +func (o *ListAgentsOKBodyOtelCollectorItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var listAgentsOkBodyOtelCollectorItems0TypeStatusPropEnum []any + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AGENT_STATUS_UNSPECIFIED","AGENT_STATUS_STARTING","AGENT_STATUS_INITIALIZATION_ERROR","AGENT_STATUS_RUNNING","AGENT_STATUS_WAITING","AGENT_STATUS_STOPPING","AGENT_STATUS_DONE","AGENT_STATUS_UNKNOWN"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + listAgentsOkBodyOtelCollectorItems0TypeStatusPropEnum = append(listAgentsOkBodyOtelCollectorItems0TypeStatusPropEnum, v) + } +} + +const ( + + // ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSUNSPECIFIED captures enum value "AGENT_STATUS_UNSPECIFIED" + ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSUNSPECIFIED string = "AGENT_STATUS_UNSPECIFIED" + + // ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSSTARTING captures enum value "AGENT_STATUS_STARTING" + ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSSTARTING string = "AGENT_STATUS_STARTING" + + // ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSINITIALIZATIONERROR captures enum value "AGENT_STATUS_INITIALIZATION_ERROR" + ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSINITIALIZATIONERROR string = "AGENT_STATUS_INITIALIZATION_ERROR" + + // ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSRUNNING captures enum value "AGENT_STATUS_RUNNING" + ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSRUNNING string = "AGENT_STATUS_RUNNING" + + // ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSWAITING captures enum value "AGENT_STATUS_WAITING" + ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSWAITING string = "AGENT_STATUS_WAITING" + + // ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSSTOPPING captures enum value "AGENT_STATUS_STOPPING" + ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSSTOPPING string = "AGENT_STATUS_STOPPING" + + // ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSDONE captures enum value "AGENT_STATUS_DONE" + ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSDONE string = "AGENT_STATUS_DONE" + + // ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSUNKNOWN captures enum value "AGENT_STATUS_UNKNOWN" + ListAgentsOKBodyOtelCollectorItems0StatusAGENTSTATUSUNKNOWN string = "AGENT_STATUS_UNKNOWN" +) + +// prop value enum +func (o *ListAgentsOKBodyOtelCollectorItems0) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, listAgentsOkBodyOtelCollectorItems0TypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (o *ListAgentsOKBodyOtelCollectorItems0) validateStatus(formats strfmt.Registry) error { + if swag.IsZero(o.Status) { // not required + return nil + } + + // value enum + if err := o.validateStatusEnum("status", "body", *o.Status); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this list agents OK body otel collector items0 based on context it is used +func (o *ListAgentsOKBodyOtelCollectorItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ListAgentsOKBodyOtelCollectorItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListAgentsOKBodyOtelCollectorItems0) UnmarshalBinary(b []byte) error { + var res ListAgentsOKBodyOtelCollectorItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + /* ListAgentsOKBodyPMMAgentItems0 PMMAgent runs on Generic or Container Node. swagger:model ListAgentsOKBodyPMMAgentItems0 */ type ListAgentsOKBodyPMMAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3485,6 +3770,7 @@ ListAgentsOKBodyPostgresExporterItems0 PostgresExporter runs on Generic or Conta swagger:model ListAgentsOKBodyPostgresExporterItems0 */ type ListAgentsOKBodyPostgresExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3726,6 +4012,7 @@ func (o *ListAgentsOKBodyPostgresExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyPostgresExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3772,6 +4059,7 @@ ListAgentsOKBodyPostgresExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyPostgresExporterItems0MetricsResolutions */ type ListAgentsOKBodyPostgresExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3815,6 +4103,7 @@ ListAgentsOKBodyProxysqlExporterItems0 ProxySQLExporter runs on Generic or Conta swagger:model ListAgentsOKBodyProxysqlExporterItems0 */ type ListAgentsOKBodyProxysqlExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4050,6 +4339,7 @@ func (o *ListAgentsOKBodyProxysqlExporterItems0) ContextValidate(ctx context.Con } func (o *ListAgentsOKBodyProxysqlExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4096,6 +4386,7 @@ ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions MetricsResolutions repr swagger:model ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions */ type ListAgentsOKBodyProxysqlExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4139,6 +4430,7 @@ ListAgentsOKBodyQANMongodbMongologAgentItems0 QANMongoDBMongologAgent runs withi swagger:model ListAgentsOKBodyQANMongodbMongologAgentItems0 */ type ListAgentsOKBodyQANMongodbMongologAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4348,6 +4640,7 @@ ListAgentsOKBodyQANMongodbProfilerAgentItems0 QANMongoDBProfilerAgent runs withi swagger:model ListAgentsOKBodyQANMongodbProfilerAgentItems0 */ type ListAgentsOKBodyQANMongodbProfilerAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4557,6 +4850,7 @@ ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 QANMySQLPerfSchemaAgent runs withi swagger:model ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 */ type ListAgentsOKBodyQANMysqlPerfschemaAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4784,6 +5078,7 @@ ListAgentsOKBodyQANMysqlSlowlogAgentItems0 QANMySQLSlowlogAgent runs within pmm- swagger:model ListAgentsOKBodyQANMysqlSlowlogAgentItems0 */ type ListAgentsOKBodyQANMysqlSlowlogAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5014,6 +5309,7 @@ ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 QANPostgreSQLPgStatementsAg swagger:model ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatementsAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5226,6 +5522,7 @@ ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 QANPostgreSQLPgStatMonitor swagger:model ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 */ type ListAgentsOKBodyQANPostgresqlPgstatmonitorAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5441,6 +5738,7 @@ ListAgentsOKBodyRDSExporterItems0 RDSExporter runs on Generic or Container Node swagger:model ListAgentsOKBodyRDSExporterItems0 */ type ListAgentsOKBodyRDSExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5673,6 +5971,7 @@ func (o *ListAgentsOKBodyRDSExporterItems0) ContextValidate(ctx context.Context, } func (o *ListAgentsOKBodyRDSExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5719,6 +6018,7 @@ ListAgentsOKBodyRDSExporterItems0MetricsResolutions MetricsResolutions represent swagger:model ListAgentsOKBodyRDSExporterItems0MetricsResolutions */ type ListAgentsOKBodyRDSExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5762,6 +6062,7 @@ ListAgentsOKBodyRtaMongodbAgentItems0 RTAMongoDBAgent runs within pmm-agent and swagger:model ListAgentsOKBodyRtaMongodbAgentItems0 */ type ListAgentsOKBodyRtaMongodbAgentItems0 struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -5982,6 +6283,7 @@ func (o *ListAgentsOKBodyRtaMongodbAgentItems0) ContextValidate(ctx context.Cont } func (o *ListAgentsOKBodyRtaMongodbAgentItems0) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -6028,6 +6330,7 @@ ListAgentsOKBodyRtaMongodbAgentItems0RtaOptions RTAOptions holds Real-Time Query swagger:model ListAgentsOKBodyRtaMongodbAgentItems0RtaOptions */ type ListAgentsOKBodyRtaMongodbAgentItems0RtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -6067,6 +6370,7 @@ ListAgentsOKBodyVMAgentItems0 VMAgent runs on Generic or Container Node alongsid swagger:model ListAgentsOKBodyVMAgentItems0 */ type ListAgentsOKBodyVMAgentItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6194,6 +6498,7 @@ ListAgentsOKBodyValkeyExporterItems0 ValkeyExporter runs on Generic or Container swagger:model ListAgentsOKBodyValkeyExporterItems0 */ type ListAgentsOKBodyValkeyExporterItems0 struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6365,6 +6670,7 @@ func (o *ListAgentsOKBodyValkeyExporterItems0) ContextValidate(ctx context.Conte } func (o *ListAgentsOKBodyValkeyExporterItems0) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6411,6 +6717,7 @@ ListAgentsOKBodyValkeyExporterItems0MetricsResolutions MetricsResolutions repres swagger:model ListAgentsOKBodyValkeyExporterItems0MetricsResolutions */ type ListAgentsOKBodyValkeyExporterItems0MetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` diff --git a/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go b/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go index fd762f29720..946dbbe4ca8 100644 --- a/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go +++ b/api/inventory/v1/json/client/agents_service/remove_agent_parameters.go @@ -61,6 +61,7 @@ RemoveAgentParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveAgentParams struct { + // AgentID. AgentID string @@ -147,6 +148,7 @@ func (o *RemoveAgentParams) SetForce(force *bool) { // WriteToRequest writes these params to a swagger request func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -167,6 +169,7 @@ func (o *RemoveAgentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.R } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/agents_service/remove_agent_responses.go b/api/inventory/v1/json/client/agents_service/remove_agent_responses.go index 15ce395fa19..2cf7048bdb4 100644 --- a/api/inventory/v1/json/client/agents_service/remove_agent_responses.go +++ b/api/inventory/v1/json/client/agents_service/remove_agent_responses.go @@ -104,6 +104,7 @@ func (o *RemoveAgentOK) GetPayload() any { } func (o *RemoveAgentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *RemoveAgentDefault) GetPayload() *RemoveAgentDefaultBody { } func (o *RemoveAgentDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveAgentDefaultBody) // response payload @@ -190,6 +192,7 @@ RemoveAgentDefaultBody remove agent default body swagger:model RemoveAgentDefaultBody */ type RemoveAgentDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *RemoveAgentDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *RemoveAgentDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -307,6 +313,7 @@ RemoveAgentDefaultBodyDetailsItems0 remove agent default body details items0 swagger:model RemoveAgentDefaultBodyDetailsItems0 */ type RemoveAgentDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type RemoveAgentDefaultBodyDetailsItems0 struct { func (o *RemoveAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *RemoveAgentDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveAgentDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/client/nodes_service/add_node_parameters.go b/api/inventory/v1/json/client/nodes_service/add_node_parameters.go index 67702dfa372..a1f49d176f4 100644 --- a/api/inventory/v1/json/client/nodes_service/add_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/add_node_parameters.go @@ -60,6 +60,7 @@ AddNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddNodeParams struct { + // Body. Body AddNodeBody @@ -129,6 +130,7 @@ func (o *AddNodeParams) SetBody(body AddNodeBody) { // WriteToRequest writes these params to a swagger request func (o *AddNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/add_node_responses.go b/api/inventory/v1/json/client/nodes_service/add_node_responses.go index 6d671e6a8b3..5515d057f3c 100644 --- a/api/inventory/v1/json/client/nodes_service/add_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/add_node_responses.go @@ -104,6 +104,7 @@ func (o *AddNodeOK) GetPayload() *AddNodeOKBody { } func (o *AddNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddNodeOKBody) // response payload @@ -177,6 +178,7 @@ func (o *AddNodeDefault) GetPayload() *AddNodeDefaultBody { } func (o *AddNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddNodeDefaultBody) // response payload @@ -192,6 +194,7 @@ AddNodeBody add node body swagger:model AddNodeBody */ type AddNodeBody struct { + // container Container *AddNodeParamsBodyContainer `json:"container,omitempty"` @@ -384,6 +387,7 @@ func (o *AddNodeBody) ContextValidate(ctx context.Context, formats strfmt.Regist } func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -408,6 +412,7 @@ func (o *AddNodeBody) contextValidateContainer(ctx context.Context, formats strf } func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -432,6 +437,7 @@ func (o *AddNodeBody) contextValidateGeneric(ctx context.Context, formats strfmt } func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -456,6 +462,7 @@ func (o *AddNodeBody) contextValidateRemote(ctx context.Context, formats strfmt. } func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzure != nil { if swag.IsZero(o.RemoteAzure) { // not required @@ -480,6 +487,7 @@ func (o *AddNodeBody) contextValidateRemoteAzure(ctx context.Context, formats st } func (o *AddNodeBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -526,6 +534,7 @@ AddNodeDefaultBody add node default body swagger:model AddNodeDefaultBody */ type AddNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -595,7 +604,9 @@ func (o *AddNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -615,6 +626,7 @@ func (o *AddNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -643,6 +655,7 @@ AddNodeDefaultBodyDetailsItems0 add node default body details items0 swagger:model AddNodeDefaultBodyDetailsItems0 */ type AddNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -654,6 +667,7 @@ type AddNodeDefaultBodyDetailsItems0 struct { func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -691,6 +705,7 @@ func (o *AddNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -754,6 +769,7 @@ AddNodeOKBody add node OK body swagger:model AddNodeOKBody */ type AddNodeOKBody struct { + // container Container *AddNodeOKBodyContainer `json:"container,omitempty"` @@ -946,6 +962,7 @@ func (o *AddNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -970,6 +987,7 @@ func (o *AddNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -994,6 +1012,7 @@ func (o *AddNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -1018,6 +1037,7 @@ func (o *AddNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzureDatabase != nil { if swag.IsZero(o.RemoteAzureDatabase) { // not required @@ -1042,6 +1062,7 @@ func (o *AddNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *AddNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -1088,6 +1109,7 @@ AddNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model AddNodeOKBodyContainer */ type AddNodeOKBodyContainer struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1155,6 +1177,7 @@ AddNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model AddNodeOKBodyGeneric */ type AddNodeOKBodyGeneric struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1219,6 +1242,7 @@ AddNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model AddNodeOKBodyRemote */ type AddNodeOKBodyRemote struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1274,6 +1298,7 @@ AddNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model AddNodeOKBodyRemoteAzureDatabase */ type AddNodeOKBodyRemoteAzureDatabase struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1329,6 +1354,7 @@ AddNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model AddNodeOKBodyRemoteRDS */ type AddNodeOKBodyRemoteRDS struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1387,6 +1413,7 @@ AddNodeParamsBodyContainer add node params body container swagger:model AddNodeParamsBodyContainer */ type AddNodeParamsBodyContainer struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1448,6 +1475,7 @@ AddNodeParamsBodyGeneric add node params body generic swagger:model AddNodeParamsBodyGeneric */ type AddNodeParamsBodyGeneric struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1506,6 +1534,7 @@ AddNodeParamsBodyRemote add node params body remote swagger:model AddNodeParamsBodyRemote */ type AddNodeParamsBodyRemote struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1558,6 +1587,7 @@ AddNodeParamsBodyRemoteAzure add node params body remote azure swagger:model AddNodeParamsBodyRemoteAzure */ type AddNodeParamsBodyRemoteAzure struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` @@ -1610,6 +1640,7 @@ AddNodeParamsBodyRemoteRDS add node params body remote RDS swagger:model AddNodeParamsBodyRemoteRDS */ type AddNodeParamsBodyRemoteRDS struct { + // Unique across all Nodes user-defined name. NodeName string `json:"node_name,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/get_node_parameters.go b/api/inventory/v1/json/client/nodes_service/get_node_parameters.go index 3498346e1f1..25b4a671bc0 100644 --- a/api/inventory/v1/json/client/nodes_service/get_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/get_node_parameters.go @@ -60,6 +60,7 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { + /* NodeID. Unique randomly generated instance identifier. @@ -132,6 +133,7 @@ func (o *GetNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/get_node_responses.go b/api/inventory/v1/json/client/nodes_service/get_node_responses.go index 40f3bb381f9..0d8f5d2b234 100644 --- a/api/inventory/v1/json/client/nodes_service/get_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/get_node_responses.go @@ -104,6 +104,7 @@ func (o *GetNodeOK) GetPayload() *GetNodeOKBody { } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeDefaultBody) // response payload @@ -192,6 +194,7 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -309,6 +315,7 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetNodeDefaultBodyDetailsItems0 struct { func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { + // container Container *GetNodeOKBodyContainer `json:"container,omitempty"` @@ -612,6 +622,7 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + if o.Container != nil { if swag.IsZero(o.Container) { // not required @@ -636,6 +647,7 @@ func (o *GetNodeOKBody) contextValidateContainer(ctx context.Context, formats st } func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + if o.Generic != nil { if swag.IsZero(o.Generic) { // not required @@ -660,6 +672,7 @@ func (o *GetNodeOKBody) contextValidateGeneric(ctx context.Context, formats strf } func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + if o.Remote != nil { if swag.IsZero(o.Remote) { // not required @@ -684,6 +697,7 @@ func (o *GetNodeOKBody) contextValidateRemote(ctx context.Context, formats strfm } func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteAzureDatabase != nil { if swag.IsZero(o.RemoteAzureDatabase) { // not required @@ -708,6 +722,7 @@ func (o *GetNodeOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, } func (o *GetNodeOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RemoteRDS != nil { if swag.IsZero(o.RemoteRDS) { // not required @@ -754,6 +769,7 @@ GetNodeOKBodyContainer ContainerNode represents a Docker container. swagger:model GetNodeOKBodyContainer */ type GetNodeOKBodyContainer struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -821,6 +837,7 @@ GetNodeOKBodyGeneric GenericNode represents a bare metal server or virtual machi swagger:model GetNodeOKBodyGeneric */ type GetNodeOKBodyGeneric struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -885,6 +902,7 @@ GetNodeOKBodyRemote RemoteNode represents generic remote Node. It's a node where swagger:model GetNodeOKBodyRemote */ type GetNodeOKBodyRemote struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -940,6 +958,7 @@ GetNodeOKBodyRemoteAzureDatabase RemoteAzureDatabaseNode represents remote Azure swagger:model GetNodeOKBodyRemoteAzureDatabase */ type GetNodeOKBodyRemoteAzureDatabase struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -995,6 +1014,7 @@ GetNodeOKBodyRemoteRDS RemoteRDSNode represents remote RDS Node. Agents can't ru swagger:model GetNodeOKBodyRemoteRDS */ type GetNodeOKBodyRemoteRDS struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go b/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go index 63128821ce8..828de4c8f11 100644 --- a/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/list_nodes_parameters.go @@ -60,6 +60,7 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { + /* NodeType. Return only Nodes with matching Node type. @@ -85,7 +86,9 @@ func (o *ListNodesParams) WithDefaults() *ListNodesParams { // // All values with no default are reset to their zero value. func (o *ListNodesParams) SetDefaults() { - nodeTypeDefault := string("NODE_TYPE_UNSPECIFIED") + var ( + nodeTypeDefault = string("NODE_TYPE_UNSPECIFIED") + ) val := ListNodesParams{ NodeType: &nodeTypeDefault, @@ -143,6 +146,7 @@ func (o *ListNodesParams) SetNodeType(nodeType *string) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -158,6 +162,7 @@ func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } qNodeType := qrNodeType if qNodeType != "" { + if err := r.SetQueryParam("node_type", qNodeType); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go b/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go index 15fa4eb9397..9b926ab5fbb 100644 --- a/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go +++ b/api/inventory/v1/json/client/nodes_service/list_nodes_responses.go @@ -104,6 +104,7 @@ func (o *ListNodesOK) GetPayload() *ListNodesOKBody { } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -309,6 +315,7 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type ListNodesDefaultBodyDetailsItems0 struct { func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListNodesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { + // generic Generic []*ListNodesOKBodyGenericItems0 `json:"generic"` @@ -647,7 +657,9 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Generic); i++ { + if o.Generic[i] != nil { if swag.IsZero(o.Generic[i]) { // not required @@ -667,13 +679,16 @@ func (o *ListNodesOKBody) contextValidateGeneric(ctx context.Context, formats st return err } } + } return nil } func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Container); i++ { + if o.Container[i] != nil { if swag.IsZero(o.Container[i]) { // not required @@ -693,13 +708,16 @@ func (o *ListNodesOKBody) contextValidateContainer(ctx context.Context, formats return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Remote); i++ { + if o.Remote[i] != nil { if swag.IsZero(o.Remote[i]) { // not required @@ -719,13 +737,16 @@ func (o *ListNodesOKBody) contextValidateRemote(ctx context.Context, formats str return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RemoteRDS); i++ { + if o.RemoteRDS[i] != nil { if swag.IsZero(o.RemoteRDS[i]) { // not required @@ -745,13 +766,16 @@ func (o *ListNodesOKBody) contextValidateRemoteRDS(ctx context.Context, formats return err } } + } return nil } func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RemoteAzureDatabase); i++ { + if o.RemoteAzureDatabase[i] != nil { if swag.IsZero(o.RemoteAzureDatabase[i]) { // not required @@ -771,6 +795,7 @@ func (o *ListNodesOKBody) contextValidateRemoteAzureDatabase(ctx context.Context return err } } + } return nil @@ -799,6 +824,7 @@ ListNodesOKBodyContainerItems0 ContainerNode represents a Docker container. swagger:model ListNodesOKBodyContainerItems0 */ type ListNodesOKBodyContainerItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -866,6 +892,7 @@ ListNodesOKBodyGenericItems0 GenericNode represents a bare metal server or virtu swagger:model ListNodesOKBodyGenericItems0 */ type ListNodesOKBodyGenericItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -930,6 +957,7 @@ ListNodesOKBodyRemoteAzureDatabaseItems0 RemoteAzureDatabaseNode represents remo swagger:model ListNodesOKBodyRemoteAzureDatabaseItems0 */ type ListNodesOKBodyRemoteAzureDatabaseItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -985,6 +1013,7 @@ ListNodesOKBodyRemoteItems0 RemoteNode represents generic remote Node. It's a no swagger:model ListNodesOKBodyRemoteItems0 */ type ListNodesOKBodyRemoteItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -1040,6 +1069,7 @@ ListNodesOKBodyRemoteRDSItems0 RemoteRDSNode represents remote RDS Node. Agents swagger:model ListNodesOKBodyRemoteRDSItems0 */ type ListNodesOKBodyRemoteRDSItems0 struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` diff --git a/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go b/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go index 62194bd1a8e..c2bfa764dad 100644 --- a/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go +++ b/api/inventory/v1/json/client/nodes_service/remove_node_parameters.go @@ -61,6 +61,7 @@ RemoveNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveNodeParams struct { + /* Force. Remove node with all dependencies. @@ -150,6 +151,7 @@ func (o *RemoveNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *RemoveNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/nodes_service/remove_node_responses.go b/api/inventory/v1/json/client/nodes_service/remove_node_responses.go index 4fc5f3a61c4..e16f0f64905 100644 --- a/api/inventory/v1/json/client/nodes_service/remove_node_responses.go +++ b/api/inventory/v1/json/client/nodes_service/remove_node_responses.go @@ -104,6 +104,7 @@ func (o *RemoveNodeOK) GetPayload() any { } func (o *RemoveNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *RemoveNodeDefault) GetPayload() *RemoveNodeDefaultBody { } func (o *RemoveNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveNodeDefaultBody) // response payload @@ -190,6 +192,7 @@ RemoveNodeDefaultBody remove node default body swagger:model RemoveNodeDefaultBody */ type RemoveNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *RemoveNodeDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *RemoveNodeDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -307,6 +313,7 @@ RemoveNodeDefaultBodyDetailsItems0 remove node default body details items0 swagger:model RemoveNodeDefaultBodyDetailsItems0 */ type RemoveNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type RemoveNodeDefaultBodyDetailsItems0 struct { func (o *RemoveNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *RemoveNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/client/services_service/add_service_parameters.go b/api/inventory/v1/json/client/services_service/add_service_parameters.go index ed2a7830ee1..db289d481c3 100644 --- a/api/inventory/v1/json/client/services_service/add_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/add_service_parameters.go @@ -60,6 +60,7 @@ AddServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddServiceParams struct { + // Body. Body AddServiceBody @@ -129,6 +130,7 @@ func (o *AddServiceParams) SetBody(body AddServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/add_service_responses.go b/api/inventory/v1/json/client/services_service/add_service_responses.go index 04f7212eda1..8dbbb3552eb 100644 --- a/api/inventory/v1/json/client/services_service/add_service_responses.go +++ b/api/inventory/v1/json/client/services_service/add_service_responses.go @@ -104,6 +104,7 @@ func (o *AddServiceOK) GetPayload() *AddServiceOKBody { } func (o *AddServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceOKBody) // response payload @@ -177,6 +178,7 @@ func (o *AddServiceDefault) GetPayload() *AddServiceDefaultBody { } func (o *AddServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceDefaultBody) // response payload @@ -192,6 +194,7 @@ AddServiceBody add service body swagger:model AddServiceBody */ type AddServiceBody struct { + // external External *AddServiceParamsBodyExternal `json:"external,omitempty"` @@ -452,6 +455,7 @@ func (o *AddServiceBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -476,6 +480,7 @@ func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -500,6 +505,7 @@ func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -524,6 +530,7 @@ func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -548,6 +555,7 @@ func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfm } func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -572,6 +580,7 @@ func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats } func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -596,6 +605,7 @@ func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -642,6 +652,7 @@ AddServiceDefaultBody add service default body swagger:model AddServiceDefaultBody */ type AddServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -711,7 +722,9 @@ func (o *AddServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -731,6 +744,7 @@ func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -759,6 +773,7 @@ AddServiceDefaultBodyDetailsItems0 add service default body details items0 swagger:model AddServiceDefaultBodyDetailsItems0 */ type AddServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -770,6 +785,7 @@ type AddServiceDefaultBodyDetailsItems0 struct { func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -807,6 +823,7 @@ func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -870,6 +887,7 @@ AddServiceOKBody add service OK body swagger:model AddServiceOKBody */ type AddServiceOKBody struct { + // external External *AddServiceOKBodyExternal `json:"external,omitempty"` @@ -1130,6 +1148,7 @@ func (o *AddServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -1154,6 +1173,7 @@ func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -1178,6 +1198,7 @@ func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -1202,6 +1223,7 @@ func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -1226,6 +1248,7 @@ func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -1250,6 +1273,7 @@ func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -1274,6 +1298,7 @@ func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -1320,6 +1345,7 @@ AddServiceOKBodyExternal ExternalService represents a generic External service i swagger:model AddServiceOKBodyExternal */ type AddServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1384,6 +1410,7 @@ AddServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model AddServiceOKBodyHaproxy */ type AddServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1439,6 +1466,7 @@ AddServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model AddServiceOKBodyMongodb */ type AddServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1509,6 +1537,7 @@ AddServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyMysql */ type AddServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1582,6 +1611,7 @@ AddServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model AddServiceOKBodyPostgresql */ type AddServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1658,6 +1688,7 @@ AddServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model AddServiceOKBodyProxysql */ type AddServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1728,6 +1759,7 @@ AddServiceOKBodyValkey ValkeyService represents a generic Valkey instance. swagger:model AddServiceOKBodyValkey */ type AddServiceOKBodyValkey struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1798,6 +1830,7 @@ AddServiceParamsBodyExternal add service params body external swagger:model AddServiceParamsBodyExternal */ type AddServiceParamsBodyExternal struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1853,6 +1886,7 @@ AddServiceParamsBodyHaproxy add service params body haproxy swagger:model AddServiceParamsBodyHaproxy */ type AddServiceParamsBodyHaproxy struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1905,6 +1939,7 @@ AddServiceParamsBodyMongodb add service params body mongodb swagger:model AddServiceParamsBodyMongodb */ type AddServiceParamsBodyMongodb struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -1969,6 +2004,7 @@ AddServiceParamsBodyMysql add service params body mysql swagger:model AddServiceParamsBodyMysql */ type AddServiceParamsBodyMysql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -2036,6 +2072,7 @@ AddServiceParamsBodyPostgresql add service params body postgresql swagger:model AddServiceParamsBodyPostgresql */ type AddServiceParamsBodyPostgresql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -2103,6 +2140,7 @@ AddServiceParamsBodyProxysql add service params body proxysql swagger:model AddServiceParamsBodyProxysql */ type AddServiceParamsBodyProxysql struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` @@ -2167,6 +2205,7 @@ AddServiceParamsBodyValkey add service params body valkey swagger:model AddServiceParamsBodyValkey */ type AddServiceParamsBodyValkey struct { + // Unique across all Services user-defined name. Required. ServiceName string `json:"service_name,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/change_service_parameters.go b/api/inventory/v1/json/client/services_service/change_service_parameters.go index d718cb7f5b9..d2ffc87b968 100644 --- a/api/inventory/v1/json/client/services_service/change_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/change_service_parameters.go @@ -60,6 +60,7 @@ ChangeServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeServiceParams struct { + // Body. Body ChangeServiceBody @@ -143,6 +144,7 @@ func (o *ChangeServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *ChangeServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/change_service_responses.go b/api/inventory/v1/json/client/services_service/change_service_responses.go index 3b515455437..2e693a4093c 100644 --- a/api/inventory/v1/json/client/services_service/change_service_responses.go +++ b/api/inventory/v1/json/client/services_service/change_service_responses.go @@ -104,6 +104,7 @@ func (o *ChangeServiceOK) GetPayload() *ChangeServiceOKBody { } func (o *ChangeServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeServiceOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ChangeServiceDefault) GetPayload() *ChangeServiceDefaultBody { } func (o *ChangeServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeServiceDefaultBody) // response payload @@ -192,6 +194,7 @@ ChangeServiceBody change service body swagger:model ChangeServiceBody */ type ChangeServiceBody struct { + // environment Environment *string `json:"environment,omitempty"` @@ -260,6 +263,7 @@ func (o *ChangeServiceBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *ChangeServiceBody) contextValidateCustomLabels(ctx context.Context, formats strfmt.Registry) error { + if o.CustomLabels != nil { if swag.IsZero(o.CustomLabels) { // not required @@ -306,6 +310,7 @@ ChangeServiceDefaultBody change service default body swagger:model ChangeServiceDefaultBody */ type ChangeServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -375,7 +380,9 @@ func (o *ChangeServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -395,6 +402,7 @@ func (o *ChangeServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -423,6 +431,7 @@ ChangeServiceDefaultBodyDetailsItems0 change service default body details items0 swagger:model ChangeServiceDefaultBodyDetailsItems0 */ type ChangeServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -434,6 +443,7 @@ type ChangeServiceDefaultBodyDetailsItems0 struct { func (o *ChangeServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -471,6 +481,7 @@ func (o *ChangeServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -534,6 +545,7 @@ ChangeServiceOKBody change service OK body swagger:model ChangeServiceOKBody */ type ChangeServiceOKBody struct { + // external External *ChangeServiceOKBodyExternal `json:"external,omitempty"` @@ -794,6 +806,7 @@ func (o *ChangeServiceOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *ChangeServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -818,6 +831,7 @@ func (o *ChangeServiceOKBody) contextValidateExternal(ctx context.Context, forma } func (o *ChangeServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -842,6 +856,7 @@ func (o *ChangeServiceOKBody) contextValidateHaproxy(ctx context.Context, format } func (o *ChangeServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -866,6 +881,7 @@ func (o *ChangeServiceOKBody) contextValidateMongodb(ctx context.Context, format } func (o *ChangeServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -890,6 +906,7 @@ func (o *ChangeServiceOKBody) contextValidateMysql(ctx context.Context, formats } func (o *ChangeServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -914,6 +931,7 @@ func (o *ChangeServiceOKBody) contextValidatePostgresql(ctx context.Context, for } func (o *ChangeServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -938,6 +956,7 @@ func (o *ChangeServiceOKBody) contextValidateProxysql(ctx context.Context, forma } func (o *ChangeServiceOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -984,6 +1003,7 @@ ChangeServiceOKBodyExternal ExternalService represents a generic External servic swagger:model ChangeServiceOKBodyExternal */ type ChangeServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1048,6 +1068,7 @@ ChangeServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service i swagger:model ChangeServiceOKBodyHaproxy */ type ChangeServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1103,6 +1124,7 @@ ChangeServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model ChangeServiceOKBodyMongodb */ type ChangeServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1173,6 +1195,7 @@ ChangeServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model ChangeServiceOKBodyMysql */ type ChangeServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1246,6 +1269,7 @@ ChangeServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL swagger:model ChangeServiceOKBodyPostgresql */ type ChangeServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1322,6 +1346,7 @@ ChangeServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instan swagger:model ChangeServiceOKBodyProxysql */ type ChangeServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1392,6 +1417,7 @@ ChangeServiceOKBodyValkey ValkeyService represents a generic Valkey instance. swagger:model ChangeServiceOKBodyValkey */ type ChangeServiceOKBodyValkey struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1462,6 +1488,7 @@ ChangeServiceParamsBodyCustomLabels A wrapper for map[string]string. This type a swagger:model ChangeServiceParamsBodyCustomLabels */ type ChangeServiceParamsBodyCustomLabels struct { + // values Values map[string]string `json:"values,omitempty"` } diff --git a/api/inventory/v1/json/client/services_service/get_service_parameters.go b/api/inventory/v1/json/client/services_service/get_service_parameters.go index 8569bce763c..12989ecf6ae 100644 --- a/api/inventory/v1/json/client/services_service/get_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/get_service_parameters.go @@ -60,6 +60,7 @@ GetServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetServiceParams struct { + /* ServiceID. Unique randomly generated instance identifier. @@ -132,6 +133,7 @@ func (o *GetServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/get_service_responses.go b/api/inventory/v1/json/client/services_service/get_service_responses.go index 798b441b811..0c2a396fa28 100644 --- a/api/inventory/v1/json/client/services_service/get_service_responses.go +++ b/api/inventory/v1/json/client/services_service/get_service_responses.go @@ -104,6 +104,7 @@ func (o *GetServiceOK) GetPayload() *GetServiceOKBody { } func (o *GetServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetServiceOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetServiceDefault) GetPayload() *GetServiceDefaultBody { } func (o *GetServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetServiceDefaultBody) // response payload @@ -192,6 +194,7 @@ GetServiceDefaultBody get service default body swagger:model GetServiceDefaultBody */ type GetServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -309,6 +315,7 @@ GetServiceDefaultBodyDetailsItems0 get service default body details items0 swagger:model GetServiceDefaultBodyDetailsItems0 */ type GetServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetServiceDefaultBodyDetailsItems0 struct { func (o *GetServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetServiceOKBody get service OK body swagger:model GetServiceOKBody */ type GetServiceOKBody struct { + // external External *GetServiceOKBodyExternal `json:"external,omitempty"` @@ -680,6 +690,7 @@ func (o *GetServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -704,6 +715,7 @@ func (o *GetServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -728,6 +740,7 @@ func (o *GetServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -752,6 +765,7 @@ func (o *GetServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -776,6 +790,7 @@ func (o *GetServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -800,6 +815,7 @@ func (o *GetServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *GetServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -824,6 +840,7 @@ func (o *GetServiceOKBody) contextValidateProxysql(ctx context.Context, formats } func (o *GetServiceOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -870,6 +887,7 @@ GetServiceOKBodyExternal ExternalService represents a generic External service i swagger:model GetServiceOKBodyExternal */ type GetServiceOKBodyExternal struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -934,6 +952,7 @@ GetServiceOKBodyHaproxy HAProxyService represents a generic HAProxy service inst swagger:model GetServiceOKBodyHaproxy */ type GetServiceOKBodyHaproxy struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -989,6 +1008,7 @@ GetServiceOKBodyMongodb MongoDBService represents a generic MongoDB instance. swagger:model GetServiceOKBodyMongodb */ type GetServiceOKBodyMongodb struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1059,6 +1079,7 @@ GetServiceOKBodyMysql MySQLService represents a generic MySQL instance. swagger:model GetServiceOKBodyMysql */ type GetServiceOKBodyMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1132,6 +1153,7 @@ GetServiceOKBodyPostgresql PostgreSQLService represents a generic PostgreSQL ins swagger:model GetServiceOKBodyPostgresql */ type GetServiceOKBodyPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1208,6 +1230,7 @@ GetServiceOKBodyProxysql ProxySQLService represents a generic ProxySQL instance. swagger:model GetServiceOKBodyProxysql */ type GetServiceOKBodyProxysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1278,6 +1301,7 @@ GetServiceOKBodyValkey ValkeyService represents a generic Valkey instance. swagger:model GetServiceOKBodyValkey */ type GetServiceOKBodyValkey struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go b/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go index 9415db910a0..e51b41675fb 100644 --- a/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go +++ b/api/inventory/v1/json/client/services_service/list_active_service_types_parameters.go @@ -60,6 +60,7 @@ ListActiveServiceTypesParams contains all the parameters to send to the API endp Typically these are written to a http.Request. */ type ListActiveServiceTypesParams struct { + // Body. Body any @@ -129,6 +130,7 @@ func (o *ListActiveServiceTypesParams) SetBody(body any) { // WriteToRequest writes these params to a swagger request func (o *ListActiveServiceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go b/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go index d973352a1e6..55e66e2850e 100644 --- a/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go +++ b/api/inventory/v1/json/client/services_service/list_active_service_types_responses.go @@ -105,6 +105,7 @@ func (o *ListActiveServiceTypesOK) GetPayload() *ListActiveServiceTypesOKBody { } func (o *ListActiveServiceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListActiveServiceTypesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListActiveServiceTypesDefault) GetPayload() *ListActiveServiceTypesDefa } func (o *ListActiveServiceTypesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListActiveServiceTypesDefaultBody) // response payload @@ -193,6 +195,7 @@ ListActiveServiceTypesDefaultBody list active service types default body swagger:model ListActiveServiceTypesDefaultBody */ type ListActiveServiceTypesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListActiveServiceTypesDefaultBody) ContextValidate(ctx context.Context, } func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListActiveServiceTypesDefaultBody) contextValidateDetails(ctx context.C return err } } + } return nil @@ -310,6 +316,7 @@ ListActiveServiceTypesDefaultBodyDetailsItems0 list active service types default swagger:model ListActiveServiceTypesDefaultBodyDetailsItems0 */ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListActiveServiceTypesDefaultBodyDetailsItems0 struct { func (o *ListActiveServiceTypesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListActiveServiceTypesDefaultBodyDetailsItems0) UnmarshalJSON(data []by // MarshalJSON marshals this object with additional properties into a JSON object func (o ListActiveServiceTypesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListActiveServiceTypesOKBody list active service types OK body swagger:model ListActiveServiceTypesOKBody */ type ListActiveServiceTypesOKBody struct { + // service types ServiceTypes []*string `json:"service_types"` } diff --git a/api/inventory/v1/json/client/services_service/list_services_parameters.go b/api/inventory/v1/json/client/services_service/list_services_parameters.go index 2173e7e1824..9c038187829 100644 --- a/api/inventory/v1/json/client/services_service/list_services_parameters.go +++ b/api/inventory/v1/json/client/services_service/list_services_parameters.go @@ -60,6 +60,7 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { + /* ExternalGroup. Return only services in this external group. @@ -97,7 +98,9 @@ func (o *ListServicesParams) WithDefaults() *ListServicesParams { // // All values with no default are reset to their zero value. func (o *ListServicesParams) SetDefaults() { - serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + var ( + serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") + ) val := ListServicesParams{ ServiceType: &serviceTypeDefault, @@ -177,6 +180,7 @@ func (o *ListServicesParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -192,6 +196,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qExternalGroup := qrExternalGroup if qExternalGroup != "" { + if err := r.SetQueryParam("external_group", qExternalGroup); err != nil { return err } @@ -208,6 +213,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qNodeID := qrNodeID if qNodeID != "" { + if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -224,6 +230,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qServiceType := qrServiceType if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/list_services_responses.go b/api/inventory/v1/json/client/services_service/list_services_responses.go index 68f7aa12d99..3207db63e40 100644 --- a/api/inventory/v1/json/client/services_service/list_services_responses.go +++ b/api/inventory/v1/json/client/services_service/list_services_responses.go @@ -104,6 +104,7 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -309,6 +315,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // mysql Mysql []*ListServicesOKBodyMysqlItems0 `json:"mysql"` @@ -729,7 +739,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mysql); i++ { + if o.Mysql[i] != nil { if swag.IsZero(o.Mysql[i]) { // not required @@ -749,13 +761,16 @@ func (o *ListServicesOKBody) contextValidateMysql(ctx context.Context, formats s return err } } + } return nil } func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -775,13 +790,16 @@ func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats return err } } + } return nil } func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Postgresql); i++ { + if o.Postgresql[i] != nil { if swag.IsZero(o.Postgresql[i]) { // not required @@ -801,13 +819,16 @@ func (o *ListServicesOKBody) contextValidatePostgresql(ctx context.Context, form return err } } + } return nil } func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Proxysql); i++ { + if o.Proxysql[i] != nil { if swag.IsZero(o.Proxysql[i]) { // not required @@ -827,13 +848,16 @@ func (o *ListServicesOKBody) contextValidateProxysql(ctx context.Context, format return err } } + } return nil } func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Haproxy); i++ { + if o.Haproxy[i] != nil { if swag.IsZero(o.Haproxy[i]) { // not required @@ -853,13 +877,16 @@ func (o *ListServicesOKBody) contextValidateHaproxy(ctx context.Context, formats return err } } + } return nil } func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.External); i++ { + if o.External[i] != nil { if swag.IsZero(o.External[i]) { // not required @@ -879,13 +906,16 @@ func (o *ListServicesOKBody) contextValidateExternal(ctx context.Context, format return err } } + } return nil } func (o *ListServicesOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Valkey); i++ { + if o.Valkey[i] != nil { if swag.IsZero(o.Valkey[i]) { // not required @@ -905,6 +935,7 @@ func (o *ListServicesOKBody) contextValidateValkey(ctx context.Context, formats return err } } + } return nil @@ -933,6 +964,7 @@ ListServicesOKBodyExternalItems0 ExternalService represents a generic External s swagger:model ListServicesOKBodyExternalItems0 */ type ListServicesOKBodyExternalItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -997,6 +1029,7 @@ ListServicesOKBodyHaproxyItems0 HAProxyService represents a generic HAProxy serv swagger:model ListServicesOKBodyHaproxyItems0 */ type ListServicesOKBodyHaproxyItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1052,6 +1085,7 @@ ListServicesOKBodyMongodbItems0 MongoDBService represents a generic MongoDB inst swagger:model ListServicesOKBodyMongodbItems0 */ type ListServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1122,6 +1156,7 @@ ListServicesOKBodyMysqlItems0 MySQLService represents a generic MySQL instance. swagger:model ListServicesOKBodyMysqlItems0 */ type ListServicesOKBodyMysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1195,6 +1230,7 @@ ListServicesOKBodyPostgresqlItems0 PostgreSQLService represents a generic Postgr swagger:model ListServicesOKBodyPostgresqlItems0 */ type ListServicesOKBodyPostgresqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1271,6 +1307,7 @@ ListServicesOKBodyProxysqlItems0 ProxySQLService represents a generic ProxySQL i swagger:model ListServicesOKBodyProxysqlItems0 */ type ListServicesOKBodyProxysqlItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1341,6 +1378,7 @@ ListServicesOKBodyValkeyItems0 ValkeyService represents a generic Valkey instanc swagger:model ListServicesOKBodyValkeyItems0 */ type ListServicesOKBodyValkeyItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/inventory/v1/json/client/services_service/remove_service_parameters.go b/api/inventory/v1/json/client/services_service/remove_service_parameters.go index 876f2945e99..09c33e6bcd7 100644 --- a/api/inventory/v1/json/client/services_service/remove_service_parameters.go +++ b/api/inventory/v1/json/client/services_service/remove_service_parameters.go @@ -61,6 +61,7 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { + /* Force. Remove service with all dependencies. @@ -150,6 +151,7 @@ func (o *RemoveServiceParams) SetServiceID(serviceID string) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/inventory/v1/json/client/services_service/remove_service_responses.go b/api/inventory/v1/json/client/services_service/remove_service_responses.go index 399b18b8cf9..404174da350 100644 --- a/api/inventory/v1/json/client/services_service/remove_service_responses.go +++ b/api/inventory/v1/json/client/services_service/remove_service_responses.go @@ -104,6 +104,7 @@ func (o *RemoveServiceOK) GetPayload() any { } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -190,6 +192,7 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -307,6 +313,7 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type RemoveServiceDefaultBodyDetailsItems0 struct { func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/inventory/v1/json/v1.json b/api/inventory/v1/json/v1.json index 18b9a0b485c..7bc2a81dbff 100644 --- a/api/inventory/v1/json/v1.json +++ b/api/inventory/v1/json/v1.json @@ -63,7 +63,8 @@ "AGENT_TYPE_RDS_EXPORTER", "AGENT_TYPE_AZURE_DATABASE_EXPORTER", "AGENT_TYPE_NOMAD_AGENT", - "AGENT_TYPE_RTA_MONGODB_AGENT" + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_OTEL_COLLECTOR" ], "type": "string", "default": "AGENT_TYPE_UNSPECIFIED", @@ -2177,6 +2178,55 @@ } }, "x-order": 18 + }, + "otel_collector": { + "type": "array", + "items": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + } + }, + "x-order": 19 } } } @@ -3748,6 +3798,50 @@ } }, "x-order": 16 + }, + "otel_collector": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 1 + }, + "log_file_paths": { + "description": "Deprecated: use log_sources for per-path preset. If log_sources is empty, these are used with preset \"raw\".", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 2 + }, + "log_sources": { + "type": "array", + "items": { + "description": "LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing).", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + }, + "preset": { + "description": "Preset name from log_parser_presets table, or \"raw\" for no operators.", + "type": "string", + "x-order": 1 + } + } + }, + "x-order": 3 + } + }, + "x-order": 17 } } } @@ -5709,6 +5803,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 17 } } } @@ -7812,6 +7952,52 @@ } }, "x-order": 18 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 19 } } } @@ -9870,6 +10056,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "ChangeOtelCollectorParams patches the single otel_collector agent per pmm-agent (merge_labels must not use keys log_sources or log_file_paths).", + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "merge_labels": { + "description": "Keys to merge into custom labels (overwrite per key). Reserved keys log_sources and log_file_paths are rejected.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 1 + }, + "add_log_sources": { + "description": "Append or update log sources; same path appears twice — last preset wins.", + "type": "array", + "items": { + "description": "LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing).", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + }, + "preset": { + "description": "Preset name from log_parser_presets table, or \"raw\" for no operators.", + "type": "string", + "x-order": 1 + } + } + }, + "x-order": 2 + }, + "remove_legacy_log_file_paths": { + "description": "If true, remove legacy log_file_paths label when present.", + "type": "boolean", + "x-order": 3 + } + }, + "x-order": 17 } } } @@ -11844,6 +12076,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 17 } } } diff --git a/api/inventory/v1/log_level.pb.go b/api/inventory/v1/log_level.pb.go index cd798d6fb86..16defbb9016 100644 --- a/api/inventory/v1/log_level.pb.go +++ b/api/inventory/v1/log_level.pb.go @@ -7,12 +7,11 @@ package inventoryv1 import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -108,13 +107,10 @@ func file_inventory_v1_log_level_proto_rawDescGZIP() []byte { return file_inventory_v1_log_level_proto_rawDescData } -var ( - file_inventory_v1_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_log_level_proto_goTypes = []any{ - (LogLevel)(0), // 0: inventory.v1.LogLevel - } -) - +var file_inventory_v1_log_level_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_log_level_proto_goTypes = []any{ + (LogLevel)(0), // 0: inventory.v1.LogLevel +} var file_inventory_v1_log_level_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/inventory/v1/log_level.swagger.json b/api/inventory/v1/log_level.swagger.json new file mode 100644 index 00000000000..0e16c21a9e1 --- /dev/null +++ b/api/inventory/v1/log_level.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventory/v1/log_level.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/inventory/v1/nodes.pb.go b/api/inventory/v1/nodes.pb.go index 672f9e43761..7391959ad03 100644 --- a/api/inventory/v1/nodes.pb.go +++ b/api/inventory/v1/nodes.pb.go @@ -7,15 +7,14 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -2008,42 +2007,39 @@ func file_inventory_v1_nodes_proto_rawDescGZIP() []byte { return file_inventory_v1_nodes_proto_rawDescData } -var ( - file_inventory_v1_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 28) - file_inventory_v1_nodes_proto_goTypes = []any{ - (NodeType)(0), // 0: inventory.v1.NodeType - (*GenericNode)(nil), // 1: inventory.v1.GenericNode - (*ContainerNode)(nil), // 2: inventory.v1.ContainerNode - (*RemoteNode)(nil), // 3: inventory.v1.RemoteNode - (*RemoteRDSNode)(nil), // 4: inventory.v1.RemoteRDSNode - (*RemoteAzureDatabaseNode)(nil), // 5: inventory.v1.RemoteAzureDatabaseNode - (*ListNodesRequest)(nil), // 6: inventory.v1.ListNodesRequest - (*ListNodesResponse)(nil), // 7: inventory.v1.ListNodesResponse - (*GetNodeRequest)(nil), // 8: inventory.v1.GetNodeRequest - (*GetNodeResponse)(nil), // 9: inventory.v1.GetNodeResponse - (*AddNodeRequest)(nil), // 10: inventory.v1.AddNodeRequest - (*AddNodeResponse)(nil), // 11: inventory.v1.AddNodeResponse - (*AddGenericNodeParams)(nil), // 12: inventory.v1.AddGenericNodeParams - (*AddContainerNodeParams)(nil), // 13: inventory.v1.AddContainerNodeParams - (*AddRemoteNodeParams)(nil), // 14: inventory.v1.AddRemoteNodeParams - (*AddRemoteRDSNodeParams)(nil), // 15: inventory.v1.AddRemoteRDSNodeParams - (*AddRemoteAzureNodeParams)(nil), // 16: inventory.v1.AddRemoteAzureNodeParams - (*RemoveNodeRequest)(nil), // 17: inventory.v1.RemoveNodeRequest - (*RemoveNodeResponse)(nil), // 18: inventory.v1.RemoveNodeResponse - nil, // 19: inventory.v1.GenericNode.CustomLabelsEntry - nil, // 20: inventory.v1.ContainerNode.CustomLabelsEntry - nil, // 21: inventory.v1.RemoteNode.CustomLabelsEntry - nil, // 22: inventory.v1.RemoteRDSNode.CustomLabelsEntry - nil, // 23: inventory.v1.RemoteAzureDatabaseNode.CustomLabelsEntry - nil, // 24: inventory.v1.AddGenericNodeParams.CustomLabelsEntry - nil, // 25: inventory.v1.AddContainerNodeParams.CustomLabelsEntry - nil, // 26: inventory.v1.AddRemoteNodeParams.CustomLabelsEntry - nil, // 27: inventory.v1.AddRemoteRDSNodeParams.CustomLabelsEntry - nil, // 28: inventory.v1.AddRemoteAzureNodeParams.CustomLabelsEntry - } -) - +var file_inventory_v1_nodes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_nodes_proto_msgTypes = make([]protoimpl.MessageInfo, 28) +var file_inventory_v1_nodes_proto_goTypes = []any{ + (NodeType)(0), // 0: inventory.v1.NodeType + (*GenericNode)(nil), // 1: inventory.v1.GenericNode + (*ContainerNode)(nil), // 2: inventory.v1.ContainerNode + (*RemoteNode)(nil), // 3: inventory.v1.RemoteNode + (*RemoteRDSNode)(nil), // 4: inventory.v1.RemoteRDSNode + (*RemoteAzureDatabaseNode)(nil), // 5: inventory.v1.RemoteAzureDatabaseNode + (*ListNodesRequest)(nil), // 6: inventory.v1.ListNodesRequest + (*ListNodesResponse)(nil), // 7: inventory.v1.ListNodesResponse + (*GetNodeRequest)(nil), // 8: inventory.v1.GetNodeRequest + (*GetNodeResponse)(nil), // 9: inventory.v1.GetNodeResponse + (*AddNodeRequest)(nil), // 10: inventory.v1.AddNodeRequest + (*AddNodeResponse)(nil), // 11: inventory.v1.AddNodeResponse + (*AddGenericNodeParams)(nil), // 12: inventory.v1.AddGenericNodeParams + (*AddContainerNodeParams)(nil), // 13: inventory.v1.AddContainerNodeParams + (*AddRemoteNodeParams)(nil), // 14: inventory.v1.AddRemoteNodeParams + (*AddRemoteRDSNodeParams)(nil), // 15: inventory.v1.AddRemoteRDSNodeParams + (*AddRemoteAzureNodeParams)(nil), // 16: inventory.v1.AddRemoteAzureNodeParams + (*RemoveNodeRequest)(nil), // 17: inventory.v1.RemoveNodeRequest + (*RemoveNodeResponse)(nil), // 18: inventory.v1.RemoveNodeResponse + nil, // 19: inventory.v1.GenericNode.CustomLabelsEntry + nil, // 20: inventory.v1.ContainerNode.CustomLabelsEntry + nil, // 21: inventory.v1.RemoteNode.CustomLabelsEntry + nil, // 22: inventory.v1.RemoteRDSNode.CustomLabelsEntry + nil, // 23: inventory.v1.RemoteAzureDatabaseNode.CustomLabelsEntry + nil, // 24: inventory.v1.AddGenericNodeParams.CustomLabelsEntry + nil, // 25: inventory.v1.AddContainerNodeParams.CustomLabelsEntry + nil, // 26: inventory.v1.AddRemoteNodeParams.CustomLabelsEntry + nil, // 27: inventory.v1.AddRemoteRDSNodeParams.CustomLabelsEntry + nil, // 28: inventory.v1.AddRemoteAzureNodeParams.CustomLabelsEntry +} var file_inventory_v1_nodes_proto_depIdxs = []int32{ 19, // 0: inventory.v1.GenericNode.custom_labels:type_name -> inventory.v1.GenericNode.CustomLabelsEntry 20, // 1: inventory.v1.ContainerNode.custom_labels:type_name -> inventory.v1.ContainerNode.CustomLabelsEntry diff --git a/api/inventory/v1/nodes.swagger.json b/api/inventory/v1/nodes.swagger.json new file mode 100644 index 00000000000..32958ba155f --- /dev/null +++ b/api/inventory/v1/nodes.swagger.json @@ -0,0 +1,708 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventory/v1/nodes.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "NodesService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/inventory/nodes": { + "get": { + "summary": "List Nodes", + "description": "Returns a list of all Nodes.", + "operationId": "ListNodes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListNodesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "node_type", + "description": "Return only Nodes with matching Node type.", + "in": "query", + "required": false, + "type": "string", + "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" + ], + "default": "NODE_TYPE_UNSPECIFIED" + } + ], + "tags": [ + "NodesService" + ] + }, + "post": { + "summary": "Add a Node", + "description": "Adds a Node.", + "operationId": "AddNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddNodeRequest" + } + } + ], + "tags": [ + "NodesService" + ] + } + }, + "/v1/inventory/nodes/{node_id}": { + "get": { + "summary": "Get a Node", + "description": "Returns a single Node by ID.", + "operationId": "GetNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "node_id", + "description": "Unique randomly generated instance identifier.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "NodesService" + ] + }, + "delete": { + "summary": "Remove a Node", + "description": "Removes a Node.", + "operationId": "RemoveNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "node_id", + "description": "Unique randomly generated instance identifier.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "force", + "description": "Remove node with all dependencies.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "NodesService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1AddContainerNodeParams": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id of the Generic Node where this Container Node runs." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1AddGenericNodeParams": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1AddNodeRequest": { + "type": "object", + "properties": { + "generic": { + "$ref": "#/definitions/v1AddGenericNodeParams" + }, + "container": { + "$ref": "#/definitions/v1AddContainerNodeParams" + }, + "remote": { + "$ref": "#/definitions/v1AddRemoteNodeParams" + }, + "remote_rds": { + "$ref": "#/definitions/v1AddRemoteRDSNodeParams" + }, + "remote_azure": { + "$ref": "#/definitions/v1AddRemoteAzureNodeParams" + } + } + }, + "v1AddNodeResponse": { + "type": "object", + "properties": { + "generic": { + "$ref": "#/definitions/v1GenericNode" + }, + "container": { + "$ref": "#/definitions/v1ContainerNode" + }, + "remote": { + "$ref": "#/definitions/v1RemoteNode" + }, + "remote_rds": { + "$ref": "#/definitions/v1RemoteRDSNode" + }, + "remote_azure_database": { + "$ref": "#/definitions/v1RemoteAzureDatabaseNode" + } + } + }, + "v1AddRemoteAzureNodeParams": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1AddRemoteNodeParams": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1AddRemoteRDSNodeParams": { + "type": "object", + "properties": { + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1ContainerNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id of the Generic Node where this Container Node runs." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "is_pmm_server_node": { + "type": "boolean", + "description": "True if this node is a PMM Server node (HA mode)." + } + }, + "description": "ContainerNode represents a Docker container." + }, + "v1GenericNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "is_pmm_server_node": { + "type": "boolean", + "description": "True if this node is a PMM Server node (HA mode)." + } + }, + "description": "GenericNode represents a bare metal server or virtual machine." + }, + "v1GetNodeResponse": { + "type": "object", + "properties": { + "generic": { + "$ref": "#/definitions/v1GenericNode" + }, + "container": { + "$ref": "#/definitions/v1ContainerNode" + }, + "remote": { + "$ref": "#/definitions/v1RemoteNode" + }, + "remote_rds": { + "$ref": "#/definitions/v1RemoteRDSNode" + }, + "remote_azure_database": { + "$ref": "#/definitions/v1RemoteAzureDatabaseNode" + } + } + }, + "v1ListNodesResponse": { + "type": "object", + "properties": { + "generic": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1GenericNode" + } + }, + "container": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ContainerNode" + } + }, + "remote": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1RemoteNode" + } + }, + "remote_rds": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1RemoteRDSNode" + } + }, + "remote_azure_database": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1RemoteAzureDatabaseNode" + } + } + } + }, + "v1NodeType": { + "type": "string", + "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" + ], + "default": "NODE_TYPE_UNSPECIFIED", + "description": "NodeType describes supported Node types." + }, + "v1RemoteAzureDatabaseNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "RemoteAzureDatabaseNode represents remote AzureDatabase Node. Agents can't run on Remote AzureDatabase Nodes." + }, + "v1RemoteNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "RemoteNode represents generic remote Node. It's a node where we don't run pmm-agents. Only external exporters can run on Remote Nodes." + }, + "v1RemoteRDSNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "instance_id": { + "type": "string", + "description": "AWS instance ID." + } + }, + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes." + }, + "v1RemoveNodeResponse": { + "type": "object" + } + } +} diff --git a/api/inventory/v1/nodes_grpc.pb.go b/api/inventory/v1/nodes_grpc.pb.go index 7142c1b4a15..14c8f370438 100644 --- a/api/inventory/v1/nodes_grpc.pb.go +++ b/api/inventory/v1/nodes_grpc.pb.go @@ -8,7 +8,6 @@ package inventoryv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -117,15 +116,12 @@ type UnimplementedNodesServiceServer struct{} func (UnimplementedNodesServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListNodes not implemented") } - func (UnimplementedNodesServiceServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetNode not implemented") } - func (UnimplementedNodesServiceServer) AddNode(context.Context, *AddNodeRequest) (*AddNodeResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddNode not implemented") } - func (UnimplementedNodesServiceServer) RemoveNode(context.Context, *RemoveNodeRequest) (*RemoveNodeResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveNode not implemented") } diff --git a/api/inventory/v1/services.pb.go b/api/inventory/v1/services.pb.go index 0ca7d8acb26..d1a54903862 100644 --- a/api/inventory/v1/services.pb.go +++ b/api/inventory/v1/services.pb.go @@ -7,17 +7,15 @@ package inventoryv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - common "github.com/percona/pmm/api/common" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -3284,57 +3282,54 @@ func file_inventory_v1_services_proto_rawDescGZIP() []byte { return file_inventory_v1_services_proto_rawDescData } -var ( - file_inventory_v1_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_inventory_v1_services_proto_msgTypes = make([]protoimpl.MessageInfo, 42) - file_inventory_v1_services_proto_goTypes = []any{ - (ServiceType)(0), // 0: inventory.v1.ServiceType - (*MySQLService)(nil), // 1: inventory.v1.MySQLService - (*MongoDBService)(nil), // 2: inventory.v1.MongoDBService - (*PostgreSQLService)(nil), // 3: inventory.v1.PostgreSQLService - (*ValkeyService)(nil), // 4: inventory.v1.ValkeyService - (*ProxySQLService)(nil), // 5: inventory.v1.ProxySQLService - (*HAProxyService)(nil), // 6: inventory.v1.HAProxyService - (*ExternalService)(nil), // 7: inventory.v1.ExternalService - (*ListServicesRequest)(nil), // 8: inventory.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 9: inventory.v1.ListServicesResponse - (*ListActiveServiceTypesRequest)(nil), // 10: inventory.v1.ListActiveServiceTypesRequest - (*ListActiveServiceTypesResponse)(nil), // 11: inventory.v1.ListActiveServiceTypesResponse - (*GetServiceRequest)(nil), // 12: inventory.v1.GetServiceRequest - (*GetServiceResponse)(nil), // 13: inventory.v1.GetServiceResponse - (*AddServiceRequest)(nil), // 14: inventory.v1.AddServiceRequest - (*AddServiceResponse)(nil), // 15: inventory.v1.AddServiceResponse - (*AddMySQLServiceParams)(nil), // 16: inventory.v1.AddMySQLServiceParams - (*AddMongoDBServiceParams)(nil), // 17: inventory.v1.AddMongoDBServiceParams - (*AddPostgreSQLServiceParams)(nil), // 18: inventory.v1.AddPostgreSQLServiceParams - (*AddValkeyServiceParams)(nil), // 19: inventory.v1.AddValkeyServiceParams - (*AddProxySQLServiceParams)(nil), // 20: inventory.v1.AddProxySQLServiceParams - (*AddHAProxyServiceParams)(nil), // 21: inventory.v1.AddHAProxyServiceParams - (*AddExternalServiceParams)(nil), // 22: inventory.v1.AddExternalServiceParams - (*RemoveServiceRequest)(nil), // 23: inventory.v1.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 24: inventory.v1.RemoveServiceResponse - (*ChangeServiceRequest)(nil), // 25: inventory.v1.ChangeServiceRequest - (*ChangeServiceResponse)(nil), // 26: inventory.v1.ChangeServiceResponse - nil, // 27: inventory.v1.MySQLService.CustomLabelsEntry - nil, // 28: inventory.v1.MySQLService.ExtraDsnParamsEntry - nil, // 29: inventory.v1.MongoDBService.CustomLabelsEntry - nil, // 30: inventory.v1.PostgreSQLService.CustomLabelsEntry - nil, // 31: inventory.v1.ValkeyService.CustomLabelsEntry - nil, // 32: inventory.v1.ProxySQLService.CustomLabelsEntry - nil, // 33: inventory.v1.HAProxyService.CustomLabelsEntry - nil, // 34: inventory.v1.ExternalService.CustomLabelsEntry - nil, // 35: inventory.v1.AddMySQLServiceParams.CustomLabelsEntry - nil, // 36: inventory.v1.AddMySQLServiceParams.ExtraDsnParamsEntry - nil, // 37: inventory.v1.AddMongoDBServiceParams.CustomLabelsEntry - nil, // 38: inventory.v1.AddPostgreSQLServiceParams.CustomLabelsEntry - nil, // 39: inventory.v1.AddValkeyServiceParams.CustomLabelsEntry - nil, // 40: inventory.v1.AddProxySQLServiceParams.CustomLabelsEntry - nil, // 41: inventory.v1.AddHAProxyServiceParams.CustomLabelsEntry - nil, // 42: inventory.v1.AddExternalServiceParams.CustomLabelsEntry - (*common.StringMap)(nil), // 43: common.StringMap - } -) - +var file_inventory_v1_services_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_inventory_v1_services_proto_msgTypes = make([]protoimpl.MessageInfo, 42) +var file_inventory_v1_services_proto_goTypes = []any{ + (ServiceType)(0), // 0: inventory.v1.ServiceType + (*MySQLService)(nil), // 1: inventory.v1.MySQLService + (*MongoDBService)(nil), // 2: inventory.v1.MongoDBService + (*PostgreSQLService)(nil), // 3: inventory.v1.PostgreSQLService + (*ValkeyService)(nil), // 4: inventory.v1.ValkeyService + (*ProxySQLService)(nil), // 5: inventory.v1.ProxySQLService + (*HAProxyService)(nil), // 6: inventory.v1.HAProxyService + (*ExternalService)(nil), // 7: inventory.v1.ExternalService + (*ListServicesRequest)(nil), // 8: inventory.v1.ListServicesRequest + (*ListServicesResponse)(nil), // 9: inventory.v1.ListServicesResponse + (*ListActiveServiceTypesRequest)(nil), // 10: inventory.v1.ListActiveServiceTypesRequest + (*ListActiveServiceTypesResponse)(nil), // 11: inventory.v1.ListActiveServiceTypesResponse + (*GetServiceRequest)(nil), // 12: inventory.v1.GetServiceRequest + (*GetServiceResponse)(nil), // 13: inventory.v1.GetServiceResponse + (*AddServiceRequest)(nil), // 14: inventory.v1.AddServiceRequest + (*AddServiceResponse)(nil), // 15: inventory.v1.AddServiceResponse + (*AddMySQLServiceParams)(nil), // 16: inventory.v1.AddMySQLServiceParams + (*AddMongoDBServiceParams)(nil), // 17: inventory.v1.AddMongoDBServiceParams + (*AddPostgreSQLServiceParams)(nil), // 18: inventory.v1.AddPostgreSQLServiceParams + (*AddValkeyServiceParams)(nil), // 19: inventory.v1.AddValkeyServiceParams + (*AddProxySQLServiceParams)(nil), // 20: inventory.v1.AddProxySQLServiceParams + (*AddHAProxyServiceParams)(nil), // 21: inventory.v1.AddHAProxyServiceParams + (*AddExternalServiceParams)(nil), // 22: inventory.v1.AddExternalServiceParams + (*RemoveServiceRequest)(nil), // 23: inventory.v1.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 24: inventory.v1.RemoveServiceResponse + (*ChangeServiceRequest)(nil), // 25: inventory.v1.ChangeServiceRequest + (*ChangeServiceResponse)(nil), // 26: inventory.v1.ChangeServiceResponse + nil, // 27: inventory.v1.MySQLService.CustomLabelsEntry + nil, // 28: inventory.v1.MySQLService.ExtraDsnParamsEntry + nil, // 29: inventory.v1.MongoDBService.CustomLabelsEntry + nil, // 30: inventory.v1.PostgreSQLService.CustomLabelsEntry + nil, // 31: inventory.v1.ValkeyService.CustomLabelsEntry + nil, // 32: inventory.v1.ProxySQLService.CustomLabelsEntry + nil, // 33: inventory.v1.HAProxyService.CustomLabelsEntry + nil, // 34: inventory.v1.ExternalService.CustomLabelsEntry + nil, // 35: inventory.v1.AddMySQLServiceParams.CustomLabelsEntry + nil, // 36: inventory.v1.AddMySQLServiceParams.ExtraDsnParamsEntry + nil, // 37: inventory.v1.AddMongoDBServiceParams.CustomLabelsEntry + nil, // 38: inventory.v1.AddPostgreSQLServiceParams.CustomLabelsEntry + nil, // 39: inventory.v1.AddValkeyServiceParams.CustomLabelsEntry + nil, // 40: inventory.v1.AddProxySQLServiceParams.CustomLabelsEntry + nil, // 41: inventory.v1.AddHAProxyServiceParams.CustomLabelsEntry + nil, // 42: inventory.v1.AddExternalServiceParams.CustomLabelsEntry + (*common.StringMap)(nil), // 43: common.StringMap +} var file_inventory_v1_services_proto_depIdxs = []int32{ 27, // 0: inventory.v1.MySQLService.custom_labels:type_name -> inventory.v1.MySQLService.CustomLabelsEntry 28, // 1: inventory.v1.MySQLService.extra_dsn_params:type_name -> inventory.v1.MySQLService.ExtraDsnParamsEntry diff --git a/api/inventory/v1/services.pb.validate.go b/api/inventory/v1/services.pb.validate.go index 79783d70e5d..6f939fb5f8f 100644 --- a/api/inventory/v1/services.pb.validate.go +++ b/api/inventory/v1/services.pb.validate.go @@ -4062,6 +4062,7 @@ func (m *ChangeServiceRequest) validate(all bool) error { } if m.CustomLabels != nil { + if all { switch v := interface{}(m.GetCustomLabels()).(type) { case interface{ ValidateAll() error }: @@ -4090,6 +4091,7 @@ func (m *ChangeServiceRequest) validate(all bool) error { } } } + } if len(errors) > 0 { diff --git a/api/inventory/v1/services.swagger.json b/api/inventory/v1/services.swagger.json new file mode 100644 index 00000000000..ab118f837ff --- /dev/null +++ b/api/inventory/v1/services.swagger.json @@ -0,0 +1,1189 @@ +{ + "swagger": "2.0", + "info": { + "title": "inventory/v1/services.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ServicesService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/inventory/services": { + "get": { + "summary": "List Services", + "description": "Returns a list of Services filtered by type.", + "operationId": "ListServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "node_id", + "description": "Return only Services running on that Node.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "service_type", + "description": "Return only services filtered by service type.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_VALKEY_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_UNSPECIFIED" + }, + { + "name": "external_group", + "description": "Return only services in this external group.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ServicesService" + ] + }, + "post": { + "summary": "Add a Service", + "description": "Adds a Service.", + "operationId": "AddService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddServiceRequest" + } + } + ], + "tags": [ + "ServicesService" + ] + } + }, + "/v1/inventory/services/{service_id}": { + "get": { + "summary": "Get a Service", + "description": "Returns a single Service by ID.", + "operationId": "GetService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "service_id", + "description": "Unique randomly generated instance identifier.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "ServicesService" + ] + }, + "delete": { + "summary": "Remove Service", + "description": "Removes Service.", + "operationId": "RemoveService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "service_id", + "description": "Unique randomly generated instance identifier. Required.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "force", + "description": "Remove service with all dependencies.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "ServicesService" + ] + }, + "put": { + "summary": "Change service", + "description": "Changes service configuration. If a new cluster label is specified, it removes all backup/restore tasks scheduled for the related services. Fails if there are running backup/restore tasks.", + "operationId": "ChangeService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "service_id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServicesServiceChangeServiceBody" + } + } + ], + "tags": [ + "ServicesService" + ] + } + }, + "/v1/inventory/services:getTypes": { + "post": { + "summary": "List Active Service Types", + "description": "Returns a list of active Service types.", + "operationId": "ListActiveServiceTypes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListActiveServiceTypesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ListActiveServiceTypesRequest" + } + } + ], + "tags": [ + "ServicesService" + ] + } + } + }, + "definitions": { + "ServicesServiceChangeServiceBody": { + "type": "object", + "properties": { + "environment": { + "type": "string", + "x-nullable": true + }, + "cluster": { + "type": "string", + "x-nullable": true + }, + "replication_set": { + "type": "string", + "x-nullable": true + }, + "external_group": { + "type": "string", + "x-nullable": true + }, + "custom_labels": { + "$ref": "#/definitions/commonStringMap", + "x-nullable": true, + "description": "Replace all custom user-assigned labels." + } + } + }, + "commonStringMap": { + "type": "object", + "properties": { + "values": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "description": "A wrapper for map[string]string. This type allows to distinguish between an empty map and a null value." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1AddExternalServiceParams": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "group": { + "type": "string", + "description": "Group name of external service." + } + } + }, + "v1AddHAProxyServiceParams": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1AddMongoDBServiceParams": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1AddMySQLServiceParams": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra parameters to be added to the DSN." + } + } + }, + "v1AddPostgreSQLServiceParams": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + } + } + }, + "v1AddProxySQLServiceParams": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1AddServiceRequest": { + "type": "object", + "properties": { + "mysql": { + "$ref": "#/definitions/v1AddMySQLServiceParams" + }, + "mongodb": { + "$ref": "#/definitions/v1AddMongoDBServiceParams" + }, + "postgresql": { + "$ref": "#/definitions/v1AddPostgreSQLServiceParams" + }, + "proxysql": { + "$ref": "#/definitions/v1AddProxySQLServiceParams" + }, + "haproxy": { + "$ref": "#/definitions/v1AddHAProxyServiceParams" + }, + "external": { + "$ref": "#/definitions/v1AddExternalServiceParams" + }, + "valkey": { + "$ref": "#/definitions/v1AddValkeyServiceParams" + } + } + }, + "v1AddServiceResponse": { + "type": "object", + "properties": { + "mysql": { + "$ref": "#/definitions/v1MySQLService" + }, + "mongodb": { + "$ref": "#/definitions/v1MongoDBService" + }, + "postgresql": { + "$ref": "#/definitions/v1PostgreSQLService" + }, + "proxysql": { + "$ref": "#/definitions/v1ProxySQLService" + }, + "haproxy": { + "$ref": "#/definitions/v1HAProxyService" + }, + "external": { + "$ref": "#/definitions/v1ExternalService" + }, + "valkey": { + "$ref": "#/definitions/v1ValkeyService" + } + } + }, + "v1AddValkeyServiceParams": { + "type": "object", + "properties": { + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs. Required." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + } + }, + "v1ChangeServiceResponse": { + "type": "object", + "properties": { + "mysql": { + "$ref": "#/definitions/v1MySQLService" + }, + "mongodb": { + "$ref": "#/definitions/v1MongoDBService" + }, + "postgresql": { + "$ref": "#/definitions/v1PostgreSQLService" + }, + "proxysql": { + "$ref": "#/definitions/v1ProxySQLService" + }, + "haproxy": { + "$ref": "#/definitions/v1HAProxyService" + }, + "external": { + "$ref": "#/definitions/v1ExternalService" + }, + "valkey": { + "$ref": "#/definitions/v1ValkeyService" + } + } + }, + "v1ExternalService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this service instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "group": { + "type": "string", + "description": "Group name of external service." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP)." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port." + } + }, + "description": "ExternalService represents a generic External service instance." + }, + "v1GetServiceResponse": { + "type": "object", + "properties": { + "mysql": { + "$ref": "#/definitions/v1MySQLService" + }, + "mongodb": { + "$ref": "#/definitions/v1MongoDBService" + }, + "postgresql": { + "$ref": "#/definitions/v1PostgreSQLService" + }, + "proxysql": { + "$ref": "#/definitions/v1ProxySQLService" + }, + "haproxy": { + "$ref": "#/definitions/v1HAProxyService" + }, + "external": { + "$ref": "#/definitions/v1ExternalService" + }, + "valkey": { + "$ref": "#/definitions/v1ValkeyService" + } + } + }, + "v1HAProxyService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this service instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "HAProxyService represents a generic HAProxy service instance." + }, + "v1ListActiveServiceTypesRequest": { + "type": "object" + }, + "v1ListActiveServiceTypesResponse": { + "type": "object", + "properties": { + "service_types": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ServiceType" + } + } + } + }, + "v1ListServicesResponse": { + "type": "object", + "properties": { + "mysql": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MySQLService" + } + }, + "mongodb": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MongoDBService" + } + }, + "postgresql": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1PostgreSQLService" + } + }, + "proxysql": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ProxySQLService" + } + }, + "haproxy": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1HAProxyService" + } + }, + "external": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ExternalService" + } + }, + "valkey": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ValkeyService" + } + } + } + }, + "v1MongoDBService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "MongoDB version." + } + }, + "description": "MongoDBService represents a generic MongoDB instance." + }, + "v1MySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "MySQL version." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra parameters to be added to the DSN." + } + }, + "description": "MySQLService represents a generic MySQL instance." + }, + "v1PostgreSQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "database_name": { + "type": "string", + "description": "Database name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "PostgreSQL version." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + } + }, + "description": "PostgreSQLService represents a generic PostgreSQL instance." + }, + "v1ProxySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "ProxySQL version." + } + }, + "description": "ProxySQLService represents a generic ProxySQL instance." + }, + "v1RemoveServiceResponse": { + "type": "object" + }, + "v1ServiceType": { + "type": "string", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_VALKEY_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "ServiceType describes supported Service types." + }, + "v1ValkeyService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "Valkey version." + } + }, + "description": "ValkeyService represents a generic Valkey instance." + } + } +} diff --git a/api/inventory/v1/services_grpc.pb.go b/api/inventory/v1/services_grpc.pb.go index 1de232e4cc5..27f42369172 100644 --- a/api/inventory/v1/services_grpc.pb.go +++ b/api/inventory/v1/services_grpc.pb.go @@ -8,7 +8,6 @@ package inventoryv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -147,23 +146,18 @@ type UnimplementedServicesServiceServer struct{} func (UnimplementedServicesServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListServices not implemented") } - func (UnimplementedServicesServiceServer) ListActiveServiceTypes(context.Context, *ListActiveServiceTypesRequest) (*ListActiveServiceTypesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListActiveServiceTypes not implemented") } - func (UnimplementedServicesServiceServer) GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetService not implemented") } - func (UnimplementedServicesServiceServer) AddService(context.Context, *AddServiceRequest) (*AddServiceResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddService not implemented") } - func (UnimplementedServicesServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveService not implemented") } - func (UnimplementedServicesServiceServer) ChangeService(context.Context, *ChangeServiceRequest) (*ChangeServiceResponse, error) { return nil, status.Error(codes.Unimplemented, "method ChangeService not implemented") } diff --git a/api/inventory/v1/types/agent_types.go b/api/inventory/v1/types/agent_types.go index 7cffa997238..ba8e7f8f978 100644 --- a/api/inventory/v1/types/agent_types.go +++ b/api/inventory/v1/types/agent_types.go @@ -39,6 +39,7 @@ const ( AgentTypeExternalExporter = "AGENT_TYPE_EXTERNAL_EXPORTER" AgentTypeAzureDatabaseExporter = "AGENT_TYPE_AZURE_DATABASE_EXPORTER" AgentTypeRTAMongoDBAgent = "AGENT_TYPE_RTA_MONGODB_AGENT" + AgentTypeOtelCollector = "AGENT_TYPE_OTEL_COLLECTOR" ) var agentTypeNames = map[string]string{ @@ -62,6 +63,7 @@ var agentTypeNames = map[string]string{ AgentTypeExternalExporter: "external-exporter", AgentTypeAzureDatabaseExporter: "azure_database_exporter", AgentTypeRTAMongoDBAgent: "rta_mongodb_agent", + AgentTypeOtelCollector: "otel_collector", } // AgentTypeName returns human friendly agent type to be used in reports. diff --git a/api/management/v1/agent.pb.go b/api/management/v1/agent.pb.go index 8225cca8957..7661cbe75cc 100644 --- a/api/management/v1/agent.pb.go +++ b/api/management/v1/agent.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -1205,30 +1203,27 @@ func file_management_v1_agent_proto_rawDescGZIP() []byte { return file_management_v1_agent_proto_rawDescData } -var ( - file_management_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 13) - file_management_v1_agent_proto_goTypes = []any{ - (UpdateSeverity)(0), // 0: management.v1.UpdateSeverity - (*UniversalAgent)(nil), // 1: management.v1.UniversalAgent - (*ListAgentsRequest)(nil), // 2: management.v1.ListAgentsRequest - (*ListAgentsResponse)(nil), // 3: management.v1.ListAgentsResponse - (*AgentVersions)(nil), // 4: management.v1.AgentVersions - (*ListAgentVersionsRequest)(nil), // 5: management.v1.ListAgentVersionsRequest - (*ListAgentVersionsResponse)(nil), // 6: management.v1.ListAgentVersionsResponse - (*UniversalAgent_MySQLOptions)(nil), // 7: management.v1.UniversalAgent.MySQLOptions - (*UniversalAgent_AzureOptions)(nil), // 8: management.v1.UniversalAgent.AzureOptions - (*UniversalAgent_MongoDBOptions)(nil), // 9: management.v1.UniversalAgent.MongoDBOptions - (*UniversalAgent_PostgreSQLOptions)(nil), // 10: management.v1.UniversalAgent.PostgreSQLOptions - (*UniversalAgent_ValkeyOptions)(nil), // 11: management.v1.UniversalAgent.ValkeyOptions - nil, // 12: management.v1.UniversalAgent.CustomLabelsEntry - nil, // 13: management.v1.UniversalAgent.MySQLOptions.ExtraDsnParamsEntry - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp - (v1.LogLevel)(0), // 15: inventory.v1.LogLevel - (*v1.RTAOptions)(nil), // 16: inventory.v1.RTAOptions - } -) - +var file_management_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_management_v1_agent_proto_goTypes = []any{ + (UpdateSeverity)(0), // 0: management.v1.UpdateSeverity + (*UniversalAgent)(nil), // 1: management.v1.UniversalAgent + (*ListAgentsRequest)(nil), // 2: management.v1.ListAgentsRequest + (*ListAgentsResponse)(nil), // 3: management.v1.ListAgentsResponse + (*AgentVersions)(nil), // 4: management.v1.AgentVersions + (*ListAgentVersionsRequest)(nil), // 5: management.v1.ListAgentVersionsRequest + (*ListAgentVersionsResponse)(nil), // 6: management.v1.ListAgentVersionsResponse + (*UniversalAgent_MySQLOptions)(nil), // 7: management.v1.UniversalAgent.MySQLOptions + (*UniversalAgent_AzureOptions)(nil), // 8: management.v1.UniversalAgent.AzureOptions + (*UniversalAgent_MongoDBOptions)(nil), // 9: management.v1.UniversalAgent.MongoDBOptions + (*UniversalAgent_PostgreSQLOptions)(nil), // 10: management.v1.UniversalAgent.PostgreSQLOptions + (*UniversalAgent_ValkeyOptions)(nil), // 11: management.v1.UniversalAgent.ValkeyOptions + nil, // 12: management.v1.UniversalAgent.CustomLabelsEntry + nil, // 13: management.v1.UniversalAgent.MySQLOptions.ExtraDsnParamsEntry + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (v1.LogLevel)(0), // 15: inventory.v1.LogLevel + (*v1.RTAOptions)(nil), // 16: inventory.v1.RTAOptions +} var file_management_v1_agent_proto_depIdxs = []int32{ 8, // 0: management.v1.UniversalAgent.azure_options:type_name -> management.v1.UniversalAgent.AzureOptions 14, // 1: management.v1.UniversalAgent.created_at:type_name -> google.protobuf.Timestamp diff --git a/api/management/v1/agent.swagger.json b/api/management/v1/agent.swagger.json new file mode 100644 index 00000000000..66ea6d4a070 --- /dev/null +++ b/api/management/v1/agent.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/agent.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/annotation.pb.go b/api/management/v1/annotation.pb.go index ec781561e4c..d014773c308 100644 --- a/api/management/v1/annotation.pb.go +++ b/api/management/v1/annotation.pb.go @@ -7,13 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -157,14 +156,11 @@ func file_management_v1_annotation_proto_rawDescGZIP() []byte { return file_management_v1_annotation_proto_rawDescData } -var ( - file_management_v1_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_management_v1_annotation_proto_goTypes = []any{ - (*AddAnnotationRequest)(nil), // 0: management.v1.AddAnnotationRequest - (*AddAnnotationResponse)(nil), // 1: management.v1.AddAnnotationResponse - } -) - +var file_management_v1_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_management_v1_annotation_proto_goTypes = []any{ + (*AddAnnotationRequest)(nil), // 0: management.v1.AddAnnotationRequest + (*AddAnnotationResponse)(nil), // 1: management.v1.AddAnnotationResponse +} var file_management_v1_annotation_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/management/v1/annotation.swagger.json b/api/management/v1/annotation.swagger.json new file mode 100644 index 00000000000..3d5937159fb --- /dev/null +++ b/api/management/v1/annotation.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/annotation.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/azure.pb.go b/api/management/v1/azure.pb.go index fdd2f154751..c523ba94e70 100644 --- a/api/management/v1/azure.pb.go +++ b/api/management/v1/azure.pb.go @@ -7,13 +7,12 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -699,20 +698,17 @@ func file_management_v1_azure_proto_rawDescGZIP() []byte { return file_management_v1_azure_proto_rawDescData } -var ( - file_management_v1_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_management_v1_azure_proto_goTypes = []any{ - (DiscoverAzureDatabaseType)(0), // 0: management.v1.DiscoverAzureDatabaseType - (*DiscoverAzureDatabaseRequest)(nil), // 1: management.v1.DiscoverAzureDatabaseRequest - (*DiscoverAzureDatabaseInstance)(nil), // 2: management.v1.DiscoverAzureDatabaseInstance - (*DiscoverAzureDatabaseResponse)(nil), // 3: management.v1.DiscoverAzureDatabaseResponse - (*AddAzureDatabaseRequest)(nil), // 4: management.v1.AddAzureDatabaseRequest - (*AddAzureDatabaseResponse)(nil), // 5: management.v1.AddAzureDatabaseResponse - nil, // 6: management.v1.AddAzureDatabaseRequest.CustomLabelsEntry - } -) - +var file_management_v1_azure_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_azure_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_management_v1_azure_proto_goTypes = []any{ + (DiscoverAzureDatabaseType)(0), // 0: management.v1.DiscoverAzureDatabaseType + (*DiscoverAzureDatabaseRequest)(nil), // 1: management.v1.DiscoverAzureDatabaseRequest + (*DiscoverAzureDatabaseInstance)(nil), // 2: management.v1.DiscoverAzureDatabaseInstance + (*DiscoverAzureDatabaseResponse)(nil), // 3: management.v1.DiscoverAzureDatabaseResponse + (*AddAzureDatabaseRequest)(nil), // 4: management.v1.AddAzureDatabaseRequest + (*AddAzureDatabaseResponse)(nil), // 5: management.v1.AddAzureDatabaseResponse + nil, // 6: management.v1.AddAzureDatabaseRequest.CustomLabelsEntry +} var file_management_v1_azure_proto_depIdxs = []int32{ 0, // 0: management.v1.DiscoverAzureDatabaseInstance.type:type_name -> management.v1.DiscoverAzureDatabaseType 2, // 1: management.v1.DiscoverAzureDatabaseResponse.azure_database_instance:type_name -> management.v1.DiscoverAzureDatabaseInstance diff --git a/api/management/v1/azure.swagger.json b/api/management/v1/azure.swagger.json new file mode 100644 index 00000000000..83b5bc19d33 --- /dev/null +++ b/api/management/v1/azure.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/azure.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/external.pb.go b/api/management/v1/external.pb.go index 1f2612371ce..4585b95173f 100644 --- a/api/management/v1/external.pb.go +++ b/api/management/v1/external.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -342,19 +340,16 @@ func file_management_v1_external_proto_rawDescGZIP() []byte { return file_management_v1_external_proto_rawDescData } -var ( - file_management_v1_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_external_proto_goTypes = []any{ - (*AddExternalServiceParams)(nil), // 0: management.v1.AddExternalServiceParams - (*ExternalServiceResult)(nil), // 1: management.v1.ExternalServiceResult - nil, // 2: management.v1.AddExternalServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (*v1.ExternalService)(nil), // 5: inventory.v1.ExternalService - (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter - } -) - +var file_management_v1_external_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_external_proto_goTypes = []any{ + (*AddExternalServiceParams)(nil), // 0: management.v1.AddExternalServiceParams + (*ExternalServiceResult)(nil), // 1: management.v1.ExternalServiceResult + nil, // 2: management.v1.AddExternalServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (*v1.ExternalService)(nil), // 5: inventory.v1.ExternalService + (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter +} var file_management_v1_external_proto_depIdxs = []int32{ 3, // 0: management.v1.AddExternalServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddExternalServiceParams.custom_labels:type_name -> management.v1.AddExternalServiceParams.CustomLabelsEntry diff --git a/api/management/v1/external.swagger.json b/api/management/v1/external.swagger.json new file mode 100644 index 00000000000..ee98890ec3a --- /dev/null +++ b/api/management/v1/external.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/external.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/haproxy.pb.go b/api/management/v1/haproxy.pb.go index 06b4c664762..662b9422e42 100644 --- a/api/management/v1/haproxy.pb.go +++ b/api/management/v1/haproxy.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -320,19 +318,16 @@ func file_management_v1_haproxy_proto_rawDescGZIP() []byte { return file_management_v1_haproxy_proto_rawDescData } -var ( - file_management_v1_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_haproxy_proto_goTypes = []any{ - (*AddHAProxyServiceParams)(nil), // 0: management.v1.AddHAProxyServiceParams - (*HAProxyServiceResult)(nil), // 1: management.v1.HAProxyServiceResult - nil, // 2: management.v1.AddHAProxyServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (*v1.HAProxyService)(nil), // 5: inventory.v1.HAProxyService - (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter - } -) - +var file_management_v1_haproxy_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_haproxy_proto_goTypes = []any{ + (*AddHAProxyServiceParams)(nil), // 0: management.v1.AddHAProxyServiceParams + (*HAProxyServiceResult)(nil), // 1: management.v1.HAProxyServiceResult + nil, // 2: management.v1.AddHAProxyServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (*v1.HAProxyService)(nil), // 5: inventory.v1.HAProxyService + (*v1.ExternalExporter)(nil), // 6: inventory.v1.ExternalExporter +} var file_management_v1_haproxy_proto_depIdxs = []int32{ 3, // 0: management.v1.AddHAProxyServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddHAProxyServiceParams.custom_labels:type_name -> management.v1.AddHAProxyServiceParams.CustomLabelsEntry diff --git a/api/management/v1/haproxy.swagger.json b/api/management/v1/haproxy.swagger.json new file mode 100644 index 00000000000..456d36f1f16 --- /dev/null +++ b/api/management/v1/haproxy.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/haproxy.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/json/client/management_service/add_annotation_parameters.go b/api/management/v1/json/client/management_service/add_annotation_parameters.go index 0a6148e59af..68d4bd76539 100644 --- a/api/management/v1/json/client/management_service/add_annotation_parameters.go +++ b/api/management/v1/json/client/management_service/add_annotation_parameters.go @@ -60,6 +60,7 @@ AddAnnotationParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAnnotationParams struct { + /* Body. AddAnnotationRequest is a params to add new annotation. @@ -132,6 +133,7 @@ func (o *AddAnnotationParams) SetBody(body AddAnnotationBody) { // WriteToRequest writes these params to a swagger request func (o *AddAnnotationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_annotation_responses.go b/api/management/v1/json/client/management_service/add_annotation_responses.go index e0707e893c8..27296879191 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 @@ -104,6 +104,7 @@ func (o *AddAnnotationOK) GetPayload() any { } func (o *AddAnnotationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *AddAnnotationDefault) GetPayload() *AddAnnotationDefaultBody { } func (o *AddAnnotationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAnnotationDefaultBody) // response payload @@ -190,6 +192,7 @@ AddAnnotationBody AddAnnotationRequest is a params to add new annotation. swagger:model AddAnnotationBody */ type AddAnnotationBody struct { + // An annotation description. Required. Text string `json:"text,omitempty"` @@ -236,6 +239,7 @@ AddAnnotationDefaultBody add annotation default body swagger:model AddAnnotationDefaultBody */ type AddAnnotationDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -305,7 +309,9 @@ func (o *AddAnnotationDefaultBody) ContextValidate(ctx context.Context, formats } func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -325,6 +331,7 @@ func (o *AddAnnotationDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -353,6 +360,7 @@ AddAnnotationDefaultBodyDetailsItems0 add annotation default body details items0 swagger:model AddAnnotationDefaultBodyDetailsItems0 */ type AddAnnotationDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -364,6 +372,7 @@ type AddAnnotationDefaultBodyDetailsItems0 struct { func (o *AddAnnotationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -401,6 +410,7 @@ func (o *AddAnnotationDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAnnotationDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/add_azure_database_parameters.go b/api/management/v1/json/client/management_service/add_azure_database_parameters.go index b9e1d96ff02..1fd8c87b5db 100644 --- a/api/management/v1/json/client/management_service/add_azure_database_parameters.go +++ b/api/management/v1/json/client/management_service/add_azure_database_parameters.go @@ -60,6 +60,7 @@ AddAzureDatabaseParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddAzureDatabaseParams struct { + // Body. Body AddAzureDatabaseBody @@ -129,6 +130,7 @@ func (o *AddAzureDatabaseParams) SetBody(body AddAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *AddAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_azure_database_responses.go b/api/management/v1/json/client/management_service/add_azure_database_responses.go index 947f66d7e84..5d5bd67446a 100644 --- a/api/management/v1/json/client/management_service/add_azure_database_responses.go +++ b/api/management/v1/json/client/management_service/add_azure_database_responses.go @@ -105,6 +105,7 @@ func (o *AddAzureDatabaseOK) GetPayload() any { } func (o *AddAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -176,6 +177,7 @@ func (o *AddAzureDatabaseDefault) GetPayload() *AddAzureDatabaseDefaultBody { } func (o *AddAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddAzureDatabaseDefaultBody) // response payload @@ -191,6 +193,7 @@ AddAzureDatabaseBody add azure database body swagger:model AddAzureDatabaseBody */ type AddAzureDatabaseBody struct { + // Azure database location. Region string `json:"region,omitempty"` @@ -361,6 +364,7 @@ AddAzureDatabaseDefaultBody add azure database default body swagger:model AddAzureDatabaseDefaultBody */ type AddAzureDatabaseDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -430,7 +434,9 @@ func (o *AddAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, forma } func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -450,6 +456,7 @@ func (o *AddAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context return err } } + } return nil @@ -478,6 +485,7 @@ AddAzureDatabaseDefaultBodyDetailsItems0 add azure database default body details swagger:model AddAzureDatabaseDefaultBodyDetailsItems0 */ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -489,6 +497,7 @@ type AddAzureDatabaseDefaultBodyDetailsItems0 struct { func (o *AddAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -526,6 +535,7 @@ func (o *AddAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) er // MarshalJSON marshals this object with additional properties into a JSON object func (o AddAzureDatabaseDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/add_service_parameters.go b/api/management/v1/json/client/management_service/add_service_parameters.go index 64e2dd78b6b..8e80c2a6085 100644 --- a/api/management/v1/json/client/management_service/add_service_parameters.go +++ b/api/management/v1/json/client/management_service/add_service_parameters.go @@ -60,6 +60,7 @@ AddServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type AddServiceParams struct { + // Body. Body AddServiceBody @@ -129,6 +130,7 @@ func (o *AddServiceParams) SetBody(body AddServiceBody) { // WriteToRequest writes these params to a swagger request func (o *AddServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/add_service_responses.go b/api/management/v1/json/client/management_service/add_service_responses.go index 40d004ff770..75a572018c5 100644 --- a/api/management/v1/json/client/management_service/add_service_responses.go +++ b/api/management/v1/json/client/management_service/add_service_responses.go @@ -105,6 +105,7 @@ func (o *AddServiceOK) GetPayload() *AddServiceOKBody { } func (o *AddServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceOKBody) // response payload @@ -178,6 +179,7 @@ func (o *AddServiceDefault) GetPayload() *AddServiceDefaultBody { } func (o *AddServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(AddServiceDefaultBody) // response payload @@ -193,6 +195,7 @@ AddServiceBody add service body swagger:model AddServiceBody */ type AddServiceBody struct { + // external External *AddServiceParamsBodyExternal `json:"external,omitempty"` @@ -487,6 +490,7 @@ func (o *AddServiceBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -511,6 +515,7 @@ func (o *AddServiceBody) contextValidateExternal(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -535,6 +540,7 @@ func (o *AddServiceBody) contextValidateHaproxy(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -559,6 +565,7 @@ func (o *AddServiceBody) contextValidateMongodb(ctx context.Context, formats str } func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -583,6 +590,7 @@ func (o *AddServiceBody) contextValidateMysql(ctx context.Context, formats strfm } func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -607,6 +615,7 @@ func (o *AddServiceBody) contextValidatePostgresql(ctx context.Context, formats } func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -631,6 +640,7 @@ func (o *AddServiceBody) contextValidateProxysql(ctx context.Context, formats st } func (o *AddServiceBody) contextValidateRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RDS != nil { if swag.IsZero(o.RDS) { // not required @@ -655,6 +665,7 @@ func (o *AddServiceBody) contextValidateRDS(ctx context.Context, formats strfmt. } func (o *AddServiceBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -701,6 +712,7 @@ AddServiceDefaultBody add service default body swagger:model AddServiceDefaultBody */ type AddServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -770,7 +782,9 @@ func (o *AddServiceDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -790,6 +804,7 @@ func (o *AddServiceDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -818,6 +833,7 @@ AddServiceDefaultBodyDetailsItems0 add service default body details items0 swagger:model AddServiceDefaultBodyDetailsItems0 */ type AddServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -829,6 +845,7 @@ type AddServiceDefaultBodyDetailsItems0 struct { func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -866,6 +883,7 @@ func (o *AddServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o AddServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -929,6 +947,7 @@ AddServiceOKBody add service OK body swagger:model AddServiceOKBody */ type AddServiceOKBody struct { + // external External *AddServiceOKBodyExternal `json:"external,omitempty"` @@ -1223,6 +1242,7 @@ func (o *AddServiceOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats strfmt.Registry) error { + if o.External != nil { if swag.IsZero(o.External) { // not required @@ -1247,6 +1267,7 @@ func (o *AddServiceOKBody) contextValidateExternal(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats strfmt.Registry) error { + if o.Haproxy != nil { if swag.IsZero(o.Haproxy) { // not required @@ -1271,6 +1292,7 @@ func (o *AddServiceOKBody) contextValidateHaproxy(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + if o.Mongodb != nil { if swag.IsZero(o.Mongodb) { // not required @@ -1295,6 +1317,7 @@ func (o *AddServiceOKBody) contextValidateMongodb(ctx context.Context, formats s } func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -1319,6 +1342,7 @@ func (o *AddServiceOKBody) contextValidateMysql(ctx context.Context, formats str } func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -1343,6 +1367,7 @@ func (o *AddServiceOKBody) contextValidatePostgresql(ctx context.Context, format } func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats strfmt.Registry) error { + if o.Proxysql != nil { if swag.IsZero(o.Proxysql) { // not required @@ -1367,6 +1392,7 @@ func (o *AddServiceOKBody) contextValidateProxysql(ctx context.Context, formats } func (o *AddServiceOKBody) contextValidateRDS(ctx context.Context, formats strfmt.Registry) error { + if o.RDS != nil { if swag.IsZero(o.RDS) { // not required @@ -1391,6 +1417,7 @@ func (o *AddServiceOKBody) contextValidateRDS(ctx context.Context, formats strfm } func (o *AddServiceOKBody) contextValidateValkey(ctx context.Context, formats strfmt.Registry) error { + if o.Valkey != nil { if swag.IsZero(o.Valkey) { // not required @@ -1437,6 +1464,7 @@ AddServiceOKBodyExternal add service OK body external swagger:model AddServiceOKBodyExternal */ type AddServiceOKBodyExternal struct { + // external exporter ExternalExporter *AddServiceOKBodyExternalExternalExporter `json:"external_exporter,omitempty"` @@ -1527,6 +1555,7 @@ func (o *AddServiceOKBodyExternal) ContextValidate(ctx context.Context, formats } func (o *AddServiceOKBodyExternal) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -1551,6 +1580,7 @@ func (o *AddServiceOKBodyExternal) contextValidateExternalExporter(ctx context.C } func (o *AddServiceOKBodyExternal) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -1597,6 +1627,7 @@ AddServiceOKBodyExternalExternalExporter ExternalExporter runs on any Node type, swagger:model AddServiceOKBodyExternalExternalExporter */ type AddServiceOKBodyExternalExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -1765,6 +1796,7 @@ func (o *AddServiceOKBodyExternalExternalExporter) ContextValidate(ctx context.C } func (o *AddServiceOKBodyExternalExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1811,6 +1843,7 @@ AddServiceOKBodyExternalExternalExporterMetricsResolutions MetricsResolutions re swagger:model AddServiceOKBodyExternalExternalExporterMetricsResolutions */ type AddServiceOKBodyExternalExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -1854,6 +1887,7 @@ AddServiceOKBodyExternalService ExternalService represents a generic External se swagger:model AddServiceOKBodyExternalService */ type AddServiceOKBodyExternalService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -1918,6 +1952,7 @@ AddServiceOKBodyHaproxy add service OK body haproxy swagger:model AddServiceOKBodyHaproxy */ type AddServiceOKBodyHaproxy struct { + // external exporter ExternalExporter *AddServiceOKBodyHaproxyExternalExporter `json:"external_exporter,omitempty"` @@ -2008,6 +2043,7 @@ func (o *AddServiceOKBodyHaproxy) ContextValidate(ctx context.Context, formats s } func (o *AddServiceOKBodyHaproxy) contextValidateExternalExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ExternalExporter != nil { if swag.IsZero(o.ExternalExporter) { // not required @@ -2032,6 +2068,7 @@ func (o *AddServiceOKBodyHaproxy) contextValidateExternalExporter(ctx context.Co } func (o *AddServiceOKBodyHaproxy) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -2078,6 +2115,7 @@ AddServiceOKBodyHaproxyExternalExporter ExternalExporter runs on any Node type, swagger:model AddServiceOKBodyHaproxyExternalExporter */ type AddServiceOKBodyHaproxyExternalExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2246,6 +2284,7 @@ func (o *AddServiceOKBodyHaproxyExternalExporter) ContextValidate(ctx context.Co } func (o *AddServiceOKBodyHaproxyExternalExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -2292,6 +2331,7 @@ AddServiceOKBodyHaproxyExternalExporterMetricsResolutions MetricsResolutions rep swagger:model AddServiceOKBodyHaproxyExternalExporterMetricsResolutions */ type AddServiceOKBodyHaproxyExternalExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -2335,6 +2375,7 @@ AddServiceOKBodyHaproxyService HAProxyService represents a generic HAProxy servi swagger:model AddServiceOKBodyHaproxyService */ type AddServiceOKBodyHaproxyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -2390,6 +2431,7 @@ AddServiceOKBodyMongodb add service OK body mongodb swagger:model AddServiceOKBodyMongodb */ type AddServiceOKBodyMongodb struct { + // mongodb exporter MongodbExporter *AddServiceOKBodyMongodbMongodbExporter `json:"mongodb_exporter,omitempty"` @@ -2582,6 +2624,7 @@ func (o *AddServiceOKBodyMongodb) ContextValidate(ctx context.Context, formats s } func (o *AddServiceOKBodyMongodb) contextValidateMongodbExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MongodbExporter != nil { if swag.IsZero(o.MongodbExporter) { // not required @@ -2606,6 +2649,7 @@ func (o *AddServiceOKBodyMongodb) contextValidateMongodbExporter(ctx context.Con } func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbMongolog(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbMongolog != nil { if swag.IsZero(o.QANMongodbMongolog) { // not required @@ -2630,6 +2674,7 @@ func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbMongolog(ctx context. } func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbProfiler(ctx context.Context, formats strfmt.Registry) error { + if o.QANMongodbProfiler != nil { if swag.IsZero(o.QANMongodbProfiler) { // not required @@ -2654,6 +2699,7 @@ func (o *AddServiceOKBodyMongodb) contextValidateQANMongodbProfiler(ctx context. } func (o *AddServiceOKBodyMongodb) contextValidateRtaMongodbAgent(ctx context.Context, formats strfmt.Registry) error { + if o.RtaMongodbAgent != nil { if swag.IsZero(o.RtaMongodbAgent) { // not required @@ -2678,6 +2724,7 @@ func (o *AddServiceOKBodyMongodb) contextValidateRtaMongodbAgent(ctx context.Con } func (o *AddServiceOKBodyMongodb) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -2724,6 +2771,7 @@ AddServiceOKBodyMongodbMongodbExporter MongoDBExporter runs on Generic or Contai swagger:model AddServiceOKBodyMongodbMongodbExporter */ type AddServiceOKBodyMongodbMongodbExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -2972,6 +3020,7 @@ func (o *AddServiceOKBodyMongodbMongodbExporter) ContextValidate(ctx context.Con } func (o *AddServiceOKBodyMongodbMongodbExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -3018,6 +3067,7 @@ AddServiceOKBodyMongodbMongodbExporterMetricsResolutions MetricsResolutions repr swagger:model AddServiceOKBodyMongodbMongodbExporterMetricsResolutions */ type AddServiceOKBodyMongodbMongodbExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -3061,6 +3111,7 @@ AddServiceOKBodyMongodbQANMongodbMongolog QANMongoDBMongologAgent runs within pm swagger:model AddServiceOKBodyMongodbQANMongodbMongolog */ type AddServiceOKBodyMongodbQANMongodbMongolog struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3270,6 +3321,7 @@ AddServiceOKBodyMongodbQANMongodbProfiler QANMongoDBProfilerAgent runs within pm swagger:model AddServiceOKBodyMongodbQANMongodbProfiler */ type AddServiceOKBodyMongodbQANMongodbProfiler struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -3479,6 +3531,7 @@ AddServiceOKBodyMongodbRtaMongodbAgent RTAMongoDBAgent runs within pmm-agent and swagger:model AddServiceOKBodyMongodbRtaMongodbAgent */ type AddServiceOKBodyMongodbRtaMongodbAgent struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -3699,6 +3752,7 @@ func (o *AddServiceOKBodyMongodbRtaMongodbAgent) ContextValidate(ctx context.Con } func (o *AddServiceOKBodyMongodbRtaMongodbAgent) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -3745,6 +3799,7 @@ AddServiceOKBodyMongodbRtaMongodbAgentRtaOptions RTAOptions holds Real-Time Quer swagger:model AddServiceOKBodyMongodbRtaMongodbAgentRtaOptions */ type AddServiceOKBodyMongodbRtaMongodbAgentRtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } @@ -3782,6 +3837,7 @@ AddServiceOKBodyMongodbService MongoDBService represents a generic MongoDB insta swagger:model AddServiceOKBodyMongodbService */ type AddServiceOKBodyMongodbService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -3852,6 +3908,7 @@ AddServiceOKBodyMysql add service OK body mysql swagger:model AddServiceOKBodyMysql */ type AddServiceOKBodyMysql struct { + // Actual table count at the moment of adding. TableCount int32 `json:"table_count,omitempty"` @@ -4013,6 +4070,7 @@ func (o *AddServiceOKBodyMysql) ContextValidate(ctx context.Context, formats str } func (o *AddServiceOKBodyMysql) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -4037,6 +4095,7 @@ func (o *AddServiceOKBodyMysql) contextValidateMysqldExporter(ctx context.Contex } func (o *AddServiceOKBodyMysql) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschema != nil { if swag.IsZero(o.QANMysqlPerfschema) { // not required @@ -4061,6 +4120,7 @@ func (o *AddServiceOKBodyMysql) contextValidateQANMysqlPerfschema(ctx context.Co } func (o *AddServiceOKBodyMysql) contextValidateQANMysqlSlowlog(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlSlowlog != nil { if swag.IsZero(o.QANMysqlSlowlog) { // not required @@ -4085,6 +4145,7 @@ func (o *AddServiceOKBodyMysql) contextValidateQANMysqlSlowlog(ctx context.Conte } func (o *AddServiceOKBodyMysql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -4131,6 +4192,7 @@ AddServiceOKBodyMysqlMysqldExporter MySQLdExporter runs on Generic or Container swagger:model AddServiceOKBodyMysqlMysqldExporter */ type AddServiceOKBodyMysqlMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4389,6 +4451,7 @@ func (o *AddServiceOKBodyMysqlMysqldExporter) ContextValidate(ctx context.Contex } func (o *AddServiceOKBodyMysqlMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -4435,6 +4498,7 @@ AddServiceOKBodyMysqlMysqldExporterMetricsResolutions MetricsResolutions represe swagger:model AddServiceOKBodyMysqlMysqldExporterMetricsResolutions */ type AddServiceOKBodyMysqlMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -4478,6 +4542,7 @@ AddServiceOKBodyMysqlQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm- swagger:model AddServiceOKBodyMysqlQANMysqlPerfschema */ type AddServiceOKBodyMysqlQANMysqlPerfschema struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4705,6 +4770,7 @@ AddServiceOKBodyMysqlQANMysqlSlowlog QANMySQLSlowlogAgent runs within pmm-agent swagger:model AddServiceOKBodyMysqlQANMysqlSlowlog */ type AddServiceOKBodyMysqlQANMysqlSlowlog struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -4935,6 +5001,7 @@ AddServiceOKBodyMysqlService MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyMysqlService */ type AddServiceOKBodyMysqlService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -5008,6 +5075,7 @@ AddServiceOKBodyPostgresql add service OK body postgresql swagger:model AddServiceOKBodyPostgresql */ type AddServiceOKBodyPostgresql struct { + // Warning message. Warning string `json:"warning,omitempty"` @@ -5169,6 +5237,7 @@ func (o *AddServiceOKBodyPostgresql) ContextValidate(ctx context.Context, format } func (o *AddServiceOKBodyPostgresql) contextValidatePostgresExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresExporter != nil { if swag.IsZero(o.PostgresExporter) { // not required @@ -5193,6 +5262,7 @@ func (o *AddServiceOKBodyPostgresql) contextValidatePostgresExporter(ctx context } func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatementsAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatementsAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatementsAgent) { // not required @@ -5217,6 +5287,7 @@ func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatementsAge } func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatmonitorAgent(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatmonitorAgent != nil { if swag.IsZero(o.QANPostgresqlPgstatmonitorAgent) { // not required @@ -5241,6 +5312,7 @@ func (o *AddServiceOKBodyPostgresql) contextValidateQANPostgresqlPgstatmonitorAg } func (o *AddServiceOKBodyPostgresql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -5287,6 +5359,7 @@ AddServiceOKBodyPostgresqlPostgresExporter PostgresExporter runs on Generic or C swagger:model AddServiceOKBodyPostgresqlPostgresExporter */ type AddServiceOKBodyPostgresqlPostgresExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5528,6 +5601,7 @@ func (o *AddServiceOKBodyPostgresqlPostgresExporter) ContextValidate(ctx context } func (o *AddServiceOKBodyPostgresqlPostgresExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -5574,6 +5648,7 @@ AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions MetricsResolutions swagger:model AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions */ type AddServiceOKBodyPostgresqlPostgresExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -5617,6 +5692,7 @@ AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent QANPostgreSQLPgStatemen swagger:model AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent */ type AddServiceOKBodyPostgresqlQANPostgresqlPgstatementsAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -5829,6 +5905,7 @@ AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent QANPostgreSQLPgStatMon swagger:model AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent */ type AddServiceOKBodyPostgresqlQANPostgresqlPgstatmonitorAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6044,6 +6121,7 @@ AddServiceOKBodyPostgresqlService PostgreSQLService represents a generic Postgre swagger:model AddServiceOKBodyPostgresqlService */ type AddServiceOKBodyPostgresqlService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -6120,6 +6198,7 @@ AddServiceOKBodyProxysql add service OK body proxysql swagger:model AddServiceOKBodyProxysql */ type AddServiceOKBodyProxysql struct { + // proxysql exporter ProxysqlExporter *AddServiceOKBodyProxysqlProxysqlExporter `json:"proxysql_exporter,omitempty"` @@ -6210,6 +6289,7 @@ func (o *AddServiceOKBodyProxysql) ContextValidate(ctx context.Context, formats } func (o *AddServiceOKBodyProxysql) contextValidateProxysqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ProxysqlExporter != nil { if swag.IsZero(o.ProxysqlExporter) { // not required @@ -6234,6 +6314,7 @@ func (o *AddServiceOKBodyProxysql) contextValidateProxysqlExporter(ctx context.C } func (o *AddServiceOKBodyProxysql) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -6280,6 +6361,7 @@ AddServiceOKBodyProxysqlProxysqlExporter ProxySQLExporter runs on Generic or Con swagger:model AddServiceOKBodyProxysqlProxysqlExporter */ type AddServiceOKBodyProxysqlProxysqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -6515,6 +6597,7 @@ func (o *AddServiceOKBodyProxysqlProxysqlExporter) ContextValidate(ctx context.C } func (o *AddServiceOKBodyProxysqlProxysqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -6561,6 +6644,7 @@ AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions MetricsResolutions re swagger:model AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions */ type AddServiceOKBodyProxysqlProxysqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -6604,6 +6688,7 @@ AddServiceOKBodyProxysqlService ProxySQLService represents a generic ProxySQL in swagger:model AddServiceOKBodyProxysqlService */ type AddServiceOKBodyProxysqlService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -6674,6 +6759,7 @@ AddServiceOKBodyRDS add service OK body RDS swagger:model AddServiceOKBodyRDS */ type AddServiceOKBodyRDS struct { + // mysql Mysql *AddServiceOKBodyRDSMysql `json:"mysql,omitempty"` @@ -6968,6 +7054,7 @@ func (o *AddServiceOKBodyRDS) ContextValidate(ctx context.Context, formats strfm } func (o *AddServiceOKBodyRDS) contextValidateMysql(ctx context.Context, formats strfmt.Registry) error { + if o.Mysql != nil { if swag.IsZero(o.Mysql) { // not required @@ -6992,6 +7079,7 @@ func (o *AddServiceOKBodyRDS) contextValidateMysql(ctx context.Context, formats } func (o *AddServiceOKBodyRDS) contextValidateMysqldExporter(ctx context.Context, formats strfmt.Registry) error { + if o.MysqldExporter != nil { if swag.IsZero(o.MysqldExporter) { // not required @@ -7016,6 +7104,7 @@ func (o *AddServiceOKBodyRDS) contextValidateMysqldExporter(ctx context.Context, } func (o *AddServiceOKBodyRDS) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { + if o.Node != nil { if swag.IsZero(o.Node) { // not required @@ -7040,6 +7129,7 @@ func (o *AddServiceOKBodyRDS) contextValidateNode(ctx context.Context, formats s } func (o *AddServiceOKBodyRDS) contextValidatePostgresql(ctx context.Context, formats strfmt.Registry) error { + if o.Postgresql != nil { if swag.IsZero(o.Postgresql) { // not required @@ -7064,6 +7154,7 @@ func (o *AddServiceOKBodyRDS) contextValidatePostgresql(ctx context.Context, for } func (o *AddServiceOKBodyRDS) contextValidatePostgresqlExporter(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlExporter != nil { if swag.IsZero(o.PostgresqlExporter) { // not required @@ -7088,6 +7179,7 @@ func (o *AddServiceOKBodyRDS) contextValidatePostgresqlExporter(ctx context.Cont } func (o *AddServiceOKBodyRDS) contextValidateQANMysqlPerfschema(ctx context.Context, formats strfmt.Registry) error { + if o.QANMysqlPerfschema != nil { if swag.IsZero(o.QANMysqlPerfschema) { // not required @@ -7112,6 +7204,7 @@ func (o *AddServiceOKBodyRDS) contextValidateQANMysqlPerfschema(ctx context.Cont } func (o *AddServiceOKBodyRDS) contextValidateQANPostgresqlPgstatements(ctx context.Context, formats strfmt.Registry) error { + if o.QANPostgresqlPgstatements != nil { if swag.IsZero(o.QANPostgresqlPgstatements) { // not required @@ -7136,6 +7229,7 @@ func (o *AddServiceOKBodyRDS) contextValidateQANPostgresqlPgstatements(ctx conte } func (o *AddServiceOKBodyRDS) contextValidateRDSExporter(ctx context.Context, formats strfmt.Registry) error { + if o.RDSExporter != nil { if swag.IsZero(o.RDSExporter) { // not required @@ -7182,6 +7276,7 @@ AddServiceOKBodyRDSMysql MySQLService represents a generic MySQL instance. swagger:model AddServiceOKBodyRDSMysql */ type AddServiceOKBodyRDSMysql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -7255,6 +7350,7 @@ AddServiceOKBodyRDSMysqldExporter MySQLdExporter runs on Generic or Container No swagger:model AddServiceOKBodyRDSMysqldExporter */ type AddServiceOKBodyRDSMysqldExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -7513,6 +7609,7 @@ func (o *AddServiceOKBodyRDSMysqldExporter) ContextValidate(ctx context.Context, } func (o *AddServiceOKBodyRDSMysqldExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -7559,6 +7656,7 @@ AddServiceOKBodyRDSMysqldExporterMetricsResolutions MetricsResolutions represent swagger:model AddServiceOKBodyRDSMysqldExporterMetricsResolutions */ type AddServiceOKBodyRDSMysqldExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -7602,6 +7700,7 @@ AddServiceOKBodyRDSNode RemoteRDSNode represents remote RDS Node. Agents can't r swagger:model AddServiceOKBodyRDSNode */ type AddServiceOKBodyRDSNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -7660,6 +7759,7 @@ AddServiceOKBodyRDSPostgresql PostgreSQLService represents a generic PostgreSQL swagger:model AddServiceOKBodyRDSPostgresql */ type AddServiceOKBodyRDSPostgresql struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -7736,6 +7836,7 @@ AddServiceOKBodyRDSPostgresqlExporter PostgresExporter runs on Generic or Contai swagger:model AddServiceOKBodyRDSPostgresqlExporter */ type AddServiceOKBodyRDSPostgresqlExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -7977,6 +8078,7 @@ func (o *AddServiceOKBodyRDSPostgresqlExporter) ContextValidate(ctx context.Cont } func (o *AddServiceOKBodyRDSPostgresqlExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8023,6 +8125,7 @@ AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions MetricsResolutions repre swagger:model AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions */ type AddServiceOKBodyRDSPostgresqlExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -8066,6 +8169,7 @@ AddServiceOKBodyRDSQANMysqlPerfschema QANMySQLPerfSchemaAgent runs within pmm-ag swagger:model AddServiceOKBodyRDSQANMysqlPerfschema */ type AddServiceOKBodyRDSQANMysqlPerfschema struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -8293,6 +8397,7 @@ AddServiceOKBodyRDSQANPostgresqlPgstatements QANPostgreSQLPgStatementsAgent runs swagger:model AddServiceOKBodyRDSQANPostgresqlPgstatements */ type AddServiceOKBodyRDSQANPostgresqlPgstatements struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -8505,6 +8610,7 @@ AddServiceOKBodyRDSRDSExporter RDSExporter runs on Generic or Container Node and swagger:model AddServiceOKBodyRDSRDSExporter */ type AddServiceOKBodyRDSRDSExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -8737,6 +8843,7 @@ func (o *AddServiceOKBodyRDSRDSExporter) ContextValidate(ctx context.Context, fo } func (o *AddServiceOKBodyRDSRDSExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -8783,6 +8890,7 @@ AddServiceOKBodyRDSRDSExporterMetricsResolutions MetricsResolutions represents P swagger:model AddServiceOKBodyRDSRDSExporterMetricsResolutions */ type AddServiceOKBodyRDSRDSExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -8826,6 +8934,7 @@ AddServiceOKBodyValkey add service OK body valkey swagger:model AddServiceOKBodyValkey */ type AddServiceOKBodyValkey struct { + // service Service *AddServiceOKBodyValkeyService `json:"service,omitempty"` @@ -8916,6 +9025,7 @@ func (o *AddServiceOKBodyValkey) ContextValidate(ctx context.Context, formats st } func (o *AddServiceOKBodyValkey) contextValidateService(ctx context.Context, formats strfmt.Registry) error { + if o.Service != nil { if swag.IsZero(o.Service) { // not required @@ -8940,6 +9050,7 @@ func (o *AddServiceOKBodyValkey) contextValidateService(ctx context.Context, for } func (o *AddServiceOKBodyValkey) contextValidateValkeyExporter(ctx context.Context, formats strfmt.Registry) error { + if o.ValkeyExporter != nil { if swag.IsZero(o.ValkeyExporter) { // not required @@ -8986,6 +9097,7 @@ AddServiceOKBodyValkeyService ValkeyService represents a generic Valkey instance swagger:model AddServiceOKBodyValkeyService */ type AddServiceOKBodyValkeyService struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` @@ -9056,6 +9168,7 @@ AddServiceOKBodyValkeyValkeyExporter ValkeyExporter runs on Generic or Container swagger:model AddServiceOKBodyValkeyValkeyExporter */ type AddServiceOKBodyValkeyValkeyExporter struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` @@ -9227,6 +9340,7 @@ func (o *AddServiceOKBodyValkeyValkeyExporter) ContextValidate(ctx context.Conte } func (o *AddServiceOKBodyValkeyValkeyExporter) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -9273,6 +9387,7 @@ AddServiceOKBodyValkeyValkeyExporterMetricsResolutions MetricsResolutions repres swagger:model AddServiceOKBodyValkeyValkeyExporterMetricsResolutions */ type AddServiceOKBodyValkeyValkeyExporterMetricsResolutions struct { + // High resolution. In JSON should be represented as a string with number of seconds with `s` suffix. Hr string `json:"hr,omitempty"` @@ -9316,6 +9431,7 @@ AddServiceParamsBodyExternal add service params body external swagger:model AddServiceParamsBodyExternal */ type AddServiceParamsBodyExternal struct { + // Node identifier on which an external exporter is been running. // runs_on_node_id should always be passed with node_id. // Exactly one of these parameters should be present: node_id, node_name, add_node. @@ -9484,6 +9600,7 @@ func (o *AddServiceParamsBodyExternal) ContextValidate(ctx context.Context, form } func (o *AddServiceParamsBodyExternal) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -9530,6 +9647,7 @@ AddServiceParamsBodyExternalAddNode AddNodeParams holds node params and is used swagger:model AddServiceParamsBodyExternalAddNode */ type AddServiceParamsBodyExternalAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -9658,6 +9776,7 @@ AddServiceParamsBodyHaproxy add service params body haproxy swagger:model AddServiceParamsBodyHaproxy */ type AddServiceParamsBodyHaproxy struct { + // Node identifier on which an external exporter is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -9818,6 +9937,7 @@ func (o *AddServiceParamsBodyHaproxy) ContextValidate(ctx context.Context, forma } func (o *AddServiceParamsBodyHaproxy) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -9864,6 +9984,7 @@ AddServiceParamsBodyHaproxyAddNode AddNodeParams holds node params and is used t swagger:model AddServiceParamsBodyHaproxyAddNode */ type AddServiceParamsBodyHaproxyAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -9992,6 +10113,7 @@ AddServiceParamsBodyMongodb add service params body mongodb swagger:model AddServiceParamsBodyMongodb */ type AddServiceParamsBodyMongodb struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -10273,6 +10395,7 @@ func (o *AddServiceParamsBodyMongodb) ContextValidate(ctx context.Context, forma } func (o *AddServiceParamsBodyMongodb) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -10319,6 +10442,7 @@ AddServiceParamsBodyMongodbAddNode AddNodeParams holds node params and is used t swagger:model AddServiceParamsBodyMongodbAddNode */ type AddServiceParamsBodyMongodbAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -10447,6 +10571,7 @@ AddServiceParamsBodyMysql add service params body mysql swagger:model AddServiceParamsBodyMysql */ type AddServiceParamsBodyMysql struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -10722,6 +10847,7 @@ func (o *AddServiceParamsBodyMysql) ContextValidate(ctx context.Context, formats } func (o *AddServiceParamsBodyMysql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -10768,6 +10894,7 @@ AddServiceParamsBodyMysqlAddNode AddNodeParams holds node params and is used to swagger:model AddServiceParamsBodyMysqlAddNode */ type AddServiceParamsBodyMysqlAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -10896,6 +11023,7 @@ AddServiceParamsBodyPostgresql add service params body postgresql swagger:model AddServiceParamsBodyPostgresql */ type AddServiceParamsBodyPostgresql struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -11167,6 +11295,7 @@ func (o *AddServiceParamsBodyPostgresql) ContextValidate(ctx context.Context, fo } func (o *AddServiceParamsBodyPostgresql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -11213,6 +11342,7 @@ AddServiceParamsBodyPostgresqlAddNode AddNodeParams holds node params and is use swagger:model AddServiceParamsBodyPostgresqlAddNode */ type AddServiceParamsBodyPostgresqlAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -11341,6 +11471,7 @@ AddServiceParamsBodyProxysql add service params body proxysql swagger:model AddServiceParamsBodyProxysql */ type AddServiceParamsBodyProxysql struct { + // Node identifier on which a service is been running. // Exactly one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -11579,6 +11710,7 @@ func (o *AddServiceParamsBodyProxysql) ContextValidate(ctx context.Context, form } func (o *AddServiceParamsBodyProxysql) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -11625,6 +11757,7 @@ AddServiceParamsBodyProxysqlAddNode AddNodeParams holds node params and is used swagger:model AddServiceParamsBodyProxysqlAddNode */ type AddServiceParamsBodyProxysqlAddNode struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -11753,6 +11886,7 @@ AddServiceParamsBodyRDS add service params body RDS swagger:model AddServiceParamsBodyRDS */ type AddServiceParamsBodyRDS struct { + // AWS region. Region string `json:"region,omitempty"` @@ -11999,6 +12133,7 @@ AddServiceParamsBodyValkey add service params body valkey swagger:model AddServiceParamsBodyValkey */ type AddServiceParamsBodyValkey struct { + // Node identifier on which the service is running. // Only one of these parameters should be present: node_id, node_name, add_node. NodeID string `json:"node_id,omitempty"` @@ -12243,6 +12378,7 @@ func (o *AddServiceParamsBodyValkey) ContextValidate(ctx context.Context, format } func (o *AddServiceParamsBodyValkey) contextValidateAddNode(ctx context.Context, formats strfmt.Registry) error { + if o.AddNode != nil { if swag.IsZero(o.AddNode) { // not required @@ -12289,6 +12425,7 @@ AddServiceParamsBodyValkeyAddNode AddNodeParams holds node params and is used to swagger:model AddServiceParamsBodyValkeyAddNode */ type AddServiceParamsBodyValkeyAddNode 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"` diff --git a/api/management/v1/json/client/management_service/discover_azure_database_parameters.go b/api/management/v1/json/client/management_service/discover_azure_database_parameters.go index f5f9f75a926..75b1e24acba 100644 --- a/api/management/v1/json/client/management_service/discover_azure_database_parameters.go +++ b/api/management/v1/json/client/management_service/discover_azure_database_parameters.go @@ -60,6 +60,7 @@ DiscoverAzureDatabaseParams contains all the parameters to send to the API endpo Typically these are written to a http.Request. */ type DiscoverAzureDatabaseParams struct { + /* Body. DiscoverAzureDatabaseRequest discover azure databases request. @@ -132,6 +133,7 @@ func (o *DiscoverAzureDatabaseParams) SetBody(body DiscoverAzureDatabaseBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverAzureDatabaseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/discover_azure_database_responses.go b/api/management/v1/json/client/management_service/discover_azure_database_responses.go index ee99deb5004..edc2c16bb58 100644 --- a/api/management/v1/json/client/management_service/discover_azure_database_responses.go +++ b/api/management/v1/json/client/management_service/discover_azure_database_responses.go @@ -105,6 +105,7 @@ func (o *DiscoverAzureDatabaseOK) GetPayload() *DiscoverAzureDatabaseOKBody { } func (o *DiscoverAzureDatabaseOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverAzureDatabaseOKBody) // response payload @@ -178,6 +179,7 @@ func (o *DiscoverAzureDatabaseDefault) GetPayload() *DiscoverAzureDatabaseDefaul } func (o *DiscoverAzureDatabaseDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverAzureDatabaseDefaultBody) // response payload @@ -193,6 +195,7 @@ DiscoverAzureDatabaseBody DiscoverAzureDatabaseRequest discover azure databases swagger:model DiscoverAzureDatabaseBody */ type DiscoverAzureDatabaseBody struct { + // Azure client ID. AzureClientID string `json:"azure_client_id,omitempty"` @@ -239,6 +242,7 @@ DiscoverAzureDatabaseDefaultBody discover azure database default body swagger:model DiscoverAzureDatabaseDefaultBody */ type DiscoverAzureDatabaseDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -308,7 +312,9 @@ func (o *DiscoverAzureDatabaseDefaultBody) ContextValidate(ctx context.Context, } func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -328,6 +334,7 @@ func (o *DiscoverAzureDatabaseDefaultBody) contextValidateDetails(ctx context.Co return err } } + } return nil @@ -356,6 +363,7 @@ DiscoverAzureDatabaseDefaultBodyDetailsItems0 discover azure database default bo swagger:model DiscoverAzureDatabaseDefaultBodyDetailsItems0 */ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -367,6 +375,7 @@ type DiscoverAzureDatabaseDefaultBodyDetailsItems0 struct { func (o *DiscoverAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -404,6 +413,7 @@ func (o *DiscoverAzureDatabaseDefaultBodyDetailsItems0) UnmarshalJSON(data []byt // MarshalJSON marshals this object with additional properties into a JSON object func (o DiscoverAzureDatabaseDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -467,6 +477,7 @@ DiscoverAzureDatabaseOKBody DiscoverAzureDatabaseResponse discover azure databas swagger:model DiscoverAzureDatabaseOKBody */ type DiscoverAzureDatabaseOKBody struct { + // azure database instance AzureDatabaseInstance []*DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 `json:"azure_database_instance"` } @@ -530,7 +541,9 @@ func (o *DiscoverAzureDatabaseOKBody) ContextValidate(ctx context.Context, forma } func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AzureDatabaseInstance); i++ { + if o.AzureDatabaseInstance[i] != nil { if swag.IsZero(o.AzureDatabaseInstance[i]) { // not required @@ -550,6 +563,7 @@ func (o *DiscoverAzureDatabaseOKBody) contextValidateAzureDatabaseInstance(ctx c return err } } + } return nil @@ -578,6 +592,7 @@ DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 DiscoverAzureDatabaseInst swagger:model DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 */ type DiscoverAzureDatabaseOKBodyAzureDatabaseInstanceItems0 struct { + // Azure database instance ID. InstanceID string `json:"instance_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/discover_rds_parameters.go b/api/management/v1/json/client/management_service/discover_rds_parameters.go index ef5c0058c50..93e9487d969 100644 --- a/api/management/v1/json/client/management_service/discover_rds_parameters.go +++ b/api/management/v1/json/client/management_service/discover_rds_parameters.go @@ -60,6 +60,7 @@ DiscoverRDSParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type DiscoverRDSParams struct { + // Body. Body DiscoverRDSBody @@ -129,6 +130,7 @@ func (o *DiscoverRDSParams) SetBody(body DiscoverRDSBody) { // WriteToRequest writes these params to a swagger request func (o *DiscoverRDSParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/discover_rds_responses.go b/api/management/v1/json/client/management_service/discover_rds_responses.go index b8743c96b40..d0a66ec60d0 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 @@ -105,6 +105,7 @@ func (o *DiscoverRDSOK) GetPayload() *DiscoverRDSOKBody { } func (o *DiscoverRDSOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverRDSOKBody) // response payload @@ -178,6 +179,7 @@ func (o *DiscoverRDSDefault) GetPayload() *DiscoverRDSDefaultBody { } func (o *DiscoverRDSDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(DiscoverRDSDefaultBody) // response payload @@ -193,6 +195,7 @@ DiscoverRDSBody discover RDS body swagger:model DiscoverRDSBody */ type DiscoverRDSBody struct { + // AWS Access key. Optional. AWSAccessKey string `json:"aws_access_key,omitempty"` @@ -233,6 +236,7 @@ DiscoverRDSDefaultBody discover RDS default body swagger:model DiscoverRDSDefaultBody */ type DiscoverRDSDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -302,7 +306,9 @@ func (o *DiscoverRDSDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -322,6 +328,7 @@ func (o *DiscoverRDSDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -350,6 +357,7 @@ DiscoverRDSDefaultBodyDetailsItems0 discover RDS default body details items0 swagger:model DiscoverRDSDefaultBodyDetailsItems0 */ type DiscoverRDSDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -361,6 +369,7 @@ type DiscoverRDSDefaultBodyDetailsItems0 struct { func (o *DiscoverRDSDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -398,6 +407,7 @@ func (o *DiscoverRDSDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o DiscoverRDSDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -461,6 +471,7 @@ DiscoverRDSOKBody discover RDS OK body swagger:model DiscoverRDSOKBody */ type DiscoverRDSOKBody struct { + // rds instances RDSInstances []*DiscoverRDSOKBodyRDSInstancesItems0 `json:"rds_instances"` } @@ -524,7 +535,9 @@ func (o *DiscoverRDSOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.RDSInstances); i++ { + if o.RDSInstances[i] != nil { if swag.IsZero(o.RDSInstances[i]) { // not required @@ -544,6 +557,7 @@ func (o *DiscoverRDSOKBody) contextValidateRDSInstances(ctx context.Context, for return err } } + } return nil @@ -572,6 +586,7 @@ DiscoverRDSOKBodyRDSInstancesItems0 DiscoverRDSInstance models an unique RDS ins swagger:model DiscoverRDSOKBodyRDSInstancesItems0 */ type DiscoverRDSOKBodyRDSInstancesItems0 struct { + // AWS region. Region string `json:"region,omitempty"` diff --git a/api/management/v1/json/client/management_service/get_node_parameters.go b/api/management/v1/json/client/management_service/get_node_parameters.go index 63aa4bdf7c6..73629cc22da 100644 --- a/api/management/v1/json/client/management_service/get_node_parameters.go +++ b/api/management/v1/json/client/management_service/get_node_parameters.go @@ -60,6 +60,7 @@ GetNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetNodeParams struct { + /* NodeID. Unique Node identifier. @@ -132,6 +133,7 @@ func (o *GetNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *GetNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/get_node_responses.go b/api/management/v1/json/client/management_service/get_node_responses.go index 241eb92bed5..7d10fda71b9 100644 --- a/api/management/v1/json/client/management_service/get_node_responses.go +++ b/api/management/v1/json/client/management_service/get_node_responses.go @@ -105,6 +105,7 @@ func (o *GetNodeOK) GetPayload() *GetNodeOKBody { } func (o *GetNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetNodeDefault) GetPayload() *GetNodeDefaultBody { } func (o *GetNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetNodeDefaultBody) // response payload @@ -193,6 +195,7 @@ GetNodeDefaultBody get node default body swagger:model GetNodeDefaultBody */ type GetNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *GetNodeDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *GetNodeDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -310,6 +316,7 @@ GetNodeDefaultBodyDetailsItems0 get node default body details items0 swagger:model GetNodeDefaultBodyDetailsItems0 */ type GetNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type GetNodeDefaultBodyDetailsItems0 struct { func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *GetNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ GetNodeOKBody get node OK body swagger:model GetNodeOKBody */ type GetNodeOKBody struct { + // node Node *GetNodeOKBodyNode `json:"node,omitempty"` } @@ -477,6 +487,7 @@ func (o *GetNodeOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetNodeOKBody) contextValidateNode(ctx context.Context, formats strfmt.Registry) error { + if o.Node != nil { if swag.IsZero(o.Node) { // not required @@ -523,6 +534,7 @@ GetNodeOKBodyNode get node OK body node swagger:model GetNodeOKBodyNode */ type GetNodeOKBodyNode struct { + // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -770,7 +782,9 @@ func (o *GetNodeOKBodyNode) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -790,13 +804,16 @@ func (o *GetNodeOKBodyNode) contextValidateAgents(ctx context.Context, formats s return err } } + } return nil } func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -816,6 +833,7 @@ func (o *GetNodeOKBodyNode) contextValidateServices(ctx context.Context, formats return err } } + } return nil @@ -844,6 +862,7 @@ GetNodeOKBodyNodeAgentsItems0 get node OK body node agents items0 swagger:model GetNodeOKBodyNodeAgentsItems0 */ type GetNodeOKBodyNodeAgentsItems0 struct { + // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -890,6 +909,7 @@ GetNodeOKBodyNodeServicesItems0 Service represents a service running on a node. swagger:model GetNodeOKBodyNodeServicesItems0 */ type GetNodeOKBodyNodeServicesItems0 struct { + // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_agent_versions_parameters.go b/api/management/v1/json/client/management_service/list_agent_versions_parameters.go index d7f16fa9b2d..97d2ce24b71 100644 --- a/api/management/v1/json/client/management_service/list_agent_versions_parameters.go +++ b/api/management/v1/json/client/management_service/list_agent_versions_parameters.go @@ -115,6 +115,7 @@ func (o *ListAgentVersionsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListAgentVersionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_agent_versions_responses.go b/api/management/v1/json/client/management_service/list_agent_versions_responses.go index a0a8858d962..dc5b538faef 100644 --- a/api/management/v1/json/client/management_service/list_agent_versions_responses.go +++ b/api/management/v1/json/client/management_service/list_agent_versions_responses.go @@ -105,6 +105,7 @@ func (o *ListAgentVersionsOK) GetPayload() *ListAgentVersionsOKBody { } func (o *ListAgentVersionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentVersionsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListAgentVersionsDefault) GetPayload() *ListAgentVersionsDefaultBody { } func (o *ListAgentVersionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentVersionsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListAgentVersionsDefaultBody list agent versions default body swagger:model ListAgentVersionsDefaultBody */ type ListAgentVersionsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListAgentVersionsDefaultBody) ContextValidate(ctx context.Context, form } func (o *ListAgentVersionsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListAgentVersionsDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -310,6 +316,7 @@ ListAgentVersionsDefaultBodyDetailsItems0 list agent versions default body detai swagger:model ListAgentVersionsDefaultBodyDetailsItems0 */ type ListAgentVersionsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListAgentVersionsDefaultBodyDetailsItems0 struct { func (o *ListAgentVersionsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListAgentVersionsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentVersionsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListAgentVersionsOKBody list agent versions OK body swagger:model ListAgentVersionsOKBody */ type ListAgentVersionsOKBody struct { + // List of Agent versions. AgentVersions []*ListAgentVersionsOKBodyAgentVersionsItems0 `json:"agent_versions"` } @@ -484,7 +494,9 @@ func (o *ListAgentVersionsOKBody) ContextValidate(ctx context.Context, formats s } func (o *ListAgentVersionsOKBody) contextValidateAgentVersions(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.AgentVersions); i++ { + if o.AgentVersions[i] != nil { if swag.IsZero(o.AgentVersions[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListAgentVersionsOKBody) contextValidateAgentVersions(ctx context.Conte return err } } + } return nil @@ -532,6 +545,7 @@ ListAgentVersionsOKBodyAgentVersionsItems0 list agent versions OK body agent ver swagger:model ListAgentVersionsOKBodyAgentVersionsItems0 */ type ListAgentVersionsOKBodyAgentVersionsItems0 struct { + // Agent ID. AgentID string `json:"agent_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_agents_parameters.go b/api/management/v1/json/client/management_service/list_agents_parameters.go index 5dd7b7b6a4f..7c16816c10a 100644 --- a/api/management/v1/json/client/management_service/list_agents_parameters.go +++ b/api/management/v1/json/client/management_service/list_agents_parameters.go @@ -60,6 +60,7 @@ ListAgentsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListAgentsParams struct { + /* NodeID. Return only Agents that relate to a specific NodeID. @@ -149,6 +150,7 @@ func (o *ListAgentsParams) SetServiceID(serviceID *string) { // WriteToRequest writes these params to a swagger request func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -164,6 +166,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qNodeID := qrNodeID if qNodeID != "" { + if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -180,6 +183,7 @@ func (o *ListAgentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Re } qServiceID := qrServiceID if qServiceID != "" { + if err := r.SetQueryParam("service_id", qServiceID); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_agents_responses.go b/api/management/v1/json/client/management_service/list_agents_responses.go index 2da78ec1324..b808212608c 100644 --- a/api/management/v1/json/client/management_service/list_agents_responses.go +++ b/api/management/v1/json/client/management_service/list_agents_responses.go @@ -105,6 +105,7 @@ func (o *ListAgentsOK) GetPayload() *ListAgentsOKBody { } func (o *ListAgentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListAgentsDefault) GetPayload() *ListAgentsDefaultBody { } func (o *ListAgentsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListAgentsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListAgentsDefaultBody list agents default body swagger:model ListAgentsDefaultBody */ type ListAgentsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListAgentsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListAgentsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -310,6 +316,7 @@ ListAgentsDefaultBodyDetailsItems0 list agents default body details items0 swagger:model ListAgentsDefaultBodyDetailsItems0 */ type ListAgentsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListAgentsDefaultBodyDetailsItems0 struct { func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListAgentsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListAgentsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListAgentsOKBody list agents OK body swagger:model ListAgentsOKBody */ type ListAgentsOKBody struct { + // List of Agents. Agents []*ListAgentsOKBodyAgentsItems0 `json:"agents"` } @@ -484,7 +494,9 @@ func (o *ListAgentsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListAgentsOKBody) contextValidateAgents(ctx context.Context, formats st return err } } + } return nil @@ -532,6 +545,7 @@ ListAgentsOKBodyAgentsItems0 list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0 */ type ListAgentsOKBodyAgentsItems0 struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -932,6 +946,7 @@ func (o *ListAgentsOKBodyAgentsItems0) ContextValidate(ctx context.Context, form } func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { + if o.AzureOptions != nil { if swag.IsZero(o.AzureOptions) { // not required @@ -956,6 +971,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateAzureOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MongoDBOptions != nil { if swag.IsZero(o.MongoDBOptions) { // not required @@ -980,6 +996,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMongoDBOptions(ctx context } func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlOptions != nil { if swag.IsZero(o.MysqlOptions) { // not required @@ -1004,6 +1021,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidateMysqlOptions(ctx context.C } func (o *ListAgentsOKBodyAgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlOptions != nil { if swag.IsZero(o.PostgresqlOptions) { // not required @@ -1028,6 +1046,7 @@ func (o *ListAgentsOKBodyAgentsItems0) contextValidatePostgresqlOptions(ctx cont } func (o *ListAgentsOKBodyAgentsItems0) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -1074,6 +1093,7 @@ ListAgentsOKBodyAgentsItems0AzureOptions list agents OK body agents items0 azure swagger:model ListAgentsOKBodyAgentsItems0AzureOptions */ type ListAgentsOKBodyAgentsItems0AzureOptions struct { + // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -1123,6 +1143,7 @@ ListAgentsOKBodyAgentsItems0MongoDBOptions list agents OK body agents items0 mon swagger:model ListAgentsOKBodyAgentsItems0MongoDBOptions */ type ListAgentsOKBodyAgentsItems0MongoDBOptions struct { + // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -1178,6 +1199,7 @@ ListAgentsOKBodyAgentsItems0MysqlOptions list agents OK body agents items0 mysql swagger:model ListAgentsOKBodyAgentsItems0MysqlOptions */ type ListAgentsOKBodyAgentsItems0MysqlOptions struct { + // True if TLS key is set. IsTLSKeySet bool `json:"is_tls_key_set,omitempty"` @@ -1218,6 +1240,7 @@ ListAgentsOKBodyAgentsItems0PostgresqlOptions list agents OK body agents items0 swagger:model ListAgentsOKBodyAgentsItems0PostgresqlOptions */ type ListAgentsOKBodyAgentsItems0PostgresqlOptions struct { + // True if TLS key is set. IsSslKeySet bool `json:"is_ssl_key_set,omitempty"` @@ -1261,6 +1284,7 @@ ListAgentsOKBodyAgentsItems0RtaOptions RTAOptions holds Real-Time Query Analytic swagger:model ListAgentsOKBodyAgentsItems0RtaOptions */ type ListAgentsOKBodyAgentsItems0RtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } diff --git a/api/management/v1/json/client/management_service/list_nodes_parameters.go b/api/management/v1/json/client/management_service/list_nodes_parameters.go index 441e42660e2..eeca2a1f5f7 100644 --- a/api/management/v1/json/client/management_service/list_nodes_parameters.go +++ b/api/management/v1/json/client/management_service/list_nodes_parameters.go @@ -60,6 +60,7 @@ ListNodesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListNodesParams struct { + /* NodeType. Node type to be filtered out. @@ -85,7 +86,9 @@ func (o *ListNodesParams) WithDefaults() *ListNodesParams { // // All values with no default are reset to their zero value. func (o *ListNodesParams) SetDefaults() { - nodeTypeDefault := string("NODE_TYPE_UNSPECIFIED") + var ( + nodeTypeDefault = string("NODE_TYPE_UNSPECIFIED") + ) val := ListNodesParams{ NodeType: &nodeTypeDefault, @@ -143,6 +146,7 @@ func (o *ListNodesParams) SetNodeType(nodeType *string) { // WriteToRequest writes these params to a swagger request func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -158,6 +162,7 @@ func (o *ListNodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Reg } qNodeType := qrNodeType if qNodeType != "" { + if err := r.SetQueryParam("node_type", qNodeType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_nodes_responses.go b/api/management/v1/json/client/management_service/list_nodes_responses.go index d9f378b0034..e47d09aad07 100644 --- a/api/management/v1/json/client/management_service/list_nodes_responses.go +++ b/api/management/v1/json/client/management_service/list_nodes_responses.go @@ -105,6 +105,7 @@ func (o *ListNodesOK) GetPayload() *ListNodesOKBody { } func (o *ListNodesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListNodesDefault) GetPayload() *ListNodesDefaultBody { } func (o *ListNodesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListNodesDefaultBody) // response payload @@ -193,6 +195,7 @@ ListNodesDefaultBody list nodes default body swagger:model ListNodesDefaultBody */ type ListNodesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListNodesDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListNodesDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -310,6 +316,7 @@ ListNodesDefaultBodyDetailsItems0 list nodes default body details items0 swagger:model ListNodesDefaultBodyDetailsItems0 */ type ListNodesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListNodesDefaultBodyDetailsItems0 struct { func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListNodesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListNodesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListNodesOKBody list nodes OK body swagger:model ListNodesOKBody */ type ListNodesOKBody struct { + // nodes Nodes []*ListNodesOKBodyNodesItems0 `json:"nodes"` } @@ -484,7 +494,9 @@ func (o *ListNodesOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Nodes); i++ { + if o.Nodes[i] != nil { if swag.IsZero(o.Nodes[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListNodesOKBody) contextValidateNodes(ctx context.Context, formats strf return err } } + } return nil @@ -532,6 +545,7 @@ ListNodesOKBodyNodesItems0 list nodes OK body nodes items0 swagger:model ListNodesOKBodyNodesItems0 */ type ListNodesOKBodyNodesItems0 struct { + // Unique Node identifier. NodeID string `json:"node_id,omitempty"` @@ -779,7 +793,9 @@ func (o *ListNodesOKBodyNodesItems0) ContextValidate(ctx context.Context, format } func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -799,13 +815,16 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateAgents(ctx context.Context, return err } } + } return nil } func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -825,6 +844,7 @@ func (o *ListNodesOKBodyNodesItems0) contextValidateServices(ctx context.Context return err } } + } return nil @@ -853,6 +873,7 @@ ListNodesOKBodyNodesItems0AgentsItems0 list nodes OK body nodes items0 agents it swagger:model ListNodesOKBodyNodesItems0AgentsItems0 */ type ListNodesOKBodyNodesItems0AgentsItems0 struct { + // Unique Agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -899,6 +920,7 @@ ListNodesOKBodyNodesItems0ServicesItems0 Service represents a service running on swagger:model ListNodesOKBodyNodesItems0ServicesItems0 */ type ListNodesOKBodyNodesItems0ServicesItems0 struct { + // Unique Service identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/list_services_parameters.go b/api/management/v1/json/client/management_service/list_services_parameters.go index 80363638efa..d9a1cba1032 100644 --- a/api/management/v1/json/client/management_service/list_services_parameters.go +++ b/api/management/v1/json/client/management_service/list_services_parameters.go @@ -60,6 +60,7 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { + /* ExternalGroup. Return only services in this external group. @@ -97,7 +98,9 @@ func (o *ListServicesParams) WithDefaults() *ListServicesParams { // // All values with no default are reset to their zero value. func (o *ListServicesParams) SetDefaults() { - serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + var ( + serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") + ) val := ListServicesParams{ ServiceType: &serviceTypeDefault, @@ -177,6 +180,7 @@ func (o *ListServicesParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -192,6 +196,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qExternalGroup := qrExternalGroup if qExternalGroup != "" { + if err := r.SetQueryParam("external_group", qExternalGroup); err != nil { return err } @@ -208,6 +213,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qNodeID := qrNodeID if qNodeID != "" { + if err := r.SetQueryParam("node_id", qNodeID); err != nil { return err } @@ -224,6 +230,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qServiceType := qrServiceType if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/list_services_responses.go b/api/management/v1/json/client/management_service/list_services_responses.go index d9fcccd96b2..4570a26e435 100644 --- a/api/management/v1/json/client/management_service/list_services_responses.go +++ b/api/management/v1/json/client/management_service/list_services_responses.go @@ -105,6 +105,7 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -193,6 +195,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -310,6 +316,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // List of Services. Services []*ListServicesOKBodyServicesItems0 `json:"services"` } @@ -484,7 +494,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Services); i++ { + if o.Services[i] != nil { if swag.IsZero(o.Services[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListServicesOKBody) contextValidateServices(ctx context.Context, format return err } } + } return nil @@ -532,6 +545,7 @@ ListServicesOKBodyServicesItems0 list services OK body services items0 swagger:model ListServicesOKBodyServicesItems0 */ type ListServicesOKBodyServicesItems0 struct { + // Unique service identifier. ServiceID string `json:"service_id,omitempty"` @@ -744,7 +758,9 @@ func (o *ListServicesOKBodyServicesItems0) ContextValidate(ctx context.Context, } func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Agents); i++ { + if o.Agents[i] != nil { if swag.IsZero(o.Agents[i]) { // not required @@ -764,6 +780,7 @@ func (o *ListServicesOKBodyServicesItems0) contextValidateAgents(ctx context.Con return err } } + } return nil @@ -792,6 +809,7 @@ ListServicesOKBodyServicesItems0AgentsItems0 list services OK body services item swagger:model ListServicesOKBodyServicesItems0AgentsItems0 */ type ListServicesOKBodyServicesItems0AgentsItems0 struct { + // Unique agent identifier. AgentID string `json:"agent_id,omitempty"` @@ -1192,6 +1210,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) ContextValidate(ctx conte } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptions(ctx context.Context, formats strfmt.Registry) error { + if o.AzureOptions != nil { if swag.IsZero(o.AzureOptions) { // not required @@ -1216,6 +1235,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateAzureOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MongoDBOptions != nil { if swag.IsZero(o.MongoDBOptions) { // not required @@ -1240,6 +1260,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMongoDBOpt } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.MysqlOptions != nil { if swag.IsZero(o.MysqlOptions) { // not required @@ -1264,6 +1285,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateMysqlOptio } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidatePostgresqlOptions(ctx context.Context, formats strfmt.Registry) error { + if o.PostgresqlOptions != nil { if swag.IsZero(o.PostgresqlOptions) { // not required @@ -1288,6 +1310,7 @@ func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidatePostgresql } func (o *ListServicesOKBodyServicesItems0AgentsItems0) contextValidateRtaOptions(ctx context.Context, formats strfmt.Registry) error { + if o.RtaOptions != nil { if swag.IsZero(o.RtaOptions) { // not required @@ -1334,6 +1357,7 @@ ListServicesOKBodyServicesItems0AgentsItems0AzureOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0AzureOptions */ type ListServicesOKBodyServicesItems0AgentsItems0AzureOptions struct { + // Azure client ID. ClientID string `json:"client_id,omitempty"` @@ -1383,6 +1407,7 @@ ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions list services OK body swagger:model ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MongoDBOptions struct { + // True if TLS certificate is set. IsTLSCertificateKeySet bool `json:"is_tls_certificate_key_set,omitempty"` @@ -1438,6 +1463,7 @@ ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions list services OK body s swagger:model ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0MysqlOptions struct { + // True if TLS key is set. IsTLSKeySet bool `json:"is_tls_key_set,omitempty"` @@ -1478,6 +1504,7 @@ ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions list services OK b swagger:model ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions */ type ListServicesOKBodyServicesItems0AgentsItems0PostgresqlOptions struct { + // True if TLS key is set. IsSslKeySet bool `json:"is_ssl_key_set,omitempty"` @@ -1521,6 +1548,7 @@ ListServicesOKBodyServicesItems0AgentsItems0RtaOptions RTAOptions holds Real-Tim swagger:model ListServicesOKBodyServicesItems0AgentsItems0RtaOptions */ type ListServicesOKBodyServicesItems0AgentsItems0RtaOptions struct { + // Query collect interval (default 2s is set by server). CollectInterval string `json:"collect_interval,omitempty"` } diff --git a/api/management/v1/json/client/management_service/register_node_parameters.go b/api/management/v1/json/client/management_service/register_node_parameters.go index a614118a70b..5de06b5b324 100644 --- a/api/management/v1/json/client/management_service/register_node_parameters.go +++ b/api/management/v1/json/client/management_service/register_node_parameters.go @@ -60,6 +60,7 @@ RegisterNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RegisterNodeParams struct { + // Body. Body RegisterNodeBody @@ -129,6 +130,7 @@ func (o *RegisterNodeParams) SetBody(body RegisterNodeBody) { // WriteToRequest writes these params to a swagger request func (o *RegisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/register_node_responses.go b/api/management/v1/json/client/management_service/register_node_responses.go index f4c682e05e9..dca9952fe43 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 @@ -105,6 +105,7 @@ func (o *RegisterNodeOK) GetPayload() *RegisterNodeOKBody { } func (o *RegisterNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RegisterNodeOKBody) // response payload @@ -178,6 +179,7 @@ func (o *RegisterNodeDefault) GetPayload() *RegisterNodeDefaultBody { } func (o *RegisterNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RegisterNodeDefaultBody) // response payload @@ -193,6 +195,7 @@ RegisterNodeBody register node body swagger:model RegisterNodeBody */ type RegisterNodeBody struct { + // NodeType describes supported Node types. // Enum: ["NODE_TYPE_UNSPECIFIED","NODE_TYPE_GENERIC_NODE","NODE_TYPE_CONTAINER_NODE","NODE_TYPE_REMOTE_NODE","NODE_TYPE_REMOTE_RDS_NODE","NODE_TYPE_REMOTE_AZURE_DATABASE_NODE"] NodeType *string `json:"node_type,omitempty"` @@ -395,6 +398,7 @@ RegisterNodeDefaultBody register node default body swagger:model RegisterNodeDefaultBody */ type RegisterNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -464,7 +468,9 @@ func (o *RegisterNodeDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -484,6 +490,7 @@ func (o *RegisterNodeDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -512,6 +519,7 @@ RegisterNodeDefaultBodyDetailsItems0 register node default body details items0 swagger:model RegisterNodeDefaultBodyDetailsItems0 */ type RegisterNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -523,6 +531,7 @@ type RegisterNodeDefaultBodyDetailsItems0 struct { func (o *RegisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -560,6 +569,7 @@ func (o *RegisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RegisterNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -623,6 +633,7 @@ RegisterNodeOKBody register node OK body swagger:model RegisterNodeOKBody */ type RegisterNodeOKBody struct { + // Token represents token for vmagent auth config. Token string `json:"token,omitempty"` @@ -753,6 +764,7 @@ func (o *RegisterNodeOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, formats strfmt.Registry) error { + if o.ContainerNode != nil { if swag.IsZero(o.ContainerNode) { // not required @@ -777,6 +789,7 @@ func (o *RegisterNodeOKBody) contextValidateContainerNode(ctx context.Context, f } func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, formats strfmt.Registry) error { + if o.GenericNode != nil { if swag.IsZero(o.GenericNode) { // not required @@ -801,6 +814,7 @@ func (o *RegisterNodeOKBody) contextValidateGenericNode(ctx context.Context, for } func (o *RegisterNodeOKBody) contextValidatePMMAgent(ctx context.Context, formats strfmt.Registry) error { + if o.PMMAgent != nil { if swag.IsZero(o.PMMAgent) { // not required @@ -847,6 +861,7 @@ RegisterNodeOKBodyContainerNode ContainerNode represents a Docker container. swagger:model RegisterNodeOKBodyContainerNode */ type RegisterNodeOKBodyContainerNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -914,6 +929,7 @@ RegisterNodeOKBodyGenericNode GenericNode represents a bare metal server or virt swagger:model RegisterNodeOKBodyGenericNode */ type RegisterNodeOKBodyGenericNode struct { + // Unique randomly generated instance identifier. NodeID string `json:"node_id,omitempty"` @@ -978,6 +994,7 @@ RegisterNodeOKBodyPMMAgent PMMAgent runs on Generic or Container Node. swagger:model RegisterNodeOKBodyPMMAgent */ type RegisterNodeOKBodyPMMAgent struct { + // Unique randomly generated instance identifier. AgentID string `json:"agent_id,omitempty"` diff --git a/api/management/v1/json/client/management_service/remove_service_parameters.go b/api/management/v1/json/client/management_service/remove_service_parameters.go index 16511c1b2e4..7700f224248 100644 --- a/api/management/v1/json/client/management_service/remove_service_parameters.go +++ b/api/management/v1/json/client/management_service/remove_service_parameters.go @@ -60,6 +60,7 @@ RemoveServiceParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type RemoveServiceParams struct { + /* ServiceID. Either a Service ID or a Service Name. @@ -91,7 +92,9 @@ func (o *RemoveServiceParams) WithDefaults() *RemoveServiceParams { // // All values with no default are reset to their zero value. func (o *RemoveServiceParams) SetDefaults() { - serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + var ( + serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") + ) val := RemoveServiceParams{ ServiceType: &serviceTypeDefault, @@ -160,6 +163,7 @@ func (o *RemoveServiceParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -180,6 +184,7 @@ func (o *RemoveServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt } qServiceType := qrServiceType if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/remove_service_responses.go b/api/management/v1/json/client/management_service/remove_service_responses.go index b9b54fc46ba..04adf4f9132 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 @@ -104,6 +104,7 @@ func (o *RemoveServiceOK) GetPayload() any { } func (o *RemoveServiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *RemoveServiceDefault) GetPayload() *RemoveServiceDefaultBody { } func (o *RemoveServiceDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(RemoveServiceDefaultBody) // response payload @@ -190,6 +192,7 @@ RemoveServiceDefaultBody remove service default body swagger:model RemoveServiceDefaultBody */ type RemoveServiceDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *RemoveServiceDefaultBody) ContextValidate(ctx context.Context, formats } func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *RemoveServiceDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -307,6 +313,7 @@ RemoveServiceDefaultBodyDetailsItems0 remove service default body details items0 swagger:model RemoveServiceDefaultBodyDetailsItems0 */ type RemoveServiceDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type RemoveServiceDefaultBodyDetailsItems0 struct { func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *RemoveServiceDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o RemoveServiceDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/management/v1/json/client/management_service/unregister_node_parameters.go b/api/management/v1/json/client/management_service/unregister_node_parameters.go index 069530e44b2..21d279574a5 100644 --- a/api/management/v1/json/client/management_service/unregister_node_parameters.go +++ b/api/management/v1/json/client/management_service/unregister_node_parameters.go @@ -61,6 +61,7 @@ UnregisterNodeParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UnregisterNodeParams struct { + /* Force. Force delete node, related service account, even if it has more service tokens attached. @@ -150,6 +151,7 @@ func (o *UnregisterNodeParams) SetNodeID(nodeID string) { // WriteToRequest writes these params to a swagger request func (o *UnregisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *UnregisterNodeParams) WriteToRequest(r runtime.ClientRequest, reg strfm } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } diff --git a/api/management/v1/json/client/management_service/unregister_node_responses.go b/api/management/v1/json/client/management_service/unregister_node_responses.go index a935e26136f..baa8ef3d866 100644 --- a/api/management/v1/json/client/management_service/unregister_node_responses.go +++ b/api/management/v1/json/client/management_service/unregister_node_responses.go @@ -104,6 +104,7 @@ func (o *UnregisterNodeOK) GetPayload() *UnregisterNodeOKBody { } func (o *UnregisterNodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UnregisterNodeOKBody) // response payload @@ -177,6 +178,7 @@ func (o *UnregisterNodeDefault) GetPayload() *UnregisterNodeDefaultBody { } func (o *UnregisterNodeDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UnregisterNodeDefaultBody) // response payload @@ -192,6 +194,7 @@ UnregisterNodeDefaultBody unregister node default body swagger:model UnregisterNodeDefaultBody */ type UnregisterNodeDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *UnregisterNodeDefaultBody) ContextValidate(ctx context.Context, formats } func (o *UnregisterNodeDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *UnregisterNodeDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -309,6 +315,7 @@ UnregisterNodeDefaultBodyDetailsItems0 unregister node default body details item swagger:model UnregisterNodeDefaultBodyDetailsItems0 */ type UnregisterNodeDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type UnregisterNodeDefaultBodyDetailsItems0 struct { func (o *UnregisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *UnregisterNodeDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o UnregisterNodeDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ UnregisterNodeOKBody unregister node OK body swagger:model UnregisterNodeOKBody */ type UnregisterNodeOKBody struct { + // Warning message if there are more service tokens attached to service account. Warning string `json:"warning,omitempty"` } diff --git a/api/management/v1/metrics.pb.go b/api/management/v1/metrics.pb.go index af41e8e2ebb..4e15adc6171 100644 --- a/api/management/v1/metrics.pb.go +++ b/api/management/v1/metrics.pb.go @@ -7,12 +7,11 @@ package managementv1 import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -97,13 +96,10 @@ func file_management_v1_metrics_proto_rawDescGZIP() []byte { return file_management_v1_metrics_proto_rawDescData } -var ( - file_management_v1_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_metrics_proto_goTypes = []any{ - (MetricsMode)(0), // 0: management.v1.MetricsMode - } -) - +var file_management_v1_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_metrics_proto_goTypes = []any{ + (MetricsMode)(0), // 0: management.v1.MetricsMode +} var file_management_v1_metrics_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/management/v1/metrics.swagger.json b/api/management/v1/metrics.swagger.json new file mode 100644 index 00000000000..48c8c4ec4ca --- /dev/null +++ b/api/management/v1/metrics.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/metrics.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/mongodb.pb.go b/api/management/v1/mongodb.pb.go index 5fc9584c35c..371190431cf 100644 --- a/api/management/v1/mongodb.pb.go +++ b/api/management/v1/mongodb.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -530,23 +528,20 @@ func file_management_v1_mongodb_proto_rawDescGZIP() []byte { return file_management_v1_mongodb_proto_rawDescData } -var ( - file_management_v1_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_mongodb_proto_goTypes = []any{ - (*AddMongoDBServiceParams)(nil), // 0: management.v1.AddMongoDBServiceParams - (*MongoDBServiceResult)(nil), // 1: management.v1.MongoDBServiceResult - nil, // 2: management.v1.AddMongoDBServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.MongoDBService)(nil), // 6: inventory.v1.MongoDBService - (*v1.MongoDBExporter)(nil), // 7: inventory.v1.MongoDBExporter - (*v1.QANMongoDBProfilerAgent)(nil), // 8: inventory.v1.QANMongoDBProfilerAgent - (*v1.QANMongoDBMongologAgent)(nil), // 9: inventory.v1.QANMongoDBMongologAgent - (*v1.RTAMongoDBAgent)(nil), // 10: inventory.v1.RTAMongoDBAgent - } -) - +var file_management_v1_mongodb_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_mongodb_proto_goTypes = []any{ + (*AddMongoDBServiceParams)(nil), // 0: management.v1.AddMongoDBServiceParams + (*MongoDBServiceResult)(nil), // 1: management.v1.MongoDBServiceResult + nil, // 2: management.v1.AddMongoDBServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.MongoDBService)(nil), // 6: inventory.v1.MongoDBService + (*v1.MongoDBExporter)(nil), // 7: inventory.v1.MongoDBExporter + (*v1.QANMongoDBProfilerAgent)(nil), // 8: inventory.v1.QANMongoDBProfilerAgent + (*v1.QANMongoDBMongologAgent)(nil), // 9: inventory.v1.QANMongoDBMongologAgent + (*v1.RTAMongoDBAgent)(nil), // 10: inventory.v1.RTAMongoDBAgent +} var file_management_v1_mongodb_proto_depIdxs = []int32{ 3, // 0: management.v1.AddMongoDBServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddMongoDBServiceParams.custom_labels:type_name -> management.v1.AddMongoDBServiceParams.CustomLabelsEntry diff --git a/api/management/v1/mongodb.swagger.json b/api/management/v1/mongodb.swagger.json new file mode 100644 index 00000000000..2722b769cf7 --- /dev/null +++ b/api/management/v1/mongodb.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/mongodb.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/mysql.pb.go b/api/management/v1/mysql.pb.go index 880618f4403..97ee6ed09fb 100644 --- a/api/management/v1/mysql.pb.go +++ b/api/management/v1/mysql.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -516,23 +514,20 @@ func file_management_v1_mysql_proto_rawDescGZIP() []byte { return file_management_v1_mysql_proto_rawDescData } -var ( - file_management_v1_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 4) - file_management_v1_mysql_proto_goTypes = []any{ - (*AddMySQLServiceParams)(nil), // 0: management.v1.AddMySQLServiceParams - (*MySQLServiceResult)(nil), // 1: management.v1.MySQLServiceResult - nil, // 2: management.v1.AddMySQLServiceParams.CustomLabelsEntry - nil, // 3: management.v1.AddMySQLServiceParams.ExtraDsnParamsEntry - (*AddNodeParams)(nil), // 4: management.v1.AddNodeParams - (MetricsMode)(0), // 5: management.v1.MetricsMode - (v1.LogLevel)(0), // 6: inventory.v1.LogLevel - (*v1.MySQLService)(nil), // 7: inventory.v1.MySQLService - (*v1.MySQLdExporter)(nil), // 8: inventory.v1.MySQLdExporter - (*v1.QANMySQLPerfSchemaAgent)(nil), // 9: inventory.v1.QANMySQLPerfSchemaAgent - (*v1.QANMySQLSlowlogAgent)(nil), // 10: inventory.v1.QANMySQLSlowlogAgent - } -) - +var file_management_v1_mysql_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_management_v1_mysql_proto_goTypes = []any{ + (*AddMySQLServiceParams)(nil), // 0: management.v1.AddMySQLServiceParams + (*MySQLServiceResult)(nil), // 1: management.v1.MySQLServiceResult + nil, // 2: management.v1.AddMySQLServiceParams.CustomLabelsEntry + nil, // 3: management.v1.AddMySQLServiceParams.ExtraDsnParamsEntry + (*AddNodeParams)(nil), // 4: management.v1.AddNodeParams + (MetricsMode)(0), // 5: management.v1.MetricsMode + (v1.LogLevel)(0), // 6: inventory.v1.LogLevel + (*v1.MySQLService)(nil), // 7: inventory.v1.MySQLService + (*v1.MySQLdExporter)(nil), // 8: inventory.v1.MySQLdExporter + (*v1.QANMySQLPerfSchemaAgent)(nil), // 9: inventory.v1.QANMySQLPerfSchemaAgent + (*v1.QANMySQLSlowlogAgent)(nil), // 10: inventory.v1.QANMySQLSlowlogAgent +} var file_management_v1_mysql_proto_depIdxs = []int32{ 4, // 0: management.v1.AddMySQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddMySQLServiceParams.custom_labels:type_name -> management.v1.AddMySQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/mysql.swagger.json b/api/management/v1/mysql.swagger.json new file mode 100644 index 00000000000..f0be3fa24f2 --- /dev/null +++ b/api/management/v1/mysql.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/mysql.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/node.pb.go b/api/management/v1/node.pb.go index 8915b579dfd..de24278803f 100644 --- a/api/management/v1/node.pb.go +++ b/api/management/v1/node.pb.go @@ -7,16 +7,14 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -1226,35 +1224,32 @@ func file_management_v1_node_proto_rawDescGZIP() []byte { return file_management_v1_node_proto_rawDescData } -var ( - file_management_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 15) - file_management_v1_node_proto_goTypes = []any{ - (UniversalNode_Status)(0), // 0: management.v1.UniversalNode.Status - (*AddNodeParams)(nil), // 1: management.v1.AddNodeParams - (*RegisterNodeRequest)(nil), // 2: management.v1.RegisterNodeRequest - (*RegisterNodeResponse)(nil), // 3: management.v1.RegisterNodeResponse - (*UnregisterNodeRequest)(nil), // 4: management.v1.UnregisterNodeRequest - (*UnregisterNodeResponse)(nil), // 5: management.v1.UnregisterNodeResponse - (*UniversalNode)(nil), // 6: management.v1.UniversalNode - (*ListNodesRequest)(nil), // 7: management.v1.ListNodesRequest - (*ListNodesResponse)(nil), // 8: management.v1.ListNodesResponse - (*GetNodeRequest)(nil), // 9: management.v1.GetNodeRequest - (*GetNodeResponse)(nil), // 10: management.v1.GetNodeResponse - nil, // 11: management.v1.AddNodeParams.CustomLabelsEntry - nil, // 12: management.v1.RegisterNodeRequest.CustomLabelsEntry - (*UniversalNode_Service)(nil), // 13: management.v1.UniversalNode.Service - (*UniversalNode_Agent)(nil), // 14: management.v1.UniversalNode.Agent - nil, // 15: management.v1.UniversalNode.CustomLabelsEntry - (v1.NodeType)(0), // 16: inventory.v1.NodeType - (MetricsMode)(0), // 17: management.v1.MetricsMode - (*v1.GenericNode)(nil), // 18: inventory.v1.GenericNode - (*v1.ContainerNode)(nil), // 19: inventory.v1.ContainerNode - (*v1.PMMAgent)(nil), // 20: inventory.v1.PMMAgent - (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp - } -) - +var file_management_v1_node_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_node_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_management_v1_node_proto_goTypes = []any{ + (UniversalNode_Status)(0), // 0: management.v1.UniversalNode.Status + (*AddNodeParams)(nil), // 1: management.v1.AddNodeParams + (*RegisterNodeRequest)(nil), // 2: management.v1.RegisterNodeRequest + (*RegisterNodeResponse)(nil), // 3: management.v1.RegisterNodeResponse + (*UnregisterNodeRequest)(nil), // 4: management.v1.UnregisterNodeRequest + (*UnregisterNodeResponse)(nil), // 5: management.v1.UnregisterNodeResponse + (*UniversalNode)(nil), // 6: management.v1.UniversalNode + (*ListNodesRequest)(nil), // 7: management.v1.ListNodesRequest + (*ListNodesResponse)(nil), // 8: management.v1.ListNodesResponse + (*GetNodeRequest)(nil), // 9: management.v1.GetNodeRequest + (*GetNodeResponse)(nil), // 10: management.v1.GetNodeResponse + nil, // 11: management.v1.AddNodeParams.CustomLabelsEntry + nil, // 12: management.v1.RegisterNodeRequest.CustomLabelsEntry + (*UniversalNode_Service)(nil), // 13: management.v1.UniversalNode.Service + (*UniversalNode_Agent)(nil), // 14: management.v1.UniversalNode.Agent + nil, // 15: management.v1.UniversalNode.CustomLabelsEntry + (v1.NodeType)(0), // 16: inventory.v1.NodeType + (MetricsMode)(0), // 17: management.v1.MetricsMode + (*v1.GenericNode)(nil), // 18: inventory.v1.GenericNode + (*v1.ContainerNode)(nil), // 19: inventory.v1.ContainerNode + (*v1.PMMAgent)(nil), // 20: inventory.v1.PMMAgent + (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp +} var file_management_v1_node_proto_depIdxs = []int32{ 16, // 0: management.v1.AddNodeParams.node_type:type_name -> inventory.v1.NodeType 11, // 1: management.v1.AddNodeParams.custom_labels:type_name -> management.v1.AddNodeParams.CustomLabelsEntry diff --git a/api/management/v1/node.swagger.json b/api/management/v1/node.swagger.json new file mode 100644 index 00000000000..87f7e2581d0 --- /dev/null +++ b/api/management/v1/node.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/node.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/postgresql.pb.go b/api/management/v1/postgresql.pb.go index 20b9fe29eaf..d575b00544a 100644 --- a/api/management/v1/postgresql.pb.go +++ b/api/management/v1/postgresql.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -507,22 +505,19 @@ func file_management_v1_postgresql_proto_rawDescGZIP() []byte { return file_management_v1_postgresql_proto_rawDescData } -var ( - file_management_v1_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_postgresql_proto_goTypes = []any{ - (*AddPostgreSQLServiceParams)(nil), // 0: management.v1.AddPostgreSQLServiceParams - (*PostgreSQLServiceResult)(nil), // 1: management.v1.PostgreSQLServiceResult - nil, // 2: management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.PostgreSQLService)(nil), // 6: inventory.v1.PostgreSQLService - (*v1.PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter - (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.v1.QANPostgreSQLPgStatementsAgent - (*v1.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.v1.QANPostgreSQLPgStatMonitorAgent - } -) - +var file_management_v1_postgresql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_postgresql_proto_goTypes = []any{ + (*AddPostgreSQLServiceParams)(nil), // 0: management.v1.AddPostgreSQLServiceParams + (*PostgreSQLServiceResult)(nil), // 1: management.v1.PostgreSQLServiceResult + nil, // 2: management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.PostgreSQLService)(nil), // 6: inventory.v1.PostgreSQLService + (*v1.PostgresExporter)(nil), // 7: inventory.v1.PostgresExporter + (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 8: inventory.v1.QANPostgreSQLPgStatementsAgent + (*v1.QANPostgreSQLPgStatMonitorAgent)(nil), // 9: inventory.v1.QANPostgreSQLPgStatMonitorAgent +} var file_management_v1_postgresql_proto_depIdxs = []int32{ 3, // 0: management.v1.AddPostgreSQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddPostgreSQLServiceParams.custom_labels:type_name -> management.v1.AddPostgreSQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/postgresql.swagger.json b/api/management/v1/postgresql.swagger.json new file mode 100644 index 00000000000..a4694fd37f7 --- /dev/null +++ b/api/management/v1/postgresql.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/postgresql.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/proxysql.pb.go b/api/management/v1/proxysql.pb.go index df8c4011336..e9d5678db43 100644 --- a/api/management/v1/proxysql.pb.go +++ b/api/management/v1/proxysql.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -369,20 +367,17 @@ func file_management_v1_proxysql_proto_rawDescGZIP() []byte { return file_management_v1_proxysql_proto_rawDescData } -var ( - file_management_v1_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_proxysql_proto_goTypes = []any{ - (*AddProxySQLServiceParams)(nil), // 0: management.v1.AddProxySQLServiceParams - (*ProxySQLServiceResult)(nil), // 1: management.v1.ProxySQLServiceResult - nil, // 2: management.v1.AddProxySQLServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.ProxySQLService)(nil), // 6: inventory.v1.ProxySQLService - (*v1.ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter - } -) - +var file_management_v1_proxysql_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_proxysql_proto_goTypes = []any{ + (*AddProxySQLServiceParams)(nil), // 0: management.v1.AddProxySQLServiceParams + (*ProxySQLServiceResult)(nil), // 1: management.v1.ProxySQLServiceResult + nil, // 2: management.v1.AddProxySQLServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.ProxySQLService)(nil), // 6: inventory.v1.ProxySQLService + (*v1.ProxySQLExporter)(nil), // 7: inventory.v1.ProxySQLExporter +} var file_management_v1_proxysql_proto_depIdxs = []int32{ 3, // 0: management.v1.AddProxySQLServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddProxySQLServiceParams.custom_labels:type_name -> management.v1.AddProxySQLServiceParams.CustomLabelsEntry diff --git a/api/management/v1/proxysql.swagger.json b/api/management/v1/proxysql.swagger.json new file mode 100644 index 00000000000..64f40cbe45f --- /dev/null +++ b/api/management/v1/proxysql.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/proxysql.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/rds.pb.go b/api/management/v1/rds.pb.go index 6f8449b00ab..fd77ebf9cb3 100644 --- a/api/management/v1/rds.pb.go +++ b/api/management/v1/rds.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -819,29 +817,26 @@ func file_management_v1_rds_proto_rawDescGZIP() []byte { return file_management_v1_rds_proto_rawDescData } -var ( - file_management_v1_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_management_v1_rds_proto_goTypes = []any{ - (DiscoverRDSEngine)(0), // 0: management.v1.DiscoverRDSEngine - (*DiscoverRDSInstance)(nil), // 1: management.v1.DiscoverRDSInstance - (*DiscoverRDSRequest)(nil), // 2: management.v1.DiscoverRDSRequest - (*DiscoverRDSResponse)(nil), // 3: management.v1.DiscoverRDSResponse - (*AddRDSServiceParams)(nil), // 4: management.v1.AddRDSServiceParams - (*RDSServiceResult)(nil), // 5: management.v1.RDSServiceResult - nil, // 6: management.v1.AddRDSServiceParams.CustomLabelsEntry - (MetricsMode)(0), // 7: management.v1.MetricsMode - (*v1.RemoteRDSNode)(nil), // 8: inventory.v1.RemoteRDSNode - (*v1.RDSExporter)(nil), // 9: inventory.v1.RDSExporter - (*v1.MySQLService)(nil), // 10: inventory.v1.MySQLService - (*v1.MySQLdExporter)(nil), // 11: inventory.v1.MySQLdExporter - (*v1.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.v1.QANMySQLPerfSchemaAgent - (*v1.PostgreSQLService)(nil), // 13: inventory.v1.PostgreSQLService - (*v1.PostgresExporter)(nil), // 14: inventory.v1.PostgresExporter - (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.v1.QANPostgreSQLPgStatementsAgent - } -) - +var file_management_v1_rds_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_rds_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_management_v1_rds_proto_goTypes = []any{ + (DiscoverRDSEngine)(0), // 0: management.v1.DiscoverRDSEngine + (*DiscoverRDSInstance)(nil), // 1: management.v1.DiscoverRDSInstance + (*DiscoverRDSRequest)(nil), // 2: management.v1.DiscoverRDSRequest + (*DiscoverRDSResponse)(nil), // 3: management.v1.DiscoverRDSResponse + (*AddRDSServiceParams)(nil), // 4: management.v1.AddRDSServiceParams + (*RDSServiceResult)(nil), // 5: management.v1.RDSServiceResult + nil, // 6: management.v1.AddRDSServiceParams.CustomLabelsEntry + (MetricsMode)(0), // 7: management.v1.MetricsMode + (*v1.RemoteRDSNode)(nil), // 8: inventory.v1.RemoteRDSNode + (*v1.RDSExporter)(nil), // 9: inventory.v1.RDSExporter + (*v1.MySQLService)(nil), // 10: inventory.v1.MySQLService + (*v1.MySQLdExporter)(nil), // 11: inventory.v1.MySQLdExporter + (*v1.QANMySQLPerfSchemaAgent)(nil), // 12: inventory.v1.QANMySQLPerfSchemaAgent + (*v1.PostgreSQLService)(nil), // 13: inventory.v1.PostgreSQLService + (*v1.PostgresExporter)(nil), // 14: inventory.v1.PostgresExporter + (*v1.QANPostgreSQLPgStatementsAgent)(nil), // 15: inventory.v1.QANPostgreSQLPgStatementsAgent +} var file_management_v1_rds_proto_depIdxs = []int32{ 0, // 0: management.v1.DiscoverRDSInstance.engine:type_name -> management.v1.DiscoverRDSEngine 1, // 1: management.v1.DiscoverRDSResponse.rds_instances:type_name -> management.v1.DiscoverRDSInstance diff --git a/api/management/v1/rds.swagger.json b/api/management/v1/rds.swagger.json new file mode 100644 index 00000000000..a03802476a3 --- /dev/null +++ b/api/management/v1/rds.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/rds.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/service.pb.go b/api/management/v1/service.pb.go index b1c2fa98c9a..20ab0da7230 100644 --- a/api/management/v1/service.pb.go +++ b/api/management/v1/service.pb.go @@ -7,17 +7,15 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -951,61 +949,58 @@ func file_management_v1_service_proto_rawDescGZIP() []byte { return file_management_v1_service_proto_rawDescData } -var ( - file_management_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) - file_management_v1_service_proto_goTypes = []any{ - (UniversalService_Status)(0), // 0: management.v1.UniversalService.Status - (*AddServiceRequest)(nil), // 1: management.v1.AddServiceRequest - (*AddServiceResponse)(nil), // 2: management.v1.AddServiceResponse - (*RemoveServiceRequest)(nil), // 3: management.v1.RemoveServiceRequest - (*RemoveServiceResponse)(nil), // 4: management.v1.RemoveServiceResponse - (*UniversalService)(nil), // 5: management.v1.UniversalService - (*ListServicesRequest)(nil), // 6: management.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 7: management.v1.ListServicesResponse - nil, // 8: management.v1.UniversalService.CustomLabelsEntry - (*AddMySQLServiceParams)(nil), // 9: management.v1.AddMySQLServiceParams - (*AddMongoDBServiceParams)(nil), // 10: management.v1.AddMongoDBServiceParams - (*AddPostgreSQLServiceParams)(nil), // 11: management.v1.AddPostgreSQLServiceParams - (*AddProxySQLServiceParams)(nil), // 12: management.v1.AddProxySQLServiceParams - (*AddHAProxyServiceParams)(nil), // 13: management.v1.AddHAProxyServiceParams - (*AddExternalServiceParams)(nil), // 14: management.v1.AddExternalServiceParams - (*AddRDSServiceParams)(nil), // 15: management.v1.AddRDSServiceParams - (*AddValkeyServiceParams)(nil), // 16: management.v1.AddValkeyServiceParams - (*MySQLServiceResult)(nil), // 17: management.v1.MySQLServiceResult - (*MongoDBServiceResult)(nil), // 18: management.v1.MongoDBServiceResult - (*PostgreSQLServiceResult)(nil), // 19: management.v1.PostgreSQLServiceResult - (*ProxySQLServiceResult)(nil), // 20: management.v1.ProxySQLServiceResult - (*HAProxyServiceResult)(nil), // 21: management.v1.HAProxyServiceResult - (*ExternalServiceResult)(nil), // 22: management.v1.ExternalServiceResult - (*RDSServiceResult)(nil), // 23: management.v1.RDSServiceResult - (*ValkeyServiceResult)(nil), // 24: management.v1.ValkeyServiceResult - (v1.ServiceType)(0), // 25: inventory.v1.ServiceType - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - (*UniversalAgent)(nil), // 27: management.v1.UniversalAgent - (*AddAnnotationRequest)(nil), // 28: management.v1.AddAnnotationRequest - (*ListAgentsRequest)(nil), // 29: management.v1.ListAgentsRequest - (*ListAgentVersionsRequest)(nil), // 30: management.v1.ListAgentVersionsRequest - (*RegisterNodeRequest)(nil), // 31: management.v1.RegisterNodeRequest - (*UnregisterNodeRequest)(nil), // 32: management.v1.UnregisterNodeRequest - (*ListNodesRequest)(nil), // 33: management.v1.ListNodesRequest - (*GetNodeRequest)(nil), // 34: management.v1.GetNodeRequest - (*DiscoverRDSRequest)(nil), // 35: management.v1.DiscoverRDSRequest - (*DiscoverAzureDatabaseRequest)(nil), // 36: management.v1.DiscoverAzureDatabaseRequest - (*AddAzureDatabaseRequest)(nil), // 37: management.v1.AddAzureDatabaseRequest - (*AddAnnotationResponse)(nil), // 38: management.v1.AddAnnotationResponse - (*ListAgentsResponse)(nil), // 39: management.v1.ListAgentsResponse - (*ListAgentVersionsResponse)(nil), // 40: management.v1.ListAgentVersionsResponse - (*RegisterNodeResponse)(nil), // 41: management.v1.RegisterNodeResponse - (*UnregisterNodeResponse)(nil), // 42: management.v1.UnregisterNodeResponse - (*ListNodesResponse)(nil), // 43: management.v1.ListNodesResponse - (*GetNodeResponse)(nil), // 44: management.v1.GetNodeResponse - (*DiscoverRDSResponse)(nil), // 45: management.v1.DiscoverRDSResponse - (*DiscoverAzureDatabaseResponse)(nil), // 46: management.v1.DiscoverAzureDatabaseResponse - (*AddAzureDatabaseResponse)(nil), // 47: management.v1.AddAzureDatabaseResponse - } -) - +var file_management_v1_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_management_v1_service_proto_goTypes = []any{ + (UniversalService_Status)(0), // 0: management.v1.UniversalService.Status + (*AddServiceRequest)(nil), // 1: management.v1.AddServiceRequest + (*AddServiceResponse)(nil), // 2: management.v1.AddServiceResponse + (*RemoveServiceRequest)(nil), // 3: management.v1.RemoveServiceRequest + (*RemoveServiceResponse)(nil), // 4: management.v1.RemoveServiceResponse + (*UniversalService)(nil), // 5: management.v1.UniversalService + (*ListServicesRequest)(nil), // 6: management.v1.ListServicesRequest + (*ListServicesResponse)(nil), // 7: management.v1.ListServicesResponse + nil, // 8: management.v1.UniversalService.CustomLabelsEntry + (*AddMySQLServiceParams)(nil), // 9: management.v1.AddMySQLServiceParams + (*AddMongoDBServiceParams)(nil), // 10: management.v1.AddMongoDBServiceParams + (*AddPostgreSQLServiceParams)(nil), // 11: management.v1.AddPostgreSQLServiceParams + (*AddProxySQLServiceParams)(nil), // 12: management.v1.AddProxySQLServiceParams + (*AddHAProxyServiceParams)(nil), // 13: management.v1.AddHAProxyServiceParams + (*AddExternalServiceParams)(nil), // 14: management.v1.AddExternalServiceParams + (*AddRDSServiceParams)(nil), // 15: management.v1.AddRDSServiceParams + (*AddValkeyServiceParams)(nil), // 16: management.v1.AddValkeyServiceParams + (*MySQLServiceResult)(nil), // 17: management.v1.MySQLServiceResult + (*MongoDBServiceResult)(nil), // 18: management.v1.MongoDBServiceResult + (*PostgreSQLServiceResult)(nil), // 19: management.v1.PostgreSQLServiceResult + (*ProxySQLServiceResult)(nil), // 20: management.v1.ProxySQLServiceResult + (*HAProxyServiceResult)(nil), // 21: management.v1.HAProxyServiceResult + (*ExternalServiceResult)(nil), // 22: management.v1.ExternalServiceResult + (*RDSServiceResult)(nil), // 23: management.v1.RDSServiceResult + (*ValkeyServiceResult)(nil), // 24: management.v1.ValkeyServiceResult + (v1.ServiceType)(0), // 25: inventory.v1.ServiceType + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp + (*UniversalAgent)(nil), // 27: management.v1.UniversalAgent + (*AddAnnotationRequest)(nil), // 28: management.v1.AddAnnotationRequest + (*ListAgentsRequest)(nil), // 29: management.v1.ListAgentsRequest + (*ListAgentVersionsRequest)(nil), // 30: management.v1.ListAgentVersionsRequest + (*RegisterNodeRequest)(nil), // 31: management.v1.RegisterNodeRequest + (*UnregisterNodeRequest)(nil), // 32: management.v1.UnregisterNodeRequest + (*ListNodesRequest)(nil), // 33: management.v1.ListNodesRequest + (*GetNodeRequest)(nil), // 34: management.v1.GetNodeRequest + (*DiscoverRDSRequest)(nil), // 35: management.v1.DiscoverRDSRequest + (*DiscoverAzureDatabaseRequest)(nil), // 36: management.v1.DiscoverAzureDatabaseRequest + (*AddAzureDatabaseRequest)(nil), // 37: management.v1.AddAzureDatabaseRequest + (*AddAnnotationResponse)(nil), // 38: management.v1.AddAnnotationResponse + (*ListAgentsResponse)(nil), // 39: management.v1.ListAgentsResponse + (*ListAgentVersionsResponse)(nil), // 40: management.v1.ListAgentVersionsResponse + (*RegisterNodeResponse)(nil), // 41: management.v1.RegisterNodeResponse + (*UnregisterNodeResponse)(nil), // 42: management.v1.UnregisterNodeResponse + (*ListNodesResponse)(nil), // 43: management.v1.ListNodesResponse + (*GetNodeResponse)(nil), // 44: management.v1.GetNodeResponse + (*DiscoverRDSResponse)(nil), // 45: management.v1.DiscoverRDSResponse + (*DiscoverAzureDatabaseResponse)(nil), // 46: management.v1.DiscoverAzureDatabaseResponse + (*AddAzureDatabaseResponse)(nil), // 47: management.v1.AddAzureDatabaseResponse +} var file_management_v1_service_proto_depIdxs = []int32{ 9, // 0: management.v1.AddServiceRequest.mysql:type_name -> management.v1.AddMySQLServiceParams 10, // 1: management.v1.AddServiceRequest.mongodb:type_name -> management.v1.AddMongoDBServiceParams diff --git a/api/management/v1/service.swagger.json b/api/management/v1/service.swagger.json new file mode 100644 index 00000000000..a7b39cbf2dc --- /dev/null +++ b/api/management/v1/service.swagger.json @@ -0,0 +1,4495 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ManagementService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/management/agents": { + "get": { + "summary": "List Agents", + "description": "Lists Agents with filter.", + "operationId": "ListAgents", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListAgentsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "service_id", + "description": "Return only Agents that relate to a specific ServiceID.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "node_id", + "description": "Return only Agents that relate to a specific NodeID.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/agents/versions": { + "get": { + "summary": "List Agent Versions", + "description": "Lists Agent versions and their update severity.", + "operationId": "ListAgentVersions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListAgentVersionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/annotations": { + "post": { + "summary": "Add an Annotation", + "description": "Adds an annotation.", + "operationId": "AddAnnotation", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddAnnotationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "AddAnnotationRequest is a params to add new annotation.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddAnnotationRequest" + } + } + ], + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/nodes": { + "get": { + "summary": "List Nodes", + "description": "Lists Nodes with filter.", + "operationId": "ListNodes", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListNodesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "node_type", + "description": "Node type to be filtered out.", + "in": "query", + "required": false, + "type": "string", + "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" + ], + "default": "NODE_TYPE_UNSPECIFIED" + } + ], + "tags": [ + "ManagementService" + ] + }, + "post": { + "summary": "Register a Node", + "description": "Registers a new Node and a pmm-agent.", + "operationId": "RegisterNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RegisterNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1RegisterNodeRequest" + } + } + ], + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/nodes/{node_id}": { + "get": { + "summary": "Get Node", + "description": "Gets a single Node by ID.", + "operationId": "GetNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "node_id", + "description": "Unique Node identifier.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "ManagementService" + ] + }, + "delete": { + "summary": "Unregister a Node", + "description": "Unregisters a Node and pmm-agent", + "operationId": "UnregisterNode", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UnregisterNodeResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "node_id", + "description": "Node_id to be unregistered.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "force", + "description": "Force delete node, related service account, even if it has more service tokens attached.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/services": { + "get": { + "summary": "List Services", + "description": "Returns a filtered list of Services.", + "operationId": "ListServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "node_id", + "description": "Return only Services running on that Node.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "service_type", + "description": "Return only services filtered by service type.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_VALKEY_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_UNSPECIFIED" + }, + { + "name": "external_group", + "description": "Return only services in this external group.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ManagementService" + ] + }, + "post": { + "summary": "Add a Service", + "description": "Adds a service and starts several agents.", + "operationId": "AddService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddServiceRequest" + } + } + ], + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/services/azure": { + "post": { + "summary": "Add Azure Database", + "description": "Adds an Azure Database instance.", + "operationId": "AddAzureDatabase", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddAzureDatabaseResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddAzureDatabaseRequest" + } + } + ], + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/services/{service_id}": { + "delete": { + "summary": "Remove a Service", + "description": "Removes a Service along with its Agents.", + "operationId": "RemoveService", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveServiceResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "service_id", + "description": "Either a Service ID or a Service Name.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "service_type", + "description": "Service type.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_VALKEY_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_UNSPECIFIED" + } + ], + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/services:discoverAzure": { + "post": { + "summary": "Discover Azure Database", + "description": "Discovers Azure Database for MySQL, MariaDB and PostgreSQL Server instances.", + "operationId": "DiscoverAzureDatabase", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DiscoverAzureDatabaseResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "DiscoverAzureDatabaseRequest discover azure databases request.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1DiscoverAzureDatabaseRequest" + } + } + ], + "tags": [ + "ManagementService" + ] + } + }, + "/v1/management/services:discoverRDS": { + "post": { + "summary": "Discover RDS", + "description": "Discovers RDS instances.", + "operationId": "DiscoverRDS", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1DiscoverRDSResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googleRpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1DiscoverRDSRequest" + } + } + ], + "tags": [ + "ManagementService" + ] + } + } + }, + "definitions": { + "UniversalAgentAzureOptions": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "description": "Azure client ID." + }, + "is_client_secret_set": { + "type": "boolean", + "description": "True if Azure client secret is set." + }, + "resource_group": { + "type": "string", + "description": "Azure resource group." + }, + "subscription_id": { + "type": "string", + "description": "Azure subscription ID." + }, + "tenant_id": { + "type": "string", + "description": "Azure tenant ID." + } + } + }, + "UniversalAgentMongoDBOptions": { + "type": "object", + "properties": { + "is_tls_certificate_key_set": { + "type": "boolean", + "description": "True if TLS certificate is set." + }, + "is_tls_certificate_key_file_password_set": { + "type": "boolean", + "description": "True if TLS certificate file password is set." + }, + "authentication_mechanism": { + "type": "string", + "description": "MongoDB auth mechanism." + }, + "authentication_database": { + "type": "string", + "description": "MongoDB auth database." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "description": "MongoDB stats collections." + }, + "collections_limit": { + "type": "integer", + "format": "int32", + "description": "MongoDB collections limit." + }, + "enable_all_collectors": { + "type": "boolean", + "description": "True if all collectors are enabled." + } + } + }, + "UniversalAgentMySQLOptions": { + "type": "object", + "properties": { + "is_tls_key_set": { + "type": "boolean", + "description": "True if TLS key is set." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + } + }, + "UniversalAgentPostgreSQLOptions": { + "type": "object", + "properties": { + "is_ssl_key_set": { + "type": "boolean", + "description": "True if TLS key is set." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + }, + "max_exporter_connections": { + "type": "integer", + "format": "int32", + "description": "Maximum number of connections from exporter to PostgreSQL instance." + } + } + }, + "UniversalAgentValkeyOptions": { + "type": "object" + }, + "UniversalNodeAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique Agent identifier." + }, + "agent_type": { + "type": "string", + "description": "Agent type." + }, + "status": { + "type": "string", + "description": "Actual Agent status." + }, + "is_connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + } + } + }, + "UniversalNodeService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique Service identifier." + }, + "service_type": { + "type": "string", + "description": "Service type." + }, + "service_name": { + "type": "string", + "description": "Service name." + } + }, + "description": "Service represents a service running on a node." + }, + "commonMetricsResolutions": { + "type": "object", + "properties": { + "hr": { + "type": "string", + "description": "High resolution. In JSON should be represented as a string with number of seconds with `s` suffix." + }, + "mr": { + "type": "string", + "description": "Medium resolution. In JSON should be represented as a string with number of seconds with `s` suffix." + }, + "lr": { + "type": "string", + "description": "Low resolution. In JSON should be represented as a string with number of seconds with `s` suffix." + } + }, + "description": "MetricsResolutions represents Prometheus exporters metrics resolutions." + }, + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "v1AddAnnotationRequest": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "An annotation description. Required." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tags are used to filter annotations." + }, + "node_name": { + "type": "string", + "description": "Used for annotating a node." + }, + "service_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Used for annotating services." + } + }, + "description": "AddAnnotationRequest is a params to add new annotation." + }, + "v1AddAnnotationResponse": { + "type": "object" + }, + "v1AddAzureDatabaseRequest": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "Azure database location." + }, + "az": { + "type": "string", + "description": "Azure database availability zone." + }, + "instance_id": { + "type": "string", + "description": "Azure database instance ID." + }, + "node_model": { + "type": "string", + "description": "Represents a purchasable Stock Keeping Unit (SKU) under a product.\nhttps://docs.microsoft.com/en-us/partner-center/develop/product-resources#sku." + }, + "address": { + "type": "string", + "description": "Address used to connect to it." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name. Defaults to Azure Database instance ID." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Defaults to Azure Database instance ID." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "username": { + "type": "string", + "description": "Username for scraping metrics." + }, + "password": { + "type": "string", + "description": "Password for scraping metrics." + }, + "azure_client_id": { + "type": "string", + "description": "Azure client ID." + }, + "azure_client_secret": { + "type": "string", + "description": "Azure client secret." + }, + "azure_tenant_id": { + "type": "string", + "description": "Azure tanant ID." + }, + "azure_subscription_id": { + "type": "string", + "description": "Azure subscription ID." + }, + "azure_resource_group": { + "type": "string", + "description": "Azure resource group." + }, + "azure_database_exporter": { + "type": "boolean", + "description": "If true, adds azure_database_exporter." + }, + "qan": { + "type": "boolean", + "description": "If true, adds qan-mysql-perfschema-agent or qan-postgresql-pgstatements-agent." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node and Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "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": { + "$ref": "#/definitions/v1DiscoverAzureDatabaseType", + "title": "Azure database resource type (mysql, maria, postgres)" + } + } + }, + "v1AddAzureDatabaseResponse": { + "type": "object" + }, + "v1AddExternalServiceParams": { + "type": "object", + "properties": { + "runs_on_node_id": { + "type": "string", + "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." + }, + "node_name": { + "type": "string", + "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." + }, + "add_node": { + "$ref": "#/definitions/v1AddNodeParams", + "description": "Create a new Node with those parameters.\nadd_node should always be passed with address.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "address": { + "type": "string", + "description": "Node and Exporter access address (DNS name or IP).\naddress should always be passed with add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "password": { + "type": "string", + "description": "HTTP basic auth password for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "node_id": { + "type": "string", + "description": "Node identifier on which an external service is been running.\nnode_id should always be passed with runs_on_node_id." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "group": { + "type": "string", + "description": "Group name of external service." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically.\nNode with registered pmm_agent_id must present at pmm-server\nin case of push metrics_mode." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + } + } + }, + "v1AddHAProxyServiceParams": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "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." + }, + "node_name": { + "type": "string", + "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." + }, + "add_node": { + "$ref": "#/definitions/v1AddNodeParams", + "description": "Create a new Node with those parameters.\nadd_node always should be passed with address.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "address": { + "type": "string", + "description": "Node and Exporter access address (DNS name or IP).\naddress always should be passed with add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "password": { + "type": "string", + "description": "HTTP basic auth password for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically.\nNode with registered pmm_agent_id must present at pmm-server\nin case of push metrics_mode." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + } + } + }, + "v1AddMongoDBServiceParams": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "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_name": { + "type": "string", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/v1AddNodeParams", + "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Service Access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "MongoDB username for exporter and QAN agent access." + }, + "password": { + "type": "string", + "description": "MongoDB password for exporter and QAN agent access." + }, + "qan_mongodb_profiler": { + "type": "boolean", + "description": "If true, adds qan-mongodb-profiler-agent for provided service." + }, + "qan_mongodb_mongolog": { + "type": "boolean", + "description": "If true, adds qan-mongodb-mongolog-agent for provided service." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_certificate_key": { + "type": "string", + "description": "Client certificate and key." + }, + "tls_certificate_key_file_password": { + "type": "string", + "description": "Password for decrypting tls_certificate_key." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "authentication_mechanism": { + "type": "string", + "description": "Authentication mechanism.\nSee https://docs.mongodb.com/manual/reference/connection-string/#mongodb-urioption-urioption.authMechanism\nfor details." + }, + "authentication_database": { + "type": "string", + "description": "Authentication database." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collections to get stats from. Can use * ." + }, + "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" + }, + "enable_all_collectors": { + "type": "boolean", + "title": "Enable all collectors" + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "title": "Exporter log level" + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "environment_variable_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Environment variable names to pass to the exporter.\nValues will be resolved from pmm-agent's environment when starting the exporter." + }, + "rta_mongodb_agent": { + "type": "boolean", + "description": "If true, adds Real-Time Analytics agent for the provided service." + } + } + }, + "v1AddMySQLServiceParams": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "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_name": { + "type": "string", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/v1AddNodeParams", + "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Service Access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "MySQL password for scraping metrics." + }, + "qan_mysql_perfschema": { + "type": "boolean", + "description": "If true, adds qan-mysql-perfschema-agent for provided service." + }, + "qan_mysql_slowlog": { + "type": "boolean", + "description": "If true, adds qan-mysql-slowlog-agent for provided service." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "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." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "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." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "title": "Exporter log level" + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "extra DSN parameters to be used for connecting to MySQL." + } + } + }, + "v1AddNodeParams": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/v1NodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + } + }, + "description": "AddNodeParams holds node params and is used to add new node to inventory while adding new service." + }, + "v1AddPostgreSQLServiceParams": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "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_name": { + "type": "string", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/v1AddNodeParams", + "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service Access port.\nPort is required when the address present." + }, + "database": { + "type": "string", + "description": "Database name." + }, + "socket": { + "type": "string", + "description": "Service Access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "PostgreSQL password for scraping metrics." + }, + "qan_postgresql_pgstatements_agent": { + "type": "boolean", + "description": "If true, adds qan-postgresql-pgstatements-agent for provided service." + }, + "qan_postgresql_pgstatmonitor_agent": { + "type": "boolean", + "description": "If true, adds qan-postgresql-pgstatmonitor-agent for provided service." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "title": "Exporter log level" + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit for auto discovery." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "max_exporter_connections": { + "type": "integer", + "format": "int32", + "description": "Maximum number of connections that exporter can open to the database instance." + } + } + }, + "v1AddProxySQLServiceParams": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "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_name": { + "type": "string", + "description": "Node name on which a service is been running.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/v1AddNodeParams", + "description": "Create a new Node with those parameters.\nExactly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Required." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Service Access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "ProxySQL username for scraping metrics." + }, + "password": { + "type": "string", + "description": "ProxySQL password for scraping metrics." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for this exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "title": "Exporter log level" + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + } + } + }, + "v1AddRDSServiceParams": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "AWS region." + }, + "az": { + "type": "string", + "description": "AWS availability zone." + }, + "instance_id": { + "type": "string", + "description": "AWS instance ID." + }, + "node_model": { + "type": "string", + "description": "AWS instance class." + }, + "address": { + "type": "string", + "description": "Address used to connect to it." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port." + }, + "engine": { + "$ref": "#/definitions/v1DiscoverRDSEngine", + "description": "Instance engine." + }, + "pmm_agent_id": { + "type": "string", + "description": "PMM Agent ID." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name. Defaults to AWS instance ID." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name. Defaults to AWS instance ID." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "username": { + "type": "string", + "description": "Username for scraping metrics." + }, + "password": { + "type": "string", + "description": "Password for scraping metrics." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access key." + }, + "aws_secret_key": { + "type": "string", + "description": "AWS Secret key." + }, + "rds_exporter": { + "type": "boolean", + "description": "If true, adds rds_exporter." + }, + "qan_mysql_perfschema": { + "type": "boolean", + "description": "If true, adds qan-mysql-perfschema-agent." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node and Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "disable_query_examples": { + "type": "boolean", + "description": "Disable query examples." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "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." + }, + "disable_basic_metrics": { + "type": "boolean", + "description": "Disable basic metrics." + }, + "disable_enhanced_metrics": { + "type": "boolean", + "description": "Disable enhanced metrics." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for this exporter.\nPush metrics mode is not allowed." + }, + "qan_postgresql_pgstatements": { + "type": "boolean", + "title": "If true, add qan-pgstatements" + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "database": { + "type": "string", + "description": "Database name." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_postgresql_exporter_connections": { + "type": "integer", + "format": "int32", + "description": "Maximum number of exporter connections to PostgreSQL instance." + } + } + }, + "v1AddServiceRequest": { + "type": "object", + "properties": { + "mysql": { + "$ref": "#/definitions/v1AddMySQLServiceParams" + }, + "mongodb": { + "$ref": "#/definitions/v1AddMongoDBServiceParams" + }, + "postgresql": { + "$ref": "#/definitions/v1AddPostgreSQLServiceParams" + }, + "proxysql": { + "$ref": "#/definitions/v1AddProxySQLServiceParams" + }, + "haproxy": { + "$ref": "#/definitions/v1AddHAProxyServiceParams" + }, + "external": { + "$ref": "#/definitions/v1AddExternalServiceParams" + }, + "rds": { + "$ref": "#/definitions/v1AddRDSServiceParams" + }, + "valkey": { + "$ref": "#/definitions/v1AddValkeyServiceParams" + } + } + }, + "v1AddServiceResponse": { + "type": "object", + "properties": { + "mysql": { + "$ref": "#/definitions/v1MySQLServiceResult" + }, + "mongodb": { + "$ref": "#/definitions/v1MongoDBServiceResult" + }, + "postgresql": { + "$ref": "#/definitions/v1PostgreSQLServiceResult" + }, + "proxysql": { + "$ref": "#/definitions/v1ProxySQLServiceResult" + }, + "haproxy": { + "$ref": "#/definitions/v1HAProxyServiceResult" + }, + "external": { + "$ref": "#/definitions/v1ExternalServiceResult" + }, + "rds": { + "$ref": "#/definitions/v1RDSServiceResult" + }, + "valkey": { + "$ref": "#/definitions/v1ValkeyServiceResult" + } + } + }, + "v1AddValkeyServiceParams": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Node identifier on which the service is running.\nOnly one of these parameters should be present: node_id, node_name, add_node." + }, + "node_name": { + "type": "string", + "description": "Node name on which a service is running.\nOnly one of these parameters should be present: node_id, node_name, add_node." + }, + "add_node": { + "$ref": "#/definitions/v1AddNodeParams", + "description": "Create a new Node with those parameters.\nOnly one of these parameters should be present: node_id, node_name, add_node." + }, + "service_name": { + "type": "string", + "description": "User-defined name, it is required and should be unique across all services." + }, + "address": { + "type": "string", + "description": "Node and Service access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Service access port.\nPort is required when the address is present." + }, + "socket": { + "type": "string", + "description": "Service access socket.\nAddress (and port) or socket is required." + }, + "pmm_agent_id": { + "type": "string", + "description": "The \"pmm-agent\" identifier which should run agents. Required." + }, + "username": { + "type": "string", + "description": "Valkey username for scraping metrics." + }, + "password": { + "type": "string", + "description": "Valkey password for scraping metrics." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "skip_connection_check": { + "type": "boolean", + "description": "Skip connection check." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for connection." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS verification." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for the Valkey exporter.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "title": "Exporter log level" + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "tls_ca": { + "type": "string", + "description": "TLS CA certificate." + }, + "tls_cert": { + "type": "string", + "description": "TLS Certifcate." + }, + "tls_key": { + "type": "string", + "description": "TLS Certificate Key." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + } + } + }, + "v1AgentStatus": { + "type": "string", + "enum": [ + "AGENT_STATUS_UNSPECIFIED", + "AGENT_STATUS_STARTING", + "AGENT_STATUS_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "default": "AGENT_STATUS_UNSPECIFIED", + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\n - AGENT_STATUS_UNKNOWN: Agent is not connected, we don't know anything about it's state." + }, + "v1AgentVersions": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Agent ID." + }, + "version": { + "type": "string", + "description": "Agent version." + }, + "node_name": { + "type": "string", + "description": "Node name where the agent runs." + }, + "severity": { + "$ref": "#/definitions/v1UpdateSeverity", + "description": "Update severity." + } + } + }, + "v1ContainerNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id of the Generic Node where this Container Node runs." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "is_pmm_server_node": { + "type": "boolean", + "description": "True if this node is a PMM Server node (HA mode)." + } + }, + "description": "ContainerNode represents a Docker container." + }, + "v1DiscoverAzureDatabaseInstance": { + "type": "object", + "properties": { + "instance_id": { + "type": "string", + "description": "Azure database instance ID." + }, + "region": { + "type": "string", + "description": "Azure database location." + }, + "service_name": { + "type": "string", + "description": "Azure database server name." + }, + "username": { + "type": "string", + "description": "Database username." + }, + "address": { + "type": "string", + "description": "Address used to connect to it." + }, + "azure_resource_group": { + "type": "string", + "description": "Azure Resource group." + }, + "environment": { + "type": "string", + "description": "Environment tag." + }, + "type": { + "$ref": "#/definitions/v1DiscoverAzureDatabaseType", + "description": "Database type." + }, + "az": { + "type": "string", + "description": "Azure database availability zone." + }, + "node_model": { + "type": "string", + "description": "Represents a purchasable Stock Keeping Unit (SKU) under a product.\nhttps://docs.microsoft.com/en-us/partner-center/develop/product-resources#sku." + } + }, + "description": "DiscoverAzureDatabaseInstance models an unique Azure Database instance for the list of instances returned by Discovery." + }, + "v1DiscoverAzureDatabaseRequest": { + "type": "object", + "properties": { + "azure_client_id": { + "type": "string", + "description": "Azure client ID." + }, + "azure_client_secret": { + "type": "string", + "description": "Azure client secret." + }, + "azure_tenant_id": { + "type": "string", + "description": "Azure tanant ID." + }, + "azure_subscription_id": { + "type": "string", + "description": "Azure subscription ID." + } + }, + "description": "DiscoverAzureDatabaseRequest discover azure databases request." + }, + "v1DiscoverAzureDatabaseResponse": { + "type": "object", + "properties": { + "azure_database_instance": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1DiscoverAzureDatabaseInstance" + } + } + }, + "description": "DiscoverAzureDatabaseResponse discover azure databases response." + }, + "v1DiscoverAzureDatabaseType": { + "type": "string", + "enum": [ + "DISCOVER_AZURE_DATABASE_TYPE_UNSPECIFIED", + "DISCOVER_AZURE_DATABASE_TYPE_MYSQL", + "DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL" + ], + "default": "DISCOVER_AZURE_DATABASE_TYPE_UNSPECIFIED", + "description": "DiscoverAzureDatabaseType describes supported Azure Database instance engines.\n\n - DISCOVER_AZURE_DATABASE_TYPE_MYSQL: MySQL type: microsoft.dbformysql or MariaDB type: microsoft.dbformariadb\n - DISCOVER_AZURE_DATABASE_TYPE_POSTGRESQL: PostgreSQL type: microsoft.dbformysql" + }, + "v1DiscoverRDSEngine": { + "type": "string", + "enum": [ + "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "DISCOVER_RDS_ENGINE_MYSQL", + "DISCOVER_RDS_ENGINE_POSTGRESQL" + ], + "default": "DISCOVER_RDS_ENGINE_UNSPECIFIED", + "description": "DiscoverRDSEngine describes supported RDS instance engines." + }, + "v1DiscoverRDSInstance": { + "type": "object", + "properties": { + "region": { + "type": "string", + "description": "AWS region." + }, + "az": { + "type": "string", + "description": "AWS availability zone." + }, + "instance_id": { + "type": "string", + "description": "AWS instance ID." + }, + "node_model": { + "type": "string", + "description": "AWS instance class." + }, + "address": { + "type": "string", + "description": "Address used to connect to it." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port." + }, + "engine": { + "$ref": "#/definitions/v1DiscoverRDSEngine", + "description": "Instance engine." + }, + "engine_version": { + "type": "string", + "description": "Engine version." + } + }, + "description": "DiscoverRDSInstance models an unique RDS instance for the list of instances returned by Discovery." + }, + "v1DiscoverRDSRequest": { + "type": "object", + "properties": { + "aws_access_key": { + "type": "string", + "description": "AWS Access key. Optional." + }, + "aws_secret_key": { + "type": "string", + "description": "AWS Secret key. Optional." + } + } + }, + "v1DiscoverRDSResponse": { + "type": "object", + "properties": { + "rds_instances": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1DiscoverRDSInstance" + } + } + } + }, + "v1ExternalExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "disabled": { + "type": "boolean", + "description": "If disabled, metrics from this exporter will not be collected." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname verification." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + } + }, + "description": "ExternalExporter runs on any Node type, including Remote Node." + }, + "v1ExternalService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this service instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "group": { + "type": "string", + "description": "Group name of external service." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP)." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port." + } + }, + "description": "ExternalService represents a generic External service instance." + }, + "v1ExternalServiceResult": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/v1ExternalService" + }, + "external_exporter": { + "$ref": "#/definitions/v1ExternalExporter" + } + } + }, + "v1GenericNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "is_pmm_server_node": { + "type": "boolean", + "description": "True if this node is a PMM Server node (HA mode)." + } + }, + "description": "GenericNode represents a bare metal server or virtual machine." + }, + "v1GetNodeResponse": { + "type": "object", + "properties": { + "node": { + "$ref": "#/definitions/v1UniversalNode" + } + } + }, + "v1HAProxyService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this service instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + } + }, + "description": "HAProxyService represents a generic HAProxy service instance." + }, + "v1HAProxyServiceResult": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/v1HAProxyService" + }, + "external_exporter": { + "$ref": "#/definitions/v1ExternalExporter" + } + } + }, + "v1ListAgentVersionsResponse": { + "type": "object", + "properties": { + "agent_versions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AgentVersions" + }, + "description": "List of Agent versions." + } + } + }, + "v1ListAgentsResponse": { + "type": "object", + "properties": { + "agents": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UniversalAgent" + }, + "description": "List of Agents." + } + } + }, + "v1ListNodesResponse": { + "type": "object", + "properties": { + "nodes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UniversalNode" + } + } + } + }, + "v1ListServicesResponse": { + "type": "object", + "properties": { + "services": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UniversalService" + }, + "description": "List of Services." + } + } + }, + "v1LogLevel": { + "type": "string", + "enum": [ + "LOG_LEVEL_UNSPECIFIED", + "LOG_LEVEL_FATAL", + "LOG_LEVEL_ERROR", + "LOG_LEVEL_WARN", + "LOG_LEVEL_INFO", + "LOG_LEVEL_DEBUG" + ], + "default": "LOG_LEVEL_UNSPECIFIED", + "description": "- LOG_LEVEL_UNSPECIFIED: Auto", + "title": "Log level for exporters" + }, + "v1MetricsMode": { + "type": "string", + "enum": [ + "METRICS_MODE_UNSPECIFIED", + "METRICS_MODE_PULL", + "METRICS_MODE_PUSH" + ], + "default": "METRICS_MODE_UNSPECIFIED", + "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" + }, + "v1MongoDBExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "stats_collections": { + "type": "array", + "items": { + "type": "string" + }, + "title": "List of colletions to get stats from. Can use *" + }, + "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" + }, + "enable_all_collectors": { + "type": "boolean", + "description": "Enable all collectors." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "environment_variable_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Environment variable names passed to the exporter." + } + }, + "description": "MongoDBExporter runs on Generic or Container Node and exposes MongoDB Service metrics." + }, + "v1MongoDBService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "MongoDB version." + } + }, + "description": "MongoDBService represents a generic MongoDB instance." + }, + "v1MongoDBServiceResult": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/v1MongoDBService" + }, + "mongodb_exporter": { + "$ref": "#/definitions/v1MongoDBExporter" + }, + "qan_mongodb_profiler": { + "$ref": "#/definitions/v1QANMongoDBProfilerAgent" + }, + "qan_mongodb_mongolog": { + "$ref": "#/definitions/v1QANMongoDBMongologAgent" + }, + "rta_mongodb_agent": { + "$ref": "#/definitions/v1RTAMongoDBAgent" + } + } + }, + "v1MySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "MySQL version." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra parameters to be added to the DSN." + } + }, + "description": "MySQLService represents a generic MySQL instance." + }, + "v1MySQLServiceResult": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/v1MySQLService" + }, + "mysqld_exporter": { + "$ref": "#/definitions/v1MySQLdExporter" + }, + "qan_mysql_perfschema": { + "$ref": "#/definitions/v1QANMySQLPerfSchemaAgent" + }, + "qan_mysql_slowlog": { + "$ref": "#/definitions/v1QANMySQLSlowlogAgent" + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Actual table count at the moment of adding." + } + } + }, + "v1MySQLdExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "tablestats_group_table_limit": { + "type": "integer", + "format": "int32", + "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." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Actual table count at the moment of adding." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "tablestats_group_disabled": { + "type": "boolean", + "description": "True if tablestats group collectors are currently disabled." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + }, + "description": "MySQLdExporter runs on Generic or Container Node and exposes MySQL Service metrics." + }, + "v1NodeType": { + "type": "string", + "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" + ], + "default": "NODE_TYPE_UNSPECIFIED", + "description": "NodeType describes supported Node types." + }, + "v1PMMAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + } + }, + "description": "PMMAgent runs on Generic or Container Node." + }, + "v1PostgreSQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "database_name": { + "type": "string", + "description": "Database name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "PostgreSQL version." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + } + }, + "description": "PostgreSQLService represents a generic PostgreSQL instance." + }, + "v1PostgreSQLServiceResult": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/v1PostgreSQLService" + }, + "postgres_exporter": { + "$ref": "#/definitions/v1PostgresExporter" + }, + "qan_postgresql_pgstatements_agent": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatementsAgent" + }, + "qan_postgresql_pgstatmonitor_agent": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatMonitorAgent" + }, + "warning": { + "type": "string", + "description": "Warning message." + } + } + }, + "v1PostgresExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation. Uses sslmode=required instead of verify-full." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "max_exporter_connections": { + "type": "integer", + "format": "int32", + "description": "Maximum number of connections that exporter can open to the database instance." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "PostgresExporter runs on Generic or Container Node and exposes PostgreSQL Service metrics." + }, + "v1ProxySQLExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "ProxySQL username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "ProxySQLExporter runs on Generic or Container Node and exposes ProxySQL Service metrics." + }, + "v1ProxySQLService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "ProxySQL version." + } + }, + "description": "ProxySQLService represents a generic ProxySQL instance." + }, + "v1ProxySQLServiceResult": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/v1ProxySQLService" + }, + "proxysql_exporter": { + "$ref": "#/definitions/v1ProxySQLExporter" + } + } + }, + "v1QANMongoDBMongologAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profiler data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMongoDBMongologAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server." + }, + "v1QANMongoDBProfilerAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profiler data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANMongoDBProfilerAgent runs within pmm-agent and sends MongoDB Query Analytics data to the PMM Server." + }, + "v1QANMySQLPerfSchemaAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + }, + "description": "QANMySQLPerfSchemaAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "v1QANMySQLSlowlogAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MySQL username for getting performance data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "tls_ca": { + "type": "string", + "description": "Certificate Authority certificate chain." + }, + "tls_cert": { + "type": "string", + "description": "Client certificate." + }, + "tls_key": { + "type": "string", + "description": "Password for decrypting tls_cert." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "title": "Limit query length in QAN (default: server-defined; -1: no limit)" + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "max_slowlog_file_size": { + "type": "string", + "format": "int64", + "description": "Slowlog file is rotated at this size if \u003e 0." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "title": "mod tidy" + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "extra_dsn_params": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Extra DSN parameters for MySQL connection." + } + }, + "description": "QANMySQLSlowlogAgent runs within pmm-agent and sends MySQL Query Analytics data to the PMM Server." + }, + "v1QANPostgreSQLPgStatMonitorAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat monitor data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatMonitorAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "v1QANPostgreSQLPgStatementsAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "PostgreSQL username for getting pg stat statements data." + }, + "disable_comments_parsing": { + "type": "boolean", + "description": "Disable parsing comments from queries and showing them in QAN." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN (default: server-defined; -1: no limit)." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "QANPostgreSQLPgStatementsAgent runs within pmm-agent and sends PostgreSQL Query Analytics data to the PMM Server." + }, + "v1RDSExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "node_id": { + "type": "string", + "description": "Node identifier." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status (the same for several configurations)." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics (the same for several configurations)." + }, + "basic_metrics_disabled": { + "type": "boolean", + "description": "Basic metrics are disabled." + }, + "enhanced_metrics_disabled": { + "type": "boolean", + "description": "Enhanced metrics are disabled." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "auto_discovery_limit": { + "type": "integer", + "format": "int32", + "description": "Limit of databases for auto-discovery." + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "RDSExporter runs on Generic or Container Node and exposes RemoteRDS Node metrics." + }, + "v1RDSServiceResult": { + "type": "object", + "properties": { + "node": { + "$ref": "#/definitions/v1RemoteRDSNode" + }, + "rds_exporter": { + "$ref": "#/definitions/v1RDSExporter" + }, + "mysql": { + "$ref": "#/definitions/v1MySQLService" + }, + "mysqld_exporter": { + "$ref": "#/definitions/v1MySQLdExporter" + }, + "qan_mysql_perfschema": { + "$ref": "#/definitions/v1QANMySQLPerfSchemaAgent" + }, + "postgresql": { + "$ref": "#/definitions/v1PostgreSQLService" + }, + "postgresql_exporter": { + "$ref": "#/definitions/v1PostgresExporter" + }, + "qan_postgresql_pgstatements": { + "$ref": "#/definitions/v1QANPostgreSQLPgStatementsAgent" + } + } + }, + "v1RTAMongoDBAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique agent identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "MongoDB username for getting profiler data." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "rta_options": { + "$ref": "#/definitions/v1RTAOptions", + "description": "Real-Time Analytics options." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + } + }, + "description": "RTAMongoDBAgent runs within pmm-agent and sends MongoDB Real-Time Query Analytics data to the PMM Server." + }, + "v1RTAOptions": { + "type": "object", + "properties": { + "collect_interval": { + "type": "string", + "description": "Query collect interval (default 2s is set by server)." + } + }, + "description": "RTAOptions holds Real-Time Query Analytics agent options." + }, + "v1RegisterNodeRequest": { + "type": "object", + "properties": { + "node_type": { + "$ref": "#/definitions/v1NodeType", + "description": "Node type to be registered." + }, + "node_name": { + "type": "string", + "description": "A user-defined name unique across all Nodes." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "container_id": { + "type": "string", + "description": "Container identifier. If specified, must be a unique Docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + }, + "reregister": { + "type": "boolean", + "description": "If true, and Node with that name already exist, it will be removed with all dependent Services and Agents." + }, + "metrics_mode": { + "$ref": "#/definitions/v1MetricsMode", + "description": "Defines metrics flow model for node_exporter being added by this request.\nMetrics could be pushed to the server with vmagent,\npulled by the server, or the server could choose behavior automatically." + }, + "disable_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of collector names to disable in this exporter." + }, + "agent_password": { + "type": "string", + "description": "Custom password for exporter endpoint /metrics." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "instance_id": { + "type": "string", + "description": "AWS instance ID." + } + } + }, + "v1RegisterNodeResponse": { + "type": "object", + "properties": { + "generic_node": { + "$ref": "#/definitions/v1GenericNode" + }, + "container_node": { + "$ref": "#/definitions/v1ContainerNode" + }, + "pmm_agent": { + "$ref": "#/definitions/v1PMMAgent" + }, + "token": { + "type": "string", + "description": "Token represents token for vmagent auth config." + }, + "warning": { + "type": "string", + "description": "Warning message." + } + } + }, + "v1RemoteRDSNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "node_name": { + "type": "string", + "description": "Unique across all Nodes user-defined name." + }, + "address": { + "type": "string", + "description": "DB instance identifier." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "instance_id": { + "type": "string", + "description": "AWS instance ID." + } + }, + "description": "RemoteRDSNode represents remote RDS Node. Agents can't run on Remote RDS Nodes." + }, + "v1RemoveServiceResponse": { + "type": "object" + }, + "v1ServiceType": { + "type": "string", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_VALKEY_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "ServiceType describes supported Service types." + }, + "v1UniversalAgent": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique agent identifier." + }, + "is_agent_password_set": { + "type": "boolean", + "description": "True if the agent password is set." + }, + "agent_type": { + "type": "string", + "description": "Agent type." + }, + "aws_access_key": { + "type": "string", + "description": "AWS Access Key." + }, + "is_aws_secret_key_set": { + "type": "boolean", + "description": "True if AWS Secret Key is set." + }, + "azure_options": { + "$ref": "#/definitions/UniversalAgentAzureOptions", + "description": "Options used for connecting to Azure." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "log_level": { + "$ref": "#/definitions/v1LogLevel", + "description": "Log level for exporter." + }, + "max_query_length": { + "type": "integer", + "format": "int32", + "description": "Limit query length in QAN." + }, + "max_query_log_size": { + "type": "string", + "format": "int64", + "description": "Limit query log size in QAN." + }, + "metrics_path": { + "type": "string", + "description": "Path under which metrics are exposed, used to generate URI." + }, + "metrics_scheme": { + "type": "string", + "description": "Scheme to generate URI to exporter metrics endpoints." + }, + "mongo_db_options": { + "$ref": "#/definitions/UniversalAgentMongoDBOptions", + "description": "TLS and other options for connecting to MongoDB." + }, + "mysql_options": { + "$ref": "#/definitions/UniversalAgentMySQLOptions", + "description": "TLS and other options for connecting to MySQL." + }, + "node_id": { + "type": "string", + "description": "A unique node identifier." + }, + "is_password_set": { + "type": "boolean", + "description": "True if password for connecting the agent to the database is set." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier." + }, + "postgresql_options": { + "$ref": "#/definitions/UniversalAgentPostgreSQLOptions", + "description": "TLS options for connecting to PostgreSQL." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "push_metrics": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "query_examples_disabled": { + "type": "boolean", + "description": "True if query examples are disabled." + }, + "comments_parsing_disabled": { + "type": "boolean", + "description": "True if query comments parsing is disabled." + }, + "rds_basic_metrics_disabled": { + "type": "boolean", + "description": "True if RDS basic metrics are disdabled." + }, + "rds_enhanced_metrics_disabled": { + "type": "boolean", + "description": "True if RDS enhanced metrics are disdabled." + }, + "runs_on_node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "status": { + "type": "string", + "description": "Actual Agent status." + }, + "table_count": { + "type": "integer", + "format": "int32", + "description": "Last known table count." + }, + "table_count_tablestats_group_limit": { + "type": "integer", + "format": "int32", + "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." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname validation." + }, + "username": { + "type": "string", + "description": "HTTP basic auth username for collecting metrics." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp." + }, + "version": { + "type": "string", + "description": "Agent version." + }, + "is_connected": { + "type": "boolean", + "description": "True if Agent is running and connected to pmm-managed." + }, + "expose_exporter": { + "type": "boolean", + "description": "True if an exporter agent is exposed on all host addresses." + }, + "valkey_options": { + "$ref": "#/definitions/UniversalAgentValkeyOptions", + "description": "Options for connecting to Valkey." + }, + "rta_options": { + "$ref": "#/definitions/v1RTAOptions", + "description": "Real-Time Analytics options." + } + } + }, + "v1UniversalNode": { + "type": "object", + "properties": { + "node_id": { + "type": "string", + "description": "Unique Node identifier." + }, + "node_type": { + "type": "string", + "description": "Node type." + }, + "node_name": { + "type": "string", + "description": "User-defined node name." + }, + "machine_id": { + "type": "string", + "description": "Linux machine-id." + }, + "distro": { + "type": "string", + "description": "Linux distribution name and version." + }, + "node_model": { + "type": "string", + "description": "Node model." + }, + "container_id": { + "type": "string", + "description": "A node's unique docker container identifier." + }, + "container_name": { + "type": "string", + "description": "Container name." + }, + "address": { + "type": "string", + "description": "Node address (DNS name or IP)." + }, + "region": { + "type": "string", + "description": "Node region." + }, + "az": { + "type": "string", + "description": "Node availability zone." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Node." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp." + }, + "status": { + "$ref": "#/definitions/v1UniversalNodeStatus", + "description": "The health status of the node." + }, + "agents": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/UniversalNodeAgent" + }, + "description": "List of agents related to this node." + }, + "services": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/UniversalNodeService" + }, + "description": "List of services running on this node." + }, + "instance_id": { + "type": "string", + "description": "Instance ID for cloud providers (e.g. AWS RDS)." + }, + "is_pmm_server_node": { + "type": "boolean", + "description": "True if this node is a PMM Server node (HA mode)." + } + } + }, + "v1UniversalNodeStatus": { + "type": "string", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_UP", + "STATUS_DOWN", + "STATUS_UNKNOWN" + ], + "default": "STATUS_UNSPECIFIED", + "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)." + }, + "v1UniversalService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique service identifier." + }, + "service_type": { + "type": "string", + "description": "Service type." + }, + "service_name": { + "type": "string", + "description": "User-defined name unique across all Services." + }, + "database_name": { + "type": "string", + "description": "Database name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "node_name": { + "type": "string", + "description": "Node name where this instance runs." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels for Service." + }, + "external_group": { + "type": "string", + "description": "External group name." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Creation timestamp." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Last update timestamp." + }, + "agents": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UniversalAgent" + }, + "description": "List of agents related to this service." + }, + "status": { + "$ref": "#/definitions/v1UniversalServiceStatus", + "description": "The health status of the service." + }, + "version": { + "type": "string", + "description": "The service/database version." + } + } + }, + "v1UniversalServiceStatus": { + "type": "string", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_UP", + "STATUS_DOWN", + "STATUS_UNKNOWN" + ], + "default": "STATUS_UNSPECIFIED", + "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)." + }, + "v1UnregisterNodeResponse": { + "type": "object", + "properties": { + "warning": { + "type": "string", + "description": "Warning message if there are more service tokens attached to service account." + } + } + }, + "v1UpdateSeverity": { + "type": "string", + "enum": [ + "UPDATE_SEVERITY_UNSPECIFIED", + "UPDATE_SEVERITY_UNSUPPORTED", + "UPDATE_SEVERITY_UP_TO_DATE", + "UPDATE_SEVERITY_REQUIRED", + "UPDATE_SEVERITY_CRITICAL" + ], + "default": "UPDATE_SEVERITY_UNSPECIFIED", + "description": " - UPDATE_SEVERITY_UNSUPPORTED: The client version is newer than the server version.\n - UPDATE_SEVERITY_UP_TO_DATE: The client version matches the server version.\n - UPDATE_SEVERITY_REQUIRED: The client's minor or patch version is older.\n - UPDATE_SEVERITY_CRITICAL: The client's major version is older." + }, + "v1ValkeyExporter": { + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "pmm_agent_id": { + "type": "string", + "description": "The pmm-agent identifier which runs this instance." + }, + "disabled": { + "type": "boolean", + "description": "Desired Agent status: enabled (false) or disabled (true)." + }, + "service_id": { + "type": "string", + "description": "Service identifier." + }, + "username": { + "type": "string", + "description": "Valkey username for scraping metrics." + }, + "tls": { + "type": "boolean", + "description": "Use TLS for database connections." + }, + "tls_skip_verify": { + "type": "boolean", + "description": "Skip TLS certificate and hostname verification." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "push_metrics_enabled": { + "type": "boolean", + "description": "True if exporter uses push metrics mode." + }, + "disabled_collectors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of disabled collector names." + }, + "status": { + "$ref": "#/definitions/v1AgentStatus", + "description": "Actual Agent status." + }, + "listen_port": { + "type": "integer", + "format": "int64", + "description": "Listen port for scraping metrics." + }, + "process_exec_path": { + "type": "string", + "description": "Path to exec process." + }, + "expose_exporter": { + "type": "boolean", + "title": "Optionally expose the exporter process on all public interfaces" + }, + "metrics_resolutions": { + "$ref": "#/definitions/commonMetricsResolutions", + "description": "Metrics resolution for this agent." + } + }, + "description": "ValkeyExporter runs on Generic or Container Node and exposes Valkey Service metrics." + }, + "v1ValkeyService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "Valkey version." + } + }, + "description": "ValkeyService represents a generic Valkey instance." + }, + "v1ValkeyServiceResult": { + "type": "object", + "properties": { + "service": { + "$ref": "#/definitions/v1ValkeyService" + }, + "valkey_exporter": { + "$ref": "#/definitions/v1ValkeyExporter" + } + } + } + } +} diff --git a/api/management/v1/service_grpc.pb.go b/api/management/v1/service_grpc.pb.go index b50380dc4b5..7693162cf5a 100644 --- a/api/management/v1/service_grpc.pb.go +++ b/api/management/v1/service_grpc.pb.go @@ -8,7 +8,6 @@ package managementv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -252,51 +251,39 @@ type UnimplementedManagementServiceServer struct{} func (UnimplementedManagementServiceServer) AddAnnotation(context.Context, *AddAnnotationRequest) (*AddAnnotationResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddAnnotation not implemented") } - func (UnimplementedManagementServiceServer) ListAgents(context.Context, *ListAgentsRequest) (*ListAgentsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListAgents not implemented") } - func (UnimplementedManagementServiceServer) ListAgentVersions(context.Context, *ListAgentVersionsRequest) (*ListAgentVersionsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListAgentVersions not implemented") } - func (UnimplementedManagementServiceServer) RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) { return nil, status.Error(codes.Unimplemented, "method RegisterNode not implemented") } - func (UnimplementedManagementServiceServer) UnregisterNode(context.Context, *UnregisterNodeRequest) (*UnregisterNodeResponse, error) { return nil, status.Error(codes.Unimplemented, "method UnregisterNode not implemented") } - func (UnimplementedManagementServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListNodes not implemented") } - func (UnimplementedManagementServiceServer) GetNode(context.Context, *GetNodeRequest) (*GetNodeResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetNode not implemented") } - func (UnimplementedManagementServiceServer) AddService(context.Context, *AddServiceRequest) (*AddServiceResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddService not implemented") } - func (UnimplementedManagementServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListServices not implemented") } - func (UnimplementedManagementServiceServer) DiscoverRDS(context.Context, *DiscoverRDSRequest) (*DiscoverRDSResponse, error) { return nil, status.Error(codes.Unimplemented, "method DiscoverRDS not implemented") } - func (UnimplementedManagementServiceServer) DiscoverAzureDatabase(context.Context, *DiscoverAzureDatabaseRequest) (*DiscoverAzureDatabaseResponse, error) { return nil, status.Error(codes.Unimplemented, "method DiscoverAzureDatabase not implemented") } - func (UnimplementedManagementServiceServer) AddAzureDatabase(context.Context, *AddAzureDatabaseRequest) (*AddAzureDatabaseResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddAzureDatabase not implemented") } - func (UnimplementedManagementServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveService not implemented") } diff --git a/api/management/v1/severity.pb.go b/api/management/v1/severity.pb.go index 93408b544e2..dccdc65ddca 100644 --- a/api/management/v1/severity.pb.go +++ b/api/management/v1/severity.pb.go @@ -7,12 +7,11 @@ package managementv1 import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -119,13 +118,10 @@ func file_management_v1_severity_proto_rawDescGZIP() []byte { return file_management_v1_severity_proto_rawDescData } -var ( - file_management_v1_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_management_v1_severity_proto_goTypes = []any{ - (Severity)(0), // 0: management.v1.Severity - } -) - +var file_management_v1_severity_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_management_v1_severity_proto_goTypes = []any{ + (Severity)(0), // 0: management.v1.Severity +} var file_management_v1_severity_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/management/v1/severity.swagger.json b/api/management/v1/severity.swagger.json new file mode 100644 index 00000000000..251bda17116 --- /dev/null +++ b/api/management/v1/severity.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/severity.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/management/v1/valkey.pb.go b/api/management/v1/valkey.pb.go index 37723eea5ec..50e0848541e 100644 --- a/api/management/v1/valkey.pb.go +++ b/api/management/v1/valkey.pb.go @@ -7,15 +7,13 @@ package managementv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" + v1 "github.com/percona/pmm/api/inventory/v1" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -391,20 +389,17 @@ func file_management_v1_valkey_proto_rawDescGZIP() []byte { return file_management_v1_valkey_proto_rawDescData } -var ( - file_management_v1_valkey_proto_msgTypes = make([]protoimpl.MessageInfo, 3) - file_management_v1_valkey_proto_goTypes = []any{ - (*AddValkeyServiceParams)(nil), // 0: management.v1.AddValkeyServiceParams - (*ValkeyServiceResult)(nil), // 1: management.v1.ValkeyServiceResult - nil, // 2: management.v1.AddValkeyServiceParams.CustomLabelsEntry - (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams - (MetricsMode)(0), // 4: management.v1.MetricsMode - (v1.LogLevel)(0), // 5: inventory.v1.LogLevel - (*v1.ValkeyService)(nil), // 6: inventory.v1.ValkeyService - (*v1.ValkeyExporter)(nil), // 7: inventory.v1.ValkeyExporter - } -) - +var file_management_v1_valkey_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_management_v1_valkey_proto_goTypes = []any{ + (*AddValkeyServiceParams)(nil), // 0: management.v1.AddValkeyServiceParams + (*ValkeyServiceResult)(nil), // 1: management.v1.ValkeyServiceResult + nil, // 2: management.v1.AddValkeyServiceParams.CustomLabelsEntry + (*AddNodeParams)(nil), // 3: management.v1.AddNodeParams + (MetricsMode)(0), // 4: management.v1.MetricsMode + (v1.LogLevel)(0), // 5: inventory.v1.LogLevel + (*v1.ValkeyService)(nil), // 6: inventory.v1.ValkeyService + (*v1.ValkeyExporter)(nil), // 7: inventory.v1.ValkeyExporter +} var file_management_v1_valkey_proto_depIdxs = []int32{ 3, // 0: management.v1.AddValkeyServiceParams.add_node:type_name -> management.v1.AddNodeParams 2, // 1: management.v1.AddValkeyServiceParams.custom_labels:type_name -> management.v1.AddValkeyServiceParams.CustomLabelsEntry diff --git a/api/management/v1/valkey.pb.validate.go b/api/management/v1/valkey.pb.validate.go index 55268da8d34..a2260070a98 100644 --- a/api/management/v1/valkey.pb.validate.go +++ b/api/management/v1/valkey.pb.validate.go @@ -62,6 +62,7 @@ func (m *AddValkeyServiceParams) validate(all bool) error { var errors []error if m.GetNodeId() != "" { + if utf8.RuneCountInString(m.GetNodeId()) < 1 { err := AddValkeyServiceParamsValidationError{ field: "NodeId", @@ -72,9 +73,11 @@ func (m *AddValkeyServiceParams) validate(all bool) error { } errors = append(errors, err) } + } if m.GetNodeName() != "" { + if utf8.RuneCountInString(m.GetNodeName()) < 1 { err := AddValkeyServiceParamsValidationError{ field: "NodeName", @@ -85,6 +88,7 @@ func (m *AddValkeyServiceParams) validate(all bool) error { } errors = append(errors, err) } + } if all { diff --git a/api/management/v1/valkey.swagger.json b/api/management/v1/valkey.swagger.json new file mode 100644 index 00000000000..a0170f19df2 --- /dev/null +++ b/api/management/v1/valkey.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "management/v1/valkey.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "googleRpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + } + } +} diff --git a/api/qan/v1/collector.pb.go b/api/qan/v1/collector.pb.go index 34b292da2f9..b53102e8a73 100644 --- a/api/qan/v1/collector.pb.go +++ b/api/qan/v1/collector.pb.go @@ -7,15 +7,13 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -2743,20 +2741,17 @@ func file_qan_v1_collector_proto_rawDescGZIP() []byte { return file_qan_v1_collector_proto_rawDescData } -var ( - file_qan_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) - file_qan_v1_collector_proto_goTypes = []any{ - (*CollectRequest)(nil), // 0: qan.v1.CollectRequest - (*MetricsBucket)(nil), // 1: qan.v1.MetricsBucket - (*CollectResponse)(nil), // 2: qan.v1.CollectResponse - nil, // 3: qan.v1.MetricsBucket.LabelsEntry - nil, // 4: qan.v1.MetricsBucket.WarningsEntry - nil, // 5: qan.v1.MetricsBucket.ErrorsEntry - (v1.AgentType)(0), // 6: inventory.v1.AgentType - (ExampleType)(0), // 7: qan.v1.ExampleType - } -) - +var file_qan_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_qan_v1_collector_proto_goTypes = []any{ + (*CollectRequest)(nil), // 0: qan.v1.CollectRequest + (*MetricsBucket)(nil), // 1: qan.v1.MetricsBucket + (*CollectResponse)(nil), // 2: qan.v1.CollectResponse + nil, // 3: qan.v1.MetricsBucket.LabelsEntry + nil, // 4: qan.v1.MetricsBucket.WarningsEntry + nil, // 5: qan.v1.MetricsBucket.ErrorsEntry + (v1.AgentType)(0), // 6: inventory.v1.AgentType + (ExampleType)(0), // 7: qan.v1.ExampleType +} var file_qan_v1_collector_proto_depIdxs = []int32{ 1, // 0: qan.v1.CollectRequest.metrics_bucket:type_name -> qan.v1.MetricsBucket 6, // 1: qan.v1.MetricsBucket.agent_type:type_name -> inventory.v1.AgentType diff --git a/api/qan/v1/collector.swagger.json b/api/qan/v1/collector.swagger.json new file mode 100644 index 00000000000..5313874d3b2 --- /dev/null +++ b/api/qan/v1/collector.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "qan/v1/collector.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/qan/v1/collector_grpc.pb.go b/api/qan/v1/collector_grpc.pb.go index e13e55d5599..99faa76e1ce 100644 --- a/api/qan/v1/collector_grpc.pb.go +++ b/api/qan/v1/collector_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/qan/v1/filters.pb.go b/api/qan/v1/filters.pb.go index fcbf5e7aead..cffe93c4255 100644 --- a/api/qan/v1/filters.pb.go +++ b/api/qan/v1/filters.pb.go @@ -7,13 +7,12 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -281,19 +280,16 @@ func file_qan_v1_filters_proto_rawDescGZIP() []byte { return file_qan_v1_filters_proto_rawDescData } -var ( - file_qan_v1_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) - file_qan_v1_filters_proto_goTypes = []any{ - (*GetFilteredMetricsNamesRequest)(nil), // 0: qan.v1.GetFilteredMetricsNamesRequest - (*GetFilteredMetricsNamesResponse)(nil), // 1: qan.v1.GetFilteredMetricsNamesResponse - (*ListLabels)(nil), // 2: qan.v1.ListLabels - (*Values)(nil), // 3: qan.v1.Values - nil, // 4: qan.v1.GetFilteredMetricsNamesResponse.LabelsEntry - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 6: qan.v1.MapFieldEntry - } -) - +var file_qan_v1_filters_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_qan_v1_filters_proto_goTypes = []any{ + (*GetFilteredMetricsNamesRequest)(nil), // 0: qan.v1.GetFilteredMetricsNamesRequest + (*GetFilteredMetricsNamesResponse)(nil), // 1: qan.v1.GetFilteredMetricsNamesResponse + (*ListLabels)(nil), // 2: qan.v1.ListLabels + (*Values)(nil), // 3: qan.v1.Values + nil, // 4: qan.v1.GetFilteredMetricsNamesResponse.LabelsEntry + (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 6: qan.v1.MapFieldEntry +} var file_qan_v1_filters_proto_depIdxs = []int32{ 5, // 0: qan.v1.GetFilteredMetricsNamesRequest.period_start_from:type_name -> google.protobuf.Timestamp 5, // 1: qan.v1.GetFilteredMetricsNamesRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/filters.swagger.json b/api/qan/v1/filters.swagger.json new file mode 100644 index 00000000000..bd5c3eb7ba0 --- /dev/null +++ b/api/qan/v1/filters.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "qan/v1/filters.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go index 5b2c7bf438c..0b477d3a710 100644 --- a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go +++ b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_parameters.go @@ -60,6 +60,7 @@ ExplainFingerprintByQueryIDParams contains all the parameters to send to the API Typically these are written to a http.Request. */ type ExplainFingerprintByQueryIDParams struct { + /* Body. ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID. @@ -132,6 +133,7 @@ func (o *ExplainFingerprintByQueryIDParams) SetBody(body ExplainFingerprintByQue // WriteToRequest writes these params to a swagger request func (o *ExplainFingerprintByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go index 55cf6802df7..274ea6b2639 100644 --- a/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go +++ b/api/qan/v1/json/client/qan_service/explain_fingerprint_by_query_id_responses.go @@ -104,6 +104,7 @@ func (o *ExplainFingerprintByQueryIDOK) GetPayload() *ExplainFingerprintByQueryI } func (o *ExplainFingerprintByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ExplainFingerprintByQueryIDOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ExplainFingerprintByQueryIDDefault) GetPayload() *ExplainFingerprintByQ } func (o *ExplainFingerprintByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ExplainFingerprintByQueryIDDefaultBody) // response payload @@ -192,6 +194,7 @@ ExplainFingerprintByQueryIDBody ExplainFingerprintByQueryIDRequest get explain f swagger:model ExplainFingerprintByQueryIDBody */ type ExplainFingerprintByQueryIDBody struct { + // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -232,6 +235,7 @@ ExplainFingerprintByQueryIDDefaultBody explain fingerprint by query ID default b swagger:model ExplainFingerprintByQueryIDDefaultBody */ type ExplainFingerprintByQueryIDDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -301,7 +305,9 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) ContextValidate(ctx context.Con } func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -321,6 +327,7 @@ func (o *ExplainFingerprintByQueryIDDefaultBody) contextValidateDetails(ctx cont return err } } + } return nil @@ -349,6 +356,7 @@ ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 explain fingerprint by query swagger:model ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 */ type ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -360,6 +368,7 @@ type ExplainFingerprintByQueryIDDefaultBodyDetailsItems0 struct { func (o *ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -397,6 +406,7 @@ func (o *ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data // MarshalJSON marshals this object with additional properties into a JSON object func (o ExplainFingerprintByQueryIDDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -460,6 +470,7 @@ ExplainFingerprintByQueryIDOKBody ExplainFingerprintByQueryIDResponse is explain swagger:model ExplainFingerprintByQueryIDOKBody */ type ExplainFingerprintByQueryIDOKBody struct { + // explain fingerprint ExplainFingerprint string `json:"explain_fingerprint,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go index 7b377ad61a2..14be6f6c2d3 100644 --- a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_parameters.go @@ -60,6 +60,7 @@ GetFilteredMetricsNamesParams contains all the parameters to send to the API end Typically these are written to a http.Request. */ type GetFilteredMetricsNamesParams struct { + /* Body. GetFilteredMetricsNamesRequest contains period for which we need filters. @@ -132,6 +133,7 @@ func (o *GetFilteredMetricsNamesParams) SetBody(body GetFilteredMetricsNamesBody // WriteToRequest writes these params to a swagger request func (o *GetFilteredMetricsNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go index 2d3c57609d7..04715b23a5b 100644 --- a/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go +++ b/api/qan/v1/json/client/qan_service/get_filtered_metrics_names_responses.go @@ -105,6 +105,7 @@ func (o *GetFilteredMetricsNamesOK) GetPayload() *GetFilteredMetricsNamesOKBody } func (o *GetFilteredMetricsNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFilteredMetricsNamesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetFilteredMetricsNamesDefault) GetPayload() *GetFilteredMetricsNamesDe } func (o *GetFilteredMetricsNamesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetFilteredMetricsNamesDefaultBody) // response payload @@ -193,6 +195,7 @@ GetFilteredMetricsNamesBody GetFilteredMetricsNamesRequest contains period for w swagger:model GetFilteredMetricsNamesBody */ type GetFilteredMetricsNamesBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -299,7 +302,9 @@ func (o *GetFilteredMetricsNamesBody) ContextValidate(ctx context.Context, forma } func (o *GetFilteredMetricsNamesBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -319,6 +324,7 @@ func (o *GetFilteredMetricsNamesBody) contextValidateLabels(ctx context.Context, return err } } + } return nil @@ -347,6 +353,7 @@ GetFilteredMetricsNamesDefaultBody get filtered metrics names default body swagger:model GetFilteredMetricsNamesDefaultBody */ type GetFilteredMetricsNamesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -416,7 +423,9 @@ func (o *GetFilteredMetricsNamesDefaultBody) ContextValidate(ctx context.Context } func (o *GetFilteredMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -436,6 +445,7 @@ func (o *GetFilteredMetricsNamesDefaultBody) contextValidateDetails(ctx context. return err } } + } return nil @@ -464,6 +474,7 @@ GetFilteredMetricsNamesDefaultBodyDetailsItems0 get filtered metrics names defau swagger:model GetFilteredMetricsNamesDefaultBodyDetailsItems0 */ type GetFilteredMetricsNamesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -475,6 +486,7 @@ type GetFilteredMetricsNamesDefaultBodyDetailsItems0 struct { func (o *GetFilteredMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -512,6 +524,7 @@ func (o *GetFilteredMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []b // MarshalJSON marshals this object with additional properties into a JSON object func (o GetFilteredMetricsNamesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -576,6 +589,7 @@ GetFilteredMetricsNamesOKBody GetFilteredMetricsNamesResponse is map of labels f swagger:model GetFilteredMetricsNamesOKBody */ type GetFilteredMetricsNamesOKBody struct { + // labels Labels map[string]GetFilteredMetricsNamesOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -639,12 +653,15 @@ func (o *GetFilteredMetricsNamesOKBody) ContextValidate(ctx context.Context, for } func (o *GetFilteredMetricsNamesOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Labels { + if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil @@ -673,6 +690,7 @@ GetFilteredMetricsNamesOKBodyLabelsAnon ListLabels is list of label's values: du swagger:model GetFilteredMetricsNamesOKBodyLabelsAnon */ type GetFilteredMetricsNamesOKBodyLabelsAnon struct { + // name Name []*GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 `json:"name"` } @@ -736,7 +754,9 @@ func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) ContextValidate(ctx context.Co } func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) contextValidateName(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Name); i++ { + if o.Name[i] != nil { if swag.IsZero(o.Name[i]) { // not required @@ -756,6 +776,7 @@ func (o *GetFilteredMetricsNamesOKBodyLabelsAnon) contextValidateName(ctx contex return err } } + } return nil @@ -784,6 +805,7 @@ GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 Values is label values and mai swagger:model GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 */ type GetFilteredMetricsNamesOKBodyLabelsAnonNameItems0 struct { + // value Value string `json:"value,omitempty"` @@ -827,6 +849,7 @@ GetFilteredMetricsNamesParamsBodyLabelsItems0 MapFieldEntry allows to pass label swagger:model GetFilteredMetricsNamesParamsBodyLabelsItems0 */ type GetFilteredMetricsNamesParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_histogram_parameters.go b/api/qan/v1/json/client/qan_service/get_histogram_parameters.go index 273d1c7ba35..a86298f9918 100644 --- a/api/qan/v1/json/client/qan_service/get_histogram_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_histogram_parameters.go @@ -60,6 +60,7 @@ GetHistogramParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetHistogramParams struct { + /* Body. GetHistogramRequest defines filtering by time range, labels and queryid. @@ -132,6 +133,7 @@ func (o *GetHistogramParams) SetBody(body GetHistogramBody) { // WriteToRequest writes these params to a swagger request func (o *GetHistogramParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_histogram_responses.go b/api/qan/v1/json/client/qan_service/get_histogram_responses.go index 6bb68146f35..877b05e32d6 100644 --- a/api/qan/v1/json/client/qan_service/get_histogram_responses.go +++ b/api/qan/v1/json/client/qan_service/get_histogram_responses.go @@ -105,6 +105,7 @@ func (o *GetHistogramOK) GetPayload() *GetHistogramOKBody { } func (o *GetHistogramOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetHistogramOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetHistogramDefault) GetPayload() *GetHistogramDefaultBody { } func (o *GetHistogramDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetHistogramDefaultBody) // response payload @@ -193,6 +195,7 @@ GetHistogramBody GetHistogramRequest defines filtering by time range, labels and swagger:model GetHistogramBody */ type GetHistogramBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -299,7 +302,9 @@ func (o *GetHistogramBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -319,6 +324,7 @@ func (o *GetHistogramBody) contextValidateLabels(ctx context.Context, formats st return err } } + } return nil @@ -347,6 +353,7 @@ GetHistogramDefaultBody get histogram default body swagger:model GetHistogramDefaultBody */ type GetHistogramDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -416,7 +423,9 @@ func (o *GetHistogramDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -436,6 +445,7 @@ func (o *GetHistogramDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -464,6 +474,7 @@ GetHistogramDefaultBodyDetailsItems0 get histogram default body details items0 swagger:model GetHistogramDefaultBodyDetailsItems0 */ type GetHistogramDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -475,6 +486,7 @@ type GetHistogramDefaultBodyDetailsItems0 struct { func (o *GetHistogramDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -512,6 +524,7 @@ func (o *GetHistogramDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetHistogramDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -575,6 +588,7 @@ GetHistogramOKBody GetHistogramResponse is histogram items as a list. swagger:model GetHistogramOKBody */ type GetHistogramOKBody struct { + // histogram items HistogramItems []*GetHistogramOKBodyHistogramItemsItems0 `json:"histogram_items"` } @@ -638,7 +652,9 @@ func (o *GetHistogramOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.HistogramItems); i++ { + if o.HistogramItems[i] != nil { if swag.IsZero(o.HistogramItems[i]) { // not required @@ -658,6 +674,7 @@ func (o *GetHistogramOKBody) contextValidateHistogramItems(ctx context.Context, return err } } + } return nil @@ -686,6 +703,7 @@ GetHistogramOKBodyHistogramItemsItems0 HistogramItem represents one item in hist swagger:model GetHistogramOKBodyHistogramItemsItems0 */ type GetHistogramOKBodyHistogramItemsItems0 struct { + // range Range string `json:"range,omitempty"` @@ -726,6 +744,7 @@ GetHistogramParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimension swagger:model GetHistogramParamsBodyLabelsItems0 */ type GetHistogramParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_labels_parameters.go b/api/qan/v1/json/client/qan_service/get_labels_parameters.go index ebf388c1281..946aabc1dc4 100644 --- a/api/qan/v1/json/client/qan_service/get_labels_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_labels_parameters.go @@ -60,6 +60,7 @@ GetLabelsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetLabelsParams struct { + /* Body. GetLabelsRequest defines filtering of object detail's labels for specific value of @@ -133,6 +134,7 @@ func (o *GetLabelsParams) SetBody(body GetLabelsBody) { // WriteToRequest writes these params to a swagger request func (o *GetLabelsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_labels_responses.go b/api/qan/v1/json/client/qan_service/get_labels_responses.go index 7425ccfc09c..c193d4132bf 100644 --- a/api/qan/v1/json/client/qan_service/get_labels_responses.go +++ b/api/qan/v1/json/client/qan_service/get_labels_responses.go @@ -105,6 +105,7 @@ func (o *GetLabelsOK) GetPayload() *GetLabelsOKBody { } func (o *GetLabelsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLabelsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetLabelsDefault) GetPayload() *GetLabelsDefaultBody { } func (o *GetLabelsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetLabelsDefaultBody) // response payload @@ -194,6 +196,7 @@ GetLabelsBody GetLabelsRequest defines filtering of object detail's labels for s swagger:model GetLabelsBody */ type GetLabelsBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -279,6 +282,7 @@ GetLabelsDefaultBody get labels default body swagger:model GetLabelsDefaultBody */ type GetLabelsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -348,7 +352,9 @@ func (o *GetLabelsDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -368,6 +374,7 @@ func (o *GetLabelsDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -396,6 +403,7 @@ GetLabelsDefaultBodyDetailsItems0 get labels default body details items0 swagger:model GetLabelsDefaultBodyDetailsItems0 */ type GetLabelsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -407,6 +415,7 @@ type GetLabelsDefaultBodyDetailsItems0 struct { func (o *GetLabelsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -444,6 +453,7 @@ func (o *GetLabelsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetLabelsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -507,6 +517,7 @@ GetLabelsOKBody GetLabelsResponse is a map of labels names as keys and labels va swagger:model GetLabelsOKBody */ type GetLabelsOKBody struct { + // labels Labels map[string]GetLabelsOKBodyLabelsAnon `json:"labels,omitempty"` } @@ -570,12 +581,15 @@ func (o *GetLabelsOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetLabelsOKBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Labels { + if val, ok := o.Labels[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil @@ -604,6 +618,7 @@ GetLabelsOKBodyLabelsAnon ListLabelValues is list of label's values. swagger:model GetLabelsOKBodyLabelsAnon */ type GetLabelsOKBodyLabelsAnon struct { + // values Values []string `json:"values"` } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go b/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go index eda3e3369e0..2872b797b52 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_names_parameters.go @@ -60,6 +60,7 @@ GetMetricsNamesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsNamesParams struct { + /* Body. MetricsNamesRequest is empty. @@ -132,6 +133,7 @@ func (o *GetMetricsNamesParams) SetBody(body any) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsNamesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go b/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go index e59b8c2e83c..d345b84a2b6 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_names_responses.go @@ -104,6 +104,7 @@ func (o *GetMetricsNamesOK) GetPayload() *GetMetricsNamesOKBody { } func (o *GetMetricsNamesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsNamesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetMetricsNamesDefault) GetPayload() *GetMetricsNamesDefaultBody { } func (o *GetMetricsNamesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsNamesDefaultBody) // response payload @@ -192,6 +194,7 @@ GetMetricsNamesDefaultBody get metrics names default body swagger:model GetMetricsNamesDefaultBody */ type GetMetricsNamesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetMetricsNamesDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetMetricsNamesDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -309,6 +315,7 @@ GetMetricsNamesDefaultBodyDetailsItems0 get metrics names default body details i swagger:model GetMetricsNamesDefaultBodyDetailsItems0 */ type GetMetricsNamesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetMetricsNamesDefaultBodyDetailsItems0 struct { func (o *GetMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetMetricsNamesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetMetricsNamesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -422,6 +431,7 @@ GetMetricsNamesOKBody MetricsNamesReply is map of stored metrics: swagger:model GetMetricsNamesOKBody */ type GetMetricsNamesOKBody struct { + // data Data map[string]string `json:"data,omitempty"` } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_parameters.go b/api/qan/v1/json/client/qan_service/get_metrics_parameters.go index 65e95eae003..66539066340 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_parameters.go @@ -60,6 +60,7 @@ GetMetricsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetMetricsParams struct { + /* Body. GetMetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972. @@ -132,6 +133,7 @@ func (o *GetMetricsParams) SetBody(body GetMetricsBody) { // WriteToRequest writes these params to a swagger request func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_metrics_responses.go b/api/qan/v1/json/client/qan_service/get_metrics_responses.go index 0577b0b8431..ed797c55ae3 100644 --- a/api/qan/v1/json/client/qan_service/get_metrics_responses.go +++ b/api/qan/v1/json/client/qan_service/get_metrics_responses.go @@ -105,6 +105,7 @@ func (o *GetMetricsOK) GetPayload() *GetMetricsOKBody { } func (o *GetMetricsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetMetricsDefault) GetPayload() *GetMetricsDefaultBody { } func (o *GetMetricsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetMetricsDefaultBody) // response payload @@ -193,6 +195,7 @@ GetMetricsBody GetMetricsRequest defines filtering of metrics for specific value swagger:model GetMetricsBody */ type GetMetricsBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -308,7 +311,9 @@ func (o *GetMetricsBody) ContextValidate(ctx context.Context, formats strfmt.Reg } func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -328,6 +333,7 @@ func (o *GetMetricsBody) contextValidateLabels(ctx context.Context, formats strf return err } } + } return nil @@ -356,6 +362,7 @@ GetMetricsDefaultBody get metrics default body swagger:model GetMetricsDefaultBody */ type GetMetricsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -425,7 +432,9 @@ func (o *GetMetricsDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -445,6 +454,7 @@ func (o *GetMetricsDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -473,6 +483,7 @@ GetMetricsDefaultBodyDetailsItems0 get metrics default body details items0 swagger:model GetMetricsDefaultBodyDetailsItems0 */ type GetMetricsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -484,6 +495,7 @@ type GetMetricsDefaultBodyDetailsItems0 struct { func (o *GetMetricsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -521,6 +533,7 @@ func (o *GetMetricsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetMetricsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -584,6 +597,7 @@ GetMetricsOKBody GetMetricsResponse defines metrics for specific value of dimens swagger:model GetMetricsOKBody */ type GetMetricsOKBody struct { + // metrics Metrics map[string]GetMetricsOKBodyMetricsAnon `json:"metrics,omitempty"` @@ -769,19 +783,24 @@ func (o *GetMetricsOKBody) ContextValidate(ctx context.Context, formats strfmt.R } func (o *GetMetricsOKBody) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Metrics { + if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Sparkline); i++ { + if o.Sparkline[i] != nil { if swag.IsZero(o.Sparkline[i]) { // not required @@ -801,24 +820,29 @@ func (o *GetMetricsOKBody) contextValidateSparkline(ctx context.Context, formats return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateTotals(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Totals { + if val, ok := o.Totals[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetMetricsOKBody) contextValidateMetadata(ctx context.Context, formats strfmt.Registry) error { + if o.Metadata != nil { if swag.IsZero(o.Metadata) { // not required @@ -865,6 +889,7 @@ GetMetricsOKBodyMetadata GetSlecetedQueryMetadataResponse consists selected quer swagger:model GetMetricsOKBodyMetadata */ type GetMetricsOKBodyMetadata struct { + // service name ServiceName string `json:"service_name,omitempty"` @@ -935,6 +960,7 @@ GetMetricsOKBodyMetricsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyMetricsAnon */ type GetMetricsOKBodyMetricsAnon struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -994,6 +1020,7 @@ GetMetricsOKBodySparklineItems0 Point contains values that represents abscissa ( swagger:model GetMetricsOKBodySparklineItems0 */ type GetMetricsOKBodySparklineItems0 struct { + // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1265,6 +1292,7 @@ GetMetricsOKBodyTotalsAnon MetricValues is statistics of specific metric. swagger:model GetMetricsOKBodyTotalsAnon */ type GetMetricsOKBodyTotalsAnon struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -1323,6 +1351,7 @@ GetMetricsParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimensions swagger:model GetMetricsParamsBodyLabelsItems0 */ type GetMetricsParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_query_example_parameters.go b/api/qan/v1/json/client/qan_service/get_query_example_parameters.go index 7757bae1c9c..2d400fd9bb5 100644 --- a/api/qan/v1/json/client/qan_service/get_query_example_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_query_example_parameters.go @@ -60,6 +60,7 @@ GetQueryExampleParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryExampleParams struct { + /* Body. GetQueryExampleRequest defines filtering of query examples for specific value of @@ -133,6 +134,7 @@ func (o *GetQueryExampleParams) SetBody(body GetQueryExampleBody) { // WriteToRequest writes these params to a swagger request func (o *GetQueryExampleParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_query_example_responses.go b/api/qan/v1/json/client/qan_service/get_query_example_responses.go index a9ffcad7993..28dedc56567 100644 --- a/api/qan/v1/json/client/qan_service/get_query_example_responses.go +++ b/api/qan/v1/json/client/qan_service/get_query_example_responses.go @@ -105,6 +105,7 @@ func (o *GetQueryExampleOK) GetPayload() *GetQueryExampleOKBody { } func (o *GetQueryExampleOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryExampleOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetQueryExampleDefault) GetPayload() *GetQueryExampleDefaultBody { } func (o *GetQueryExampleDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryExampleDefaultBody) // response payload @@ -194,6 +196,7 @@ GetQueryExampleBody GetQueryExampleRequest defines filtering of query examples f swagger:model GetQueryExampleBody */ type GetQueryExampleBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -306,7 +309,9 @@ func (o *GetQueryExampleBody) ContextValidate(ctx context.Context, formats strfm } func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -326,6 +331,7 @@ func (o *GetQueryExampleBody) contextValidateLabels(ctx context.Context, formats return err } } + } return nil @@ -354,6 +360,7 @@ GetQueryExampleDefaultBody get query example default body swagger:model GetQueryExampleDefaultBody */ type GetQueryExampleDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -423,7 +430,9 @@ func (o *GetQueryExampleDefaultBody) ContextValidate(ctx context.Context, format } func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -443,6 +452,7 @@ func (o *GetQueryExampleDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -471,6 +481,7 @@ GetQueryExampleDefaultBodyDetailsItems0 get query example default body details i swagger:model GetQueryExampleDefaultBodyDetailsItems0 */ type GetQueryExampleDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -482,6 +493,7 @@ type GetQueryExampleDefaultBodyDetailsItems0 struct { func (o *GetQueryExampleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -519,6 +531,7 @@ func (o *GetQueryExampleDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o GetQueryExampleDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -582,6 +595,7 @@ GetQueryExampleOKBody GetQueryExampleResponse list of query examples. swagger:model GetQueryExampleOKBody */ type GetQueryExampleOKBody struct { + // query examples QueryExamples []*GetQueryExampleOKBodyQueryExamplesItems0 `json:"query_examples"` } @@ -645,7 +659,9 @@ func (o *GetQueryExampleOKBody) ContextValidate(ctx context.Context, formats str } func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.QueryExamples); i++ { + if o.QueryExamples[i] != nil { if swag.IsZero(o.QueryExamples[i]) { // not required @@ -665,6 +681,7 @@ func (o *GetQueryExampleOKBody) contextValidateQueryExamples(ctx context.Context return err } } + } return nil @@ -693,6 +710,7 @@ GetQueryExampleOKBodyQueryExamplesItems0 QueryExample shows query examples and t swagger:model GetQueryExampleOKBodyQueryExamplesItems0 */ type GetQueryExampleOKBodyQueryExamplesItems0 struct { + // example Example string `json:"example,omitempty"` @@ -821,6 +839,7 @@ GetQueryExampleParamsBodyLabelsItems0 MapFieldEntry allows to pass labels/dimens swagger:model GetQueryExampleParamsBodyLabelsItems0 */ type GetQueryExampleParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go b/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go index 3d949920218..367e78a912c 100644 --- a/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_query_plan_parameters.go @@ -60,6 +60,7 @@ GetQueryPlanParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetQueryPlanParams struct { + // Queryid. Queryid string @@ -129,6 +130,7 @@ func (o *GetQueryPlanParams) SetQueryid(queryid string) { // WriteToRequest writes these params to a swagger request func (o *GetQueryPlanParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_query_plan_responses.go b/api/qan/v1/json/client/qan_service/get_query_plan_responses.go index a5d3157a37a..cb82ef45379 100644 --- a/api/qan/v1/json/client/qan_service/get_query_plan_responses.go +++ b/api/qan/v1/json/client/qan_service/get_query_plan_responses.go @@ -104,6 +104,7 @@ func (o *GetQueryPlanOK) GetPayload() *GetQueryPlanOKBody { } func (o *GetQueryPlanOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryPlanOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetQueryPlanDefault) GetPayload() *GetQueryPlanDefaultBody { } func (o *GetQueryPlanDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetQueryPlanDefaultBody) // response payload @@ -192,6 +194,7 @@ GetQueryPlanDefaultBody get query plan default body swagger:model GetQueryPlanDefaultBody */ type GetQueryPlanDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetQueryPlanDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetQueryPlanDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -309,6 +315,7 @@ GetQueryPlanDefaultBodyDetailsItems0 get query plan default body details items0 swagger:model GetQueryPlanDefaultBodyDetailsItems0 */ type GetQueryPlanDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type GetQueryPlanDefaultBodyDetailsItems0 struct { func (o *GetQueryPlanDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *GetQueryPlanDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o GetQueryPlanDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ GetQueryPlanOKBody GetQueryPlanResponse contains planid and query_plan. swagger:model GetQueryPlanOKBody */ type GetQueryPlanOKBody struct { + // planid Planid string `json:"planid,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/get_report_parameters.go b/api/qan/v1/json/client/qan_service/get_report_parameters.go index 41494719a45..69d495bc6b9 100644 --- a/api/qan/v1/json/client/qan_service/get_report_parameters.go +++ b/api/qan/v1/json/client/qan_service/get_report_parameters.go @@ -60,6 +60,7 @@ GetReportParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type GetReportParams struct { + /* Body. ReportRequest defines filtering of metrics report for db server or other dimentions. @@ -132,6 +133,7 @@ func (o *GetReportParams) SetBody(body GetReportBody) { // WriteToRequest writes these params to a swagger request func (o *GetReportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/get_report_responses.go b/api/qan/v1/json/client/qan_service/get_report_responses.go index f6661b19771..8e3fb8d7272 100644 --- a/api/qan/v1/json/client/qan_service/get_report_responses.go +++ b/api/qan/v1/json/client/qan_service/get_report_responses.go @@ -105,6 +105,7 @@ func (o *GetReportOK) GetPayload() *GetReportOKBody { } func (o *GetReportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetReportOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetReportDefault) GetPayload() *GetReportDefaultBody { } func (o *GetReportDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetReportDefaultBody) // response payload @@ -193,6 +195,7 @@ GetReportBody ReportRequest defines filtering of metrics report for db server or swagger:model GetReportBody */ type GetReportBody struct { + // period start from // Format: date-time PeriodStartFrom strfmt.DateTime `json:"period_start_from,omitempty"` @@ -317,7 +320,9 @@ func (o *GetReportBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Labels); i++ { + if o.Labels[i] != nil { if swag.IsZero(o.Labels[i]) { // not required @@ -337,6 +342,7 @@ func (o *GetReportBody) contextValidateLabels(ctx context.Context, formats strfm return err } } + } return nil @@ -365,6 +371,7 @@ GetReportDefaultBody get report default body swagger:model GetReportDefaultBody */ type GetReportDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -434,7 +441,9 @@ func (o *GetReportDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -454,6 +463,7 @@ func (o *GetReportDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -482,6 +492,7 @@ GetReportDefaultBodyDetailsItems0 get report default body details items0 swagger:model GetReportDefaultBodyDetailsItems0 */ type GetReportDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -493,6 +504,7 @@ type GetReportDefaultBodyDetailsItems0 struct { func (o *GetReportDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -530,6 +542,7 @@ func (o *GetReportDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetReportDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -593,6 +606,7 @@ GetReportOKBody ReportReply is list of reports per quieryids, hosts etc. swagger:model GetReportOKBody */ type GetReportOKBody struct { + // total rows TotalRows int64 `json:"total_rows,omitempty"` @@ -665,7 +679,9 @@ func (o *GetReportOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Rows); i++ { + if o.Rows[i] != nil { if swag.IsZero(o.Rows[i]) { // not required @@ -685,6 +701,7 @@ func (o *GetReportOKBody) contextValidateRows(ctx context.Context, formats strfm return err } } + } return nil @@ -713,6 +730,7 @@ GetReportOKBodyRowsItems0 Row define metrics for selected dimention. swagger:model GetReportOKBodyRowsItems0 */ type GetReportOKBodyRowsItems0 struct { + // rank Rank int64 `json:"rank,omitempty"` @@ -838,19 +856,24 @@ func (o *GetReportOKBodyRowsItems0) ContextValidate(ctx context.Context, formats } func (o *GetReportOKBodyRowsItems0) contextValidateMetrics(ctx context.Context, formats strfmt.Registry) error { + for k := range o.Metrics { + if val, ok := o.Metrics[k]; ok { if err := val.ContextValidate(ctx, formats); err != nil { return err } } + } return nil } func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Sparkline); i++ { + if o.Sparkline[i] != nil { if swag.IsZero(o.Sparkline[i]) { // not required @@ -870,6 +893,7 @@ func (o *GetReportOKBodyRowsItems0) contextValidateSparkline(ctx context.Context return err } } + } return nil @@ -898,6 +922,7 @@ GetReportOKBodyRowsItems0MetricsAnon Metric cell. swagger:model GetReportOKBodyRowsItems0MetricsAnon */ type GetReportOKBodyRowsItems0MetricsAnon struct { + // stats Stats *GetReportOKBodyRowsItems0MetricsAnonStats `json:"stats,omitempty"` } @@ -954,6 +979,7 @@ func (o *GetReportOKBodyRowsItems0MetricsAnon) ContextValidate(ctx context.Conte } func (o *GetReportOKBodyRowsItems0MetricsAnon) contextValidateStats(ctx context.Context, formats strfmt.Registry) error { + if o.Stats != nil { if swag.IsZero(o.Stats) { // not required @@ -1000,6 +1026,7 @@ GetReportOKBodyRowsItems0MetricsAnonStats Stat is statistics of specific metric. swagger:model GetReportOKBodyRowsItems0MetricsAnonStats */ type GetReportOKBodyRowsItems0MetricsAnonStats struct { + // rate Rate float32 `json:"rate,omitempty"` @@ -1059,6 +1086,7 @@ GetReportOKBodyRowsItems0SparklineItems0 Point contains values that represents a swagger:model GetReportOKBodyRowsItems0SparklineItems0 */ type GetReportOKBodyRowsItems0SparklineItems0 struct { + // The serial number of the chart point from the largest time in the time interval to the lowest time in the time range. Point int64 `json:"point,omitempty"` @@ -1330,6 +1358,7 @@ GetReportParamsBodyLabelsItems0 ReportMapFieldEntry allows to pass labels/diment swagger:model GetReportParamsBodyLabelsItems0 */ type GetReportParamsBodyLabelsItems0 struct { + // key Key string `json:"key,omitempty"` diff --git a/api/qan/v1/json/client/qan_service/health_check_parameters.go b/api/qan/v1/json/client/qan_service/health_check_parameters.go index d7e15d2d7bb..5aa3423e42e 100644 --- a/api/qan/v1/json/client/qan_service/health_check_parameters.go +++ b/api/qan/v1/json/client/qan_service/health_check_parameters.go @@ -115,6 +115,7 @@ func (o *HealthCheckParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *HealthCheckParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/health_check_responses.go b/api/qan/v1/json/client/qan_service/health_check_responses.go index 7ba2cf47eb3..deed50d8786 100644 --- a/api/qan/v1/json/client/qan_service/health_check_responses.go +++ b/api/qan/v1/json/client/qan_service/health_check_responses.go @@ -104,6 +104,7 @@ func (o *HealthCheckOK) GetPayload() any { } func (o *HealthCheckOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *HealthCheckDefault) GetPayload() *HealthCheckDefaultBody { } func (o *HealthCheckDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(HealthCheckDefaultBody) // response payload @@ -190,6 +192,7 @@ HealthCheckDefaultBody health check default body swagger:model HealthCheckDefaultBody */ type HealthCheckDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *HealthCheckDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *HealthCheckDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *HealthCheckDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -307,6 +313,7 @@ HealthCheckDefaultBodyDetailsItems0 health check default body details items0 swagger:model HealthCheckDefaultBodyDetailsItems0 */ type HealthCheckDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -318,6 +325,7 @@ type HealthCheckDefaultBodyDetailsItems0 struct { func (o *HealthCheckDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -355,6 +363,7 @@ func (o *HealthCheckDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o HealthCheckDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/qan/v1/json/client/qan_service/query_exists_parameters.go b/api/qan/v1/json/client/qan_service/query_exists_parameters.go index 7650af6a9df..21422ff17cc 100644 --- a/api/qan/v1/json/client/qan_service/query_exists_parameters.go +++ b/api/qan/v1/json/client/qan_service/query_exists_parameters.go @@ -60,6 +60,7 @@ QueryExistsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type QueryExistsParams struct { + /* Body. QueryExistsRequest check if provided query exists or not. @@ -132,6 +133,7 @@ func (o *QueryExistsParams) SetBody(body QueryExistsBody) { // WriteToRequest writes these params to a swagger request func (o *QueryExistsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/query_exists_responses.go b/api/qan/v1/json/client/qan_service/query_exists_responses.go index a6e036b1d42..589881f3c9f 100644 --- a/api/qan/v1/json/client/qan_service/query_exists_responses.go +++ b/api/qan/v1/json/client/qan_service/query_exists_responses.go @@ -104,6 +104,7 @@ func (o *QueryExistsOK) GetPayload() *QueryExistsOKBody { } func (o *QueryExistsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(QueryExistsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *QueryExistsDefault) GetPayload() *QueryExistsDefaultBody { } func (o *QueryExistsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(QueryExistsDefaultBody) // response payload @@ -192,6 +194,7 @@ QueryExistsBody QueryExistsRequest check if provided query exists or not. swagger:model QueryExistsBody */ type QueryExistsBody struct { + // serviceid Serviceid string `json:"serviceid,omitempty"` @@ -232,6 +235,7 @@ QueryExistsDefaultBody query exists default body swagger:model QueryExistsDefaultBody */ type QueryExistsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -301,7 +305,9 @@ func (o *QueryExistsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -321,6 +327,7 @@ func (o *QueryExistsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -349,6 +356,7 @@ QueryExistsDefaultBodyDetailsItems0 query exists default body details items0 swagger:model QueryExistsDefaultBodyDetailsItems0 */ type QueryExistsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -360,6 +368,7 @@ type QueryExistsDefaultBodyDetailsItems0 struct { func (o *QueryExistsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -397,6 +406,7 @@ func (o *QueryExistsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o QueryExistsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -460,6 +470,7 @@ QueryExistsOKBody QueryExistsResponse returns true if query exists. swagger:model QueryExistsOKBody */ type QueryExistsOKBody struct { + // exists Exists bool `json:"exists,omitempty"` } diff --git a/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go b/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go index f0be4d869ce..45d51b4b648 100644 --- a/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go +++ b/api/qan/v1/json/client/qan_service/schema_by_query_id_parameters.go @@ -60,6 +60,7 @@ SchemaByQueryIDParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SchemaByQueryIDParams struct { + /* Body. SchemaByQueryIDRequest returns schema for given query ID and service ID. @@ -132,6 +133,7 @@ func (o *SchemaByQueryIDParams) SetBody(body SchemaByQueryIDBody) { // WriteToRequest writes these params to a swagger request func (o *SchemaByQueryIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go b/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go index 894c1d12cc9..51dd57a9326 100644 --- a/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go +++ b/api/qan/v1/json/client/qan_service/schema_by_query_id_responses.go @@ -104,6 +104,7 @@ func (o *SchemaByQueryIDOK) GetPayload() *SchemaByQueryIDOKBody { } func (o *SchemaByQueryIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SchemaByQueryIDOKBody) // response payload @@ -177,6 +178,7 @@ func (o *SchemaByQueryIDDefault) GetPayload() *SchemaByQueryIDDefaultBody { } func (o *SchemaByQueryIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SchemaByQueryIDDefaultBody) // response payload @@ -192,6 +194,7 @@ SchemaByQueryIDBody SchemaByQueryIDRequest returns schema for given query ID and swagger:model SchemaByQueryIDBody */ type SchemaByQueryIDBody struct { + // service id ServiceID string `json:"service_id,omitempty"` @@ -232,6 +235,7 @@ SchemaByQueryIDDefaultBody schema by query ID default body swagger:model SchemaByQueryIDDefaultBody */ type SchemaByQueryIDDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -301,7 +305,9 @@ func (o *SchemaByQueryIDDefaultBody) ContextValidate(ctx context.Context, format } func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -321,6 +327,7 @@ func (o *SchemaByQueryIDDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -349,6 +356,7 @@ SchemaByQueryIDDefaultBodyDetailsItems0 schema by query ID default body details swagger:model SchemaByQueryIDDefaultBodyDetailsItems0 */ type SchemaByQueryIDDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -360,6 +368,7 @@ type SchemaByQueryIDDefaultBodyDetailsItems0 struct { func (o *SchemaByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -397,6 +406,7 @@ func (o *SchemaByQueryIDDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) err // MarshalJSON marshals this object with additional properties into a JSON object func (o SchemaByQueryIDDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -460,6 +470,7 @@ SchemaByQueryIDOKBody SchemaByQueryIDResponse is schema for given query ID and s swagger:model SchemaByQueryIDOKBody */ type SchemaByQueryIDOKBody struct { + // schema Schema string `json:"schema,omitempty"` } diff --git a/api/qan/v1/object_details.pb.go b/api/qan/v1/object_details.pb.go index 25c9db523a5..9a68f9f39d4 100644 --- a/api/qan/v1/object_details.pb.go +++ b/api/qan/v1/object_details.pb.go @@ -7,13 +7,12 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -1608,42 +1607,39 @@ func file_qan_v1_object_details_proto_rawDescGZIP() []byte { return file_qan_v1_object_details_proto_rawDescData } -var ( - file_qan_v1_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 26) - file_qan_v1_object_details_proto_goTypes = []any{ - (*GetMetricsRequest)(nil), // 0: qan.v1.GetMetricsRequest - (*GetMetricsResponse)(nil), // 1: qan.v1.GetMetricsResponse - (*MetricValues)(nil), // 2: qan.v1.MetricValues - (*Labels)(nil), // 3: qan.v1.Labels - (*GetQueryExampleRequest)(nil), // 4: qan.v1.GetQueryExampleRequest - (*GetQueryExampleResponse)(nil), // 5: qan.v1.GetQueryExampleResponse - (*QueryExample)(nil), // 6: qan.v1.QueryExample - (*GetLabelsRequest)(nil), // 7: qan.v1.GetLabelsRequest - (*GetLabelsResponse)(nil), // 8: qan.v1.GetLabelsResponse - (*ListLabelValues)(nil), // 9: qan.v1.ListLabelValues - (*GetQueryPlanRequest)(nil), // 10: qan.v1.GetQueryPlanRequest - (*GetQueryPlanResponse)(nil), // 11: qan.v1.GetQueryPlanResponse - (*GetHistogramRequest)(nil), // 12: qan.v1.GetHistogramRequest - (*GetHistogramResponse)(nil), // 13: qan.v1.GetHistogramResponse - (*HistogramItem)(nil), // 14: qan.v1.HistogramItem - (*QueryExistsRequest)(nil), // 15: qan.v1.QueryExistsRequest - (*QueryExistsResponse)(nil), // 16: qan.v1.QueryExistsResponse - (*SchemaByQueryIDRequest)(nil), // 17: qan.v1.SchemaByQueryIDRequest - (*SchemaByQueryIDResponse)(nil), // 18: qan.v1.SchemaByQueryIDResponse - (*ExplainFingerprintByQueryIDRequest)(nil), // 19: qan.v1.ExplainFingerprintByQueryIDRequest - (*ExplainFingerprintByQueryIDResponse)(nil), // 20: qan.v1.ExplainFingerprintByQueryIDResponse - (*GetSelectedQueryMetadataResponse)(nil), // 21: qan.v1.GetSelectedQueryMetadataResponse - nil, // 22: qan.v1.GetMetricsResponse.MetricsEntry - nil, // 23: qan.v1.GetMetricsResponse.TextMetricsEntry - nil, // 24: qan.v1.GetMetricsResponse.TotalsEntry - nil, // 25: qan.v1.GetLabelsResponse.LabelsEntry - (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp - (*MapFieldEntry)(nil), // 27: qan.v1.MapFieldEntry - (*Point)(nil), // 28: qan.v1.Point - (ExampleType)(0), // 29: qan.v1.ExampleType - } -) - +var file_qan_v1_object_details_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_qan_v1_object_details_proto_goTypes = []any{ + (*GetMetricsRequest)(nil), // 0: qan.v1.GetMetricsRequest + (*GetMetricsResponse)(nil), // 1: qan.v1.GetMetricsResponse + (*MetricValues)(nil), // 2: qan.v1.MetricValues + (*Labels)(nil), // 3: qan.v1.Labels + (*GetQueryExampleRequest)(nil), // 4: qan.v1.GetQueryExampleRequest + (*GetQueryExampleResponse)(nil), // 5: qan.v1.GetQueryExampleResponse + (*QueryExample)(nil), // 6: qan.v1.QueryExample + (*GetLabelsRequest)(nil), // 7: qan.v1.GetLabelsRequest + (*GetLabelsResponse)(nil), // 8: qan.v1.GetLabelsResponse + (*ListLabelValues)(nil), // 9: qan.v1.ListLabelValues + (*GetQueryPlanRequest)(nil), // 10: qan.v1.GetQueryPlanRequest + (*GetQueryPlanResponse)(nil), // 11: qan.v1.GetQueryPlanResponse + (*GetHistogramRequest)(nil), // 12: qan.v1.GetHistogramRequest + (*GetHistogramResponse)(nil), // 13: qan.v1.GetHistogramResponse + (*HistogramItem)(nil), // 14: qan.v1.HistogramItem + (*QueryExistsRequest)(nil), // 15: qan.v1.QueryExistsRequest + (*QueryExistsResponse)(nil), // 16: qan.v1.QueryExistsResponse + (*SchemaByQueryIDRequest)(nil), // 17: qan.v1.SchemaByQueryIDRequest + (*SchemaByQueryIDResponse)(nil), // 18: qan.v1.SchemaByQueryIDResponse + (*ExplainFingerprintByQueryIDRequest)(nil), // 19: qan.v1.ExplainFingerprintByQueryIDRequest + (*ExplainFingerprintByQueryIDResponse)(nil), // 20: qan.v1.ExplainFingerprintByQueryIDResponse + (*GetSelectedQueryMetadataResponse)(nil), // 21: qan.v1.GetSelectedQueryMetadataResponse + nil, // 22: qan.v1.GetMetricsResponse.MetricsEntry + nil, // 23: qan.v1.GetMetricsResponse.TextMetricsEntry + nil, // 24: qan.v1.GetMetricsResponse.TotalsEntry + nil, // 25: qan.v1.GetLabelsResponse.LabelsEntry + (*timestamppb.Timestamp)(nil), // 26: google.protobuf.Timestamp + (*MapFieldEntry)(nil), // 27: qan.v1.MapFieldEntry + (*Point)(nil), // 28: qan.v1.Point + (ExampleType)(0), // 29: qan.v1.ExampleType +} var file_qan_v1_object_details_proto_depIdxs = []int32{ 26, // 0: qan.v1.GetMetricsRequest.period_start_from:type_name -> google.protobuf.Timestamp 26, // 1: qan.v1.GetMetricsRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/object_details.swagger.json b/api/qan/v1/object_details.swagger.json new file mode 100644 index 00000000000..e5465adaa29 --- /dev/null +++ b/api/qan/v1/object_details.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "qan/v1/object_details.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/qan/v1/profile.pb.go b/api/qan/v1/profile.pb.go index 03ab97e871a..2dce8283404 100644 --- a/api/qan/v1/profile.pb.go +++ b/api/qan/v1/profile.pb.go @@ -7,13 +7,12 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -584,21 +583,18 @@ func file_qan_v1_profile_proto_rawDescGZIP() []byte { return file_qan_v1_profile_proto_rawDescData } -var ( - file_qan_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_qan_v1_profile_proto_goTypes = []any{ - (*GetReportRequest)(nil), // 0: qan.v1.GetReportRequest - (*ReportMapFieldEntry)(nil), // 1: qan.v1.ReportMapFieldEntry - (*GetReportResponse)(nil), // 2: qan.v1.GetReportResponse - (*Row)(nil), // 3: qan.v1.Row - (*Metric)(nil), // 4: qan.v1.Metric - (*Stat)(nil), // 5: qan.v1.Stat - nil, // 6: qan.v1.Row.MetricsEntry - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - (*Point)(nil), // 8: qan.v1.Point - } -) - +var file_qan_v1_profile_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_qan_v1_profile_proto_goTypes = []any{ + (*GetReportRequest)(nil), // 0: qan.v1.GetReportRequest + (*ReportMapFieldEntry)(nil), // 1: qan.v1.ReportMapFieldEntry + (*GetReportResponse)(nil), // 2: qan.v1.GetReportResponse + (*Row)(nil), // 3: qan.v1.Row + (*Metric)(nil), // 4: qan.v1.Metric + (*Stat)(nil), // 5: qan.v1.Stat + nil, // 6: qan.v1.Row.MetricsEntry + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (*Point)(nil), // 8: qan.v1.Point +} var file_qan_v1_profile_proto_depIdxs = []int32{ 7, // 0: qan.v1.GetReportRequest.period_start_from:type_name -> google.protobuf.Timestamp 7, // 1: qan.v1.GetReportRequest.period_start_to:type_name -> google.protobuf.Timestamp diff --git a/api/qan/v1/profile.swagger.json b/api/qan/v1/profile.swagger.json new file mode 100644 index 00000000000..d893a4c50f0 --- /dev/null +++ b/api/qan/v1/profile.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "qan/v1/profile.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/qan/v1/qan.pb.go b/api/qan/v1/qan.pb.go index 629cc7d94b5..8151058b8ea 100644 --- a/api/qan/v1/qan.pb.go +++ b/api/qan/v1/qan.pb.go @@ -7,12 +7,11 @@ package qanv1 import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( @@ -991,16 +990,13 @@ func file_qan_v1_qan_proto_rawDescGZIP() []byte { return file_qan_v1_qan_proto_rawDescData } -var ( - file_qan_v1_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_qan_v1_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_qan_v1_qan_proto_goTypes = []any{ - (ExampleType)(0), // 0: qan.v1.ExampleType - (*Point)(nil), // 1: qan.v1.Point - (*MapFieldEntry)(nil), // 2: qan.v1.MapFieldEntry - } -) - +var file_qan_v1_qan_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_qan_v1_qan_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_qan_v1_qan_proto_goTypes = []any{ + (ExampleType)(0), // 0: qan.v1.ExampleType + (*Point)(nil), // 1: qan.v1.Point + (*MapFieldEntry)(nil), // 2: qan.v1.MapFieldEntry +} var file_qan_v1_qan_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type diff --git a/api/qan/v1/qan.swagger.json b/api/qan/v1/qan.swagger.json new file mode 100644 index 00000000000..eef59052f3e --- /dev/null +++ b/api/qan/v1/qan.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "qan/v1/qan.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/qan/v1/service.pb.go b/api/qan/v1/service.pb.go index 0e52423aa51..05c3c795339 100644 --- a/api/qan/v1/service.pb.go +++ b/api/qan/v1/service.pb.go @@ -7,14 +7,13 @@ package qanv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -228,37 +227,34 @@ func file_qan_v1_service_proto_rawDescGZIP() []byte { return file_qan_v1_service_proto_rawDescData } -var ( - file_qan_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) - file_qan_v1_service_proto_goTypes = []any{ - (*GetMetricsNamesRequest)(nil), // 0: qan.v1.GetMetricsNamesRequest - (*GetMetricsNamesResponse)(nil), // 1: qan.v1.GetMetricsNamesResponse - (*HealthCheckRequest)(nil), // 2: qan.v1.HealthCheckRequest - (*HealthCheckResponse)(nil), // 3: qan.v1.HealthCheckResponse - nil, // 4: qan.v1.GetMetricsNamesResponse.DataEntry - (*GetReportRequest)(nil), // 5: qan.v1.GetReportRequest - (*GetFilteredMetricsNamesRequest)(nil), // 6: qan.v1.GetFilteredMetricsNamesRequest - (*GetMetricsRequest)(nil), // 7: qan.v1.GetMetricsRequest - (*GetLabelsRequest)(nil), // 8: qan.v1.GetLabelsRequest - (*GetHistogramRequest)(nil), // 9: qan.v1.GetHistogramRequest - (*ExplainFingerprintByQueryIDRequest)(nil), // 10: qan.v1.ExplainFingerprintByQueryIDRequest - (*GetQueryPlanRequest)(nil), // 11: qan.v1.GetQueryPlanRequest - (*QueryExistsRequest)(nil), // 12: qan.v1.QueryExistsRequest - (*SchemaByQueryIDRequest)(nil), // 13: qan.v1.SchemaByQueryIDRequest - (*GetQueryExampleRequest)(nil), // 14: qan.v1.GetQueryExampleRequest - (*GetReportResponse)(nil), // 15: qan.v1.GetReportResponse - (*GetFilteredMetricsNamesResponse)(nil), // 16: qan.v1.GetFilteredMetricsNamesResponse - (*GetMetricsResponse)(nil), // 17: qan.v1.GetMetricsResponse - (*GetLabelsResponse)(nil), // 18: qan.v1.GetLabelsResponse - (*GetHistogramResponse)(nil), // 19: qan.v1.GetHistogramResponse - (*ExplainFingerprintByQueryIDResponse)(nil), // 20: qan.v1.ExplainFingerprintByQueryIDResponse - (*GetQueryPlanResponse)(nil), // 21: qan.v1.GetQueryPlanResponse - (*QueryExistsResponse)(nil), // 22: qan.v1.QueryExistsResponse - (*SchemaByQueryIDResponse)(nil), // 23: qan.v1.SchemaByQueryIDResponse - (*GetQueryExampleResponse)(nil), // 24: qan.v1.GetQueryExampleResponse - } -) - +var file_qan_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_qan_v1_service_proto_goTypes = []any{ + (*GetMetricsNamesRequest)(nil), // 0: qan.v1.GetMetricsNamesRequest + (*GetMetricsNamesResponse)(nil), // 1: qan.v1.GetMetricsNamesResponse + (*HealthCheckRequest)(nil), // 2: qan.v1.HealthCheckRequest + (*HealthCheckResponse)(nil), // 3: qan.v1.HealthCheckResponse + nil, // 4: qan.v1.GetMetricsNamesResponse.DataEntry + (*GetReportRequest)(nil), // 5: qan.v1.GetReportRequest + (*GetFilteredMetricsNamesRequest)(nil), // 6: qan.v1.GetFilteredMetricsNamesRequest + (*GetMetricsRequest)(nil), // 7: qan.v1.GetMetricsRequest + (*GetLabelsRequest)(nil), // 8: qan.v1.GetLabelsRequest + (*GetHistogramRequest)(nil), // 9: qan.v1.GetHistogramRequest + (*ExplainFingerprintByQueryIDRequest)(nil), // 10: qan.v1.ExplainFingerprintByQueryIDRequest + (*GetQueryPlanRequest)(nil), // 11: qan.v1.GetQueryPlanRequest + (*QueryExistsRequest)(nil), // 12: qan.v1.QueryExistsRequest + (*SchemaByQueryIDRequest)(nil), // 13: qan.v1.SchemaByQueryIDRequest + (*GetQueryExampleRequest)(nil), // 14: qan.v1.GetQueryExampleRequest + (*GetReportResponse)(nil), // 15: qan.v1.GetReportResponse + (*GetFilteredMetricsNamesResponse)(nil), // 16: qan.v1.GetFilteredMetricsNamesResponse + (*GetMetricsResponse)(nil), // 17: qan.v1.GetMetricsResponse + (*GetLabelsResponse)(nil), // 18: qan.v1.GetLabelsResponse + (*GetHistogramResponse)(nil), // 19: qan.v1.GetHistogramResponse + (*ExplainFingerprintByQueryIDResponse)(nil), // 20: qan.v1.ExplainFingerprintByQueryIDResponse + (*GetQueryPlanResponse)(nil), // 21: qan.v1.GetQueryPlanResponse + (*QueryExistsResponse)(nil), // 22: qan.v1.QueryExistsResponse + (*SchemaByQueryIDResponse)(nil), // 23: qan.v1.SchemaByQueryIDResponse + (*GetQueryExampleResponse)(nil), // 24: qan.v1.GetQueryExampleResponse +} var file_qan_v1_service_proto_depIdxs = []int32{ 4, // 0: qan.v1.GetMetricsNamesResponse.data:type_name -> qan.v1.GetMetricsNamesResponse.DataEntry 5, // 1: qan.v1.QANService.GetReport:input_type -> qan.v1.GetReportRequest diff --git a/api/qan/v1/service.swagger.json b/api/qan/v1/service.swagger.json new file mode 100644 index 00000000000..d3b007a1e21 --- /dev/null +++ b/api/qan/v1/service.swagger.json @@ -0,0 +1,1568 @@ +{ + "swagger": "2.0", + "info": { + "title": "qan/v1/service.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "QANService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/qan/health": { + "get": { + "summary": "Health Check", + "description": "Returns readiness of QAN API2 service.", + "operationId": "HealthCheck", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1HealthCheckResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "QANService" + ] + } + }, + "/v1/qan/metrics:getFilters": { + "post": { + "summary": "Get Filters", + "description": "Provides a filtered map of metrics names.", + "operationId": "GetFilteredMetricsNames", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetFilteredMetricsNamesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "GetFilteredMetricsNamesRequest contains period for which we need filters.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetFilteredMetricsNamesRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan/metrics:getNames": { + "post": { + "summary": "Get Metrics Names", + "description": "Provides a map of all metrics names.", + "operationId": "GetMetricsNames", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetMetricsNamesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "MetricsNamesRequest is empty.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetMetricsNamesRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan/metrics:getReport": { + "post": { + "summary": "Get Report", + "description": "Returns a list of metrics grouped by queryid or other dimensions.", + "operationId": "GetReport", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetReportResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "ReportRequest defines filtering of metrics report for db server or other dimentions.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetReportRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan/query/{queryid}/plan": { + "get": { + "summary": "Get Query Plan", + "description": "Provides a query plan and plan id for specific filtering.", + "operationId": "GetQueryPlan", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetQueryPlanResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "queryid", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan/query:exists": { + "post": { + "summary": "Check Query Existence", + "description": "Checks if query exists in clickhouse.", + "operationId": "QueryExists", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1QueryExistsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "QueryExistsRequest check if provided query exists or not.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1QueryExistsRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan/query:getExample": { + "post": { + "summary": "Get Query Example", + "description": "Provides a list of query examples.", + "operationId": "GetQueryExample", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetQueryExampleResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "GetQueryExampleRequest defines filtering of query examples for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetQueryExampleRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan/query:getSchema": { + "post": { + "summary": "Get Schema", + "description": "Provides the schema for a given queryID and serviceID.", + "operationId": "SchemaByQueryID", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SchemaByQueryIDResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "SchemaByQueryIDRequest returns schema for given query ID and service ID.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SchemaByQueryIDRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan:explainFingerprint": { + "post": { + "summary": "Get Explain Fingerprint", + "description": "Provides an explain fingerprint for given query ID.", + "operationId": "ExplainFingerprintByQueryID", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ExplainFingerprintByQueryIDResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ExplainFingerprintByQueryIDRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan:getHistogram": { + "post": { + "summary": "Get Histogram", + "description": "Provides histogram items for specific filtering.", + "operationId": "GetHistogram", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetHistogramResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "GetHistogramRequest defines filtering by time range, labels and queryid.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetHistogramRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan:getLabels": { + "post": { + "summary": "Get Labels", + "description": "Provides a list of labels for object details.", + "operationId": "GetLabels", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetLabelsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "GetLabelsRequest defines filtering of object detail's labels for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetLabelsRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + }, + "/v1/qan:getMetrics": { + "post": { + "summary": "Get Metrics", + "description": "Provides a map of metrics for specific filtering.", + "operationId": "GetMetrics", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetMetricsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "GetMetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GetMetricsRequest" + } + } + ], + "tags": [ + "QANService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1ExampleType": { + "type": "string", + "enum": [ + "EXAMPLE_TYPE_UNSPECIFIED", + "EXAMPLE_TYPE_RANDOM", + "EXAMPLE_TYPE_SLOWEST", + "EXAMPLE_TYPE_FASTEST", + "EXAMPLE_TYPE_WITH_ERROR" + ], + "default": "EXAMPLE_TYPE_UNSPECIFIED", + "description": "ExampleType is a type of query example selected for this query class in given period of time." + }, + "v1ExplainFingerprintByQueryIDRequest": { + "type": "object", + "properties": { + "serviceid": { + "type": "string" + }, + "query_id": { + "type": "string" + } + }, + "description": "ExplainFingerprintByQueryIDRequest get explain fingerprint for given query ID." + }, + "v1ExplainFingerprintByQueryIDResponse": { + "type": "object", + "properties": { + "explain_fingerprint": { + "type": "string" + }, + "placeholders_count": { + "type": "integer", + "format": "int64" + } + }, + "description": "ExplainFingerprintByQueryIDResponse is explain fingerprint and placeholders count for given query ID." + }, + "v1GetFilteredMetricsNamesRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "main_metric_name": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MapFieldEntry" + } + } + }, + "description": "GetFilteredMetricsNamesRequest contains period for which we need filters." + }, + "v1GetFilteredMetricsNamesResponse": { + "type": "object", + "properties": { + "labels": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ListLabels" + } + } + }, + "description": "GetFilteredMetricsNamesResponse is map of labels for given period by key.\nKey is label's name and value is label's value and how many times it occur." + }, + "v1GetHistogramRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MapFieldEntry" + } + }, + "queryid": { + "type": "string" + } + }, + "description": "GetHistogramRequest defines filtering by time range, labels and queryid." + }, + "v1GetHistogramResponse": { + "type": "object", + "properties": { + "histogram_items": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1HistogramItem" + } + } + }, + "description": "GetHistogramResponse is histogram items as a list." + }, + "v1GetLabelsRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "filter_by": { + "type": "string", + "description": "dimension value: ex: queryid - 1D410B4BE5060972." + }, + "group_by": { + "type": "string", + "description": "one of dimension: queryid | host ..." + } + }, + "description": "GetLabelsRequest defines filtering of object detail's labels for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." + }, + "v1GetLabelsResponse": { + "type": "object", + "properties": { + "labels": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ListLabelValues" + } + } + }, + "description": "GetLabelsResponse is a map of labels names as keys and labels values as a list." + }, + "v1GetMetricsNamesRequest": { + "type": "object", + "description": "MetricsNamesRequest is empty." + }, + "v1GetMetricsNamesResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "description": "MetricsNamesReply is map of stored metrics:\nkey is root of metric name in db (Ex:. [m_]query_time[_sum]);\nvalue - Human readable name of metrics." + }, + "v1GetMetricsRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "filter_by": { + "type": "string", + "description": "dimension value: ex: queryid - 1D410B4BE5060972." + }, + "group_by": { + "type": "string", + "description": "one of dimension: queryid | host ..." + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MapFieldEntry" + } + }, + "include_only_fields": { + "type": "array", + "items": { + "type": "string" + } + }, + "totals": { + "type": "boolean", + "title": "retrieve only values for totals, excluding N/A values" + } + }, + "description": "GetMetricsRequest defines filtering of metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." + }, + "v1GetMetricsResponse": { + "type": "object", + "properties": { + "metrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1MetricValues" + } + }, + "text_metrics": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sparkline": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Point" + } + }, + "totals": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1MetricValues" + } + }, + "fingerprint": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1GetSelectedQueryMetadataResponse" + } + }, + "description": "GetMetricsResponse defines metrics for specific value of dimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." + }, + "v1GetQueryExampleRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "filter_by": { + "type": "string", + "description": "dimension value: ex: queryid - 1D410B4BE5060972." + }, + "group_by": { + "type": "string", + "description": "one of dimension: queryid | host ..." + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MapFieldEntry" + } + }, + "limit": { + "type": "integer", + "format": "int64" + } + }, + "description": "GetQueryExampleRequest defines filtering of query examples for specific value of\ndimension (ex.: host=hostname1 or queryid=1D410B4BE5060972." + }, + "v1GetQueryExampleResponse": { + "type": "object", + "properties": { + "query_examples": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QueryExample" + } + } + }, + "description": "GetQueryExampleResponse list of query examples." + }, + "v1GetQueryPlanResponse": { + "type": "object", + "properties": { + "planid": { + "type": "string" + }, + "query_plan": { + "type": "string" + } + }, + "description": "GetQueryPlanResponse contains planid and query_plan." + }, + "v1GetReportRequest": { + "type": "object", + "properties": { + "period_start_from": { + "type": "string", + "format": "date-time" + }, + "period_start_to": { + "type": "string", + "format": "date-time" + }, + "group_by": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ReportMapFieldEntry" + } + }, + "columns": { + "type": "array", + "items": { + "type": "string" + } + }, + "order_by": { + "type": "string" + }, + "offset": { + "type": "integer", + "format": "int64" + }, + "limit": { + "type": "integer", + "format": "int64" + }, + "main_metric": { + "type": "string" + }, + "search": { + "type": "string" + } + }, + "description": "ReportRequest defines filtering of metrics report for db server or other dimentions." + }, + "v1GetReportResponse": { + "type": "object", + "properties": { + "total_rows": { + "type": "integer", + "format": "int64" + }, + "offset": { + "type": "integer", + "format": "int64" + }, + "limit": { + "type": "integer", + "format": "int64" + }, + "rows": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Row" + } + } + }, + "description": "ReportReply is list of reports per quieryids, hosts etc." + }, + "v1GetSelectedQueryMetadataResponse": { + "type": "object", + "properties": { + "service_name": { + "type": "string" + }, + "database": { + "type": "string" + }, + "schema": { + "type": "string" + }, + "username": { + "type": "string" + }, + "replication_set": { + "type": "string" + }, + "cluster": { + "type": "string" + }, + "service_type": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "environment": { + "type": "string" + }, + "node_id": { + "type": "string" + }, + "node_name": { + "type": "string" + }, + "node_type": { + "type": "string" + } + }, + "description": "GetSlecetedQueryMetadataResponse consists selected query metadata to show in details for given query ID." + }, + "v1HealthCheckResponse": { + "type": "object", + "description": "HealthCheckResponse is empty, based on returned error qan-api2 is ready or not." + }, + "v1HistogramItem": { + "type": "object", + "properties": { + "range": { + "type": "string" + }, + "frequency": { + "type": "integer", + "format": "int64" + } + }, + "description": "HistogramItem represents one item in histogram." + }, + "v1ListLabelValues": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "ListLabelValues is list of label's values." + }, + "v1ListLabels": { + "type": "object", + "properties": { + "name": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Values" + } + } + }, + "description": "ListLabels is list of label's values: duplicates are impossible." + }, + "v1MapFieldEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "MapFieldEntry allows to pass labels/dimensions in form like {\"server\": [\"db1\", \"db2\"...]}." + }, + "v1Metric": { + "type": "object", + "properties": { + "stats": { + "$ref": "#/definitions/v1Stat" + } + }, + "description": "Metric cell." + }, + "v1MetricValues": { + "type": "object", + "properties": { + "rate": { + "type": "number", + "format": "float" + }, + "cnt": { + "type": "number", + "format": "float" + }, + "sum": { + "type": "number", + "format": "float" + }, + "min": { + "type": "number", + "format": "float" + }, + "max": { + "type": "number", + "format": "float" + }, + "avg": { + "type": "number", + "format": "float" + }, + "p99": { + "type": "number", + "format": "float" + }, + "percent_of_total": { + "type": "number", + "format": "float" + } + }, + "description": "MetricValues is statistics of specific metric." + }, + "v1Point": { + "type": "object", + "properties": { + "point": { + "type": "integer", + "format": "int64", + "description": "The serial number of the chart point from the largest time in the time interval to the lowest time in the time range." + }, + "time_frame": { + "type": "integer", + "format": "int64", + "description": "Duration beetween two points." + }, + "timestamp": { + "type": "string", + "description": "Time of point in format RFC3339." + }, + "load": { + "type": "number", + "format": "float", + "description": "load is query_time / time_range." + }, + "num_queries_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries in bucket." + }, + "num_queries_with_errors_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries with errors." + }, + "num_queries_with_warnings_per_sec": { + "type": "number", + "format": "float", + "description": "number of queries with warnings." + }, + "m_query_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The statement execution time in seconds." + }, + "m_lock_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The time to acquire locks in seconds." + }, + "m_rows_sent_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of rows sent to the client." + }, + "m_rows_examined_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of rows scanned - SELECT." + }, + "m_rows_affected_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of rows changed - UPDATE, DELETE, INSERT." + }, + "m_rows_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of rows read from tables." + }, + "m_merge_passes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of merge passes that the sort algorithm has had to do." + }, + "m_innodb_io_r_ops_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Counts the number of page read operations scheduled." + }, + "m_innodb_io_r_bytes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Similar to innodb_IO_r_ops, but the unit is bytes." + }, + "m_innodb_io_r_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) it took InnoDB to actually read the data from storage." + }, + "m_innodb_rec_lock_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query waited for row locks." + }, + "m_innodb_queue_wait_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long (in seconds) the query spent either waiting to enter the InnoDB queue or inside that queue waiting for execution." + }, + "m_innodb_pages_distinct_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Counts approximately the number of unique pages the query accessed." + }, + "m_query_length_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Shows how long the query is." + }, + "m_bytes_sent_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of bytes sent to all clients." + }, + "m_tmp_tables_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on memory for the query." + }, + "m_tmp_disk_tables_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of temporary tables created on disk for the query." + }, + "m_tmp_table_sizes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total Size in bytes for all temporary tables used in the query." + }, + "m_qc_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Query Cache hits." + }, + "m_full_scan_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query performed a full table scan." + }, + "m_full_join_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query performed a full join (a join without indexes)." + }, + "m_tmp_table_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query created an implicit internal temporary table." + }, + "m_tmp_table_on_disk_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The querys temporary table was stored on disk." + }, + "m_filesort_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The query used a filesort." + }, + "m_filesort_on_disk_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The filesort was performed on disk." + }, + "m_select_full_range_join_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins that used a range search on a reference table." + }, + "m_select_range_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins that used ranges on the first table." + }, + "m_select_range_check_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of joins without keys that check for key usage after each row." + }, + "m_sort_range_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done using ranges." + }, + "m_sort_rows_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorted rows." + }, + "m_sort_scan_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of sorts that were done by scanning the table." + }, + "m_no_index_used_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of queries without index." + }, + "m_no_good_index_used_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of queries without good index." + }, + "m_docs_returned_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of returned documents." + }, + "m_response_length_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The response length of the query result in bytes." + }, + "m_docs_scanned_sum_per_sec": { + "type": "number", + "format": "float", + "description": "The number of scanned documents." + }, + "m_docs_examined_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of documents scanned during query execution." + }, + "m_keys_examined_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of index keys scanned during query execution." + }, + "m_locks_global_acquire_count_read_shared_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of times a global read lock was acquired during query execution." + }, + "m_locks_global_acquire_count_write_shared_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of times a global write lock was acquired during query execution." + }, + "m_locks_database_acquire_count_read_shared_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of times a read lock was acquired at the database level during query execution." + }, + "m_locks_database_acquire_wait_count_read_shared_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of times a read lock at the database level was requested but had to wait before being granted." + }, + "m_locks_database_time_acquiring_micros_read_shared_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Indicates the time, spent acquiring a read lock at the database level during an operation." + }, + "m_locks_collection_acquire_count_read_shared_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Number of times a read lock was acquired on a specific collection during operations." + }, + "m_storage_bytes_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of bytes read from storage during a specific operation." + }, + "m_storage_time_reading_micros_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Indicates the time, spent reading data from storage during an operation." + }, + "m_shared_blks_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared block cache hits by the statement." + }, + "m_shared_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks read by the statement." + }, + "m_shared_blks_dirtied_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks dirtied by the statement." + }, + "m_shared_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of shared blocks written by the statement." + }, + "m_shared_blk_read_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent reading shared blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_shared_blk_write_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent writing shared blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_local_blk_read_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent reading shared blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_local_blk_write_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent writing shared blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_local_blks_hit_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local block cache hits by the statement." + }, + "m_local_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks read by the statement." + }, + "m_local_blks_dirtied_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks dirtied by the statement." + }, + "m_local_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of local blocks written by the statement." + }, + "m_temp_blks_read_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks read by the statement." + }, + "m_temp_blks_written_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of temp blocks written by the statement." + }, + "m_blk_read_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent reading blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_blk_write_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time the statement spent writing blocks, in milliseconds (if track_io_timing is enabled, otherwise zero)." + }, + "m_cpu_user_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time user spent in query." + }, + "m_cpu_sys_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total time system spent in query." + }, + "m_plans_calls_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of planned calls." + }, + "m_wal_records_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of WAL (Write-ahead logging) records." + }, + "m_wal_fpi_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of FPI (full page images) in WAL (Write-ahead logging) records." + }, + "m_wal_bytes_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total bytes of WAL (Write-ahead logging) records." + }, + "m_wal_buffers_full_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of times WAL buffers become full." + }, + "m_parallel_workers_to_launch_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of parallel workers to launch." + }, + "m_parallel_workers_launched_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Total number of parallel workers launched." + }, + "m_plan_time_sum_per_sec": { + "type": "number", + "format": "float", + "description": "Plan time in per seconds." + } + }, + "description": "Point contains values that represents abscissa (time) and ordinate (volume etc.)\nof every point in a coordinate system of Sparklines." + }, + "v1QueryExample": { + "type": "object", + "properties": { + "example": { + "type": "string" + }, + "example_type": { + "$ref": "#/definitions/v1ExampleType" + }, + "is_truncated": { + "type": "integer", + "format": "int64" + }, + "placeholders_count": { + "type": "integer", + "format": "int64" + }, + "explain_fingerprint": { + "type": "string" + }, + "query_id": { + "type": "string" + }, + "example_metrics": { + "type": "string" + }, + "service_id": { + "type": "string" + }, + "service_type": { + "type": "string" + }, + "schema": { + "type": "string" + }, + "tables": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "QueryExample shows query examples and their metrics." + }, + "v1QueryExistsRequest": { + "type": "object", + "properties": { + "serviceid": { + "type": "string" + }, + "query": { + "type": "string" + } + }, + "description": "QueryExistsRequest check if provided query exists or not." + }, + "v1QueryExistsResponse": { + "type": "object", + "properties": { + "exists": { + "type": "boolean" + } + }, + "description": "QueryExistsResponse returns true if query exists." + }, + "v1ReportMapFieldEntry": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "ReportMapFieldEntry allows to pass labels/dimentions in form like {\"server\": [\"db1\", \"db2\"...]}." + }, + "v1Row": { + "type": "object", + "properties": { + "rank": { + "type": "integer", + "format": "int64" + }, + "dimension": { + "type": "string" + }, + "database": { + "type": "string" + }, + "metrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1Metric" + } + }, + "sparkline": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Point" + } + }, + "fingerprint": { + "type": "string" + }, + "num_queries": { + "type": "integer", + "format": "int64" + }, + "qps": { + "type": "number", + "format": "float" + }, + "load": { + "type": "number", + "format": "float" + } + }, + "description": "Row define metrics for selected dimention." + }, + "v1SchemaByQueryIDRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string" + }, + "query_id": { + "type": "string" + } + }, + "description": "SchemaByQueryIDRequest returns schema for given query ID and service ID." + }, + "v1SchemaByQueryIDResponse": { + "type": "object", + "properties": { + "schema": { + "type": "string" + } + }, + "description": "SchemaByQueryIDResponse is schema for given query ID and service ID." + }, + "v1Stat": { + "type": "object", + "properties": { + "rate": { + "type": "number", + "format": "float" + }, + "cnt": { + "type": "number", + "format": "float" + }, + "sum": { + "type": "number", + "format": "float" + }, + "min": { + "type": "number", + "format": "float" + }, + "max": { + "type": "number", + "format": "float" + }, + "p99": { + "type": "number", + "format": "float" + }, + "avg": { + "type": "number", + "format": "float" + }, + "sum_per_sec": { + "type": "number", + "format": "float" + } + }, + "description": "Stat is statistics of specific metric." + }, + "v1Values": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "main_metric_percent": { + "type": "number", + "format": "float" + }, + "main_metric_per_sec": { + "type": "number", + "format": "float" + } + }, + "description": "Values is label values and main metric percent and per second." + } + } +} diff --git a/api/qan/v1/service_grpc.pb.go b/api/qan/v1/service_grpc.pb.go index d96a6d9d45c..752a91653a0 100644 --- a/api/qan/v1/service_grpc.pb.go +++ b/api/qan/v1/service_grpc.pb.go @@ -8,7 +8,6 @@ package qanv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -237,47 +236,36 @@ type UnimplementedQANServiceServer struct{} func (UnimplementedQANServiceServer) GetReport(context.Context, *GetReportRequest) (*GetReportResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetReport not implemented") } - func (UnimplementedQANServiceServer) GetFilteredMetricsNames(context.Context, *GetFilteredMetricsNamesRequest) (*GetFilteredMetricsNamesResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetFilteredMetricsNames not implemented") } - func (UnimplementedQANServiceServer) GetMetricsNames(context.Context, *GetMetricsNamesRequest) (*GetMetricsNamesResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetMetricsNames not implemented") } - func (UnimplementedQANServiceServer) GetMetrics(context.Context, *GetMetricsRequest) (*GetMetricsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetMetrics not implemented") } - func (UnimplementedQANServiceServer) GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetLabels not implemented") } - func (UnimplementedQANServiceServer) GetHistogram(context.Context, *GetHistogramRequest) (*GetHistogramResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetHistogram not implemented") } - func (UnimplementedQANServiceServer) ExplainFingerprintByQueryID(context.Context, *ExplainFingerprintByQueryIDRequest) (*ExplainFingerprintByQueryIDResponse, error) { return nil, status.Error(codes.Unimplemented, "method ExplainFingerprintByQueryID not implemented") } - func (UnimplementedQANServiceServer) GetQueryPlan(context.Context, *GetQueryPlanRequest) (*GetQueryPlanResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetQueryPlan not implemented") } - func (UnimplementedQANServiceServer) QueryExists(context.Context, *QueryExistsRequest) (*QueryExistsResponse, error) { return nil, status.Error(codes.Unimplemented, "method QueryExists not implemented") } - func (UnimplementedQANServiceServer) SchemaByQueryID(context.Context, *SchemaByQueryIDRequest) (*SchemaByQueryIDResponse, error) { return nil, status.Error(codes.Unimplemented, "method SchemaByQueryID not implemented") } - func (UnimplementedQANServiceServer) GetQueryExample(context.Context, *GetQueryExampleRequest) (*GetQueryExampleResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetQueryExample not implemented") } - func (UnimplementedQANServiceServer) HealthCheck(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) { return nil, status.Error(codes.Unimplemented, "method HealthCheck not implemented") } diff --git a/api/realtimeanalytics/v1/collector.pb.go b/api/realtimeanalytics/v1/collector.pb.go index f149de0a6cf..8bb47bf7612 100644 --- a/api/realtimeanalytics/v1/collector.pb.go +++ b/api/realtimeanalytics/v1/collector.pb.go @@ -7,13 +7,12 @@ package realtimeanalyticsv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "google.golang.org/genproto/googleapis/api/visibility" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -132,15 +131,12 @@ func file_realtimeanalytics_v1_collector_proto_rawDescGZIP() []byte { return file_realtimeanalytics_v1_collector_proto_rawDescData } -var ( - file_realtimeanalytics_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_realtimeanalytics_v1_collector_proto_goTypes = []any{ - (*CollectRequest)(nil), // 0: realtimeanalytics.v1.CollectRequest - (*CollectResponse)(nil), // 1: realtimeanalytics.v1.CollectResponse - (*QueryData)(nil), // 2: realtimeanalytics.v1.QueryData - } -) - +var file_realtimeanalytics_v1_collector_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_realtimeanalytics_v1_collector_proto_goTypes = []any{ + (*CollectRequest)(nil), // 0: realtimeanalytics.v1.CollectRequest + (*CollectResponse)(nil), // 1: realtimeanalytics.v1.CollectResponse + (*QueryData)(nil), // 2: realtimeanalytics.v1.QueryData +} var file_realtimeanalytics_v1_collector_proto_depIdxs = []int32{ 2, // 0: realtimeanalytics.v1.CollectRequest.queries:type_name -> realtimeanalytics.v1.QueryData 0, // 1: realtimeanalytics.v1.CollectorService.Collect:input_type -> realtimeanalytics.v1.CollectRequest diff --git a/api/realtimeanalytics/v1/collector.swagger.json b/api/realtimeanalytics/v1/collector.swagger.json new file mode 100644 index 00000000000..0216a29e22a --- /dev/null +++ b/api/realtimeanalytics/v1/collector.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "realtimeanalytics/v1/collector.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/realtimeanalytics/v1/collector_grpc.pb.go b/api/realtimeanalytics/v1/collector_grpc.pb.go index 738bc9985e9..7bd50b8144c 100644 --- a/api/realtimeanalytics/v1/collector_grpc.pb.go +++ b/api/realtimeanalytics/v1/collector_grpc.pb.go @@ -8,7 +8,6 @@ package realtimeanalyticsv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_parameters.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_parameters.go index 96fb471c460..9fd15528e3f 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_parameters.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_parameters.go @@ -60,6 +60,7 @@ ListServicesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListServicesParams struct { + /* ServiceType. Return only services filtered by service type. @@ -85,7 +86,9 @@ func (o *ListServicesParams) WithDefaults() *ListServicesParams { // // All values with no default are reset to their zero value. func (o *ListServicesParams) SetDefaults() { - serviceTypeDefault := string("SERVICE_TYPE_UNSPECIFIED") + var ( + serviceTypeDefault = string("SERVICE_TYPE_UNSPECIFIED") + ) val := ListServicesParams{ ServiceType: &serviceTypeDefault, @@ -143,6 +146,7 @@ func (o *ListServicesParams) SetServiceType(serviceType *string) { // WriteToRequest writes these params to a swagger request func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -158,6 +162,7 @@ func (o *ListServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qServiceType := qrServiceType if qServiceType != "" { + if err := r.SetQueryParam("service_type", qServiceType); err != nil { return err } diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_responses.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_responses.go index bcac3d589dc..373d9475d69 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_responses.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_services_responses.go @@ -104,6 +104,7 @@ func (o *ListServicesOK) GetPayload() *ListServicesOKBody { } func (o *ListServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListServicesDefault) GetPayload() *ListServicesDefaultBody { } func (o *ListServicesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListServicesDefaultBody) // response payload @@ -192,6 +194,7 @@ ListServicesDefaultBody list services default body swagger:model ListServicesDefaultBody */ type ListServicesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *ListServicesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *ListServicesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -309,6 +315,7 @@ ListServicesDefaultBodyDetailsItems0 list services default body details items0 swagger:model ListServicesDefaultBodyDetailsItems0 */ type ListServicesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type ListServicesDefaultBodyDetailsItems0 struct { func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *ListServicesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListServicesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ ListServicesOKBody list services OK body swagger:model ListServicesOKBody */ type ListServicesOKBody struct { + // mongodb Mongodb []*ListServicesOKBodyMongodbItems0 `json:"mongodb"` } @@ -483,7 +493,9 @@ func (o *ListServicesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Mongodb); i++ { + if o.Mongodb[i] != nil { if swag.IsZero(o.Mongodb[i]) { // not required @@ -503,6 +515,7 @@ func (o *ListServicesOKBody) contextValidateMongodb(ctx context.Context, formats return err } } + } return nil @@ -531,6 +544,7 @@ ListServicesOKBodyMongodbItems0 MongoDBService represents a generic MongoDB inst swagger:model ListServicesOKBodyMongodbItems0 */ type ListServicesOKBodyMongodbItems0 struct { + // Unique randomly generated instance identifier. ServiceID string `json:"service_id,omitempty"` diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_sessions_parameters.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_sessions_parameters.go index d2d9bb171b0..5a86ae81b0c 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_sessions_parameters.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_sessions_parameters.go @@ -60,6 +60,7 @@ ListSessionsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ListSessionsParams struct { + /* ClusterName. Optional filter by cluster name. @@ -132,6 +133,7 @@ func (o *ListSessionsParams) SetClusterName(clusterName *string) { // WriteToRequest writes these params to a swagger request func (o *ListSessionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -147,6 +149,7 @@ func (o *ListSessionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qClusterName := qrClusterName if qClusterName != "" { + if err := r.SetQueryParam("cluster_name", qClusterName); err != nil { return err } diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_sessions_responses.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_sessions_responses.go index 1fc6503d603..e54f361204c 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_sessions_responses.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/list_sessions_responses.go @@ -105,6 +105,7 @@ func (o *ListSessionsOK) GetPayload() *ListSessionsOKBody { } func (o *ListSessionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListSessionsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListSessionsDefault) GetPayload() *ListSessionsDefaultBody { } func (o *ListSessionsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListSessionsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListSessionsDefaultBody list sessions default body swagger:model ListSessionsDefaultBody */ type ListSessionsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListSessionsDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *ListSessionsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListSessionsDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -310,6 +316,7 @@ ListSessionsDefaultBodyDetailsItems0 list sessions default body details items0 swagger:model ListSessionsDefaultBodyDetailsItems0 */ type ListSessionsDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type ListSessionsDefaultBodyDetailsItems0 struct { func (o *ListSessionsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *ListSessionsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o ListSessionsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ ListSessionsOKBody ListSessionsResponse returns the list of currently active Rea swagger:model ListSessionsOKBody */ type ListSessionsOKBody struct { + // List of active Real-Time Analytics Sessions. Sessions []*ListSessionsOKBodySessionsItems0 `json:"sessions"` } @@ -484,7 +494,9 @@ func (o *ListSessionsOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ListSessionsOKBody) contextValidateSessions(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Sessions); i++ { + if o.Sessions[i] != nil { if swag.IsZero(o.Sessions[i]) { // not required @@ -504,6 +516,7 @@ func (o *ListSessionsOKBody) contextValidateSessions(ctx context.Context, format return err } } + } return nil @@ -532,6 +545,7 @@ ListSessionsOKBodySessionsItems0 Session represents an active Real-Time Analytic swagger:model ListSessionsOKBodySessionsItems0 */ type ListSessionsOKBodySessionsItems0 struct { + // Service identifier that has enabled Real-Time Analytics session. ServiceID string `json:"service_id,omitempty"` diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_parameters.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_parameters.go index 0960212209a..d2ec16d2f6d 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_parameters.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_parameters.go @@ -60,6 +60,7 @@ SearchQueriesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type SearchQueriesParams struct { + /* Body. SearchQueriesRequest contains optional filters for listing active Real-Time Analytics session Queries. @@ -132,6 +133,7 @@ func (o *SearchQueriesParams) SetBody(body SearchQueriesBody) { // WriteToRequest writes these params to a swagger request func (o *SearchQueriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_responses.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_responses.go index c99d83d5853..189f74dfd04 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_responses.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/search_queries_responses.go @@ -105,6 +105,7 @@ func (o *SearchQueriesOK) GetPayload() *SearchQueriesOKBody { } func (o *SearchQueriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchQueriesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *SearchQueriesDefault) GetPayload() *SearchQueriesDefaultBody { } func (o *SearchQueriesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(SearchQueriesDefaultBody) // response payload @@ -193,6 +195,7 @@ SearchQueriesBody SearchQueriesRequest contains optional filters for listing act swagger:model SearchQueriesBody */ type SearchQueriesBody struct { + // Optional filter by Service identifiers. ServiceIds []string `json:"service_ids"` @@ -233,6 +236,7 @@ SearchQueriesDefaultBody search queries default body swagger:model SearchQueriesDefaultBody */ type SearchQueriesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -302,7 +306,9 @@ func (o *SearchQueriesDefaultBody) ContextValidate(ctx context.Context, formats } func (o *SearchQueriesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -322,6 +328,7 @@ func (o *SearchQueriesDefaultBody) contextValidateDetails(ctx context.Context, f return err } } + } return nil @@ -350,6 +357,7 @@ SearchQueriesDefaultBodyDetailsItems0 search queries default body details items0 swagger:model SearchQueriesDefaultBodyDetailsItems0 */ type SearchQueriesDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -361,6 +369,7 @@ type SearchQueriesDefaultBodyDetailsItems0 struct { func (o *SearchQueriesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -398,6 +407,7 @@ func (o *SearchQueriesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o SearchQueriesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -461,6 +471,7 @@ SearchQueriesOKBody SearchQueriesResponse returns the list of currently active R swagger:model SearchQueriesOKBody */ type SearchQueriesOKBody struct { + // List of active Real-Time Analytics session Queries. Queries []*SearchQueriesOKBodyQueriesItems0 `json:"queries"` } @@ -524,7 +535,9 @@ func (o *SearchQueriesOKBody) ContextValidate(ctx context.Context, formats strfm } func (o *SearchQueriesOKBody) contextValidateQueries(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Queries); i++ { + if o.Queries[i] != nil { if swag.IsZero(o.Queries[i]) { // not required @@ -544,6 +557,7 @@ func (o *SearchQueriesOKBody) contextValidateQueries(ctx context.Context, format return err } } + } return nil @@ -573,6 +587,7 @@ SearchQueriesOKBodyQueriesItems0 QueryData represents a single Real-Time Analyti swagger:model SearchQueriesOKBodyQueriesItems0 */ type SearchQueriesOKBodyQueriesItems0 struct { + // PMM Service identifier that reported the query. ServiceID string `json:"service_id,omitempty"` @@ -670,6 +685,7 @@ func (o *SearchQueriesOKBodyQueriesItems0) ContextValidate(ctx context.Context, } func (o *SearchQueriesOKBodyQueriesItems0) contextValidateMongoDBPayload(ctx context.Context, formats strfmt.Registry) error { + if o.MongoDBPayload != nil { if swag.IsZero(o.MongoDBPayload) { // not required @@ -716,6 +732,7 @@ SearchQueriesOKBodyQueriesItems0MongoDBPayload QueryMongoDBData holds MongoDB-sp swagger:model SearchQueriesOKBodyQueriesItems0MongoDBPayload */ type SearchQueriesOKBodyQueriesItems0MongoDBPayload struct { + // MongoDB instance address(host:port) that processing the query. DBInstanceAddress string `json:"db_instance_address,omitempty"` diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/start_session_parameters.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/start_session_parameters.go index 9a02b81b572..24d3dc531e9 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/start_session_parameters.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/start_session_parameters.go @@ -60,6 +60,7 @@ StartSessionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartSessionParams struct { + /* Body. StartSessionRequest contains parameters for starting Real-Time Analytics session. @@ -132,6 +133,7 @@ func (o *StartSessionParams) SetBody(body StartSessionBody) { // WriteToRequest writes these params to a swagger request func (o *StartSessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/start_session_responses.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/start_session_responses.go index 8cfa9fd7612..579db2aef04 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/start_session_responses.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/start_session_responses.go @@ -105,6 +105,7 @@ func (o *StartSessionOK) GetPayload() *StartSessionOKBody { } func (o *StartSessionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartSessionOKBody) // response payload @@ -178,6 +179,7 @@ func (o *StartSessionDefault) GetPayload() *StartSessionDefaultBody { } func (o *StartSessionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartSessionDefaultBody) // response payload @@ -193,6 +195,7 @@ StartSessionBody StartSessionRequest contains parameters for starting Real-Time swagger:model StartSessionBody */ type StartSessionBody struct { + // Required service identifier the Real-Time Analytics session shall be started for. ServiceID string `json:"service_id,omitempty"` } @@ -230,6 +233,7 @@ StartSessionDefaultBody start session default body swagger:model StartSessionDefaultBody */ type StartSessionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -299,7 +303,9 @@ func (o *StartSessionDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *StartSessionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -319,6 +325,7 @@ func (o *StartSessionDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -347,6 +354,7 @@ StartSessionDefaultBodyDetailsItems0 start session default body details items0 swagger:model StartSessionDefaultBodyDetailsItems0 */ type StartSessionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -358,6 +366,7 @@ type StartSessionDefaultBodyDetailsItems0 struct { func (o *StartSessionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -395,6 +404,7 @@ func (o *StartSessionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o StartSessionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -458,6 +468,7 @@ StartSessionOKBody StartSessionResponse is the response for starting Real-Time A swagger:model StartSessionOKBody */ type StartSessionOKBody struct { + // session Session *StartSessionOKBodySession `json:"session,omitempty"` } @@ -514,6 +525,7 @@ func (o *StartSessionOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *StartSessionOKBody) contextValidateSession(ctx context.Context, formats strfmt.Registry) error { + if o.Session != nil { if swag.IsZero(o.Session) { // not required @@ -560,6 +572,7 @@ StartSessionOKBodySession Session represents an active Real-Time Analytics sessi swagger:model StartSessionOKBodySession */ type StartSessionOKBodySession struct { + // Service identifier that has enabled Real-Time Analytics session. ServiceID string `json:"service_id,omitempty"` diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/stop_session_parameters.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/stop_session_parameters.go index 13fe4370d0e..89661b9e6dc 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/stop_session_parameters.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/stop_session_parameters.go @@ -60,6 +60,7 @@ StopSessionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StopSessionParams struct { + /* Body. StopSessionRequest contains parameters for stopping Real-Time Analytics session. @@ -132,6 +133,7 @@ func (o *StopSessionParams) SetBody(body StopSessionBody) { // WriteToRequest writes these params to a swagger request func (o *StopSessionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/stop_session_responses.go b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/stop_session_responses.go index 020899894ca..38a1c14f612 100644 --- a/api/realtimeanalytics/v1/json/client/realtime_analytics_service/stop_session_responses.go +++ b/api/realtimeanalytics/v1/json/client/realtime_analytics_service/stop_session_responses.go @@ -104,6 +104,7 @@ func (o *StopSessionOK) GetPayload() any { } func (o *StopSessionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *StopSessionDefault) GetPayload() *StopSessionDefaultBody { } func (o *StopSessionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StopSessionDefaultBody) // response payload @@ -190,6 +192,7 @@ StopSessionBody StopSessionRequest contains parameters for stopping Real-Time An swagger:model StopSessionBody */ type StopSessionBody struct { + // Required service identifier the Real-Time Analytics session shall be stopped for. ServiceID string `json:"service_id,omitempty"` } @@ -227,6 +230,7 @@ StopSessionDefaultBody stop session default body swagger:model StopSessionDefaultBody */ type StopSessionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -296,7 +300,9 @@ func (o *StopSessionDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StopSessionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -316,6 +322,7 @@ func (o *StopSessionDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -344,6 +351,7 @@ StopSessionDefaultBodyDetailsItems0 stop session default body details items0 swagger:model StopSessionDefaultBodyDetailsItems0 */ type StopSessionDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -355,6 +363,7 @@ type StopSessionDefaultBodyDetailsItems0 struct { func (o *StopSessionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -392,6 +401,7 @@ func (o *StopSessionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StopSessionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } diff --git a/api/realtimeanalytics/v1/query.pb.go b/api/realtimeanalytics/v1/query.pb.go index 6d3f2df71da..d2c537c1744 100644 --- a/api/realtimeanalytics/v1/query.pb.go +++ b/api/realtimeanalytics/v1/query.pb.go @@ -7,14 +7,13 @@ package realtimeanalyticsv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -320,16 +319,13 @@ func file_realtimeanalytics_v1_query_proto_rawDescGZIP() []byte { return file_realtimeanalytics_v1_query_proto_rawDescData } -var ( - file_realtimeanalytics_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) - file_realtimeanalytics_v1_query_proto_goTypes = []any{ - (*QueryMongoDBData)(nil), // 0: realtimeanalytics.v1.QueryMongoDBData - (*QueryData)(nil), // 1: realtimeanalytics.v1.QueryData - (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 3: google.protobuf.Duration - } -) - +var file_realtimeanalytics_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_realtimeanalytics_v1_query_proto_goTypes = []any{ + (*QueryMongoDBData)(nil), // 0: realtimeanalytics.v1.QueryMongoDBData + (*QueryData)(nil), // 1: realtimeanalytics.v1.QueryData + (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 3: google.protobuf.Duration +} var file_realtimeanalytics_v1_query_proto_depIdxs = []int32{ 2, // 0: realtimeanalytics.v1.QueryMongoDBData.operation_start_time:type_name -> google.protobuf.Timestamp 3, // 1: realtimeanalytics.v1.QueryData.query_execution_duration:type_name -> google.protobuf.Duration diff --git a/api/realtimeanalytics/v1/query.swagger.json b/api/realtimeanalytics/v1/query.swagger.json new file mode 100644 index 00000000000..6a628f444b1 --- /dev/null +++ b/api/realtimeanalytics/v1/query.swagger.json @@ -0,0 +1,44 @@ +{ + "swagger": "2.0", + "info": { + "title": "realtimeanalytics/v1/query.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/realtimeanalytics/v1/realtimeanalytics.pb.go b/api/realtimeanalytics/v1/realtimeanalytics.pb.go index 9aaf7797747..1d1b609979f 100644 --- a/api/realtimeanalytics/v1/realtimeanalytics.pb.go +++ b/api/realtimeanalytics/v1/realtimeanalytics.pb.go @@ -7,19 +7,17 @@ package realtimeanalyticsv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/envoyproxy/protoc-gen-validate/validate" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + v1 "github.com/percona/pmm/api/inventory/v1" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - v1 "github.com/percona/pmm/api/inventory/v1" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -695,30 +693,27 @@ func file_realtimeanalytics_v1_realtimeanalytics_proto_rawDescGZIP() []byte { return file_realtimeanalytics_v1_realtimeanalytics_proto_rawDescData } -var ( - file_realtimeanalytics_v1_realtimeanalytics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_realtimeanalytics_v1_realtimeanalytics_proto_msgTypes = make([]protoimpl.MessageInfo, 11) - file_realtimeanalytics_v1_realtimeanalytics_proto_goTypes = []any{ - (SessionStatus)(0), // 0: realtimeanalytics.v1.SessionStatus - (*ListServicesRequest)(nil), // 1: realtimeanalytics.v1.ListServicesRequest - (*ListServicesResponse)(nil), // 2: realtimeanalytics.v1.ListServicesResponse - (*Session)(nil), // 3: realtimeanalytics.v1.Session - (*ListSessionsRequest)(nil), // 4: realtimeanalytics.v1.ListSessionsRequest - (*ListSessionsResponse)(nil), // 5: realtimeanalytics.v1.ListSessionsResponse - (*StartSessionRequest)(nil), // 6: realtimeanalytics.v1.StartSessionRequest - (*StartSessionResponse)(nil), // 7: realtimeanalytics.v1.StartSessionResponse - (*StopSessionRequest)(nil), // 8: realtimeanalytics.v1.StopSessionRequest - (*StopSessionResponse)(nil), // 9: realtimeanalytics.v1.StopSessionResponse - (*SearchQueriesRequest)(nil), // 10: realtimeanalytics.v1.SearchQueriesRequest - (*SearchQueriesResponse)(nil), // 11: realtimeanalytics.v1.SearchQueriesResponse - (v1.ServiceType)(0), // 12: inventory.v1.ServiceType - (*v1.MongoDBService)(nil), // 13: inventory.v1.MongoDBService - (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 15: google.protobuf.Duration - (*QueryData)(nil), // 16: realtimeanalytics.v1.QueryData - } -) - +var file_realtimeanalytics_v1_realtimeanalytics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_realtimeanalytics_v1_realtimeanalytics_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_realtimeanalytics_v1_realtimeanalytics_proto_goTypes = []any{ + (SessionStatus)(0), // 0: realtimeanalytics.v1.SessionStatus + (*ListServicesRequest)(nil), // 1: realtimeanalytics.v1.ListServicesRequest + (*ListServicesResponse)(nil), // 2: realtimeanalytics.v1.ListServicesResponse + (*Session)(nil), // 3: realtimeanalytics.v1.Session + (*ListSessionsRequest)(nil), // 4: realtimeanalytics.v1.ListSessionsRequest + (*ListSessionsResponse)(nil), // 5: realtimeanalytics.v1.ListSessionsResponse + (*StartSessionRequest)(nil), // 6: realtimeanalytics.v1.StartSessionRequest + (*StartSessionResponse)(nil), // 7: realtimeanalytics.v1.StartSessionResponse + (*StopSessionRequest)(nil), // 8: realtimeanalytics.v1.StopSessionRequest + (*StopSessionResponse)(nil), // 9: realtimeanalytics.v1.StopSessionResponse + (*SearchQueriesRequest)(nil), // 10: realtimeanalytics.v1.SearchQueriesRequest + (*SearchQueriesResponse)(nil), // 11: realtimeanalytics.v1.SearchQueriesResponse + (v1.ServiceType)(0), // 12: inventory.v1.ServiceType + (*v1.MongoDBService)(nil), // 13: inventory.v1.MongoDBService + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 15: google.protobuf.Duration + (*QueryData)(nil), // 16: realtimeanalytics.v1.QueryData +} var file_realtimeanalytics_v1_realtimeanalytics_proto_depIdxs = []int32{ 12, // 0: realtimeanalytics.v1.ListServicesRequest.service_type:type_name -> inventory.v1.ServiceType 13, // 1: realtimeanalytics.v1.ListServicesResponse.mongodb:type_name -> inventory.v1.MongoDBService diff --git a/api/realtimeanalytics/v1/realtimeanalytics.swagger.json b/api/realtimeanalytics/v1/realtimeanalytics.swagger.json new file mode 100644 index 00000000000..59d45b36d7a --- /dev/null +++ b/api/realtimeanalytics/v1/realtimeanalytics.swagger.json @@ -0,0 +1,516 @@ +{ + "swagger": "2.0", + "info": { + "title": "realtimeanalytics/v1/realtimeanalytics.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "RealtimeAnalyticsService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/realtimeanalytics/queries:search": { + "post": { + "summary": "List Running Database Queries in a particular services", + "description": "Returns list of currently running Database queries in a particular services", + "operationId": "SearchQueries", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SearchQueriesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "SearchQueriesRequest contains optional filters for listing active Real-Time Analytics session Queries.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SearchQueriesRequest" + } + } + ], + "tags": [ + "RealtimeAnalyticsService" + ] + } + }, + "/v1/realtimeanalytics/services": { + "get": { + "summary": "List Services that support Real-Time Analytics", + "description": "Returns a list of Services that support Real-Time Analytics filtered by type.", + "operationId": "ListServices", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "service_type", + "description": "Return only services filtered by service type.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_VALKEY_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_UNSPECIFIED" + } + ], + "tags": [ + "RealtimeAnalyticsService" + ] + } + }, + "/v1/realtimeanalytics/sessions": { + "get": { + "summary": "List Running Real-Time Analytics Sessions", + "description": "Returns the list of all currently running Real-Time Analytics sessions with their details including service, cluster and status information.", + "operationId": "ListSessions", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListSessionsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "cluster_name", + "description": "Optional filter by cluster name.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "RealtimeAnalyticsService" + ] + } + }, + "/v1/realtimeanalytics/sessions:start": { + "post": { + "summary": "Start Real-Time Analytics session", + "description": "Start Real-Time Analytics session for a specified service.", + "operationId": "StartSession", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StartSessionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "StartSessionRequest contains parameters for starting Real-Time Analytics session.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StartSessionRequest" + } + } + ], + "tags": [ + "RealtimeAnalyticsService" + ] + } + }, + "/v1/realtimeanalytics/sessions:stop": { + "post": { + "summary": "Stop Real-Time Analytics session", + "description": "Stop Real-Time Analytics session for a specified service.", + "operationId": "StopSession", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StopSessionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "StopSessionRequest contains parameters for stopping Real-Time Analytics session.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StopSessionRequest" + } + } + ], + "tags": [ + "RealtimeAnalyticsService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1ListServicesResponse": { + "type": "object", + "properties": { + "mongodb": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1MongoDBService" + } + } + } + }, + "v1ListSessionsResponse": { + "type": "object", + "properties": { + "sessions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Session" + }, + "description": "List of active Real-Time Analytics Sessions." + } + }, + "description": "ListSessionsResponse returns the list of currently active Real-Time Analytics Sessions." + }, + "v1MongoDBService": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Unique randomly generated instance identifier." + }, + "service_name": { + "type": "string", + "description": "Unique across all Services user-defined name." + }, + "node_id": { + "type": "string", + "description": "Node identifier where this instance runs." + }, + "address": { + "type": "string", + "description": "Access address (DNS name or IP).\nAddress (and port) or socket is required." + }, + "port": { + "type": "integer", + "format": "int64", + "description": "Access port.\nPort is required when the address present." + }, + "socket": { + "type": "string", + "description": "Access unix socket.\nAddress (and port) or socket is required." + }, + "environment": { + "type": "string", + "description": "Environment name." + }, + "cluster": { + "type": "string", + "description": "Cluster name." + }, + "replication_set": { + "type": "string", + "description": "Replication set name." + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Custom user-assigned labels." + }, + "version": { + "type": "string", + "description": "MongoDB version." + } + }, + "description": "MongoDBService represents a generic MongoDB instance." + }, + "v1QueryData": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "PMM Service identifier that reported the query." + }, + "service_name": { + "type": "string", + "description": "PMM Service name that reported the query." + }, + "query_id": { + "type": "string", + "description": "Unique identifier for the query." + }, + "query_text": { + "type": "string", + "description": "The text of the query." + }, + "query_raw_json": { + "type": "string", + "description": "Raw JSON representation of the query." + }, + "query_execution_duration": { + "type": "string", + "description": "Current query current execution time." + }, + "query_collect_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the query data was collected by Real-Time Analytics agent." + }, + "client_address": { + "type": "string", + "description": "Client address (host:port)." + }, + "mongo_db_payload": { + "$ref": "#/definitions/v1QueryMongoDBData", + "description": "MongoDB-specific query data." + } + }, + "description": "QueryData represents a single Real-Time Analytics query data point.\nIt includes general query information and a payload for database-specific details." + }, + "v1QueryMongoDBData": { + "type": "object", + "properties": { + "db_instance_address": { + "type": "string", + "description": "MongoDB instance address(host:port) that processing the query." + }, + "client_app_name": { + "type": "string", + "description": "Client application name from the MongoDB query." + }, + "database_name": { + "type": "string", + "description": "Database name." + }, + "collection": { + "type": "string", + "description": "Collection name." + }, + "operation": { + "type": "string", + "description": "Query operation (\"find\", \"aggregate\", \"update\", etc)." + }, + "operation_start_time": { + "type": "string", + "format": "date-time", + "description": "The start time of the operation." + }, + "username": { + "type": "string", + "description": "MongoDB user name associated with the query." + }, + "plan_summary": { + "type": "string", + "description": "Indicates if an index (COLLSCAN vs IXSCAN) was utilized in the query." + } + }, + "description": "QueryMongoDBData holds MongoDB-specific Real-Time Analytics query information." + }, + "v1SearchQueriesRequest": { + "type": "object", + "properties": { + "service_ids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Optional filter by Service identifiers." + }, + "limit": { + "type": "string", + "format": "int64", + "description": "Optional limit the number of queries in response." + } + }, + "description": "SearchQueriesRequest contains optional filters for listing active Real-Time Analytics session Queries." + }, + "v1SearchQueriesResponse": { + "type": "object", + "properties": { + "queries": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1QueryData" + }, + "description": "List of active Real-Time Analytics session Queries." + } + }, + "description": "SearchQueriesResponse returns the list of currently active Real-Time Analytics session Queries." + }, + "v1ServiceType": { + "type": "string", + "enum": [ + "SERVICE_TYPE_UNSPECIFIED", + "SERVICE_TYPE_MYSQL_SERVICE", + "SERVICE_TYPE_MONGODB_SERVICE", + "SERVICE_TYPE_POSTGRESQL_SERVICE", + "SERVICE_TYPE_VALKEY_SERVICE", + "SERVICE_TYPE_PROXYSQL_SERVICE", + "SERVICE_TYPE_HAPROXY_SERVICE", + "SERVICE_TYPE_EXTERNAL_SERVICE" + ], + "default": "SERVICE_TYPE_UNSPECIFIED", + "description": "ServiceType describes supported Service types." + }, + "v1Session": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Service identifier that has enabled Real-Time Analytics session." + }, + "service_name": { + "type": "string", + "description": "Service name." + }, + "cluster_name": { + "type": "string", + "description": "Cluster name the service belongs to." + }, + "start_time": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the Real-Time Analytics session started." + }, + "collect_interval": { + "type": "string", + "description": "Query collect interval." + }, + "status": { + "$ref": "#/definitions/v1SessionStatus", + "description": "Current status of the Real-Time Analytics session." + } + }, + "description": "Session represents an active Real-Time Analytics session." + }, + "v1SessionStatus": { + "type": "string", + "enum": [ + "SESSION_STATUS_UNSPECIFIED", + "SESSION_STATUS_ERROR", + "SESSION_STATUS_RUNNING", + "SESSION_STATUS_DOWN" + ], + "default": "SESSION_STATUS_UNSPECIFIED", + "description": "Status represents actual Real-Time Analytics session status.\n\n - SESSION_STATUS_ERROR: Session encountered an error.\n - SESSION_STATUS_RUNNING: Session is running.\n - SESSION_STATUS_DOWN: Session has been stopped or disabled." + }, + "v1StartSessionRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Required service identifier the Real-Time Analytics session shall be started for." + } + }, + "description": "StartSessionRequest contains parameters for starting Real-Time Analytics session." + }, + "v1StartSessionResponse": { + "type": "object", + "properties": { + "session": { + "$ref": "#/definitions/v1Session" + } + }, + "description": "StartSessionResponse is the response for starting Real-Time Analytics session." + }, + "v1StopSessionRequest": { + "type": "object", + "properties": { + "service_id": { + "type": "string", + "description": "Required service identifier the Real-Time Analytics session shall be stopped for." + } + }, + "description": "StopSessionRequest contains parameters for stopping Real-Time Analytics session." + }, + "v1StopSessionResponse": { + "type": "object", + "description": "StopSessionResponse is the response for stopping Real-Time Analytics session.\n\nEmpty response for now." + } + } +} diff --git a/api/realtimeanalytics/v1/realtimeanalytics_grpc.pb.go b/api/realtimeanalytics/v1/realtimeanalytics_grpc.pb.go index 0d389f33d03..730891f4d8d 100644 --- a/api/realtimeanalytics/v1/realtimeanalytics_grpc.pb.go +++ b/api/realtimeanalytics/v1/realtimeanalytics_grpc.pb.go @@ -8,7 +8,6 @@ package realtimeanalyticsv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -132,23 +131,18 @@ type UnimplementedRealtimeAnalyticsServiceServer struct{} func (UnimplementedRealtimeAnalyticsServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListServices not implemented") } - func (UnimplementedRealtimeAnalyticsServiceServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListSessions not implemented") } - func (UnimplementedRealtimeAnalyticsServiceServer) StartSession(context.Context, *StartSessionRequest) (*StartSessionResponse, error) { return nil, status.Error(codes.Unimplemented, "method StartSession not implemented") } - func (UnimplementedRealtimeAnalyticsServiceServer) StopSession(context.Context, *StopSessionRequest) (*StopSessionResponse, error) { return nil, status.Error(codes.Unimplemented, "method StopSession not implemented") } - func (UnimplementedRealtimeAnalyticsServiceServer) SearchQueries(context.Context, *SearchQueriesRequest) (*SearchQueriesResponse, error) { return nil, status.Error(codes.Unimplemented, "method SearchQueries not implemented") } - func (UnimplementedRealtimeAnalyticsServiceServer) mustEmbedUnimplementedRealtimeAnalyticsServiceServer() { } func (UnimplementedRealtimeAnalyticsServiceServer) testEmbeddedByValue() {} diff --git a/api/server/v1/httperror.pb.go b/api/server/v1/httperror.pb.go index 8778ad26272..a71c3b4f133 100644 --- a/api/server/v1/httperror.pb.go +++ b/api/server/v1/httperror.pb.go @@ -7,13 +7,12 @@ package serverv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -120,14 +119,11 @@ func file_server_v1_httperror_proto_rawDescGZIP() []byte { return file_server_v1_httperror_proto_rawDescData } -var ( - file_server_v1_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) - file_server_v1_httperror_proto_goTypes = []any{ - (*HttpError)(nil), // 0: server.v1.HttpError - (*anypb.Any)(nil), // 1: google.protobuf.Any - } -) - +var file_server_v1_httperror_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_server_v1_httperror_proto_goTypes = []any{ + (*HttpError)(nil), // 0: server.v1.HttpError + (*anypb.Any)(nil), // 1: google.protobuf.Any +} var file_server_v1_httperror_proto_depIdxs = []int32{ 1, // 0: server.v1.HttpError.details:type_name -> google.protobuf.Any 1, // [1:1] is the sub-list for method output_type diff --git a/api/server/v1/httperror.swagger.json b/api/server/v1/httperror.swagger.json new file mode 100644 index 00000000000..7462173f0ff --- /dev/null +++ b/api/server/v1/httperror.swagger.json @@ -0,0 +1,46 @@ +{ + "swagger": "2.0", + "info": { + "title": "server/v1/httperror.proto", + "version": "version not set" + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": {}, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + } + } +} diff --git a/api/server/v1/json/client/server_service/add_log_parser_preset_parameters.go b/api/server/v1/json/client/server_service/add_log_parser_preset_parameters.go new file mode 100644 index 00000000000..4a78d525935 --- /dev/null +++ b/api/server/v1/json/client/server_service/add_log_parser_preset_parameters.go @@ -0,0 +1,146 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" +) + +// NewAddLogParserPresetParams creates a new AddLogParserPresetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewAddLogParserPresetParams() *AddLogParserPresetParams { + return &AddLogParserPresetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewAddLogParserPresetParamsWithTimeout creates a new AddLogParserPresetParams object +// with the ability to set a timeout on a request. +func NewAddLogParserPresetParamsWithTimeout(timeout time.Duration) *AddLogParserPresetParams { + return &AddLogParserPresetParams{ + timeout: timeout, + } +} + +// NewAddLogParserPresetParamsWithContext creates a new AddLogParserPresetParams object +// with the ability to set a context for a request. +func NewAddLogParserPresetParamsWithContext(ctx context.Context) *AddLogParserPresetParams { + return &AddLogParserPresetParams{ + Context: ctx, + } +} + +// NewAddLogParserPresetParamsWithHTTPClient creates a new AddLogParserPresetParams object +// with the ability to set a custom HTTPClient for a request. +func NewAddLogParserPresetParamsWithHTTPClient(client *http.Client) *AddLogParserPresetParams { + return &AddLogParserPresetParams{ + HTTPClient: client, + } +} + +/* +AddLogParserPresetParams contains all the parameters to send to the API endpoint + + for the add log parser preset operation. + + Typically these are written to a http.Request. +*/ +type AddLogParserPresetParams struct { + + // Body. + Body AddLogParserPresetBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the add log parser preset params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddLogParserPresetParams) WithDefaults() *AddLogParserPresetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the add log parser preset params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *AddLogParserPresetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the add log parser preset params +func (o *AddLogParserPresetParams) WithTimeout(timeout time.Duration) *AddLogParserPresetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the add log parser preset params +func (o *AddLogParserPresetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the add log parser preset params +func (o *AddLogParserPresetParams) WithContext(ctx context.Context) *AddLogParserPresetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the add log parser preset params +func (o *AddLogParserPresetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the add log parser preset params +func (o *AddLogParserPresetParams) WithHTTPClient(client *http.Client) *AddLogParserPresetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the add log parser preset params +func (o *AddLogParserPresetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the add log parser preset params +func (o *AddLogParserPresetParams) WithBody(body AddLogParserPresetBody) *AddLogParserPresetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the add log parser preset params +func (o *AddLogParserPresetParams) SetBody(body AddLogParserPresetBody) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *AddLogParserPresetParams) 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/server/v1/json/client/server_service/add_log_parser_preset_responses.go b/api/server/v1/json/client/server_service/add_log_parser_preset_responses.go new file mode 100644 index 00000000000..6b722c2a481 --- /dev/null +++ b/api/server/v1/json/client/server_service/add_log_parser_preset_responses.go @@ -0,0 +1,834 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" + stderrors "errors" + "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" +) + +// AddLogParserPresetReader is a Reader for the AddLogParserPreset structure. +type AddLogParserPresetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *AddLogParserPresetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewAddLogParserPresetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewAddLogParserPresetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewAddLogParserPresetOK creates a AddLogParserPresetOK with default headers values +func NewAddLogParserPresetOK() *AddLogParserPresetOK { + return &AddLogParserPresetOK{} +} + +/* +AddLogParserPresetOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type AddLogParserPresetOK struct { + Payload *AddLogParserPresetOKBody +} + +// IsSuccess returns true when this add log parser preset Ok response has a 2xx status code +func (o *AddLogParserPresetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this add log parser preset Ok response has a 3xx status code +func (o *AddLogParserPresetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this add log parser preset Ok response has a 4xx status code +func (o *AddLogParserPresetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this add log parser preset Ok response has a 5xx status code +func (o *AddLogParserPresetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this add log parser preset Ok response a status code equal to that given +func (o *AddLogParserPresetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the add log parser preset Ok response +func (o *AddLogParserPresetOK) Code() int { + return 200 +} + +func (o *AddLogParserPresetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/server/log-parser-presets][%d] addLogParserPresetOk %s", 200, payload) +} + +func (o *AddLogParserPresetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/server/log-parser-presets][%d] addLogParserPresetOk %s", 200, payload) +} + +func (o *AddLogParserPresetOK) GetPayload() *AddLogParserPresetOKBody { + return o.Payload +} + +func (o *AddLogParserPresetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(AddLogParserPresetOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewAddLogParserPresetDefault creates a AddLogParserPresetDefault with default headers values +func NewAddLogParserPresetDefault(code int) *AddLogParserPresetDefault { + return &AddLogParserPresetDefault{ + _statusCode: code, + } +} + +/* +AddLogParserPresetDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type AddLogParserPresetDefault struct { + _statusCode int + + Payload *AddLogParserPresetDefaultBody +} + +// IsSuccess returns true when this add log parser preset default response has a 2xx status code +func (o *AddLogParserPresetDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this add log parser preset default response has a 3xx status code +func (o *AddLogParserPresetDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this add log parser preset default response has a 4xx status code +func (o *AddLogParserPresetDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this add log parser preset default response has a 5xx status code +func (o *AddLogParserPresetDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this add log parser preset default response a status code equal to that given +func (o *AddLogParserPresetDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the add log parser preset default response +func (o *AddLogParserPresetDefault) Code() int { + return o._statusCode +} + +func (o *AddLogParserPresetDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/server/log-parser-presets][%d] AddLogParserPreset default %s", o._statusCode, payload) +} + +func (o *AddLogParserPresetDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/server/log-parser-presets][%d] AddLogParserPreset default %s", o._statusCode, payload) +} + +func (o *AddLogParserPresetDefault) GetPayload() *AddLogParserPresetDefaultBody { + return o.Payload +} + +func (o *AddLogParserPresetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(AddLogParserPresetDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +/* +AddLogParserPresetBody add log parser preset body +swagger:model AddLogParserPresetBody +*/ +type AddLogParserPresetBody struct { + + // name + Name string `json:"name,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // operator yaml + OperatorYaml string `json:"operator_yaml,omitempty"` +} + +// Validate validates this add log parser preset body +func (o *AddLogParserPresetBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add log parser preset body based on context it is used +func (o *AddLogParserPresetBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddLogParserPresetBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddLogParserPresetBody) UnmarshalBinary(b []byte) error { + var res AddLogParserPresetBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddLogParserPresetDefaultBody add log parser preset default body +swagger:model AddLogParserPresetDefaultBody +*/ +type AddLogParserPresetDefaultBody struct { + + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*AddLogParserPresetDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this add log parser preset default body +func (o *AddLogParserPresetDefaultBody) 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 *AddLogParserPresetDefaultBody) 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 { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("AddLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("AddLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this add log parser preset default body based on the context it is used +func (o *AddLogParserPresetDefaultBody) 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 *AddLogParserPresetDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Details); i++ { + + if o.Details[i] != nil { + + if swag.IsZero(o.Details[i]) { // not required + return nil + } + + if err := o.Details[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("AddLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("AddLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddLogParserPresetDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddLogParserPresetDefaultBody) UnmarshalBinary(b []byte) error { + var res AddLogParserPresetDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddLogParserPresetDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +swagger:model AddLogParserPresetDefaultBodyDetailsItems0 +*/ +type AddLogParserPresetDefaultBodyDetailsItems0 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + + // add log parser preset default body details items0 + AddLogParserPresetDefaultBodyDetailsItems0 map[string]any `json:"-"` +} + +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (o *AddLogParserPresetDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv AddLogParserPresetDefaultBodyDetailsItems0 + + rcv.AtType = stage1.AtType + *o = rcv + + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err + } + + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]any) + for k, v := range stage2 { + var toadd any + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + o.AddLogParserPresetDefaultBodyDetailsItems0 = result + } + + return nil +} + +// MarshalJSON marshals this object with additional properties into a JSON object +func (o AddLogParserPresetDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + + stage1.AtType = o.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(o.AddLogParserPresetDefaultBodyDetailsItems0) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(o.AddLogParserPresetDefaultBodyDetailsItems0) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this add log parser preset default body details items0 +func (o *AddLogParserPresetDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this add log parser preset default body details items0 based on context it is used +func (o *AddLogParserPresetDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddLogParserPresetDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddLogParserPresetDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res AddLogParserPresetDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddLogParserPresetOKBody add log parser preset OK body +swagger:model AddLogParserPresetOKBody +*/ +type AddLogParserPresetOKBody struct { + + // preset + Preset *AddLogParserPresetOKBodyPreset `json:"preset,omitempty"` +} + +// Validate validates this add log parser preset OK body +func (o *AddLogParserPresetOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validatePreset(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddLogParserPresetOKBody) validatePreset(formats strfmt.Registry) error { + if swag.IsZero(o.Preset) { // not required + return nil + } + + if o.Preset != nil { + if err := o.Preset.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addLogParserPresetOk" + "." + "preset") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addLogParserPresetOk" + "." + "preset") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this add log parser preset OK body based on the context it is used +func (o *AddLogParserPresetOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidatePreset(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddLogParserPresetOKBody) contextValidatePreset(ctx context.Context, formats strfmt.Registry) error { + + if o.Preset != nil { + + if swag.IsZero(o.Preset) { // not required + return nil + } + + if err := o.Preset.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("addLogParserPresetOk" + "." + "preset") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("addLogParserPresetOk" + "." + "preset") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *AddLogParserPresetOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddLogParserPresetOKBody) UnmarshalBinary(b []byte) error { + var res AddLogParserPresetOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +AddLogParserPresetOKBodyPreset LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML). +swagger:model AddLogParserPresetOKBodyPreset +*/ +type AddLogParserPresetOKBodyPreset struct { + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // operator yaml + OperatorYaml string `json:"operator_yaml,omitempty"` + + // built in + BuiltIn bool `json:"built_in,omitempty"` + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at,omitempty"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` +} + +// Validate validates this add log parser preset OK body preset +func (o *AddLogParserPresetOKBodyPreset) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := o.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *AddLogParserPresetOKBodyPreset) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(o.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("addLogParserPresetOk"+"."+"preset"+"."+"created_at", "body", "date-time", o.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *AddLogParserPresetOKBodyPreset) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(o.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("addLogParserPresetOk"+"."+"preset"+"."+"updated_at", "body", "date-time", o.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this add log parser preset OK body preset based on context it is used +func (o *AddLogParserPresetOKBodyPreset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *AddLogParserPresetOKBodyPreset) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *AddLogParserPresetOKBodyPreset) UnmarshalBinary(b []byte) error { + var res AddLogParserPresetOKBodyPreset + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/server/v1/json/client/server_service/change_log_parser_preset_parameters.go b/api/server/v1/json/client/server_service/change_log_parser_preset_parameters.go new file mode 100644 index 00000000000..a057425a576 --- /dev/null +++ b/api/server/v1/json/client/server_service/change_log_parser_preset_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" +) + +// NewChangeLogParserPresetParams creates a new ChangeLogParserPresetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewChangeLogParserPresetParams() *ChangeLogParserPresetParams { + return &ChangeLogParserPresetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewChangeLogParserPresetParamsWithTimeout creates a new ChangeLogParserPresetParams object +// with the ability to set a timeout on a request. +func NewChangeLogParserPresetParamsWithTimeout(timeout time.Duration) *ChangeLogParserPresetParams { + return &ChangeLogParserPresetParams{ + timeout: timeout, + } +} + +// NewChangeLogParserPresetParamsWithContext creates a new ChangeLogParserPresetParams object +// with the ability to set a context for a request. +func NewChangeLogParserPresetParamsWithContext(ctx context.Context) *ChangeLogParserPresetParams { + return &ChangeLogParserPresetParams{ + Context: ctx, + } +} + +// NewChangeLogParserPresetParamsWithHTTPClient creates a new ChangeLogParserPresetParams object +// with the ability to set a custom HTTPClient for a request. +func NewChangeLogParserPresetParamsWithHTTPClient(client *http.Client) *ChangeLogParserPresetParams { + return &ChangeLogParserPresetParams{ + HTTPClient: client, + } +} + +/* +ChangeLogParserPresetParams contains all the parameters to send to the API endpoint + + for the change log parser preset operation. + + Typically these are written to a http.Request. +*/ +type ChangeLogParserPresetParams struct { + + // Body. + Body ChangeLogParserPresetBody + + // ID. + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the change log parser preset params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ChangeLogParserPresetParams) WithDefaults() *ChangeLogParserPresetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the change log parser preset params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ChangeLogParserPresetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the change log parser preset params +func (o *ChangeLogParserPresetParams) WithTimeout(timeout time.Duration) *ChangeLogParserPresetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the change log parser preset params +func (o *ChangeLogParserPresetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the change log parser preset params +func (o *ChangeLogParserPresetParams) WithContext(ctx context.Context) *ChangeLogParserPresetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the change log parser preset params +func (o *ChangeLogParserPresetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the change log parser preset params +func (o *ChangeLogParserPresetParams) WithHTTPClient(client *http.Client) *ChangeLogParserPresetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the change log parser preset params +func (o *ChangeLogParserPresetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the change log parser preset params +func (o *ChangeLogParserPresetParams) WithBody(body ChangeLogParserPresetBody) *ChangeLogParserPresetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the change log parser preset params +func (o *ChangeLogParserPresetParams) SetBody(body ChangeLogParserPresetBody) { + o.Body = body +} + +// WithID adds the id to the change log parser preset params +func (o *ChangeLogParserPresetParams) WithID(id string) *ChangeLogParserPresetParams { + o.SetID(id) + return o +} + +// SetID adds the id to the change log parser preset params +func (o *ChangeLogParserPresetParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *ChangeLogParserPresetParams) 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 + } + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/server/v1/json/client/server_service/change_log_parser_preset_responses.go b/api/server/v1/json/client/server_service/change_log_parser_preset_responses.go new file mode 100644 index 00000000000..10446e68deb --- /dev/null +++ b/api/server/v1/json/client/server_service/change_log_parser_preset_responses.go @@ -0,0 +1,831 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" + stderrors "errors" + "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" +) + +// ChangeLogParserPresetReader is a Reader for the ChangeLogParserPreset structure. +type ChangeLogParserPresetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ChangeLogParserPresetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewChangeLogParserPresetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewChangeLogParserPresetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewChangeLogParserPresetOK creates a ChangeLogParserPresetOK with default headers values +func NewChangeLogParserPresetOK() *ChangeLogParserPresetOK { + return &ChangeLogParserPresetOK{} +} + +/* +ChangeLogParserPresetOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ChangeLogParserPresetOK struct { + Payload *ChangeLogParserPresetOKBody +} + +// IsSuccess returns true when this change log parser preset Ok response has a 2xx status code +func (o *ChangeLogParserPresetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this change log parser preset Ok response has a 3xx status code +func (o *ChangeLogParserPresetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this change log parser preset Ok response has a 4xx status code +func (o *ChangeLogParserPresetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this change log parser preset Ok response has a 5xx status code +func (o *ChangeLogParserPresetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this change log parser preset Ok response a status code equal to that given +func (o *ChangeLogParserPresetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the change log parser preset Ok response +func (o *ChangeLogParserPresetOK) Code() int { + return 200 +} + +func (o *ChangeLogParserPresetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/server/log-parser-presets/{id}][%d] changeLogParserPresetOk %s", 200, payload) +} + +func (o *ChangeLogParserPresetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/server/log-parser-presets/{id}][%d] changeLogParserPresetOk %s", 200, payload) +} + +func (o *ChangeLogParserPresetOK) GetPayload() *ChangeLogParserPresetOKBody { + return o.Payload +} + +func (o *ChangeLogParserPresetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ChangeLogParserPresetOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewChangeLogParserPresetDefault creates a ChangeLogParserPresetDefault with default headers values +func NewChangeLogParserPresetDefault(code int) *ChangeLogParserPresetDefault { + return &ChangeLogParserPresetDefault{ + _statusCode: code, + } +} + +/* +ChangeLogParserPresetDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ChangeLogParserPresetDefault struct { + _statusCode int + + Payload *ChangeLogParserPresetDefaultBody +} + +// IsSuccess returns true when this change log parser preset default response has a 2xx status code +func (o *ChangeLogParserPresetDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this change log parser preset default response has a 3xx status code +func (o *ChangeLogParserPresetDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this change log parser preset default response has a 4xx status code +func (o *ChangeLogParserPresetDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this change log parser preset default response has a 5xx status code +func (o *ChangeLogParserPresetDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this change log parser preset default response a status code equal to that given +func (o *ChangeLogParserPresetDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the change log parser preset default response +func (o *ChangeLogParserPresetDefault) Code() int { + return o._statusCode +} + +func (o *ChangeLogParserPresetDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/server/log-parser-presets/{id}][%d] ChangeLogParserPreset default %s", o._statusCode, payload) +} + +func (o *ChangeLogParserPresetDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[PUT /v1/server/log-parser-presets/{id}][%d] ChangeLogParserPreset default %s", o._statusCode, payload) +} + +func (o *ChangeLogParserPresetDefault) GetPayload() *ChangeLogParserPresetDefaultBody { + return o.Payload +} + +func (o *ChangeLogParserPresetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ChangeLogParserPresetDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +/* +ChangeLogParserPresetBody change log parser preset body +swagger:model ChangeLogParserPresetBody +*/ +type ChangeLogParserPresetBody struct { + + // description + Description *string `json:"description,omitempty"` + + // operator yaml + OperatorYaml *string `json:"operator_yaml,omitempty"` +} + +// Validate validates this change log parser preset body +func (o *ChangeLogParserPresetBody) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this change log parser preset body based on context it is used +func (o *ChangeLogParserPresetBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeLogParserPresetBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeLogParserPresetBody) UnmarshalBinary(b []byte) error { + var res ChangeLogParserPresetBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeLogParserPresetDefaultBody change log parser preset default body +swagger:model ChangeLogParserPresetDefaultBody +*/ +type ChangeLogParserPresetDefaultBody struct { + + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*ChangeLogParserPresetDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this change log parser preset default body +func (o *ChangeLogParserPresetDefaultBody) 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 *ChangeLogParserPresetDefaultBody) 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 { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("ChangeLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("ChangeLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this change log parser preset default body based on the context it is used +func (o *ChangeLogParserPresetDefaultBody) 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 *ChangeLogParserPresetDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Details); i++ { + + if o.Details[i] != nil { + + if swag.IsZero(o.Details[i]) { // not required + return nil + } + + if err := o.Details[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("ChangeLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("ChangeLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeLogParserPresetDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeLogParserPresetDefaultBody) UnmarshalBinary(b []byte) error { + var res ChangeLogParserPresetDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeLogParserPresetDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +swagger:model ChangeLogParserPresetDefaultBodyDetailsItems0 +*/ +type ChangeLogParserPresetDefaultBodyDetailsItems0 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + + // change log parser preset default body details items0 + ChangeLogParserPresetDefaultBodyDetailsItems0 map[string]any `json:"-"` +} + +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (o *ChangeLogParserPresetDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ChangeLogParserPresetDefaultBodyDetailsItems0 + + rcv.AtType = stage1.AtType + *o = rcv + + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err + } + + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]any) + for k, v := range stage2 { + var toadd any + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + o.ChangeLogParserPresetDefaultBodyDetailsItems0 = result + } + + return nil +} + +// MarshalJSON marshals this object with additional properties into a JSON object +func (o ChangeLogParserPresetDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + + stage1.AtType = o.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(o.ChangeLogParserPresetDefaultBodyDetailsItems0) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(o.ChangeLogParserPresetDefaultBodyDetailsItems0) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this change log parser preset default body details items0 +func (o *ChangeLogParserPresetDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this change log parser preset default body details items0 based on context it is used +func (o *ChangeLogParserPresetDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeLogParserPresetDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeLogParserPresetDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res ChangeLogParserPresetDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeLogParserPresetOKBody change log parser preset OK body +swagger:model ChangeLogParserPresetOKBody +*/ +type ChangeLogParserPresetOKBody struct { + + // preset + Preset *ChangeLogParserPresetOKBodyPreset `json:"preset,omitempty"` +} + +// Validate validates this change log parser preset OK body +func (o *ChangeLogParserPresetOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validatePreset(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeLogParserPresetOKBody) validatePreset(formats strfmt.Registry) error { + if swag.IsZero(o.Preset) { // not required + return nil + } + + if o.Preset != nil { + if err := o.Preset.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeLogParserPresetOk" + "." + "preset") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeLogParserPresetOk" + "." + "preset") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this change log parser preset OK body based on the context it is used +func (o *ChangeLogParserPresetOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidatePreset(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeLogParserPresetOKBody) contextValidatePreset(ctx context.Context, formats strfmt.Registry) error { + + if o.Preset != nil { + + if swag.IsZero(o.Preset) { // not required + return nil + } + + if err := o.Preset.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("changeLogParserPresetOk" + "." + "preset") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("changeLogParserPresetOk" + "." + "preset") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeLogParserPresetOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeLogParserPresetOKBody) UnmarshalBinary(b []byte) error { + var res ChangeLogParserPresetOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ChangeLogParserPresetOKBodyPreset LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML). +swagger:model ChangeLogParserPresetOKBodyPreset +*/ +type ChangeLogParserPresetOKBodyPreset struct { + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // operator yaml + OperatorYaml string `json:"operator_yaml,omitempty"` + + // built in + BuiltIn bool `json:"built_in,omitempty"` + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at,omitempty"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` +} + +// Validate validates this change log parser preset OK body preset +func (o *ChangeLogParserPresetOKBodyPreset) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := o.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ChangeLogParserPresetOKBodyPreset) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(o.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("changeLogParserPresetOk"+"."+"preset"+"."+"created_at", "body", "date-time", o.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *ChangeLogParserPresetOKBodyPreset) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(o.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("changeLogParserPresetOk"+"."+"preset"+"."+"updated_at", "body", "date-time", o.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this change log parser preset OK body preset based on context it is used +func (o *ChangeLogParserPresetOKBodyPreset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ChangeLogParserPresetOKBodyPreset) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ChangeLogParserPresetOKBodyPreset) UnmarshalBinary(b []byte) error { + var res ChangeLogParserPresetOKBodyPreset + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/server/v1/json/client/server_service/change_settings_parameters.go b/api/server/v1/json/client/server_service/change_settings_parameters.go index 12afd77da38..8fd09d8309e 100644 --- a/api/server/v1/json/client/server_service/change_settings_parameters.go +++ b/api/server/v1/json/client/server_service/change_settings_parameters.go @@ -60,6 +60,7 @@ ChangeSettingsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type ChangeSettingsParams struct { + // Body. Body ChangeSettingsBody @@ -129,6 +130,7 @@ func (o *ChangeSettingsParams) SetBody(body ChangeSettingsBody) { // WriteToRequest writes these params to a swagger request func (o *ChangeSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/change_settings_responses.go b/api/server/v1/json/client/server_service/change_settings_responses.go index b916ef04041..072d37b9672 100644 --- a/api/server/v1/json/client/server_service/change_settings_responses.go +++ b/api/server/v1/json/client/server_service/change_settings_responses.go @@ -104,6 +104,7 @@ func (o *ChangeSettingsOK) GetPayload() *ChangeSettingsOKBody { } func (o *ChangeSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeSettingsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ChangeSettingsDefault) GetPayload() *ChangeSettingsDefaultBody { } func (o *ChangeSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ChangeSettingsDefaultBody) // response payload @@ -192,6 +194,7 @@ ChangeSettingsBody change settings body swagger:model ChangeSettingsBody */ type ChangeSettingsBody struct { + // enable updates EnableUpdates *bool `json:"enable_updates,omitempty"` @@ -352,6 +355,7 @@ func (o *ChangeSettingsBody) ContextValidate(ctx context.Context, formats strfmt } func (o *ChangeSettingsBody) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -376,6 +380,7 @@ func (o *ChangeSettingsBody) contextValidateAdvisorRunIntervals(ctx context.Cont } func (o *ChangeSettingsBody) contextValidateAWSPartitions(ctx context.Context, formats strfmt.Registry) error { + if o.AWSPartitions != nil { if swag.IsZero(o.AWSPartitions) { // not required @@ -400,6 +405,7 @@ func (o *ChangeSettingsBody) contextValidateAWSPartitions(ctx context.Context, f } func (o *ChangeSettingsBody) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -446,6 +452,7 @@ ChangeSettingsDefaultBody change settings default body swagger:model ChangeSettingsDefaultBody */ type ChangeSettingsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -515,7 +522,9 @@ func (o *ChangeSettingsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -535,6 +544,7 @@ func (o *ChangeSettingsDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -647,6 +657,7 @@ ChangeSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized pr swagger:model ChangeSettingsDefaultBodyDetailsItems0 */ type ChangeSettingsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -685,6 +696,7 @@ type ChangeSettingsDefaultBodyDetailsItems0 struct { func (o *ChangeSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -749,6 +761,7 @@ func (o *ChangeSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ChangeSettingsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -839,6 +852,7 @@ ChangeSettingsOKBody change settings OK body swagger:model ChangeSettingsOKBody */ type ChangeSettingsOKBody struct { + // settings Settings *ChangeSettingsOKBodySettings `json:"settings,omitempty"` } @@ -895,6 +909,7 @@ func (o *ChangeSettingsOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ChangeSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { + if o.Settings != nil { if swag.IsZero(o.Settings) { // not required @@ -941,6 +956,7 @@ ChangeSettingsOKBodySettings Settings represents PMM Server settings. swagger:model ChangeSettingsOKBodySettings */ type ChangeSettingsOKBodySettings struct { + // True if updates are enabled. UpdatesEnabled bool `json:"updates_enabled,omitempty"` @@ -1082,6 +1098,7 @@ func (o *ChangeSettingsOKBodySettings) ContextValidate(ctx context.Context, form } func (o *ChangeSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -1106,6 +1123,7 @@ func (o *ChangeSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx co } func (o *ChangeSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -1152,6 +1170,7 @@ ChangeSettingsOKBodySettingsAdvisorRunIntervals AdvisorRunIntervals represents i swagger:model ChangeSettingsOKBodySettingsAdvisorRunIntervals */ type ChangeSettingsOKBodySettingsAdvisorRunIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -1195,6 +1214,7 @@ ChangeSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Pro swagger:model ChangeSettingsOKBodySettingsMetricsResolutions */ type ChangeSettingsOKBodySettingsMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` @@ -1238,6 +1258,7 @@ ChangeSettingsParamsBodyAWSPartitions A wrapper for a string array. This type al swagger:model ChangeSettingsParamsBodyAWSPartitions */ type ChangeSettingsParamsBodyAWSPartitions struct { + // values Values []string `json:"values"` } @@ -1275,6 +1296,7 @@ ChangeSettingsParamsBodyAdvisorRunIntervals AdvisorRunIntervals represents inter swagger:model ChangeSettingsParamsBodyAdvisorRunIntervals */ type ChangeSettingsParamsBodyAdvisorRunIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -1318,6 +1340,7 @@ ChangeSettingsParamsBodyMetricsResolutions MetricsResolutions represents Prometh swagger:model ChangeSettingsParamsBodyMetricsResolutions */ type ChangeSettingsParamsBodyMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` diff --git a/api/server/v1/json/client/server_service/check_updates_parameters.go b/api/server/v1/json/client/server_service/check_updates_parameters.go index 9bf5b1322dc..601149cc3e7 100644 --- a/api/server/v1/json/client/server_service/check_updates_parameters.go +++ b/api/server/v1/json/client/server_service/check_updates_parameters.go @@ -61,6 +61,7 @@ CheckUpdatesParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type CheckUpdatesParams struct { + /* Force. If false, cached information may be returned. @@ -150,6 +151,7 @@ func (o *CheckUpdatesParams) SetOnlyInstalledVersion(onlyInstalledVersion *bool) // WriteToRequest writes these params to a swagger request func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -165,6 +167,7 @@ func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qForce := swag.FormatBool(qrForce) if qForce != "" { + if err := r.SetQueryParam("force", qForce); err != nil { return err } @@ -181,6 +184,7 @@ func (o *CheckUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt. } qOnlyInstalledVersion := swag.FormatBool(qrOnlyInstalledVersion) if qOnlyInstalledVersion != "" { + if err := r.SetQueryParam("only_installed_version", qOnlyInstalledVersion); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/check_updates_responses.go b/api/server/v1/json/client/server_service/check_updates_responses.go index 85b567a990f..459be6a1852 100644 --- a/api/server/v1/json/client/server_service/check_updates_responses.go +++ b/api/server/v1/json/client/server_service/check_updates_responses.go @@ -105,6 +105,7 @@ func (o *CheckUpdatesOK) GetPayload() *CheckUpdatesOKBody { } func (o *CheckUpdatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CheckUpdatesOKBody) // response payload @@ -178,6 +179,7 @@ func (o *CheckUpdatesDefault) GetPayload() *CheckUpdatesDefaultBody { } func (o *CheckUpdatesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(CheckUpdatesDefaultBody) // response payload @@ -193,6 +195,7 @@ CheckUpdatesDefaultBody check updates default body swagger:model CheckUpdatesDefaultBody */ type CheckUpdatesDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *CheckUpdatesDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *CheckUpdatesDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -394,6 +400,7 @@ CheckUpdatesDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model CheckUpdatesDefaultBodyDetailsItems0 */ type CheckUpdatesDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -432,6 +439,7 @@ type CheckUpdatesDefaultBodyDetailsItems0 struct { func (o *CheckUpdatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -496,6 +504,7 @@ func (o *CheckUpdatesDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o CheckUpdatesDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -586,6 +595,7 @@ CheckUpdatesOKBody check updates OK body swagger:model CheckUpdatesOKBody */ type CheckUpdatesOKBody struct { + // True if there is a PMM Server update available. UpdateAvailable bool `json:"update_available,omitempty"` @@ -702,6 +712,7 @@ func (o *CheckUpdatesOKBody) ContextValidate(ctx context.Context, formats strfmt } func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, formats strfmt.Registry) error { + if o.Installed != nil { if swag.IsZero(o.Installed) { // not required @@ -726,6 +737,7 @@ func (o *CheckUpdatesOKBody) contextValidateInstalled(ctx context.Context, forma } func (o *CheckUpdatesOKBody) contextValidateLatest(ctx context.Context, formats strfmt.Registry) error { + if o.Latest != nil { if swag.IsZero(o.Latest) { // not required @@ -772,6 +784,7 @@ CheckUpdatesOKBodyInstalled VersionInfo describes component version, or PMM Serv swagger:model CheckUpdatesOKBodyInstalled */ type CheckUpdatesOKBodyInstalled struct { + // User-visible version. Version string `json:"version,omitempty"` @@ -837,6 +850,7 @@ CheckUpdatesOKBodyLatest check updates OK body latest swagger:model CheckUpdatesOKBodyLatest */ type CheckUpdatesOKBodyLatest struct { + // PMM Version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/json/client/server_service/get_log_parser_preset_parameters.go b/api/server/v1/json/client/server_service/get_log_parser_preset_parameters.go new file mode 100644 index 00000000000..b3cb4f8c5a8 --- /dev/null +++ b/api/server/v1/json/client/server_service/get_log_parser_preset_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" +) + +// NewGetLogParserPresetParams creates a new GetLogParserPresetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewGetLogParserPresetParams() *GetLogParserPresetParams { + return &GetLogParserPresetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewGetLogParserPresetParamsWithTimeout creates a new GetLogParserPresetParams object +// with the ability to set a timeout on a request. +func NewGetLogParserPresetParamsWithTimeout(timeout time.Duration) *GetLogParserPresetParams { + return &GetLogParserPresetParams{ + timeout: timeout, + } +} + +// NewGetLogParserPresetParamsWithContext creates a new GetLogParserPresetParams object +// with the ability to set a context for a request. +func NewGetLogParserPresetParamsWithContext(ctx context.Context) *GetLogParserPresetParams { + return &GetLogParserPresetParams{ + Context: ctx, + } +} + +// NewGetLogParserPresetParamsWithHTTPClient creates a new GetLogParserPresetParams object +// with the ability to set a custom HTTPClient for a request. +func NewGetLogParserPresetParamsWithHTTPClient(client *http.Client) *GetLogParserPresetParams { + return &GetLogParserPresetParams{ + HTTPClient: client, + } +} + +/* +GetLogParserPresetParams contains all the parameters to send to the API endpoint + + for the get log parser preset operation. + + Typically these are written to a http.Request. +*/ +type GetLogParserPresetParams struct { + + // ID. + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the get log parser preset params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetLogParserPresetParams) WithDefaults() *GetLogParserPresetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the get log parser preset params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *GetLogParserPresetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the get log parser preset params +func (o *GetLogParserPresetParams) WithTimeout(timeout time.Duration) *GetLogParserPresetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the get log parser preset params +func (o *GetLogParserPresetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the get log parser preset params +func (o *GetLogParserPresetParams) WithContext(ctx context.Context) *GetLogParserPresetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the get log parser preset params +func (o *GetLogParserPresetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the get log parser preset params +func (o *GetLogParserPresetParams) WithHTTPClient(client *http.Client) *GetLogParserPresetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the get log parser preset params +func (o *GetLogParserPresetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the get log parser preset params +func (o *GetLogParserPresetParams) WithID(id string) *GetLogParserPresetParams { + o.SetID(id) + return o +} + +// SetID adds the id to the get log parser preset params +func (o *GetLogParserPresetParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *GetLogParserPresetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/server/v1/json/client/server_service/get_log_parser_preset_responses.go b/api/server/v1/json/client/server_service/get_log_parser_preset_responses.go new file mode 100644 index 00000000000..980f5fd3d44 --- /dev/null +++ b/api/server/v1/json/client/server_service/get_log_parser_preset_responses.go @@ -0,0 +1,790 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" + stderrors "errors" + "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" +) + +// GetLogParserPresetReader is a Reader for the GetLogParserPreset structure. +type GetLogParserPresetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *GetLogParserPresetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewGetLogParserPresetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewGetLogParserPresetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewGetLogParserPresetOK creates a GetLogParserPresetOK with default headers values +func NewGetLogParserPresetOK() *GetLogParserPresetOK { + return &GetLogParserPresetOK{} +} + +/* +GetLogParserPresetOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type GetLogParserPresetOK struct { + Payload *GetLogParserPresetOKBody +} + +// IsSuccess returns true when this get log parser preset Ok response has a 2xx status code +func (o *GetLogParserPresetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this get log parser preset Ok response has a 3xx status code +func (o *GetLogParserPresetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this get log parser preset Ok response has a 4xx status code +func (o *GetLogParserPresetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this get log parser preset Ok response has a 5xx status code +func (o *GetLogParserPresetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this get log parser preset Ok response a status code equal to that given +func (o *GetLogParserPresetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the get log parser preset Ok response +func (o *GetLogParserPresetOK) Code() int { + return 200 +} + +func (o *GetLogParserPresetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/server/log-parser-presets/{id}][%d] getLogParserPresetOk %s", 200, payload) +} + +func (o *GetLogParserPresetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/server/log-parser-presets/{id}][%d] getLogParserPresetOk %s", 200, payload) +} + +func (o *GetLogParserPresetOK) GetPayload() *GetLogParserPresetOKBody { + return o.Payload +} + +func (o *GetLogParserPresetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetLogParserPresetOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewGetLogParserPresetDefault creates a GetLogParserPresetDefault with default headers values +func NewGetLogParserPresetDefault(code int) *GetLogParserPresetDefault { + return &GetLogParserPresetDefault{ + _statusCode: code, + } +} + +/* +GetLogParserPresetDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type GetLogParserPresetDefault struct { + _statusCode int + + Payload *GetLogParserPresetDefaultBody +} + +// IsSuccess returns true when this get log parser preset default response has a 2xx status code +func (o *GetLogParserPresetDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this get log parser preset default response has a 3xx status code +func (o *GetLogParserPresetDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this get log parser preset default response has a 4xx status code +func (o *GetLogParserPresetDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this get log parser preset default response has a 5xx status code +func (o *GetLogParserPresetDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this get log parser preset default response a status code equal to that given +func (o *GetLogParserPresetDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the get log parser preset default response +func (o *GetLogParserPresetDefault) Code() int { + return o._statusCode +} + +func (o *GetLogParserPresetDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/server/log-parser-presets/{id}][%d] GetLogParserPreset default %s", o._statusCode, payload) +} + +func (o *GetLogParserPresetDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/server/log-parser-presets/{id}][%d] GetLogParserPreset default %s", o._statusCode, payload) +} + +func (o *GetLogParserPresetDefault) GetPayload() *GetLogParserPresetDefaultBody { + return o.Payload +} + +func (o *GetLogParserPresetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(GetLogParserPresetDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +/* +GetLogParserPresetDefaultBody get log parser preset default body +swagger:model GetLogParserPresetDefaultBody +*/ +type GetLogParserPresetDefaultBody struct { + + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*GetLogParserPresetDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this get log parser preset default body +func (o *GetLogParserPresetDefaultBody) 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 *GetLogParserPresetDefaultBody) 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 { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("GetLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("GetLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this get log parser preset default body based on the context it is used +func (o *GetLogParserPresetDefaultBody) 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 *GetLogParserPresetDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Details); i++ { + + if o.Details[i] != nil { + + if swag.IsZero(o.Details[i]) { // not required + return nil + } + + if err := o.Details[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("GetLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("GetLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *GetLogParserPresetDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetLogParserPresetDefaultBody) UnmarshalBinary(b []byte) error { + var res GetLogParserPresetDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetLogParserPresetDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +swagger:model GetLogParserPresetDefaultBodyDetailsItems0 +*/ +type GetLogParserPresetDefaultBodyDetailsItems0 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + + // get log parser preset default body details items0 + GetLogParserPresetDefaultBodyDetailsItems0 map[string]any `json:"-"` +} + +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (o *GetLogParserPresetDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv GetLogParserPresetDefaultBodyDetailsItems0 + + rcv.AtType = stage1.AtType + *o = rcv + + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err + } + + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]any) + for k, v := range stage2 { + var toadd any + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + o.GetLogParserPresetDefaultBodyDetailsItems0 = result + } + + return nil +} + +// MarshalJSON marshals this object with additional properties into a JSON object +func (o GetLogParserPresetDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + + stage1.AtType = o.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(o.GetLogParserPresetDefaultBodyDetailsItems0) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(o.GetLogParserPresetDefaultBodyDetailsItems0) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this get log parser preset default body details items0 +func (o *GetLogParserPresetDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this get log parser preset default body details items0 based on context it is used +func (o *GetLogParserPresetDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetLogParserPresetDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetLogParserPresetDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res GetLogParserPresetDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetLogParserPresetOKBody get log parser preset OK body +swagger:model GetLogParserPresetOKBody +*/ +type GetLogParserPresetOKBody struct { + + // preset + Preset *GetLogParserPresetOKBodyPreset `json:"preset,omitempty"` +} + +// Validate validates this get log parser preset OK body +func (o *GetLogParserPresetOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validatePreset(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetLogParserPresetOKBody) validatePreset(formats strfmt.Registry) error { + if swag.IsZero(o.Preset) { // not required + return nil + } + + if o.Preset != nil { + if err := o.Preset.Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("getLogParserPresetOk" + "." + "preset") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("getLogParserPresetOk" + "." + "preset") + } + + return err + } + } + + return nil +} + +// ContextValidate validate this get log parser preset OK body based on the context it is used +func (o *GetLogParserPresetOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidatePreset(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetLogParserPresetOKBody) contextValidatePreset(ctx context.Context, formats strfmt.Registry) error { + + if o.Preset != nil { + + if swag.IsZero(o.Preset) { // not required + return nil + } + + if err := o.Preset.ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("getLogParserPresetOk" + "." + "preset") + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("getLogParserPresetOk" + "." + "preset") + } + + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *GetLogParserPresetOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetLogParserPresetOKBody) UnmarshalBinary(b []byte) error { + var res GetLogParserPresetOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +GetLogParserPresetOKBodyPreset LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML). +swagger:model GetLogParserPresetOKBodyPreset +*/ +type GetLogParserPresetOKBodyPreset struct { + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // operator yaml + OperatorYaml string `json:"operator_yaml,omitempty"` + + // built in + BuiltIn bool `json:"built_in,omitempty"` + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at,omitempty"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` +} + +// Validate validates this get log parser preset OK body preset +func (o *GetLogParserPresetOKBodyPreset) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := o.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *GetLogParserPresetOKBodyPreset) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(o.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("getLogParserPresetOk"+"."+"preset"+"."+"created_at", "body", "date-time", o.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *GetLogParserPresetOKBodyPreset) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(o.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("getLogParserPresetOk"+"."+"preset"+"."+"updated_at", "body", "date-time", o.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this get log parser preset OK body preset based on context it is used +func (o *GetLogParserPresetOKBodyPreset) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *GetLogParserPresetOKBodyPreset) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *GetLogParserPresetOKBodyPreset) UnmarshalBinary(b []byte) error { + var res GetLogParserPresetOKBodyPreset + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/server/v1/json/client/server_service/get_read_only_settings_parameters.go b/api/server/v1/json/client/server_service/get_read_only_settings_parameters.go index ce14210b120..b4859e143a8 100644 --- a/api/server/v1/json/client/server_service/get_read_only_settings_parameters.go +++ b/api/server/v1/json/client/server_service/get_read_only_settings_parameters.go @@ -115,6 +115,7 @@ func (o *GetReadOnlySettingsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetReadOnlySettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/get_read_only_settings_responses.go b/api/server/v1/json/client/server_service/get_read_only_settings_responses.go index 31376147ddf..1c819458b59 100644 --- a/api/server/v1/json/client/server_service/get_read_only_settings_responses.go +++ b/api/server/v1/json/client/server_service/get_read_only_settings_responses.go @@ -104,6 +104,7 @@ func (o *GetReadOnlySettingsOK) GetPayload() *GetReadOnlySettingsOKBody { } func (o *GetReadOnlySettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetReadOnlySettingsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetReadOnlySettingsDefault) GetPayload() *GetReadOnlySettingsDefaultBod } func (o *GetReadOnlySettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetReadOnlySettingsDefaultBody) // response payload @@ -192,6 +194,7 @@ GetReadOnlySettingsDefaultBody get read only settings default body swagger:model GetReadOnlySettingsDefaultBody */ type GetReadOnlySettingsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetReadOnlySettingsDefaultBody) ContextValidate(ctx context.Context, fo } func (o *GetReadOnlySettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetReadOnlySettingsDefaultBody) contextValidateDetails(ctx context.Cont return err } } + } return nil @@ -393,6 +399,7 @@ GetReadOnlySettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serializ swagger:model GetReadOnlySettingsDefaultBodyDetailsItems0 */ type GetReadOnlySettingsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -431,6 +438,7 @@ type GetReadOnlySettingsDefaultBodyDetailsItems0 struct { func (o *GetReadOnlySettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -495,6 +503,7 @@ func (o *GetReadOnlySettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) // MarshalJSON marshals this object with additional properties into a JSON object func (o GetReadOnlySettingsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -585,6 +594,7 @@ GetReadOnlySettingsOKBody get read only settings OK body swagger:model GetReadOnlySettingsOKBody */ type GetReadOnlySettingsOKBody struct { + // settings Settings *GetReadOnlySettingsOKBodySettings `json:"settings,omitempty"` } @@ -641,6 +651,7 @@ func (o *GetReadOnlySettingsOKBody) ContextValidate(ctx context.Context, formats } func (o *GetReadOnlySettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { + if o.Settings != nil { if swag.IsZero(o.Settings) { // not required @@ -687,6 +698,7 @@ GetReadOnlySettingsOKBodySettings ReadOnlySettings represents a stripped-down ve swagger:model GetReadOnlySettingsOKBodySettings */ type GetReadOnlySettingsOKBodySettings struct { + // True if updates are enabled. UpdatesEnabled bool `json:"updates_enabled,omitempty"` diff --git a/api/server/v1/json/client/server_service/get_settings_parameters.go b/api/server/v1/json/client/server_service/get_settings_parameters.go index a25fa8d3b24..f41cc415346 100644 --- a/api/server/v1/json/client/server_service/get_settings_parameters.go +++ b/api/server/v1/json/client/server_service/get_settings_parameters.go @@ -115,6 +115,7 @@ func (o *GetSettingsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/get_settings_responses.go b/api/server/v1/json/client/server_service/get_settings_responses.go index 23c0026d5c9..dd50369970f 100644 --- a/api/server/v1/json/client/server_service/get_settings_responses.go +++ b/api/server/v1/json/client/server_service/get_settings_responses.go @@ -104,6 +104,7 @@ func (o *GetSettingsOK) GetPayload() *GetSettingsOKBody { } func (o *GetSettingsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetSettingsOKBody) // response payload @@ -177,6 +178,7 @@ func (o *GetSettingsDefault) GetPayload() *GetSettingsDefaultBody { } func (o *GetSettingsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetSettingsDefaultBody) // response payload @@ -192,6 +194,7 @@ GetSettingsDefaultBody get settings default body swagger:model GetSettingsDefaultBody */ type GetSettingsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *GetSettingsDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *GetSettingsDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -393,6 +399,7 @@ GetSettingsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model GetSettingsDefaultBodyDetailsItems0 */ type GetSettingsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -431,6 +438,7 @@ type GetSettingsDefaultBodyDetailsItems0 struct { func (o *GetSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -495,6 +503,7 @@ func (o *GetSettingsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetSettingsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -585,6 +594,7 @@ GetSettingsOKBody get settings OK body swagger:model GetSettingsOKBody */ type GetSettingsOKBody struct { + // settings Settings *GetSettingsOKBodySettings `json:"settings,omitempty"` } @@ -641,6 +651,7 @@ func (o *GetSettingsOKBody) ContextValidate(ctx context.Context, formats strfmt. } func (o *GetSettingsOKBody) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error { + if o.Settings != nil { if swag.IsZero(o.Settings) { // not required @@ -687,6 +698,7 @@ GetSettingsOKBodySettings Settings represents PMM Server settings. swagger:model GetSettingsOKBodySettings */ type GetSettingsOKBodySettings struct { + // True if updates are enabled. UpdatesEnabled bool `json:"updates_enabled,omitempty"` @@ -828,6 +840,7 @@ func (o *GetSettingsOKBodySettings) ContextValidate(ctx context.Context, formats } func (o *GetSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx context.Context, formats strfmt.Registry) error { + if o.AdvisorRunIntervals != nil { if swag.IsZero(o.AdvisorRunIntervals) { // not required @@ -852,6 +865,7 @@ func (o *GetSettingsOKBodySettings) contextValidateAdvisorRunIntervals(ctx conte } func (o *GetSettingsOKBodySettings) contextValidateMetricsResolutions(ctx context.Context, formats strfmt.Registry) error { + if o.MetricsResolutions != nil { if swag.IsZero(o.MetricsResolutions) { // not required @@ -898,6 +912,7 @@ GetSettingsOKBodySettingsAdvisorRunIntervals AdvisorRunIntervals represents inte swagger:model GetSettingsOKBodySettingsAdvisorRunIntervals */ type GetSettingsOKBodySettingsAdvisorRunIntervals struct { + // Standard check interval. StandardInterval string `json:"standard_interval,omitempty"` @@ -941,6 +956,7 @@ GetSettingsOKBodySettingsMetricsResolutions MetricsResolutions represents Promet swagger:model GetSettingsOKBodySettingsMetricsResolutions */ type GetSettingsOKBodySettingsMetricsResolutions struct { + // High resolution. Should have a suffix in JSON: 1s, 1m, 1h. Hr string `json:"hr,omitempty"` diff --git a/api/server/v1/json/client/server_service/leader_health_check_parameters.go b/api/server/v1/json/client/server_service/leader_health_check_parameters.go index 86cdd9c398b..4cb5355dc72 100644 --- a/api/server/v1/json/client/server_service/leader_health_check_parameters.go +++ b/api/server/v1/json/client/server_service/leader_health_check_parameters.go @@ -115,6 +115,7 @@ func (o *LeaderHealthCheckParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *LeaderHealthCheckParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/leader_health_check_responses.go b/api/server/v1/json/client/server_service/leader_health_check_responses.go index ab224190ccc..a7506fe40ec 100644 --- a/api/server/v1/json/client/server_service/leader_health_check_responses.go +++ b/api/server/v1/json/client/server_service/leader_health_check_responses.go @@ -104,6 +104,7 @@ func (o *LeaderHealthCheckOK) GetPayload() any { } func (o *LeaderHealthCheckOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *LeaderHealthCheckDefault) GetPayload() *LeaderHealthCheckDefaultBody { } func (o *LeaderHealthCheckDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(LeaderHealthCheckDefaultBody) // response payload @@ -190,6 +192,7 @@ LeaderHealthCheckDefaultBody leader health check default body swagger:model LeaderHealthCheckDefaultBody */ type LeaderHealthCheckDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *LeaderHealthCheckDefaultBody) ContextValidate(ctx context.Context, form } func (o *LeaderHealthCheckDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *LeaderHealthCheckDefaultBody) contextValidateDetails(ctx context.Contex return err } } + } return nil @@ -391,6 +397,7 @@ LeaderHealthCheckDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized swagger:model LeaderHealthCheckDefaultBodyDetailsItems0 */ type LeaderHealthCheckDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -429,6 +436,7 @@ type LeaderHealthCheckDefaultBodyDetailsItems0 struct { func (o *LeaderHealthCheckDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -493,6 +501,7 @@ func (o *LeaderHealthCheckDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) e // MarshalJSON marshals this object with additional properties into a JSON object func (o LeaderHealthCheckDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/server/v1/json/client/server_service/list_change_logs_parameters.go b/api/server/v1/json/client/server_service/list_change_logs_parameters.go index 4160eaf6faa..b801f277d16 100644 --- a/api/server/v1/json/client/server_service/list_change_logs_parameters.go +++ b/api/server/v1/json/client/server_service/list_change_logs_parameters.go @@ -115,6 +115,7 @@ func (o *ListChangeLogsParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListChangeLogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/list_change_logs_responses.go b/api/server/v1/json/client/server_service/list_change_logs_responses.go index f0943c1e69e..c8a18907ea6 100644 --- a/api/server/v1/json/client/server_service/list_change_logs_responses.go +++ b/api/server/v1/json/client/server_service/list_change_logs_responses.go @@ -105,6 +105,7 @@ func (o *ListChangeLogsOK) GetPayload() *ListChangeLogsOKBody { } func (o *ListChangeLogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListChangeLogsOKBody) // response payload @@ -178,6 +179,7 @@ func (o *ListChangeLogsDefault) GetPayload() *ListChangeLogsDefaultBody { } func (o *ListChangeLogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListChangeLogsDefaultBody) // response payload @@ -193,6 +195,7 @@ ListChangeLogsDefaultBody list change logs default body swagger:model ListChangeLogsDefaultBody */ type ListChangeLogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *ListChangeLogsDefaultBody) ContextValidate(ctx context.Context, formats } func (o *ListChangeLogsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *ListChangeLogsDefaultBody) contextValidateDetails(ctx context.Context, return err } } + } return nil @@ -394,6 +400,7 @@ ListChangeLogsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized pr swagger:model ListChangeLogsDefaultBodyDetailsItems0 */ type ListChangeLogsDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -432,6 +439,7 @@ type ListChangeLogsDefaultBodyDetailsItems0 struct { func (o *ListChangeLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -496,6 +504,7 @@ func (o *ListChangeLogsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) erro // MarshalJSON marshals this object with additional properties into a JSON object func (o ListChangeLogsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -586,6 +595,7 @@ ListChangeLogsOKBody list change logs OK body swagger:model ListChangeLogsOKBody */ type ListChangeLogsOKBody struct { + // List of available updates. Updates []*ListChangeLogsOKBodyUpdatesItems0 `json:"updates"` @@ -669,7 +679,9 @@ func (o *ListChangeLogsOKBody) ContextValidate(ctx context.Context, formats strf } func (o *ListChangeLogsOKBody) contextValidateUpdates(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Updates); i++ { + if o.Updates[i] != nil { if swag.IsZero(o.Updates[i]) { // not required @@ -689,6 +701,7 @@ func (o *ListChangeLogsOKBody) contextValidateUpdates(ctx context.Context, forma return err } } + } return nil @@ -717,6 +730,7 @@ ListChangeLogsOKBodyUpdatesItems0 list change logs OK body updates items0 swagger:model ListChangeLogsOKBodyUpdatesItems0 */ type ListChangeLogsOKBodyUpdatesItems0 struct { + // PMM Version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/json/client/server_service/list_log_parser_presets_parameters.go b/api/server/v1/json/client/server_service/list_log_parser_presets_parameters.go new file mode 100644 index 00000000000..d12ee2d97ba --- /dev/null +++ b/api/server/v1/json/client/server_service/list_log_parser_presets_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" +) + +// NewListLogParserPresetsParams creates a new ListLogParserPresetsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewListLogParserPresetsParams() *ListLogParserPresetsParams { + return &ListLogParserPresetsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewListLogParserPresetsParamsWithTimeout creates a new ListLogParserPresetsParams object +// with the ability to set a timeout on a request. +func NewListLogParserPresetsParamsWithTimeout(timeout time.Duration) *ListLogParserPresetsParams { + return &ListLogParserPresetsParams{ + timeout: timeout, + } +} + +// NewListLogParserPresetsParamsWithContext creates a new ListLogParserPresetsParams object +// with the ability to set a context for a request. +func NewListLogParserPresetsParamsWithContext(ctx context.Context) *ListLogParserPresetsParams { + return &ListLogParserPresetsParams{ + Context: ctx, + } +} + +// NewListLogParserPresetsParamsWithHTTPClient creates a new ListLogParserPresetsParams object +// with the ability to set a custom HTTPClient for a request. +func NewListLogParserPresetsParamsWithHTTPClient(client *http.Client) *ListLogParserPresetsParams { + return &ListLogParserPresetsParams{ + HTTPClient: client, + } +} + +/* +ListLogParserPresetsParams contains all the parameters to send to the API endpoint + + for the list log parser presets operation. + + Typically these are written to a http.Request. +*/ +type ListLogParserPresetsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the list log parser presets params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListLogParserPresetsParams) WithDefaults() *ListLogParserPresetsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the list log parser presets params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ListLogParserPresetsParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the list log parser presets params +func (o *ListLogParserPresetsParams) WithTimeout(timeout time.Duration) *ListLogParserPresetsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the list log parser presets params +func (o *ListLogParserPresetsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the list log parser presets params +func (o *ListLogParserPresetsParams) WithContext(ctx context.Context) *ListLogParserPresetsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the list log parser presets params +func (o *ListLogParserPresetsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the list log parser presets params +func (o *ListLogParserPresetsParams) WithHTTPClient(client *http.Client) *ListLogParserPresetsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the list log parser presets params +func (o *ListLogParserPresetsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ListLogParserPresetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/server/v1/json/client/server_service/list_log_parser_presets_responses.go b/api/server/v1/json/client/server_service/list_log_parser_presets_responses.go new file mode 100644 index 00000000000..e7b84bc9e6f --- /dev/null +++ b/api/server/v1/json/client/server_service/list_log_parser_presets_responses.go @@ -0,0 +1,801 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" + stderrors "errors" + "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" +) + +// ListLogParserPresetsReader is a Reader for the ListLogParserPresets structure. +type ListLogParserPresetsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ListLogParserPresetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewListLogParserPresetsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewListLogParserPresetsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewListLogParserPresetsOK creates a ListLogParserPresetsOK with default headers values +func NewListLogParserPresetsOK() *ListLogParserPresetsOK { + return &ListLogParserPresetsOK{} +} + +/* +ListLogParserPresetsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ListLogParserPresetsOK struct { + Payload *ListLogParserPresetsOKBody +} + +// IsSuccess returns true when this list log parser presets Ok response has a 2xx status code +func (o *ListLogParserPresetsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list log parser presets Ok response has a 3xx status code +func (o *ListLogParserPresetsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list log parser presets Ok response has a 4xx status code +func (o *ListLogParserPresetsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list log parser presets Ok response has a 5xx status code +func (o *ListLogParserPresetsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list log parser presets Ok response a status code equal to that given +func (o *ListLogParserPresetsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the list log parser presets Ok response +func (o *ListLogParserPresetsOK) Code() int { + return 200 +} + +func (o *ListLogParserPresetsOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/server/log-parser-presets][%d] listLogParserPresetsOk %s", 200, payload) +} + +func (o *ListLogParserPresetsOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/server/log-parser-presets][%d] listLogParserPresetsOk %s", 200, payload) +} + +func (o *ListLogParserPresetsOK) GetPayload() *ListLogParserPresetsOKBody { + return o.Payload +} + +func (o *ListLogParserPresetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ListLogParserPresetsOKBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewListLogParserPresetsDefault creates a ListLogParserPresetsDefault with default headers values +func NewListLogParserPresetsDefault(code int) *ListLogParserPresetsDefault { + return &ListLogParserPresetsDefault{ + _statusCode: code, + } +} + +/* +ListLogParserPresetsDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type ListLogParserPresetsDefault struct { + _statusCode int + + Payload *ListLogParserPresetsDefaultBody +} + +// IsSuccess returns true when this list log parser presets default response has a 2xx status code +func (o *ListLogParserPresetsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this list log parser presets default response has a 3xx status code +func (o *ListLogParserPresetsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this list log parser presets default response has a 4xx status code +func (o *ListLogParserPresetsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this list log parser presets default response has a 5xx status code +func (o *ListLogParserPresetsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this list log parser presets default response a status code equal to that given +func (o *ListLogParserPresetsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the list log parser presets default response +func (o *ListLogParserPresetsDefault) Code() int { + return o._statusCode +} + +func (o *ListLogParserPresetsDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/server/log-parser-presets][%d] ListLogParserPresets default %s", o._statusCode, payload) +} + +func (o *ListLogParserPresetsDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[GET /v1/server/log-parser-presets][%d] ListLogParserPresets default %s", o._statusCode, payload) +} + +func (o *ListLogParserPresetsDefault) GetPayload() *ListLogParserPresetsDefaultBody { + return o.Payload +} + +func (o *ListLogParserPresetsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(ListLogParserPresetsDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +/* +ListLogParserPresetsDefaultBody list log parser presets default body +swagger:model ListLogParserPresetsDefaultBody +*/ +type ListLogParserPresetsDefaultBody struct { + + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*ListLogParserPresetsDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this list log parser presets default body +func (o *ListLogParserPresetsDefaultBody) 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 *ListLogParserPresetsDefaultBody) 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 { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("ListLogParserPresets default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("ListLogParserPresets default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this list log parser presets default body based on the context it is used +func (o *ListLogParserPresetsDefaultBody) 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 *ListLogParserPresetsDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Details); i++ { + + if o.Details[i] != nil { + + if swag.IsZero(o.Details[i]) { // not required + return nil + } + + if err := o.Details[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("ListLogParserPresets default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("ListLogParserPresets default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ListLogParserPresetsDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListLogParserPresetsDefaultBody) UnmarshalBinary(b []byte) error { + var res ListLogParserPresetsDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ListLogParserPresetsDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +swagger:model ListLogParserPresetsDefaultBodyDetailsItems0 +*/ +type ListLogParserPresetsDefaultBodyDetailsItems0 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + + // list log parser presets default body details items0 + ListLogParserPresetsDefaultBodyDetailsItems0 map[string]any `json:"-"` +} + +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (o *ListLogParserPresetsDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv ListLogParserPresetsDefaultBodyDetailsItems0 + + rcv.AtType = stage1.AtType + *o = rcv + + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err + } + + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]any) + for k, v := range stage2 { + var toadd any + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + o.ListLogParserPresetsDefaultBodyDetailsItems0 = result + } + + return nil +} + +// MarshalJSON marshals this object with additional properties into a JSON object +func (o ListLogParserPresetsDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + + stage1.AtType = o.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(o.ListLogParserPresetsDefaultBodyDetailsItems0) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(o.ListLogParserPresetsDefaultBodyDetailsItems0) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this list log parser presets default body details items0 +func (o *ListLogParserPresetsDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this list log parser presets default body details items0 based on context it is used +func (o *ListLogParserPresetsDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ListLogParserPresetsDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListLogParserPresetsDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res ListLogParserPresetsDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ListLogParserPresetsOKBody list log parser presets OK body +swagger:model ListLogParserPresetsOKBody +*/ +type ListLogParserPresetsOKBody struct { + + // presets + Presets []*ListLogParserPresetsOKBodyPresetsItems0 `json:"presets"` +} + +// Validate validates this list log parser presets OK body +func (o *ListLogParserPresetsOKBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validatePresets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ListLogParserPresetsOKBody) validatePresets(formats strfmt.Registry) error { + if swag.IsZero(o.Presets) { // not required + return nil + } + + for i := 0; i < len(o.Presets); i++ { + if swag.IsZero(o.Presets[i]) { // not required + continue + } + + if o.Presets[i] != nil { + if err := o.Presets[i].Validate(formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("listLogParserPresetsOk" + "." + "presets" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("listLogParserPresetsOk" + "." + "presets" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this list log parser presets OK body based on the context it is used +func (o *ListLogParserPresetsOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidatePresets(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ListLogParserPresetsOKBody) contextValidatePresets(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Presets); i++ { + + if o.Presets[i] != nil { + + if swag.IsZero(o.Presets[i]) { // not required + return nil + } + + if err := o.Presets[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("listLogParserPresetsOk" + "." + "presets" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("listLogParserPresetsOk" + "." + "presets" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *ListLogParserPresetsOKBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListLogParserPresetsOKBody) UnmarshalBinary(b []byte) error { + var res ListLogParserPresetsOKBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +ListLogParserPresetsOKBodyPresetsItems0 LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML). +swagger:model ListLogParserPresetsOKBodyPresetsItems0 +*/ +type ListLogParserPresetsOKBodyPresetsItems0 struct { + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // operator yaml + OperatorYaml string `json:"operator_yaml,omitempty"` + + // built in + BuiltIn bool `json:"built_in,omitempty"` + + // created at + // Format: date-time + CreatedAt strfmt.DateTime `json:"created_at,omitempty"` + + // updated at + // Format: date-time + UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` +} + +// Validate validates this list log parser presets OK body presets items0 +func (o *ListLogParserPresetsOKBodyPresetsItems0) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCreatedAt(formats); err != nil { + res = append(res, err) + } + + if err := o.validateUpdatedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *ListLogParserPresetsOKBodyPresetsItems0) validateCreatedAt(formats strfmt.Registry) error { + if swag.IsZero(o.CreatedAt) { // not required + return nil + } + + if err := validate.FormatOf("created_at", "body", "date-time", o.CreatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +func (o *ListLogParserPresetsOKBodyPresetsItems0) validateUpdatedAt(formats strfmt.Registry) error { + if swag.IsZero(o.UpdatedAt) { // not required + return nil + } + + if err := validate.FormatOf("updated_at", "body", "date-time", o.UpdatedAt.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this list log parser presets OK body presets items0 based on context it is used +func (o *ListLogParserPresetsOKBodyPresetsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *ListLogParserPresetsOKBodyPresetsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *ListLogParserPresetsOKBodyPresetsItems0) UnmarshalBinary(b []byte) error { + var res ListLogParserPresetsOKBodyPresetsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/server/v1/json/client/server_service/logs_parameters.go b/api/server/v1/json/client/server_service/logs_parameters.go index eac190ca90c..31b876d12f8 100644 --- a/api/server/v1/json/client/server_service/logs_parameters.go +++ b/api/server/v1/json/client/server_service/logs_parameters.go @@ -61,6 +61,7 @@ LogsParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type LogsParams struct { + /* Pprof. Include performance profiling data, @@ -133,6 +134,7 @@ func (o *LogsParams) SetPprof(pprof *bool) { // WriteToRequest writes these params to a swagger request func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -148,6 +150,7 @@ func (o *LogsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry } qPprof := swag.FormatBool(qrPprof) if qPprof != "" { + if err := r.SetQueryParam("pprof", qPprof); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/logs_responses.go b/api/server/v1/json/client/server_service/logs_responses.go index aef555e7c81..f49726868d9 100644 --- a/api/server/v1/json/client/server_service/logs_responses.go +++ b/api/server/v1/json/client/server_service/logs_responses.go @@ -47,6 +47,7 @@ func (o *LogsReader) ReadResponse(response runtime.ClientResponse, consumer runt // NewLogsOK creates a LogsOK with default headers values func NewLogsOK(writer io.Writer) *LogsOK { return &LogsOK{ + Payload: writer, } } @@ -103,6 +104,7 @@ func (o *LogsOK) GetPayload() io.Writer { } func (o *LogsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -174,6 +176,7 @@ func (o *LogsDefault) GetPayload() *LogsDefaultBody { } func (o *LogsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(LogsDefaultBody) // response payload @@ -189,6 +192,7 @@ LogsDefaultBody ErrorResponse is a message returned on HTTP error. swagger:model LogsDefaultBody */ type LogsDefaultBody struct { + // code Code int32 `json:"code,omitempty"` diff --git a/api/server/v1/json/client/server_service/readiness_parameters.go b/api/server/v1/json/client/server_service/readiness_parameters.go index 88fbc323803..ed27b254822 100644 --- a/api/server/v1/json/client/server_service/readiness_parameters.go +++ b/api/server/v1/json/client/server_service/readiness_parameters.go @@ -115,6 +115,7 @@ func (o *ReadinessParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ReadinessParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/readiness_responses.go b/api/server/v1/json/client/server_service/readiness_responses.go index dd64679b8db..05b9d097c88 100644 --- a/api/server/v1/json/client/server_service/readiness_responses.go +++ b/api/server/v1/json/client/server_service/readiness_responses.go @@ -104,6 +104,7 @@ func (o *ReadinessOK) GetPayload() any { } func (o *ReadinessOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { return err @@ -175,6 +176,7 @@ func (o *ReadinessDefault) GetPayload() *ReadinessDefaultBody { } func (o *ReadinessDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ReadinessDefaultBody) // response payload @@ -190,6 +192,7 @@ ReadinessDefaultBody readiness default body swagger:model ReadinessDefaultBody */ type ReadinessDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -259,7 +262,9 @@ func (o *ReadinessDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -279,6 +284,7 @@ func (o *ReadinessDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -391,6 +397,7 @@ ReadinessDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protoco swagger:model ReadinessDefaultBodyDetailsItems0 */ type ReadinessDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -429,6 +436,7 @@ type ReadinessDefaultBodyDetailsItems0 struct { func (o *ReadinessDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -493,6 +501,7 @@ func (o *ReadinessDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ReadinessDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent diff --git a/api/server/v1/json/client/server_service/remove_log_parser_preset_parameters.go b/api/server/v1/json/client/server_service/remove_log_parser_preset_parameters.go new file mode 100644 index 00000000000..08ec0ba9c6e --- /dev/null +++ b/api/server/v1/json/client/server_service/remove_log_parser_preset_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" +) + +// NewRemoveLogParserPresetParams creates a new RemoveLogParserPresetParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewRemoveLogParserPresetParams() *RemoveLogParserPresetParams { + return &RemoveLogParserPresetParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewRemoveLogParserPresetParamsWithTimeout creates a new RemoveLogParserPresetParams object +// with the ability to set a timeout on a request. +func NewRemoveLogParserPresetParamsWithTimeout(timeout time.Duration) *RemoveLogParserPresetParams { + return &RemoveLogParserPresetParams{ + timeout: timeout, + } +} + +// NewRemoveLogParserPresetParamsWithContext creates a new RemoveLogParserPresetParams object +// with the ability to set a context for a request. +func NewRemoveLogParserPresetParamsWithContext(ctx context.Context) *RemoveLogParserPresetParams { + return &RemoveLogParserPresetParams{ + Context: ctx, + } +} + +// NewRemoveLogParserPresetParamsWithHTTPClient creates a new RemoveLogParserPresetParams object +// with the ability to set a custom HTTPClient for a request. +func NewRemoveLogParserPresetParamsWithHTTPClient(client *http.Client) *RemoveLogParserPresetParams { + return &RemoveLogParserPresetParams{ + HTTPClient: client, + } +} + +/* +RemoveLogParserPresetParams contains all the parameters to send to the API endpoint + + for the remove log parser preset operation. + + Typically these are written to a http.Request. +*/ +type RemoveLogParserPresetParams struct { + + // ID. + ID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the remove log parser preset params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RemoveLogParserPresetParams) WithDefaults() *RemoveLogParserPresetParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the remove log parser preset params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *RemoveLogParserPresetParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the remove log parser preset params +func (o *RemoveLogParserPresetParams) WithTimeout(timeout time.Duration) *RemoveLogParserPresetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the remove log parser preset params +func (o *RemoveLogParserPresetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the remove log parser preset params +func (o *RemoveLogParserPresetParams) WithContext(ctx context.Context) *RemoveLogParserPresetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the remove log parser preset params +func (o *RemoveLogParserPresetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the remove log parser preset params +func (o *RemoveLogParserPresetParams) WithHTTPClient(client *http.Client) *RemoveLogParserPresetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the remove log parser preset params +func (o *RemoveLogParserPresetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithID adds the id to the remove log parser preset params +func (o *RemoveLogParserPresetParams) WithID(id string) *RemoveLogParserPresetParams { + o.SetID(id) + return o +} + +// SetID adds the id to the remove log parser preset params +func (o *RemoveLogParserPresetParams) SetID(id string) { + o.ID = id +} + +// WriteToRequest writes these params to a swagger request +func (o *RemoveLogParserPresetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param id + if err := r.SetPathParam("id", o.ID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/server/v1/json/client/server_service/remove_log_parser_preset_responses.go b/api/server/v1/json/client/server_service/remove_log_parser_preset_responses.go new file mode 100644 index 00000000000..4abe730a1be --- /dev/null +++ b/api/server/v1/json/client/server_service/remove_log_parser_preset_responses.go @@ -0,0 +1,588 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server_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" + stderrors "errors" + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// RemoveLogParserPresetReader is a Reader for the RemoveLogParserPreset structure. +type RemoveLogParserPresetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *RemoveLogParserPresetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) { + switch response.Code() { + case 200: + result := NewRemoveLogParserPresetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewRemoveLogParserPresetDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewRemoveLogParserPresetOK creates a RemoveLogParserPresetOK with default headers values +func NewRemoveLogParserPresetOK() *RemoveLogParserPresetOK { + return &RemoveLogParserPresetOK{} +} + +/* +RemoveLogParserPresetOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type RemoveLogParserPresetOK struct { + Payload any +} + +// IsSuccess returns true when this remove log parser preset Ok response has a 2xx status code +func (o *RemoveLogParserPresetOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this remove log parser preset Ok response has a 3xx status code +func (o *RemoveLogParserPresetOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this remove log parser preset Ok response has a 4xx status code +func (o *RemoveLogParserPresetOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this remove log parser preset Ok response has a 5xx status code +func (o *RemoveLogParserPresetOK) IsServerError() bool { + return false +} + +// IsCode returns true when this remove log parser preset Ok response a status code equal to that given +func (o *RemoveLogParserPresetOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the remove log parser preset Ok response +func (o *RemoveLogParserPresetOK) Code() int { + return 200 +} + +func (o *RemoveLogParserPresetOK) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/server/log-parser-presets/{id}][%d] removeLogParserPresetOk %s", 200, payload) +} + +func (o *RemoveLogParserPresetOK) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/server/log-parser-presets/{id}][%d] removeLogParserPresetOk %s", 200, payload) +} + +func (o *RemoveLogParserPresetOK) GetPayload() any { + return o.Payload +} + +func (o *RemoveLogParserPresetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +// NewRemoveLogParserPresetDefault creates a RemoveLogParserPresetDefault with default headers values +func NewRemoveLogParserPresetDefault(code int) *RemoveLogParserPresetDefault { + return &RemoveLogParserPresetDefault{ + _statusCode: code, + } +} + +/* +RemoveLogParserPresetDefault describes a response with status code -1, with default header values. + +An unexpected error response. +*/ +type RemoveLogParserPresetDefault struct { + _statusCode int + + Payload *RemoveLogParserPresetDefaultBody +} + +// IsSuccess returns true when this remove log parser preset default response has a 2xx status code +func (o *RemoveLogParserPresetDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this remove log parser preset default response has a 3xx status code +func (o *RemoveLogParserPresetDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this remove log parser preset default response has a 4xx status code +func (o *RemoveLogParserPresetDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this remove log parser preset default response has a 5xx status code +func (o *RemoveLogParserPresetDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this remove log parser preset default response a status code equal to that given +func (o *RemoveLogParserPresetDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the remove log parser preset default response +func (o *RemoveLogParserPresetDefault) Code() int { + return o._statusCode +} + +func (o *RemoveLogParserPresetDefault) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/server/log-parser-presets/{id}][%d] RemoveLogParserPreset default %s", o._statusCode, payload) +} + +func (o *RemoveLogParserPresetDefault) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[DELETE /v1/server/log-parser-presets/{id}][%d] RemoveLogParserPreset default %s", o._statusCode, payload) +} + +func (o *RemoveLogParserPresetDefault) GetPayload() *RemoveLogParserPresetDefaultBody { + return o.Payload +} + +func (o *RemoveLogParserPresetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(RemoveLogParserPresetDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) { + return err + } + + return nil +} + +/* +RemoveLogParserPresetDefaultBody remove log parser preset default body +swagger:model RemoveLogParserPresetDefaultBody +*/ +type RemoveLogParserPresetDefaultBody struct { + + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*RemoveLogParserPresetDefaultBodyDetailsItems0 `json:"details"` +} + +// Validate validates this remove log parser preset default body +func (o *RemoveLogParserPresetDefaultBody) 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 *RemoveLogParserPresetDefaultBody) 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 { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("RemoveLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("RemoveLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// ContextValidate validate this remove log parser preset default body based on the context it is used +func (o *RemoveLogParserPresetDefaultBody) 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 *RemoveLogParserPresetDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(o.Details); i++ { + + if o.Details[i] != nil { + + if swag.IsZero(o.Details[i]) { // not required + return nil + } + + if err := o.Details[i].ContextValidate(ctx, formats); err != nil { + ve := new(errors.Validation) + if stderrors.As(err, &ve) { + return ve.ValidateName("RemoveLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + ce := new(errors.CompositeError) + if stderrors.As(err, &ce) { + return ce.ValidateName("RemoveLogParserPreset default" + "." + "details" + "." + strconv.Itoa(i)) + } + + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *RemoveLogParserPresetDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *RemoveLogParserPresetDefaultBody) UnmarshalBinary(b []byte) error { + var res RemoveLogParserPresetDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/* +RemoveLogParserPresetDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// // or ... +// if (any.isSameTypeAs(Foo.getDefaultInstance())) { +// foo = any.unpack(Foo.getDefaultInstance()); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := anypb.New(foo) +// if err != nil { +// ... +// } +// ... +// foo := &pb.Foo{} +// if err := any.UnmarshalTo(foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +swagger:model RemoveLogParserPresetDefaultBodyDetailsItems0 +*/ +type RemoveLogParserPresetDefaultBodyDetailsItems0 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + + // remove log parser preset default body details items0 + RemoveLogParserPresetDefaultBodyDetailsItems0 map[string]any `json:"-"` +} + +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (o *RemoveLogParserPresetDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv RemoveLogParserPresetDefaultBodyDetailsItems0 + + rcv.AtType = stage1.AtType + *o = rcv + + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err + } + + delete(stage2, "@type") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]any) + for k, v := range stage2 { + var toadd any + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + o.RemoveLogParserPresetDefaultBodyDetailsItems0 = result + } + + return nil +} + +// MarshalJSON marshals this object with additional properties into a JSON object +func (o RemoveLogParserPresetDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { + var stage1 struct { + + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. As of May 2023, there are no widely used type server + // implementations and no plans to implement one. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + AtType string `json:"@type,omitempty"` + } + + stage1.AtType = o.AtType + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(o.RemoveLogParserPresetDefaultBodyDetailsItems0) == 0 { // no additional properties + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(o.RemoveLogParserPresetDefaultBodyDetailsItems0) + if err != nil { + return nil, err + } + + if len(props) < 3 { // "{}": only additional properties + return additional, nil + } + + // concatenate the 2 objects + return swag.ConcatJSON(props, additional), nil +} + +// Validate validates this remove log parser preset default body details items0 +func (o *RemoveLogParserPresetDefaultBodyDetailsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this remove log parser preset default body details items0 based on context it is used +func (o *RemoveLogParserPresetDefaultBodyDetailsItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *RemoveLogParserPresetDefaultBodyDetailsItems0) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *RemoveLogParserPresetDefaultBodyDetailsItems0) UnmarshalBinary(b []byte) error { + var res RemoveLogParserPresetDefaultBodyDetailsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/server/v1/json/client/server_service/server_service_client.go b/api/server/v1/json/client/server_service/server_service_client.go index b11647f7f53..add91fb8398 100644 --- a/api/server/v1/json/client/server_service/server_service_client.go +++ b/api/server/v1/json/client/server_service/server_service_client.go @@ -80,10 +80,16 @@ func WithAcceptApplicationZip(r *runtime.ClientOperation) { // ClientService is the interface for Client methods type ClientService interface { + AddLogParserPreset(params *AddLogParserPresetParams, opts ...ClientOption) (*AddLogParserPresetOK, error) + + ChangeLogParserPreset(params *ChangeLogParserPresetParams, opts ...ClientOption) (*ChangeLogParserPresetOK, error) + ChangeSettings(params *ChangeSettingsParams, opts ...ClientOption) (*ChangeSettingsOK, error) CheckUpdates(params *CheckUpdatesParams, opts ...ClientOption) (*CheckUpdatesOK, error) + GetLogParserPreset(params *GetLogParserPresetParams, opts ...ClientOption) (*GetLogParserPresetOK, error) + GetReadOnlySettings(params *GetReadOnlySettingsParams, opts ...ClientOption) (*GetReadOnlySettingsOK, error) GetSettings(params *GetSettingsParams, opts ...ClientOption) (*GetSettingsOK, error) @@ -92,10 +98,14 @@ type ClientService interface { ListChangeLogs(params *ListChangeLogsParams, opts ...ClientOption) (*ListChangeLogsOK, error) + ListLogParserPresets(params *ListLogParserPresetsParams, opts ...ClientOption) (*ListLogParserPresetsOK, error) + Logs(params *LogsParams, writer io.Writer, opts ...ClientOption) (*LogsOK, error) Readiness(params *ReadinessParams, opts ...ClientOption) (*ReadinessOK, error) + RemoveLogParserPreset(params *RemoveLogParserPresetParams, opts ...ClientOption) (*RemoveLogParserPresetOK, error) + StartUpdate(params *StartUpdateParams, opts ...ClientOption) (*StartUpdateOK, error) UpdateStatus(params *UpdateStatusParams, opts ...ClientOption) (*UpdateStatusOK, error) @@ -105,6 +115,94 @@ type ClientService interface { SetTransport(transport runtime.ClientTransport) } +/* +AddLogParserPreset adds o t e l log parser preset + +Creates a custom log parser preset. +*/ +func (a *Client) AddLogParserPreset(params *AddLogParserPresetParams, opts ...ClientOption) (*AddLogParserPresetOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewAddLogParserPresetParams() + } + op := &runtime.ClientOperation{ + ID: "AddLogParserPreset", + Method: "POST", + PathPattern: "/v1/server/log-parser-presets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &AddLogParserPresetReader{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 + } + + // only one success response has to be checked + success, ok := result.(*AddLogParserPresetOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*AddLogParserPresetDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + +/* +ChangeLogParserPreset changes o t e l log parser preset + +Updates description and/or operator YAML for any preset. +*/ +func (a *Client) ChangeLogParserPreset(params *ChangeLogParserPresetParams, opts ...ClientOption) (*ChangeLogParserPresetOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewChangeLogParserPresetParams() + } + op := &runtime.ClientOperation{ + ID: "ChangeLogParserPreset", + Method: "PUT", + PathPattern: "/v1/server/log-parser-presets/{id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &ChangeLogParserPresetReader{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 + } + + // only one success response has to be checked + success, ok := result.(*ChangeLogParserPresetOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ChangeLogParserPresetDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ChangeSettings changes settings @@ -193,6 +291,50 @@ func (a *Client) CheckUpdates(params *CheckUpdatesParams, opts ...ClientOption) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +GetLogParserPreset gets o t e l log parser preset + +Returns one log parser preset. +*/ +func (a *Client) GetLogParserPreset(params *GetLogParserPresetParams, opts ...ClientOption) (*GetLogParserPresetOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewGetLogParserPresetParams() + } + op := &runtime.ClientOperation{ + ID: "GetLogParserPreset", + Method: "GET", + PathPattern: "/v1/server/log-parser-presets/{id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &GetLogParserPresetReader{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 + } + + // only one success response has to be checked + success, ok := result.(*GetLogParserPresetOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*GetLogParserPresetDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* GetReadOnlySettings gets read only settings @@ -369,6 +511,50 @@ func (a *Client) ListChangeLogs(params *ListChangeLogsParams, opts ...ClientOpti return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ListLogParserPresets lists o t e l log parser presets + +Returns all rows from log_parser_presets. +*/ +func (a *Client) ListLogParserPresets(params *ListLogParserPresetsParams, opts ...ClientOption) (*ListLogParserPresetsOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewListLogParserPresetsParams() + } + op := &runtime.ClientOperation{ + ID: "ListLogParserPresets", + Method: "GET", + PathPattern: "/v1/server/log-parser-presets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &ListLogParserPresetsReader{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 + } + + // only one success response has to be checked + success, ok := result.(*ListLogParserPresetsOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*ListLogParserPresetsDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* Logs logs @@ -457,6 +643,50 @@ func (a *Client) Readiness(params *ReadinessParams, opts ...ClientOption) (*Read return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +RemoveLogParserPreset removes o t e l log parser preset + +Deletes a non-built-in preset when it is not in use. +*/ +func (a *Client) RemoveLogParserPreset(params *RemoveLogParserPresetParams, opts ...ClientOption) (*RemoveLogParserPresetOK, error) { + // NOTE: parameters are not validated before sending + if params == nil { + params = NewRemoveLogParserPresetParams() + } + op := &runtime.ClientOperation{ + ID: "RemoveLogParserPreset", + Method: "DELETE", + PathPattern: "/v1/server/log-parser-presets/{id}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &RemoveLogParserPresetReader{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 + } + + // only one success response has to be checked + success, ok := result.(*RemoveLogParserPresetOK) + if ok { + return success, nil + } + + // unexpected success response. + // + // a default response is provided: fill this and return an error + unexpectedSuccess := result.(*RemoveLogParserPresetDefault) + + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* StartUpdate starts update diff --git a/api/server/v1/json/client/server_service/start_update_parameters.go b/api/server/v1/json/client/server_service/start_update_parameters.go index 82bb6c79150..9ee4645d340 100644 --- a/api/server/v1/json/client/server_service/start_update_parameters.go +++ b/api/server/v1/json/client/server_service/start_update_parameters.go @@ -60,6 +60,7 @@ StartUpdateParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type StartUpdateParams struct { + // Body. Body StartUpdateBody @@ -129,6 +130,7 @@ func (o *StartUpdateParams) SetBody(body StartUpdateBody) { // WriteToRequest writes these params to a swagger request func (o *StartUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/start_update_responses.go b/api/server/v1/json/client/server_service/start_update_responses.go index 97ef6b5f00c..b8a40459f28 100644 --- a/api/server/v1/json/client/server_service/start_update_responses.go +++ b/api/server/v1/json/client/server_service/start_update_responses.go @@ -104,6 +104,7 @@ func (o *StartUpdateOK) GetPayload() *StartUpdateOKBody { } func (o *StartUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartUpdateOKBody) // response payload @@ -177,6 +178,7 @@ func (o *StartUpdateDefault) GetPayload() *StartUpdateDefaultBody { } func (o *StartUpdateDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(StartUpdateDefaultBody) // response payload @@ -192,6 +194,7 @@ StartUpdateBody start update body swagger:model StartUpdateBody */ type StartUpdateBody struct { + // new image NewImage string `json:"new_image,omitempty"` } @@ -229,6 +232,7 @@ StartUpdateDefaultBody start update default body swagger:model StartUpdateDefaultBody */ type StartUpdateDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -298,7 +302,9 @@ func (o *StartUpdateDefaultBody) ContextValidate(ctx context.Context, formats st } func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -318,6 +324,7 @@ func (o *StartUpdateDefaultBody) contextValidateDetails(ctx context.Context, for return err } } + } return nil @@ -430,6 +437,7 @@ StartUpdateDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized proto swagger:model StartUpdateDefaultBodyDetailsItems0 */ type StartUpdateDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -468,6 +476,7 @@ type StartUpdateDefaultBodyDetailsItems0 struct { func (o *StartUpdateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -532,6 +541,7 @@ func (o *StartUpdateDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o StartUpdateDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -622,6 +632,7 @@ StartUpdateOKBody start update OK body swagger:model StartUpdateOKBody */ type StartUpdateOKBody struct { + // Authentication token for getting update statuses. AuthToken string `json:"auth_token,omitempty"` diff --git a/api/server/v1/json/client/server_service/update_status_parameters.go b/api/server/v1/json/client/server_service/update_status_parameters.go index c9ad7782841..fe3f759e402 100644 --- a/api/server/v1/json/client/server_service/update_status_parameters.go +++ b/api/server/v1/json/client/server_service/update_status_parameters.go @@ -60,6 +60,7 @@ UpdateStatusParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateStatusParams struct { + // Body. Body UpdateStatusBody @@ -129,6 +130,7 @@ func (o *UpdateStatusParams) SetBody(body UpdateStatusBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/update_status_responses.go b/api/server/v1/json/client/server_service/update_status_responses.go index b3d125d81dc..a32311edaf2 100644 --- a/api/server/v1/json/client/server_service/update_status_responses.go +++ b/api/server/v1/json/client/server_service/update_status_responses.go @@ -104,6 +104,7 @@ func (o *UpdateStatusOK) GetPayload() *UpdateStatusOKBody { } func (o *UpdateStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateStatusOKBody) // response payload @@ -177,6 +178,7 @@ func (o *UpdateStatusDefault) GetPayload() *UpdateStatusDefaultBody { } func (o *UpdateStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateStatusDefaultBody) // response payload @@ -192,6 +194,7 @@ UpdateStatusBody update status body swagger:model UpdateStatusBody */ type UpdateStatusBody struct { + // Authentication token. AuthToken string `json:"auth_token,omitempty"` @@ -232,6 +235,7 @@ UpdateStatusDefaultBody update status default body swagger:model UpdateStatusDefaultBody */ type UpdateStatusDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -301,7 +305,9 @@ func (o *UpdateStatusDefaultBody) ContextValidate(ctx context.Context, formats s } func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -321,6 +327,7 @@ func (o *UpdateStatusDefaultBody) contextValidateDetails(ctx context.Context, fo return err } } + } return nil @@ -433,6 +440,7 @@ UpdateStatusDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized prot swagger:model UpdateStatusDefaultBodyDetailsItems0 */ type UpdateStatusDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -471,6 +479,7 @@ type UpdateStatusDefaultBodyDetailsItems0 struct { func (o *UpdateStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -535,6 +544,7 @@ func (o *UpdateStatusDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateStatusDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -625,6 +635,7 @@ UpdateStatusOKBody update status OK body swagger:model UpdateStatusOKBody */ type UpdateStatusOKBody struct { + // Progress log lines. LogLines []string `json:"log_lines"` diff --git a/api/server/v1/json/client/server_service/version_parameters.go b/api/server/v1/json/client/server_service/version_parameters.go index 89ff6074173..3712817fa88 100644 --- a/api/server/v1/json/client/server_service/version_parameters.go +++ b/api/server/v1/json/client/server_service/version_parameters.go @@ -60,6 +60,7 @@ VersionParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type VersionParams struct { + /* Dummy. Dummy parameter for internal testing. Do not use. @@ -132,6 +133,7 @@ func (o *VersionParams) SetDummy(dummy *string) { // WriteToRequest writes these params to a swagger request func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } @@ -147,6 +149,7 @@ func (o *VersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regis } qDummy := qrDummy if qDummy != "" { + if err := r.SetQueryParam("dummy", qDummy); err != nil { return err } diff --git a/api/server/v1/json/client/server_service/version_responses.go b/api/server/v1/json/client/server_service/version_responses.go index 2357cddccd3..dc9415e601c 100644 --- a/api/server/v1/json/client/server_service/version_responses.go +++ b/api/server/v1/json/client/server_service/version_responses.go @@ -105,6 +105,7 @@ func (o *VersionOK) GetPayload() *VersionOKBody { } func (o *VersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(VersionOKBody) // response payload @@ -178,6 +179,7 @@ func (o *VersionDefault) GetPayload() *VersionDefaultBody { } func (o *VersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(VersionDefaultBody) // response payload @@ -193,6 +195,7 @@ VersionDefaultBody version default body swagger:model VersionDefaultBody */ type VersionDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *VersionDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *VersionDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -394,6 +400,7 @@ VersionDefaultBodyDetailsItems0 `Any` contains an arbitrary serialized protocol swagger:model VersionDefaultBodyDetailsItems0 */ type VersionDefaultBodyDetailsItems0 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -432,6 +439,7 @@ type VersionDefaultBodyDetailsItems0 struct { func (o *VersionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -496,6 +504,7 @@ func (o *VersionDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o VersionDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // A URL/resource name that uniquely identifies the type of the serialized // protocol buffer message. This string must contain at least // one "/" character. The last segment of the URL's path must represent @@ -586,6 +595,7 @@ VersionOKBody version OK body swagger:model VersionOKBody */ type VersionOKBody struct { + // PMM Server version. Version string `json:"version,omitempty"` @@ -741,6 +751,7 @@ func (o *VersionOKBody) ContextValidate(ctx context.Context, formats strfmt.Regi } func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strfmt.Registry) error { + if o.Managed != nil { if swag.IsZero(o.Managed) { // not required @@ -765,6 +776,7 @@ func (o *VersionOKBody) contextValidateManaged(ctx context.Context, formats strf } func (o *VersionOKBody) contextValidateServer(ctx context.Context, formats strfmt.Registry) error { + if o.Server != nil { if swag.IsZero(o.Server) { // not required @@ -811,6 +823,7 @@ VersionOKBodyManaged VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyManaged */ type VersionOKBodyManaged struct { + // User-visible version. Version string `json:"version,omitempty"` @@ -876,6 +889,7 @@ VersionOKBodyServer VersionInfo describes component version, or PMM Server as a swagger:model VersionOKBodyServer */ type VersionOKBodyServer struct { + // User-visible version. Version string `json:"version,omitempty"` diff --git a/api/server/v1/json/v1.json b/api/server/v1/json/v1.json index bf2ad5c8718..7ce068c5fef 100644 --- a/api/server/v1/json/v1.json +++ b/api/server/v1/json/v1.json @@ -67,6 +67,482 @@ } } }, + "/v1/server/log-parser-presets": { + "get": { + "description": "Returns all rows from log_parser_presets.", + "tags": [ + "ServerService" + ], + "summary": "List OTEL log parser presets", + "operationId": "ListLogParserPresets", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "presets": { + "type": "array", + "items": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "post": { + "description": "Creates a custom log parser preset.", + "tags": [ + "ServerService" + ], + "summary": "Add OTEL log parser preset", + "operationId": "AddLogParserPreset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "x-order": 0 + }, + "description": { + "type": "string", + "x-order": 1 + }, + "operator_yaml": { + "type": "string", + "x-order": 2 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/server/log-parser-presets/{id}": { + "get": { + "description": "Returns one log parser preset.", + "tags": [ + "ServerService" + ], + "summary": "Get OTEL log parser preset", + "operationId": "GetLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "put": { + "description": "Updates description and/or operator YAML for any preset.", + "tags": [ + "ServerService" + ], + "summary": "Change OTEL log parser preset", + "operationId": "ChangeLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "x-nullable": true, + "x-order": 0 + }, + "operator_yaml": { + "type": "string", + "x-nullable": true, + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "delete": { + "description": "Deletes a non-built-in preset when it is not in use.", + "tags": [ + "ServerService" + ], + "summary": "Remove OTEL log parser preset", + "operationId": "RemoveLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + } + }, "/v1/server/logs.zip": { "get": { "description": "Returns the PMM Server logs.", diff --git a/api/server/v1/server.pb.go b/api/server/v1/server.pb.go index 07eca02946e..302edbdbf41 100644 --- a/api/server/v1/server.pb.go +++ b/api/server/v1/server.pb.go @@ -7,18 +7,16 @@ package serverv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" + common "github.com/percona/pmm/api/common" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" - - common "github.com/percona/pmm/api/common" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -1748,6 +1746,555 @@ func (x *ChangeSettingsResponse) GetSettings() *Settings { return nil } +// LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML). +type LogParserPreset struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + OperatorYaml string `protobuf:"bytes,4,opt,name=operator_yaml,json=operatorYaml,proto3" json:"operator_yaml,omitempty"` + BuiltIn bool `protobuf:"varint,5,opt,name=built_in,json=builtIn,proto3" json:"built_in,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LogParserPreset) Reset() { + *x = LogParserPreset{} + mi := &file_server_v1_server_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogParserPreset) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogParserPreset) ProtoMessage() {} + +func (x *LogParserPreset) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogParserPreset.ProtoReflect.Descriptor instead. +func (*LogParserPreset) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{26} +} + +func (x *LogParserPreset) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *LogParserPreset) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LogParserPreset) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *LogParserPreset) GetOperatorYaml() string { + if x != nil { + return x.OperatorYaml + } + return "" +} + +func (x *LogParserPreset) GetBuiltIn() bool { + if x != nil { + return x.BuiltIn + } + return false +} + +func (x *LogParserPreset) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *LogParserPreset) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type ListLogParserPresetsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLogParserPresetsRequest) Reset() { + *x = ListLogParserPresetsRequest{} + mi := &file_server_v1_server_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLogParserPresetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLogParserPresetsRequest) ProtoMessage() {} + +func (x *ListLogParserPresetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListLogParserPresetsRequest.ProtoReflect.Descriptor instead. +func (*ListLogParserPresetsRequest) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{27} +} + +type ListLogParserPresetsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Presets []*LogParserPreset `protobuf:"bytes,1,rep,name=presets,proto3" json:"presets,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListLogParserPresetsResponse) Reset() { + *x = ListLogParserPresetsResponse{} + mi := &file_server_v1_server_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListLogParserPresetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListLogParserPresetsResponse) ProtoMessage() {} + +func (x *ListLogParserPresetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListLogParserPresetsResponse.ProtoReflect.Descriptor instead. +func (*ListLogParserPresetsResponse) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{28} +} + +func (x *ListLogParserPresetsResponse) GetPresets() []*LogParserPreset { + if x != nil { + return x.Presets + } + return nil +} + +type GetLogParserPresetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLogParserPresetRequest) Reset() { + *x = GetLogParserPresetRequest{} + mi := &file_server_v1_server_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLogParserPresetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLogParserPresetRequest) ProtoMessage() {} + +func (x *GetLogParserPresetRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLogParserPresetRequest.ProtoReflect.Descriptor instead. +func (*GetLogParserPresetRequest) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{29} +} + +func (x *GetLogParserPresetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetLogParserPresetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Preset *LogParserPreset `protobuf:"bytes,1,opt,name=preset,proto3" json:"preset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLogParserPresetResponse) Reset() { + *x = GetLogParserPresetResponse{} + mi := &file_server_v1_server_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLogParserPresetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLogParserPresetResponse) ProtoMessage() {} + +func (x *GetLogParserPresetResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLogParserPresetResponse.ProtoReflect.Descriptor instead. +func (*GetLogParserPresetResponse) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{30} +} + +func (x *GetLogParserPresetResponse) GetPreset() *LogParserPreset { + if x != nil { + return x.Preset + } + return nil +} + +type AddLogParserPresetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + OperatorYaml string `protobuf:"bytes,3,opt,name=operator_yaml,json=operatorYaml,proto3" json:"operator_yaml,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddLogParserPresetRequest) Reset() { + *x = AddLogParserPresetRequest{} + mi := &file_server_v1_server_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddLogParserPresetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddLogParserPresetRequest) ProtoMessage() {} + +func (x *AddLogParserPresetRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddLogParserPresetRequest.ProtoReflect.Descriptor instead. +func (*AddLogParserPresetRequest) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{31} +} + +func (x *AddLogParserPresetRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *AddLogParserPresetRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AddLogParserPresetRequest) GetOperatorYaml() string { + if x != nil { + return x.OperatorYaml + } + return "" +} + +type AddLogParserPresetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Preset *LogParserPreset `protobuf:"bytes,1,opt,name=preset,proto3" json:"preset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddLogParserPresetResponse) Reset() { + *x = AddLogParserPresetResponse{} + mi := &file_server_v1_server_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddLogParserPresetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddLogParserPresetResponse) ProtoMessage() {} + +func (x *AddLogParserPresetResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddLogParserPresetResponse.ProtoReflect.Descriptor instead. +func (*AddLogParserPresetResponse) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{32} +} + +func (x *AddLogParserPresetResponse) GetPreset() *LogParserPreset { + if x != nil { + return x.Preset + } + return nil +} + +type ChangeLogParserPresetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"` + OperatorYaml *string `protobuf:"bytes,3,opt,name=operator_yaml,json=operatorYaml,proto3,oneof" json:"operator_yaml,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeLogParserPresetRequest) Reset() { + *x = ChangeLogParserPresetRequest{} + mi := &file_server_v1_server_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeLogParserPresetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeLogParserPresetRequest) ProtoMessage() {} + +func (x *ChangeLogParserPresetRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeLogParserPresetRequest.ProtoReflect.Descriptor instead. +func (*ChangeLogParserPresetRequest) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{33} +} + +func (x *ChangeLogParserPresetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChangeLogParserPresetRequest) GetDescription() string { + if x != nil && x.Description != nil { + return *x.Description + } + return "" +} + +func (x *ChangeLogParserPresetRequest) GetOperatorYaml() string { + if x != nil && x.OperatorYaml != nil { + return *x.OperatorYaml + } + return "" +} + +type ChangeLogParserPresetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Preset *LogParserPreset `protobuf:"bytes,1,opt,name=preset,proto3" json:"preset,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChangeLogParserPresetResponse) Reset() { + *x = ChangeLogParserPresetResponse{} + mi := &file_server_v1_server_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChangeLogParserPresetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChangeLogParserPresetResponse) ProtoMessage() {} + +func (x *ChangeLogParserPresetResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChangeLogParserPresetResponse.ProtoReflect.Descriptor instead. +func (*ChangeLogParserPresetResponse) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{34} +} + +func (x *ChangeLogParserPresetResponse) GetPreset() *LogParserPreset { + if x != nil { + return x.Preset + } + return nil +} + +type RemoveLogParserPresetRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveLogParserPresetRequest) Reset() { + *x = RemoveLogParserPresetRequest{} + mi := &file_server_v1_server_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveLogParserPresetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveLogParserPresetRequest) ProtoMessage() {} + +func (x *RemoveLogParserPresetRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveLogParserPresetRequest.ProtoReflect.Descriptor instead. +func (*RemoveLogParserPresetRequest) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{35} +} + +func (x *RemoveLogParserPresetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type RemoveLogParserPresetResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RemoveLogParserPresetResponse) Reset() { + *x = RemoveLogParserPresetResponse{} + mi := &file_server_v1_server_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RemoveLogParserPresetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveLogParserPresetResponse) ProtoMessage() {} + +func (x *RemoveLogParserPresetResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_v1_server_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveLogParserPresetResponse.ProtoReflect.Descriptor instead. +func (*RemoveLogParserPresetResponse) Descriptor() ([]byte, []int) { + return file_server_v1_server_proto_rawDescGZIP(), []int{36} +} + var File_server_v1_server_proto protoreflect.FileDescriptor const file_server_v1_server_proto_rawDesc = "" + @@ -1881,14 +2428,48 @@ const file_server_v1_server_proto_rawDesc = "" + "\x16_enable_access_controlB\x19\n" + "\x17_enable_internal_pg_qan\"I\n" + "\x16ChangeSettingsResponse\x12/\n" + - "\bsettings\x18\x01 \x01(\v2\x13.server.v1.SettingsR\bsettings*\xce\x01\n" + + "\bsettings\x18\x01 \x01(\v2\x13.server.v1.SettingsR\bsettings\"\x8d\x02\n" + + "\x0fLogParserPreset\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12#\n" + + "\roperator_yaml\x18\x04 \x01(\tR\foperatorYaml\x12\x19\n" + + "\bbuilt_in\x18\x05 \x01(\bR\abuiltIn\x129\n" + + "\n" + + "created_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x1d\n" + + "\x1bListLogParserPresetsRequest\"T\n" + + "\x1cListLogParserPresetsResponse\x124\n" + + "\apresets\x18\x01 \x03(\v2\x1a.server.v1.LogParserPresetR\apresets\"+\n" + + "\x19GetLogParserPresetRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"P\n" + + "\x1aGetLogParserPresetResponse\x122\n" + + "\x06preset\x18\x01 \x01(\v2\x1a.server.v1.LogParserPresetR\x06preset\"v\n" + + "\x19AddLogParserPresetRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x12#\n" + + "\roperator_yaml\x18\x03 \x01(\tR\foperatorYaml\"P\n" + + "\x1aAddLogParserPresetResponse\x122\n" + + "\x06preset\x18\x01 \x01(\v2\x1a.server.v1.LogParserPresetR\x06preset\"\xa1\x01\n" + + "\x1cChangeLogParserPresetRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12%\n" + + "\vdescription\x18\x02 \x01(\tH\x00R\vdescription\x88\x01\x01\x12(\n" + + "\roperator_yaml\x18\x03 \x01(\tH\x01R\foperatorYaml\x88\x01\x01B\x0e\n" + + "\f_descriptionB\x10\n" + + "\x0e_operator_yaml\"S\n" + + "\x1dChangeLogParserPresetResponse\x122\n" + + "\x06preset\x18\x01 \x01(\v2\x1a.server.v1.LogParserPresetR\x06preset\".\n" + + "\x1cRemoveLogParserPresetRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\x1f\n" + + "\x1dRemoveLogParserPresetResponse*\xce\x01\n" + "\x12DistributionMethod\x12#\n" + "\x1fDISTRIBUTION_METHOD_UNSPECIFIED\x10\x00\x12\x1e\n" + "\x1aDISTRIBUTION_METHOD_DOCKER\x10\x01\x12\x1b\n" + "\x17DISTRIBUTION_METHOD_OVF\x10\x02\x12\x1b\n" + "\x17DISTRIBUTION_METHOD_AMI\x10\x03\x12\x1d\n" + "\x19DISTRIBUTION_METHOD_AZURE\x10\x04\x12\x1a\n" + - "\x16DISTRIBUTION_METHOD_DO\x10\x052\xd9\x0f\n" + + "\x16DISTRIBUTION_METHOD_DO\x10\x052\xc2\x18\n" + "\rServerService\x12\x86\x01\n" + "\aVersion\x12\x19.server.v1.VersionRequest\x1a\x1a.server.v1.VersionResponse\"D\x92A'\x12\aVersion\x1a\x1cReturns PMM Server versions.\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/server/version\x12\xab\x02\n" + "\tReadiness\x12\x1b.server.v1.ReadinessRequest\x1a\x1c.server.v1.ReadinessResponse\"\xe2\x01\x92A\xc5\x01\x12\x16Check server readiness\x1a\xaa\x01Returns an error when Server components being restarted are not ready yet. Use this API for checking the health of Docker containers and for probing Kubernetes readiness.\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/server/readyz\x12\x81\x02\n" + @@ -1899,7 +2480,12 @@ const file_server_v1_server_proto_rawDesc = "" + "\fUpdateStatus\x12\x1e.server.v1.UpdateStatusRequest\x1a\x1f.server.v1.UpdateStatusResponse\"\\\x92A2\x12\rUpdate status\x1a!Returns PMM Server update status.\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/v1/server/updates:getStatus\x12\xa0\x01\n" + "\vGetSettings\x12\x1d.server.v1.GetSettingsRequest\x1a\x1e.server.v1.GetSettingsResponse\"R\x92A4\x12\fGet settings\x1a$Returns current PMM Server settings.\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/server/settings\x12\xd9\x01\n" + "\x13GetReadOnlySettings\x12%.server.v1.GetReadOnlySettingsRequest\x1a&.server.v1.GetReadOnlySettingsResponse\"s\x92AL\x12\x16Get read-only settings\x1a2Returns a stripped version of PMM Server settings.\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/server/settings/readonly\x12\xa7\x01\n" + - "\x0eChangeSettings\x12 .server.v1.ChangeSettingsRequest\x1a!.server.v1.ChangeSettingsResponse\"P\x92A/\x12\x0fChange settings\x1a\x1cChanges PMM Server settings.\x82\xd3\xe4\x93\x02\x18:\x01*\x1a\x13/v1/server/settingsB\x90\x01\n" + + "\x0eChangeSettings\x12 .server.v1.ChangeSettingsRequest\x1a!.server.v1.ChangeSettingsResponse\"P\x92A/\x12\x0fChange settings\x1a\x1cChanges PMM Server settings.\x82\xd3\xe4\x93\x02\x18:\x01*\x1a\x13/v1/server/settings\x12\xda\x01\n" + + "\x14ListLogParserPresets\x12&.server.v1.ListLogParserPresetsRequest\x1a'.server.v1.ListLogParserPresetsResponse\"q\x92AI\x12\x1cList OTEL log parser presets\x1a)Returns all rows from log_parser_presets.\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/server/log-parser-presets\x12\xcc\x01\n" + + "\x12GetLogParserPreset\x12$.server.v1.GetLogParserPresetRequest\x1a%.server.v1.GetLogParserPresetResponse\"i\x92A<\x12\x1aGet OTEL log parser preset\x1a\x1eReturns one log parser preset.\x82\xd3\xe4\x93\x02$\x12\"/v1/server/log-parser-presets/{id}\x12\xcf\x01\n" + + "\x12AddLogParserPreset\x12$.server.v1.AddLogParserPresetRequest\x1a%.server.v1.AddLogParserPresetResponse\"l\x92AA\x12\x1aAdd OTEL log parser preset\x1a#Creates a custom log parser preset.\x82\xd3\xe4\x93\x02\":\x01*\"\x1d/v1/server/log-parser-presets\x12\xf6\x01\n" + + "\x15ChangeLogParserPreset\x12'.server.v1.ChangeLogParserPresetRequest\x1a(.server.v1.ChangeLogParserPresetResponse\"\x89\x01\x92AY\x12\x1dChange OTEL log parser preset\x1a8Updates description and/or operator YAML for any preset.\x82\xd3\xe4\x93\x02':\x01*\x1a\"/v1/server/log-parser-presets/{id}\x12\xef\x01\n" + + "\x15RemoveLogParserPreset\x12'.server.v1.RemoveLogParserPresetRequest\x1a(.server.v1.RemoveLogParserPresetResponse\"\x82\x01\x92AU\x12\x1dRemove OTEL log parser preset\x1a4Deletes a non-built-in preset when it is not in use.\x82\xd3\xe4\x93\x02$*\"/v1/server/log-parser-presets/{id}B\x90\x01\n" + "\rcom.server.v1B\vServerProtoP\x01Z-github.com/percona/pmm/api/server/v1;serverv1\xa2\x02\x03SXX\xaa\x02\tServer.V1\xca\x02\tServer\\V1\xe2\x02\x15Server\\V1\\GPBMetadata\xea\x02\n" + "Server::V1b\x06proto3" @@ -1915,97 +2501,121 @@ func file_server_v1_server_proto_rawDescGZIP() []byte { return file_server_v1_server_proto_rawDescData } -var ( - file_server_v1_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) - file_server_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 26) - file_server_v1_server_proto_goTypes = []any{ - (DistributionMethod)(0), // 0: server.v1.DistributionMethod - (*VersionInfo)(nil), // 1: server.v1.VersionInfo - (*VersionRequest)(nil), // 2: server.v1.VersionRequest - (*VersionResponse)(nil), // 3: server.v1.VersionResponse - (*ReadinessRequest)(nil), // 4: server.v1.ReadinessRequest - (*ReadinessResponse)(nil), // 5: server.v1.ReadinessResponse - (*LeaderHealthCheckRequest)(nil), // 6: server.v1.LeaderHealthCheckRequest - (*LeaderHealthCheckResponse)(nil), // 7: server.v1.LeaderHealthCheckResponse - (*CheckUpdatesRequest)(nil), // 8: server.v1.CheckUpdatesRequest - (*DockerVersionInfo)(nil), // 9: server.v1.DockerVersionInfo - (*CheckUpdatesResponse)(nil), // 10: server.v1.CheckUpdatesResponse - (*ListChangeLogsRequest)(nil), // 11: server.v1.ListChangeLogsRequest - (*ListChangeLogsResponse)(nil), // 12: server.v1.ListChangeLogsResponse - (*StartUpdateRequest)(nil), // 13: server.v1.StartUpdateRequest - (*StartUpdateResponse)(nil), // 14: server.v1.StartUpdateResponse - (*UpdateStatusRequest)(nil), // 15: server.v1.UpdateStatusRequest - (*UpdateStatusResponse)(nil), // 16: server.v1.UpdateStatusResponse - (*MetricsResolutions)(nil), // 17: server.v1.MetricsResolutions - (*AdvisorRunIntervals)(nil), // 18: server.v1.AdvisorRunIntervals - (*Settings)(nil), // 19: server.v1.Settings - (*ReadOnlySettings)(nil), // 20: server.v1.ReadOnlySettings - (*GetSettingsRequest)(nil), // 21: server.v1.GetSettingsRequest - (*GetReadOnlySettingsRequest)(nil), // 22: server.v1.GetReadOnlySettingsRequest - (*GetSettingsResponse)(nil), // 23: server.v1.GetSettingsResponse - (*GetReadOnlySettingsResponse)(nil), // 24: server.v1.GetReadOnlySettingsResponse - (*ChangeSettingsRequest)(nil), // 25: server.v1.ChangeSettingsRequest - (*ChangeSettingsResponse)(nil), // 26: server.v1.ChangeSettingsResponse - (*timestamppb.Timestamp)(nil), // 27: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 28: google.protobuf.Duration - (*common.StringArray)(nil), // 29: common.StringArray - } -) - +var file_server_v1_server_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_server_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 37) +var file_server_v1_server_proto_goTypes = []any{ + (DistributionMethod)(0), // 0: server.v1.DistributionMethod + (*VersionInfo)(nil), // 1: server.v1.VersionInfo + (*VersionRequest)(nil), // 2: server.v1.VersionRequest + (*VersionResponse)(nil), // 3: server.v1.VersionResponse + (*ReadinessRequest)(nil), // 4: server.v1.ReadinessRequest + (*ReadinessResponse)(nil), // 5: server.v1.ReadinessResponse + (*LeaderHealthCheckRequest)(nil), // 6: server.v1.LeaderHealthCheckRequest + (*LeaderHealthCheckResponse)(nil), // 7: server.v1.LeaderHealthCheckResponse + (*CheckUpdatesRequest)(nil), // 8: server.v1.CheckUpdatesRequest + (*DockerVersionInfo)(nil), // 9: server.v1.DockerVersionInfo + (*CheckUpdatesResponse)(nil), // 10: server.v1.CheckUpdatesResponse + (*ListChangeLogsRequest)(nil), // 11: server.v1.ListChangeLogsRequest + (*ListChangeLogsResponse)(nil), // 12: server.v1.ListChangeLogsResponse + (*StartUpdateRequest)(nil), // 13: server.v1.StartUpdateRequest + (*StartUpdateResponse)(nil), // 14: server.v1.StartUpdateResponse + (*UpdateStatusRequest)(nil), // 15: server.v1.UpdateStatusRequest + (*UpdateStatusResponse)(nil), // 16: server.v1.UpdateStatusResponse + (*MetricsResolutions)(nil), // 17: server.v1.MetricsResolutions + (*AdvisorRunIntervals)(nil), // 18: server.v1.AdvisorRunIntervals + (*Settings)(nil), // 19: server.v1.Settings + (*ReadOnlySettings)(nil), // 20: server.v1.ReadOnlySettings + (*GetSettingsRequest)(nil), // 21: server.v1.GetSettingsRequest + (*GetReadOnlySettingsRequest)(nil), // 22: server.v1.GetReadOnlySettingsRequest + (*GetSettingsResponse)(nil), // 23: server.v1.GetSettingsResponse + (*GetReadOnlySettingsResponse)(nil), // 24: server.v1.GetReadOnlySettingsResponse + (*ChangeSettingsRequest)(nil), // 25: server.v1.ChangeSettingsRequest + (*ChangeSettingsResponse)(nil), // 26: server.v1.ChangeSettingsResponse + (*LogParserPreset)(nil), // 27: server.v1.LogParserPreset + (*ListLogParserPresetsRequest)(nil), // 28: server.v1.ListLogParserPresetsRequest + (*ListLogParserPresetsResponse)(nil), // 29: server.v1.ListLogParserPresetsResponse + (*GetLogParserPresetRequest)(nil), // 30: server.v1.GetLogParserPresetRequest + (*GetLogParserPresetResponse)(nil), // 31: server.v1.GetLogParserPresetResponse + (*AddLogParserPresetRequest)(nil), // 32: server.v1.AddLogParserPresetRequest + (*AddLogParserPresetResponse)(nil), // 33: server.v1.AddLogParserPresetResponse + (*ChangeLogParserPresetRequest)(nil), // 34: server.v1.ChangeLogParserPresetRequest + (*ChangeLogParserPresetResponse)(nil), // 35: server.v1.ChangeLogParserPresetResponse + (*RemoveLogParserPresetRequest)(nil), // 36: server.v1.RemoveLogParserPresetRequest + (*RemoveLogParserPresetResponse)(nil), // 37: server.v1.RemoveLogParserPresetResponse + (*timestamppb.Timestamp)(nil), // 38: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 39: google.protobuf.Duration + (*common.StringArray)(nil), // 40: common.StringArray +} var file_server_v1_server_proto_depIdxs = []int32{ - 27, // 0: server.v1.VersionInfo.timestamp:type_name -> google.protobuf.Timestamp + 38, // 0: server.v1.VersionInfo.timestamp:type_name -> google.protobuf.Timestamp 1, // 1: server.v1.VersionResponse.server:type_name -> server.v1.VersionInfo 1, // 2: server.v1.VersionResponse.managed:type_name -> server.v1.VersionInfo 0, // 3: server.v1.VersionResponse.distribution_method:type_name -> server.v1.DistributionMethod - 27, // 4: server.v1.DockerVersionInfo.timestamp:type_name -> google.protobuf.Timestamp + 38, // 4: server.v1.DockerVersionInfo.timestamp:type_name -> google.protobuf.Timestamp 1, // 5: server.v1.CheckUpdatesResponse.installed:type_name -> server.v1.VersionInfo 9, // 6: server.v1.CheckUpdatesResponse.latest:type_name -> server.v1.DockerVersionInfo - 27, // 7: server.v1.CheckUpdatesResponse.last_check:type_name -> google.protobuf.Timestamp + 38, // 7: server.v1.CheckUpdatesResponse.last_check:type_name -> google.protobuf.Timestamp 9, // 8: server.v1.ListChangeLogsResponse.updates:type_name -> server.v1.DockerVersionInfo - 27, // 9: server.v1.ListChangeLogsResponse.last_check:type_name -> google.protobuf.Timestamp - 28, // 10: server.v1.MetricsResolutions.hr:type_name -> google.protobuf.Duration - 28, // 11: server.v1.MetricsResolutions.mr:type_name -> google.protobuf.Duration - 28, // 12: server.v1.MetricsResolutions.lr:type_name -> google.protobuf.Duration - 28, // 13: server.v1.AdvisorRunIntervals.standard_interval:type_name -> google.protobuf.Duration - 28, // 14: server.v1.AdvisorRunIntervals.rare_interval:type_name -> google.protobuf.Duration - 28, // 15: server.v1.AdvisorRunIntervals.frequent_interval:type_name -> google.protobuf.Duration + 38, // 9: server.v1.ListChangeLogsResponse.last_check:type_name -> google.protobuf.Timestamp + 39, // 10: server.v1.MetricsResolutions.hr:type_name -> google.protobuf.Duration + 39, // 11: server.v1.MetricsResolutions.mr:type_name -> google.protobuf.Duration + 39, // 12: server.v1.MetricsResolutions.lr:type_name -> google.protobuf.Duration + 39, // 13: server.v1.AdvisorRunIntervals.standard_interval:type_name -> google.protobuf.Duration + 39, // 14: server.v1.AdvisorRunIntervals.rare_interval:type_name -> google.protobuf.Duration + 39, // 15: server.v1.AdvisorRunIntervals.frequent_interval:type_name -> google.protobuf.Duration 17, // 16: server.v1.Settings.metrics_resolutions:type_name -> server.v1.MetricsResolutions - 28, // 17: server.v1.Settings.data_retention:type_name -> google.protobuf.Duration + 39, // 17: server.v1.Settings.data_retention:type_name -> google.protobuf.Duration 18, // 18: server.v1.Settings.advisor_run_intervals:type_name -> server.v1.AdvisorRunIntervals - 28, // 19: server.v1.Settings.update_snooze_duration:type_name -> google.protobuf.Duration + 39, // 19: server.v1.Settings.update_snooze_duration:type_name -> google.protobuf.Duration 19, // 20: server.v1.GetSettingsResponse.settings:type_name -> server.v1.Settings 20, // 21: server.v1.GetReadOnlySettingsResponse.settings:type_name -> server.v1.ReadOnlySettings 17, // 22: server.v1.ChangeSettingsRequest.metrics_resolutions:type_name -> server.v1.MetricsResolutions - 28, // 23: server.v1.ChangeSettingsRequest.data_retention:type_name -> google.protobuf.Duration - 29, // 24: server.v1.ChangeSettingsRequest.aws_partitions:type_name -> common.StringArray + 39, // 23: server.v1.ChangeSettingsRequest.data_retention:type_name -> google.protobuf.Duration + 40, // 24: server.v1.ChangeSettingsRequest.aws_partitions:type_name -> common.StringArray 18, // 25: server.v1.ChangeSettingsRequest.advisor_run_intervals:type_name -> server.v1.AdvisorRunIntervals - 28, // 26: server.v1.ChangeSettingsRequest.update_snooze_duration:type_name -> google.protobuf.Duration + 39, // 26: server.v1.ChangeSettingsRequest.update_snooze_duration:type_name -> google.protobuf.Duration 19, // 27: server.v1.ChangeSettingsResponse.settings:type_name -> server.v1.Settings - 2, // 28: server.v1.ServerService.Version:input_type -> server.v1.VersionRequest - 4, // 29: server.v1.ServerService.Readiness:input_type -> server.v1.ReadinessRequest - 6, // 30: server.v1.ServerService.LeaderHealthCheck:input_type -> server.v1.LeaderHealthCheckRequest - 8, // 31: server.v1.ServerService.CheckUpdates:input_type -> server.v1.CheckUpdatesRequest - 11, // 32: server.v1.ServerService.ListChangeLogs:input_type -> server.v1.ListChangeLogsRequest - 13, // 33: server.v1.ServerService.StartUpdate:input_type -> server.v1.StartUpdateRequest - 15, // 34: server.v1.ServerService.UpdateStatus:input_type -> server.v1.UpdateStatusRequest - 21, // 35: server.v1.ServerService.GetSettings:input_type -> server.v1.GetSettingsRequest - 22, // 36: server.v1.ServerService.GetReadOnlySettings:input_type -> server.v1.GetReadOnlySettingsRequest - 25, // 37: server.v1.ServerService.ChangeSettings:input_type -> server.v1.ChangeSettingsRequest - 3, // 38: server.v1.ServerService.Version:output_type -> server.v1.VersionResponse - 5, // 39: server.v1.ServerService.Readiness:output_type -> server.v1.ReadinessResponse - 7, // 40: server.v1.ServerService.LeaderHealthCheck:output_type -> server.v1.LeaderHealthCheckResponse - 10, // 41: server.v1.ServerService.CheckUpdates:output_type -> server.v1.CheckUpdatesResponse - 12, // 42: server.v1.ServerService.ListChangeLogs:output_type -> server.v1.ListChangeLogsResponse - 14, // 43: server.v1.ServerService.StartUpdate:output_type -> server.v1.StartUpdateResponse - 16, // 44: server.v1.ServerService.UpdateStatus:output_type -> server.v1.UpdateStatusResponse - 23, // 45: server.v1.ServerService.GetSettings:output_type -> server.v1.GetSettingsResponse - 24, // 46: server.v1.ServerService.GetReadOnlySettings:output_type -> server.v1.GetReadOnlySettingsResponse - 26, // 47: server.v1.ServerService.ChangeSettings:output_type -> server.v1.ChangeSettingsResponse - 38, // [38:48] is the sub-list for method output_type - 28, // [28:38] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 38, // 28: server.v1.LogParserPreset.created_at:type_name -> google.protobuf.Timestamp + 38, // 29: server.v1.LogParserPreset.updated_at:type_name -> google.protobuf.Timestamp + 27, // 30: server.v1.ListLogParserPresetsResponse.presets:type_name -> server.v1.LogParserPreset + 27, // 31: server.v1.GetLogParserPresetResponse.preset:type_name -> server.v1.LogParserPreset + 27, // 32: server.v1.AddLogParserPresetResponse.preset:type_name -> server.v1.LogParserPreset + 27, // 33: server.v1.ChangeLogParserPresetResponse.preset:type_name -> server.v1.LogParserPreset + 2, // 34: server.v1.ServerService.Version:input_type -> server.v1.VersionRequest + 4, // 35: server.v1.ServerService.Readiness:input_type -> server.v1.ReadinessRequest + 6, // 36: server.v1.ServerService.LeaderHealthCheck:input_type -> server.v1.LeaderHealthCheckRequest + 8, // 37: server.v1.ServerService.CheckUpdates:input_type -> server.v1.CheckUpdatesRequest + 11, // 38: server.v1.ServerService.ListChangeLogs:input_type -> server.v1.ListChangeLogsRequest + 13, // 39: server.v1.ServerService.StartUpdate:input_type -> server.v1.StartUpdateRequest + 15, // 40: server.v1.ServerService.UpdateStatus:input_type -> server.v1.UpdateStatusRequest + 21, // 41: server.v1.ServerService.GetSettings:input_type -> server.v1.GetSettingsRequest + 22, // 42: server.v1.ServerService.GetReadOnlySettings:input_type -> server.v1.GetReadOnlySettingsRequest + 25, // 43: server.v1.ServerService.ChangeSettings:input_type -> server.v1.ChangeSettingsRequest + 28, // 44: server.v1.ServerService.ListLogParserPresets:input_type -> server.v1.ListLogParserPresetsRequest + 30, // 45: server.v1.ServerService.GetLogParserPreset:input_type -> server.v1.GetLogParserPresetRequest + 32, // 46: server.v1.ServerService.AddLogParserPreset:input_type -> server.v1.AddLogParserPresetRequest + 34, // 47: server.v1.ServerService.ChangeLogParserPreset:input_type -> server.v1.ChangeLogParserPresetRequest + 36, // 48: server.v1.ServerService.RemoveLogParserPreset:input_type -> server.v1.RemoveLogParserPresetRequest + 3, // 49: server.v1.ServerService.Version:output_type -> server.v1.VersionResponse + 5, // 50: server.v1.ServerService.Readiness:output_type -> server.v1.ReadinessResponse + 7, // 51: server.v1.ServerService.LeaderHealthCheck:output_type -> server.v1.LeaderHealthCheckResponse + 10, // 52: server.v1.ServerService.CheckUpdates:output_type -> server.v1.CheckUpdatesResponse + 12, // 53: server.v1.ServerService.ListChangeLogs:output_type -> server.v1.ListChangeLogsResponse + 14, // 54: server.v1.ServerService.StartUpdate:output_type -> server.v1.StartUpdateResponse + 16, // 55: server.v1.ServerService.UpdateStatus:output_type -> server.v1.UpdateStatusResponse + 23, // 56: server.v1.ServerService.GetSettings:output_type -> server.v1.GetSettingsResponse + 24, // 57: server.v1.ServerService.GetReadOnlySettings:output_type -> server.v1.GetReadOnlySettingsResponse + 26, // 58: server.v1.ServerService.ChangeSettings:output_type -> server.v1.ChangeSettingsResponse + 29, // 59: server.v1.ServerService.ListLogParserPresets:output_type -> server.v1.ListLogParserPresetsResponse + 31, // 60: server.v1.ServerService.GetLogParserPreset:output_type -> server.v1.GetLogParserPresetResponse + 33, // 61: server.v1.ServerService.AddLogParserPreset:output_type -> server.v1.AddLogParserPresetResponse + 35, // 62: server.v1.ServerService.ChangeLogParserPreset:output_type -> server.v1.ChangeLogParserPresetResponse + 37, // 63: server.v1.ServerService.RemoveLogParserPreset:output_type -> server.v1.RemoveLogParserPresetResponse + 49, // [49:64] is the sub-list for method output_type + 34, // [34:49] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_server_v1_server_proto_init() } @@ -2014,13 +2624,14 @@ func file_server_v1_server_proto_init() { return } file_server_v1_server_proto_msgTypes[24].OneofWrappers = []any{} + file_server_v1_server_proto_msgTypes[33].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_server_v1_server_proto_rawDesc), len(file_server_v1_server_proto_rawDesc)), NumEnums: 1, - NumMessages: 26, + NumMessages: 37, NumExtensions: 0, NumServices: 1, }, diff --git a/api/server/v1/server.pb.gw.go b/api/server/v1/server.pb.gw.go index 634a7f13671..6054e61223e 100644 --- a/api/server/v1/server.pb.gw.go +++ b/api/server/v1/server.pb.gw.go @@ -291,6 +291,177 @@ func local_request_ServerService_ChangeSettings_0(ctx context.Context, marshaler return msg, metadata, err } +func request_ServerService_ListLogParserPresets_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq ListLogParserPresetsRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.ListLogParserPresets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ServerService_ListLogParserPresets_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq ListLogParserPresetsRequest + metadata runtime.ServerMetadata + ) + msg, err := server.ListLogParserPresets(ctx, &protoReq) + return msg, metadata, err +} + +func request_ServerService_GetLogParserPreset_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetLogParserPresetRequest + metadata runtime.ServerMetadata + err error + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + msg, err := client.GetLogParserPreset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ServerService_GetLogParserPreset_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq GetLogParserPresetRequest + metadata runtime.ServerMetadata + err error + ) + val, ok := pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + msg, err := server.GetLogParserPreset(ctx, &protoReq) + return msg, metadata, err +} + +func request_ServerService_AddLogParserPreset_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AddLogParserPresetRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + msg, err := client.AddLogParserPreset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ServerService_AddLogParserPreset_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq AddLogParserPresetRequest + metadata runtime.ServerMetadata + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.AddLogParserPreset(ctx, &protoReq) + return msg, metadata, err +} + +func request_ServerService_ChangeLogParserPreset_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq ChangeLogParserPresetRequest + metadata runtime.ServerMetadata + err error + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + msg, err := client.ChangeLogParserPreset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ServerService_ChangeLogParserPreset_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq ChangeLogParserPresetRequest + metadata runtime.ServerMetadata + err error + ) + if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + val, ok := pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + msg, err := server.ChangeLogParserPreset(ctx, &protoReq) + return msg, metadata, err +} + +func request_ServerService_RemoveLogParserPreset_0(ctx context.Context, marshaler runtime.Marshaler, client ServerServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RemoveLogParserPresetRequest + metadata runtime.ServerMetadata + err error + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + val, ok := pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + msg, err := client.RemoveLogParserPreset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_ServerService_RemoveLogParserPreset_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RemoveLogParserPresetRequest + metadata runtime.ServerMetadata + err error + ) + val, ok := pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + msg, err := server.RemoveLogParserPreset(ctx, &protoReq) + return msg, metadata, err +} + // RegisterServerServiceHandlerServer registers the http handlers for service ServerService to "mux". // UnaryRPC :call ServerServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -497,6 +668,106 @@ func RegisterServerServiceHandlerServer(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodGet, pattern_ServerService_ListLogParserPresets_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) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/server.v1.ServerService/ListLogParserPresets", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServerService_ListLogParserPresets_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_ServerService_ListLogParserPresets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_ServerService_GetLogParserPreset_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) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/server.v1.ServerService/GetLogParserPreset", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServerService_GetLogParserPreset_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_ServerService_GetLogParserPreset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ServerService_AddLogParserPreset_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) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/server.v1.ServerService/AddLogParserPreset", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServerService_AddLogParserPreset_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_ServerService_AddLogParserPreset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPut, pattern_ServerService_ChangeLogParserPreset_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) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/server.v1.ServerService/ChangeLogParserPreset", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServerService_ChangeLogParserPreset_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_ServerService_ChangeLogParserPreset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodDelete, pattern_ServerService_RemoveLogParserPreset_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) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/server.v1.ServerService/RemoveLogParserPreset", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_ServerService_RemoveLogParserPreset_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_ServerService_RemoveLogParserPreset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } @@ -707,31 +978,126 @@ func RegisterServerServiceHandlerClient(ctx context.Context, mux *runtime.ServeM } forward_ServerService_ChangeSettings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) + mux.Handle(http.MethodGet, pattern_ServerService_ListLogParserPresets_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/server.v1.ServerService/ListLogParserPresets", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServerService_ListLogParserPresets_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ServerService_ListLogParserPresets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_ServerService_GetLogParserPreset_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/server.v1.ServerService/GetLogParserPreset", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServerService_GetLogParserPreset_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ServerService_GetLogParserPreset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPost, pattern_ServerService_AddLogParserPreset_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/server.v1.ServerService/AddLogParserPreset", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServerService_AddLogParserPreset_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ServerService_AddLogParserPreset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodPut, pattern_ServerService_ChangeLogParserPreset_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/server.v1.ServerService/ChangeLogParserPreset", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServerService_ChangeLogParserPreset_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ServerService_ChangeLogParserPreset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodDelete, pattern_ServerService_RemoveLogParserPreset_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) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/server.v1.ServerService/RemoveLogParserPreset", runtime.WithHTTPPathPattern("/v1/server/log-parser-presets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_ServerService_RemoveLogParserPreset_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_ServerService_RemoveLogParserPreset_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil } var ( - pattern_ServerService_Version_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "version"}, "")) - pattern_ServerService_Readiness_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "readyz"}, "")) - pattern_ServerService_LeaderHealthCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "leaderHealthCheck"}, "")) - pattern_ServerService_CheckUpdates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "updates"}, "")) - pattern_ServerService_ListChangeLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "server", "updates", "changelogs"}, "")) - pattern_ServerService_StartUpdate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "updates"}, "start")) - pattern_ServerService_UpdateStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "updates"}, "getStatus")) - pattern_ServerService_GetSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "settings"}, "")) - pattern_ServerService_GetReadOnlySettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "server", "settings", "readonly"}, "")) - pattern_ServerService_ChangeSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "settings"}, "")) + pattern_ServerService_Version_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "version"}, "")) + pattern_ServerService_Readiness_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "readyz"}, "")) + pattern_ServerService_LeaderHealthCheck_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "leaderHealthCheck"}, "")) + pattern_ServerService_CheckUpdates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "updates"}, "")) + pattern_ServerService_ListChangeLogs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "server", "updates", "changelogs"}, "")) + pattern_ServerService_StartUpdate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "updates"}, "start")) + pattern_ServerService_UpdateStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "updates"}, "getStatus")) + pattern_ServerService_GetSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "settings"}, "")) + pattern_ServerService_GetReadOnlySettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "server", "settings", "readonly"}, "")) + pattern_ServerService_ChangeSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "settings"}, "")) + pattern_ServerService_ListLogParserPresets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "log-parser-presets"}, "")) + pattern_ServerService_GetLogParserPreset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "server", "log-parser-presets", "id"}, "")) + pattern_ServerService_AddLogParserPreset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "server", "log-parser-presets"}, "")) + pattern_ServerService_ChangeLogParserPreset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "server", "log-parser-presets", "id"}, "")) + pattern_ServerService_RemoveLogParserPreset_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "server", "log-parser-presets", "id"}, "")) ) var ( - forward_ServerService_Version_0 = runtime.ForwardResponseMessage - forward_ServerService_Readiness_0 = runtime.ForwardResponseMessage - forward_ServerService_LeaderHealthCheck_0 = runtime.ForwardResponseMessage - forward_ServerService_CheckUpdates_0 = runtime.ForwardResponseMessage - forward_ServerService_ListChangeLogs_0 = runtime.ForwardResponseMessage - forward_ServerService_StartUpdate_0 = runtime.ForwardResponseMessage - forward_ServerService_UpdateStatus_0 = runtime.ForwardResponseMessage - forward_ServerService_GetSettings_0 = runtime.ForwardResponseMessage - forward_ServerService_GetReadOnlySettings_0 = runtime.ForwardResponseMessage - forward_ServerService_ChangeSettings_0 = runtime.ForwardResponseMessage + forward_ServerService_Version_0 = runtime.ForwardResponseMessage + forward_ServerService_Readiness_0 = runtime.ForwardResponseMessage + forward_ServerService_LeaderHealthCheck_0 = runtime.ForwardResponseMessage + forward_ServerService_CheckUpdates_0 = runtime.ForwardResponseMessage + forward_ServerService_ListChangeLogs_0 = runtime.ForwardResponseMessage + forward_ServerService_StartUpdate_0 = runtime.ForwardResponseMessage + forward_ServerService_UpdateStatus_0 = runtime.ForwardResponseMessage + forward_ServerService_GetSettings_0 = runtime.ForwardResponseMessage + forward_ServerService_GetReadOnlySettings_0 = runtime.ForwardResponseMessage + forward_ServerService_ChangeSettings_0 = runtime.ForwardResponseMessage + forward_ServerService_ListLogParserPresets_0 = runtime.ForwardResponseMessage + forward_ServerService_GetLogParserPreset_0 = runtime.ForwardResponseMessage + forward_ServerService_AddLogParserPreset_0 = runtime.ForwardResponseMessage + forward_ServerService_ChangeLogParserPreset_0 = runtime.ForwardResponseMessage + forward_ServerService_RemoveLogParserPreset_0 = runtime.ForwardResponseMessage ) diff --git a/api/server/v1/server.pb.validate.go b/api/server/v1/server.pb.validate.go index f684fea246b..65ad08bd30c 100644 --- a/api/server/v1/server.pb.validate.go +++ b/api/server/v1/server.pb.validate.go @@ -3317,6 +3317,7 @@ func (m *ChangeSettingsRequest) validate(all bool) error { } if m.AwsPartitions != nil { + if all { switch v := interface{}(m.GetAwsPartitions()).(type) { case interface{ ValidateAll() error }: @@ -3345,6 +3346,7 @@ func (m *ChangeSettingsRequest) validate(all bool) error { } } } + } if m.EnableAdvisor != nil { @@ -3585,3 +3587,1338 @@ var _ interface { Cause() error ErrorName() string } = ChangeSettingsResponseValidationError{} + +// Validate checks the field values on LogParserPreset 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 *LogParserPreset) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on LogParserPreset 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 +// LogParserPresetMultiError, or nil if none found. +func (m *LogParserPreset) ValidateAll() error { + return m.validate(true) +} + +func (m *LogParserPreset) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + // no validation rules for Name + + // no validation rules for Description + + // no validation rules for OperatorYaml + + // no validation rules for BuiltIn + + if all { + switch v := interface{}(m.GetCreatedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LogParserPresetValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LogParserPresetValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LogParserPresetValidationError{ + field: "CreatedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if all { + switch v := interface{}(m.GetUpdatedAt()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, LogParserPresetValidationError{ + field: "UpdatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, LogParserPresetValidationError{ + field: "UpdatedAt", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return LogParserPresetValidationError{ + field: "UpdatedAt", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return LogParserPresetMultiError(errors) + } + + return nil +} + +// LogParserPresetMultiError is an error wrapping multiple validation errors +// returned by LogParserPreset.ValidateAll() if the designated constraints +// aren't met. +type LogParserPresetMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m LogParserPresetMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m LogParserPresetMultiError) AllErrors() []error { return m } + +// LogParserPresetValidationError is the validation error returned by +// LogParserPreset.Validate if the designated constraints aren't met. +type LogParserPresetValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e LogParserPresetValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e LogParserPresetValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e LogParserPresetValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e LogParserPresetValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e LogParserPresetValidationError) ErrorName() string { return "LogParserPresetValidationError" } + +// Error satisfies the builtin error interface +func (e LogParserPresetValidationError) 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 %sLogParserPreset.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = LogParserPresetValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = LogParserPresetValidationError{} + +// Validate checks the field values on ListLogParserPresetsRequest 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 *ListLogParserPresetsRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListLogParserPresetsRequest 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 +// ListLogParserPresetsRequestMultiError, or nil if none found. +func (m *ListLogParserPresetsRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ListLogParserPresetsRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return ListLogParserPresetsRequestMultiError(errors) + } + + return nil +} + +// ListLogParserPresetsRequestMultiError is an error wrapping multiple +// validation errors returned by ListLogParserPresetsRequest.ValidateAll() if +// the designated constraints aren't met. +type ListLogParserPresetsRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListLogParserPresetsRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListLogParserPresetsRequestMultiError) AllErrors() []error { return m } + +// ListLogParserPresetsRequestValidationError is the validation error returned +// by ListLogParserPresetsRequest.Validate if the designated constraints +// aren't met. +type ListLogParserPresetsRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListLogParserPresetsRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListLogParserPresetsRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListLogParserPresetsRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListLogParserPresetsRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListLogParserPresetsRequestValidationError) ErrorName() string { + return "ListLogParserPresetsRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ListLogParserPresetsRequestValidationError) 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 %sListLogParserPresetsRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListLogParserPresetsRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListLogParserPresetsRequestValidationError{} + +// Validate checks the field values on ListLogParserPresetsResponse 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 *ListLogParserPresetsResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ListLogParserPresetsResponse 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 +// ListLogParserPresetsResponseMultiError, or nil if none found. +func (m *ListLogParserPresetsResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ListLogParserPresetsResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + for idx, item := range m.GetPresets() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ListLogParserPresetsResponseValidationError{ + field: fmt.Sprintf("Presets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ListLogParserPresetsResponseValidationError{ + field: fmt.Sprintf("Presets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ListLogParserPresetsResponseValidationError{ + field: fmt.Sprintf("Presets[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ListLogParserPresetsResponseMultiError(errors) + } + + return nil +} + +// ListLogParserPresetsResponseMultiError is an error wrapping multiple +// validation errors returned by ListLogParserPresetsResponse.ValidateAll() if +// the designated constraints aren't met. +type ListLogParserPresetsResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ListLogParserPresetsResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ListLogParserPresetsResponseMultiError) AllErrors() []error { return m } + +// ListLogParserPresetsResponseValidationError is the validation error returned +// by ListLogParserPresetsResponse.Validate if the designated constraints +// aren't met. +type ListLogParserPresetsResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ListLogParserPresetsResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ListLogParserPresetsResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ListLogParserPresetsResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ListLogParserPresetsResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ListLogParserPresetsResponseValidationError) ErrorName() string { + return "ListLogParserPresetsResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ListLogParserPresetsResponseValidationError) 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 %sListLogParserPresetsResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ListLogParserPresetsResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ListLogParserPresetsResponseValidationError{} + +// Validate checks the field values on GetLogParserPresetRequest 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 *GetLogParserPresetRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetLogParserPresetRequest 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 +// GetLogParserPresetRequestMultiError, or nil if none found. +func (m *GetLogParserPresetRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *GetLogParserPresetRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if len(errors) > 0 { + return GetLogParserPresetRequestMultiError(errors) + } + + return nil +} + +// GetLogParserPresetRequestMultiError is an error wrapping multiple validation +// errors returned by GetLogParserPresetRequest.ValidateAll() if the +// designated constraints aren't met. +type GetLogParserPresetRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetLogParserPresetRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetLogParserPresetRequestMultiError) AllErrors() []error { return m } + +// GetLogParserPresetRequestValidationError is the validation error returned by +// GetLogParserPresetRequest.Validate if the designated constraints aren't met. +type GetLogParserPresetRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetLogParserPresetRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetLogParserPresetRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetLogParserPresetRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetLogParserPresetRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetLogParserPresetRequestValidationError) ErrorName() string { + return "GetLogParserPresetRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e GetLogParserPresetRequestValidationError) 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 %sGetLogParserPresetRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetLogParserPresetRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetLogParserPresetRequestValidationError{} + +// Validate checks the field values on GetLogParserPresetResponse 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 *GetLogParserPresetResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on GetLogParserPresetResponse 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 +// GetLogParserPresetResponseMultiError, or nil if none found. +func (m *GetLogParserPresetResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *GetLogParserPresetResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPreset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, GetLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, GetLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPreset()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return GetLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return GetLogParserPresetResponseMultiError(errors) + } + + return nil +} + +// GetLogParserPresetResponseMultiError is an error wrapping multiple +// validation errors returned by GetLogParserPresetResponse.ValidateAll() if +// the designated constraints aren't met. +type GetLogParserPresetResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m GetLogParserPresetResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m GetLogParserPresetResponseMultiError) AllErrors() []error { return m } + +// GetLogParserPresetResponseValidationError is the validation error returned +// by GetLogParserPresetResponse.Validate if the designated constraints aren't met. +type GetLogParserPresetResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e GetLogParserPresetResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e GetLogParserPresetResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e GetLogParserPresetResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e GetLogParserPresetResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e GetLogParserPresetResponseValidationError) ErrorName() string { + return "GetLogParserPresetResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e GetLogParserPresetResponseValidationError) 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 %sGetLogParserPresetResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = GetLogParserPresetResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = GetLogParserPresetResponseValidationError{} + +// Validate checks the field values on AddLogParserPresetRequest 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 *AddLogParserPresetRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddLogParserPresetRequest 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 +// AddLogParserPresetRequestMultiError, or nil if none found. +func (m *AddLogParserPresetRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *AddLogParserPresetRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Name + + // no validation rules for Description + + // no validation rules for OperatorYaml + + if len(errors) > 0 { + return AddLogParserPresetRequestMultiError(errors) + } + + return nil +} + +// AddLogParserPresetRequestMultiError is an error wrapping multiple validation +// errors returned by AddLogParserPresetRequest.ValidateAll() if the +// designated constraints aren't met. +type AddLogParserPresetRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddLogParserPresetRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddLogParserPresetRequestMultiError) AllErrors() []error { return m } + +// AddLogParserPresetRequestValidationError is the validation error returned by +// AddLogParserPresetRequest.Validate if the designated constraints aren't met. +type AddLogParserPresetRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddLogParserPresetRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddLogParserPresetRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddLogParserPresetRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddLogParserPresetRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddLogParserPresetRequestValidationError) ErrorName() string { + return "AddLogParserPresetRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e AddLogParserPresetRequestValidationError) 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 %sAddLogParserPresetRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddLogParserPresetRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddLogParserPresetRequestValidationError{} + +// Validate checks the field values on AddLogParserPresetResponse 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 *AddLogParserPresetResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on AddLogParserPresetResponse 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 +// AddLogParserPresetResponseMultiError, or nil if none found. +func (m *AddLogParserPresetResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *AddLogParserPresetResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPreset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AddLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AddLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPreset()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AddLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return AddLogParserPresetResponseMultiError(errors) + } + + return nil +} + +// AddLogParserPresetResponseMultiError is an error wrapping multiple +// validation errors returned by AddLogParserPresetResponse.ValidateAll() if +// the designated constraints aren't met. +type AddLogParserPresetResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m AddLogParserPresetResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m AddLogParserPresetResponseMultiError) AllErrors() []error { return m } + +// AddLogParserPresetResponseValidationError is the validation error returned +// by AddLogParserPresetResponse.Validate if the designated constraints aren't met. +type AddLogParserPresetResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e AddLogParserPresetResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e AddLogParserPresetResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e AddLogParserPresetResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e AddLogParserPresetResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e AddLogParserPresetResponseValidationError) ErrorName() string { + return "AddLogParserPresetResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e AddLogParserPresetResponseValidationError) 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 %sAddLogParserPresetResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = AddLogParserPresetResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = AddLogParserPresetResponseValidationError{} + +// Validate checks the field values on ChangeLogParserPresetRequest 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 *ChangeLogParserPresetRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ChangeLogParserPresetRequest 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 +// ChangeLogParserPresetRequestMultiError, or nil if none found. +func (m *ChangeLogParserPresetRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *ChangeLogParserPresetRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if m.Description != nil { + // no validation rules for Description + } + + if m.OperatorYaml != nil { + // no validation rules for OperatorYaml + } + + if len(errors) > 0 { + return ChangeLogParserPresetRequestMultiError(errors) + } + + return nil +} + +// ChangeLogParserPresetRequestMultiError is an error wrapping multiple +// validation errors returned by ChangeLogParserPresetRequest.ValidateAll() if +// the designated constraints aren't met. +type ChangeLogParserPresetRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ChangeLogParserPresetRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ChangeLogParserPresetRequestMultiError) AllErrors() []error { return m } + +// ChangeLogParserPresetRequestValidationError is the validation error returned +// by ChangeLogParserPresetRequest.Validate if the designated constraints +// aren't met. +type ChangeLogParserPresetRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ChangeLogParserPresetRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ChangeLogParserPresetRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ChangeLogParserPresetRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ChangeLogParserPresetRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ChangeLogParserPresetRequestValidationError) ErrorName() string { + return "ChangeLogParserPresetRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e ChangeLogParserPresetRequestValidationError) 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 %sChangeLogParserPresetRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ChangeLogParserPresetRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ChangeLogParserPresetRequestValidationError{} + +// Validate checks the field values on ChangeLogParserPresetResponse 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 *ChangeLogParserPresetResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ChangeLogParserPresetResponse 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 +// ChangeLogParserPresetResponseMultiError, or nil if none found. +func (m *ChangeLogParserPresetResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *ChangeLogParserPresetResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if all { + switch v := interface{}(m.GetPreset()).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ChangeLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ChangeLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(m.GetPreset()).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ChangeLogParserPresetResponseValidationError{ + field: "Preset", + reason: "embedded message failed validation", + cause: err, + } + } + } + + if len(errors) > 0 { + return ChangeLogParserPresetResponseMultiError(errors) + } + + return nil +} + +// ChangeLogParserPresetResponseMultiError is an error wrapping multiple +// validation errors returned by ChangeLogParserPresetResponse.ValidateAll() +// if the designated constraints aren't met. +type ChangeLogParserPresetResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ChangeLogParserPresetResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ChangeLogParserPresetResponseMultiError) AllErrors() []error { return m } + +// ChangeLogParserPresetResponseValidationError is the validation error +// returned by ChangeLogParserPresetResponse.Validate if the designated +// constraints aren't met. +type ChangeLogParserPresetResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ChangeLogParserPresetResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ChangeLogParserPresetResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ChangeLogParserPresetResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ChangeLogParserPresetResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ChangeLogParserPresetResponseValidationError) ErrorName() string { + return "ChangeLogParserPresetResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e ChangeLogParserPresetResponseValidationError) 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 %sChangeLogParserPresetResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ChangeLogParserPresetResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ChangeLogParserPresetResponseValidationError{} + +// Validate checks the field values on RemoveLogParserPresetRequest 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 *RemoveLogParserPresetRequest) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoveLogParserPresetRequest 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 +// RemoveLogParserPresetRequestMultiError, or nil if none found. +func (m *RemoveLogParserPresetRequest) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoveLogParserPresetRequest) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + // no validation rules for Id + + if len(errors) > 0 { + return RemoveLogParserPresetRequestMultiError(errors) + } + + return nil +} + +// RemoveLogParserPresetRequestMultiError is an error wrapping multiple +// validation errors returned by RemoveLogParserPresetRequest.ValidateAll() if +// the designated constraints aren't met. +type RemoveLogParserPresetRequestMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoveLogParserPresetRequestMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoveLogParserPresetRequestMultiError) AllErrors() []error { return m } + +// RemoveLogParserPresetRequestValidationError is the validation error returned +// by RemoveLogParserPresetRequest.Validate if the designated constraints +// aren't met. +type RemoveLogParserPresetRequestValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RemoveLogParserPresetRequestValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RemoveLogParserPresetRequestValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RemoveLogParserPresetRequestValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RemoveLogParserPresetRequestValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RemoveLogParserPresetRequestValidationError) ErrorName() string { + return "RemoveLogParserPresetRequestValidationError" +} + +// Error satisfies the builtin error interface +func (e RemoveLogParserPresetRequestValidationError) 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 %sRemoveLogParserPresetRequest.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RemoveLogParserPresetRequestValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RemoveLogParserPresetRequestValidationError{} + +// Validate checks the field values on RemoveLogParserPresetResponse 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 *RemoveLogParserPresetResponse) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on RemoveLogParserPresetResponse 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 +// RemoveLogParserPresetResponseMultiError, or nil if none found. +func (m *RemoveLogParserPresetResponse) ValidateAll() error { + return m.validate(true) +} + +func (m *RemoveLogParserPresetResponse) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if len(errors) > 0 { + return RemoveLogParserPresetResponseMultiError(errors) + } + + return nil +} + +// RemoveLogParserPresetResponseMultiError is an error wrapping multiple +// validation errors returned by RemoveLogParserPresetResponse.ValidateAll() +// if the designated constraints aren't met. +type RemoveLogParserPresetResponseMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m RemoveLogParserPresetResponseMultiError) Error() string { + msgs := make([]string, 0, len(m)) + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m RemoveLogParserPresetResponseMultiError) AllErrors() []error { return m } + +// RemoveLogParserPresetResponseValidationError is the validation error +// returned by RemoveLogParserPresetResponse.Validate if the designated +// constraints aren't met. +type RemoveLogParserPresetResponseValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e RemoveLogParserPresetResponseValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e RemoveLogParserPresetResponseValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e RemoveLogParserPresetResponseValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e RemoveLogParserPresetResponseValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e RemoveLogParserPresetResponseValidationError) ErrorName() string { + return "RemoveLogParserPresetResponseValidationError" +} + +// Error satisfies the builtin error interface +func (e RemoveLogParserPresetResponseValidationError) 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 %sRemoveLogParserPresetResponse.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = RemoveLogParserPresetResponseValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = RemoveLogParserPresetResponseValidationError{} diff --git a/api/server/v1/server.proto b/api/server/v1/server.proto index c2885f5b6e8..0d0e34c0b05 100644 --- a/api/server/v1/server.proto +++ b/api/server/v1/server.proto @@ -248,6 +248,57 @@ message ChangeSettingsResponse { Settings settings = 1; } +// LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML). +message LogParserPreset { + string id = 1; + string name = 2; + string description = 3; + string operator_yaml = 4; + bool built_in = 5; + google.protobuf.Timestamp created_at = 6; + google.protobuf.Timestamp updated_at = 7; +} + +message ListLogParserPresetsRequest {} + +message ListLogParserPresetsResponse { + repeated LogParserPreset presets = 1; +} + +message GetLogParserPresetRequest { + string id = 1; +} + +message GetLogParserPresetResponse { + LogParserPreset preset = 1; +} + +message AddLogParserPresetRequest { + string name = 1; + string description = 2; + string operator_yaml = 3; +} + +message AddLogParserPresetResponse { + LogParserPreset preset = 1; +} + +message ChangeLogParserPresetRequest { + string id = 1; + optional string description = 2; + optional string operator_yaml = 3; +} + +message ChangeLogParserPresetResponse { + LogParserPreset preset = 1; +} + +message RemoveLogParserPresetRequest { + string id = 1; +} + +message RemoveLogParserPresetResponse {} + // Server service provides generic PMM Server public APIs. service ServerService { // Version returns PMM Server versions. @@ -340,4 +391,50 @@ service ServerService { description: "Changes PMM Server settings." }; } + // ListLogParserPresets returns all OTEL log parser presets (built-in and custom). + rpc ListLogParserPresets(ListLogParserPresetsRequest) returns (ListLogParserPresetsResponse) { + option (google.api.http) = {get: "/v1/server/log-parser-presets"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "List OTEL log parser presets" + description: "Returns all rows from log_parser_presets." + }; + } + // GetLogParserPreset returns a single preset by id. + rpc GetLogParserPreset(GetLogParserPresetRequest) returns (GetLogParserPresetResponse) { + option (google.api.http) = {get: "/v1/server/log-parser-presets/{id}"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Get OTEL log parser preset" + description: "Returns one log parser preset." + }; + } + // AddLogParserPreset creates a custom preset (built_in = false). + rpc AddLogParserPreset(AddLogParserPresetRequest) returns (AddLogParserPresetResponse) { + option (google.api.http) = { + post: "/v1/server/log-parser-presets" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Add OTEL log parser preset" + description: "Creates a custom log parser preset." + }; + } + // ChangeLogParserPreset updates description and/or operator_yaml. built_in and name are not changed. + rpc ChangeLogParserPreset(ChangeLogParserPresetRequest) returns (ChangeLogParserPresetResponse) { + option (google.api.http) = { + put: "/v1/server/log-parser-presets/{id}" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Change OTEL log parser preset" + description: "Updates description and/or operator YAML for any preset." + }; + } + // RemoveLogParserPreset deletes a custom preset if no OTEL collector references it. + rpc RemoveLogParserPreset(RemoveLogParserPresetRequest) returns (RemoveLogParserPresetResponse) { + option (google.api.http) = {delete: "/v1/server/log-parser-presets/{id}"}; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Remove OTEL log parser preset" + description: "Deletes a non-built-in preset when it is not in use." + }; + } } diff --git a/api/server/v1/server.swagger.json b/api/server/v1/server.swagger.json new file mode 100644 index 00000000000..dabfb66b28e --- /dev/null +++ b/api/server/v1/server.swagger.json @@ -0,0 +1,1049 @@ +{ + "swagger": "2.0", + "info": { + "title": "server/v1/server.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "ServerService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/server/leaderHealthCheck": { + "get": { + "summary": "Check Leadership", + "description": "Checks if the instance is the leader in a cluster. Returns an error if the instance isn't the leader.", + "operationId": "LeaderHealthCheck", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1LeaderHealthCheckResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/log-parser-presets": { + "get": { + "summary": "List OTEL log parser presets", + "description": "Returns all rows from log_parser_presets.", + "operationId": "ListLogParserPresets", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListLogParserPresetsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "ServerService" + ] + }, + "post": { + "summary": "Add OTEL log parser preset", + "description": "Creates a custom log parser preset.", + "operationId": "AddLogParserPreset", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AddLogParserPresetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AddLogParserPresetRequest" + } + } + ], + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/log-parser-presets/{id}": { + "get": { + "summary": "Get OTEL log parser preset", + "description": "Returns one log parser preset.", + "operationId": "GetLogParserPreset", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetLogParserPresetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "ServerService" + ] + }, + "delete": { + "summary": "Remove OTEL log parser preset", + "description": "Deletes a non-built-in preset when it is not in use.", + "operationId": "RemoveLogParserPreset", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1RemoveLogParserPresetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "ServerService" + ] + }, + "put": { + "summary": "Change OTEL log parser preset", + "description": "Updates description and/or operator YAML for any preset.", + "operationId": "ChangeLogParserPreset", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeLogParserPresetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ServerServiceChangeLogParserPresetBody" + } + } + ], + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/readyz": { + "get": { + "summary": "Check server readiness", + "description": "Returns an error when Server components being restarted are not ready yet. Use this API for checking the health of Docker containers and for probing Kubernetes readiness.", + "operationId": "Readiness", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ReadinessResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/settings": { + "get": { + "summary": "Get settings", + "description": "Returns current PMM Server settings.", + "operationId": "GetSettings", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetSettingsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "ServerService" + ] + }, + "put": { + "summary": "Change settings", + "description": "Changes PMM Server settings.", + "operationId": "ChangeSettings", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ChangeSettingsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ChangeSettingsRequest" + } + } + ], + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/settings/readonly": { + "get": { + "summary": "Get read-only settings", + "description": "Returns a stripped version of PMM Server settings.", + "operationId": "GetReadOnlySettings", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetReadOnlySettingsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/updates": { + "get": { + "summary": "Check updates", + "description": "Checks for available PMM Server updates.", + "operationId": "CheckUpdates", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1CheckUpdatesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "force", + "description": "If false, cached information may be returned.", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "only_installed_version", + "description": "If true, only installed version will be in response.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/updates/changelogs": { + "get": { + "summary": "Get the changelog", + "description": "Display a changelog comparing the installed version to the latest available version.", + "operationId": "ListChangeLogs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListChangeLogsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/updates:getStatus": { + "post": { + "summary": "Update status", + "description": "Returns PMM Server update status.", + "operationId": "UpdateStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateStatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateStatusRequest" + } + } + ], + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/updates:start": { + "post": { + "summary": "Start update", + "description": "Starts PMM Server update.", + "operationId": "StartUpdate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StartUpdateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StartUpdateRequest" + } + } + ], + "tags": [ + "ServerService" + ] + } + }, + "/v1/server/version": { + "get": { + "summary": "Version", + "description": "Returns PMM Server versions.", + "operationId": "Version", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1VersionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "dummy", + "description": "Dummy parameter for internal testing. Do not use.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "ServerService" + ] + } + } + }, + "definitions": { + "ServerServiceChangeLogParserPresetBody": { + "type": "object", + "properties": { + "description": { + "type": "string", + "x-nullable": true + }, + "operator_yaml": { + "type": "string", + "x-nullable": true + } + } + }, + "commonStringArray": { + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "description": "A wrapper for a string array. This type allows to distinguish between an empty array and a null value." + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + } + }, + "additionalProperties": {}, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1AddLogParserPresetRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "operator_yaml": { + "type": "string" + } + } + }, + "v1AddLogParserPresetResponse": { + "type": "object", + "properties": { + "preset": { + "$ref": "#/definitions/v1LogParserPreset" + } + } + }, + "v1AdvisorRunIntervals": { + "type": "object", + "properties": { + "standard_interval": { + "type": "string", + "description": "Standard check interval." + }, + "rare_interval": { + "type": "string", + "description": "Interval for rare check runs." + }, + "frequent_interval": { + "type": "string", + "description": "Interval for frequent check runs." + } + }, + "description": "AdvisorRunIntervals represents intervals between each run of Advisor checks." + }, + "v1ChangeLogParserPresetResponse": { + "type": "object", + "properties": { + "preset": { + "$ref": "#/definitions/v1LogParserPreset" + } + } + }, + "v1ChangeSettingsRequest": { + "type": "object", + "properties": { + "enable_updates": { + "type": "boolean", + "x-nullable": true + }, + "enable_telemetry": { + "type": "boolean", + "x-nullable": true + }, + "metrics_resolutions": { + "$ref": "#/definitions/v1MetricsResolutions" + }, + "data_retention": { + "type": "string", + "description": "A number of full days for Prometheus and QAN data retention. Should have a suffix in JSON: 2592000s, 43200m, 720h." + }, + "ssh_key": { + "type": "string", + "x-nullable": true + }, + "aws_partitions": { + "$ref": "#/definitions/commonStringArray", + "x-nullable": true + }, + "enable_advisor": { + "type": "boolean", + "x-nullable": true, + "description": "Enable Advisor." + }, + "enable_alerting": { + "type": "boolean", + "x-nullable": true, + "description": "Enable Alerting." + }, + "pmm_public_address": { + "type": "string", + "x-nullable": true, + "description": "PMM Server public address." + }, + "advisor_run_intervals": { + "$ref": "#/definitions/v1AdvisorRunIntervals", + "description": "Intervals between Advisor runs." + }, + "enable_azurediscover": { + "type": "boolean", + "x-nullable": true, + "description": "Enable Azure Discover." + }, + "enable_backup_management": { + "type": "boolean", + "x-nullable": true, + "description": "Enable Backup Management." + }, + "enable_access_control": { + "type": "boolean", + "x-nullable": true, + "title": "Enable Access Control" + }, + "enable_internal_pg_qan": { + "type": "boolean", + "x-nullable": true, + "description": "Enable Query Analytics for PMM's internal PG database." + }, + "update_snooze_duration": { + "type": "string", + "description": "A number of full days for which an update is snoozed, i.e. a multiple of 24h: 2592000s, 43200m, 720h." + } + } + }, + "v1ChangeSettingsResponse": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/definitions/v1Settings" + } + } + }, + "v1CheckUpdatesResponse": { + "type": "object", + "properties": { + "installed": { + "$ref": "#/definitions/v1VersionInfo", + "description": "Currently installed PMM Server version." + }, + "latest": { + "$ref": "#/definitions/v1DockerVersionInfo", + "description": "Latest available PMM Server version." + }, + "update_available": { + "type": "boolean", + "description": "True if there is a PMM Server update available." + }, + "latest_news_url": { + "type": "string", + "description": "Latest available PMM Server release announcement URL." + }, + "last_check": { + "type": "string", + "format": "date-time", + "description": "Last check time." + } + } + }, + "v1DistributionMethod": { + "type": "string", + "enum": [ + "DISTRIBUTION_METHOD_UNSPECIFIED", + "DISTRIBUTION_METHOD_DOCKER", + "DISTRIBUTION_METHOD_OVF", + "DISTRIBUTION_METHOD_AMI", + "DISTRIBUTION_METHOD_AZURE", + "DISTRIBUTION_METHOD_DO" + ], + "default": "DISTRIBUTION_METHOD_UNSPECIFIED", + "description": "DistributionMethod defines PMM Server distribution method: Docker image, OVF/OVA, or AMI." + }, + "v1DockerVersionInfo": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "PMM Version." + }, + "tag": { + "type": "string", + "description": "Docker image tag." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Release date." + }, + "release_notes_url": { + "type": "string", + "description": "Release notes URL for the version (if available)." + }, + "release_notes_text": { + "type": "string", + "description": "Release notes text for the version (if available)." + } + } + }, + "v1GetLogParserPresetResponse": { + "type": "object", + "properties": { + "preset": { + "$ref": "#/definitions/v1LogParserPreset" + } + } + }, + "v1GetReadOnlySettingsResponse": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/definitions/v1ReadOnlySettings" + } + } + }, + "v1GetSettingsResponse": { + "type": "object", + "properties": { + "settings": { + "$ref": "#/definitions/v1Settings" + } + } + }, + "v1LeaderHealthCheckResponse": { + "type": "object", + "description": "This probe is available without authentication, so it should not contain any data." + }, + "v1ListChangeLogsResponse": { + "type": "object", + "properties": { + "updates": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1DockerVersionInfo" + }, + "description": "List of available updates." + }, + "last_check": { + "type": "string", + "format": "date-time", + "description": "Last check time." + } + } + }, + "v1ListLogParserPresetsResponse": { + "type": "object", + "properties": { + "presets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1LogParserPreset" + } + } + } + }, + "v1LogParserPreset": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "operator_yaml": { + "type": "string" + }, + "built_in": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + }, + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML)." + }, + "v1MetricsResolutions": { + "type": "object", + "properties": { + "hr": { + "type": "string", + "description": "High resolution. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "mr": { + "type": "string", + "description": "Medium resolution. Should have a suffix in JSON: 1s, 1m, 1h." + }, + "lr": { + "type": "string", + "description": "Low resolution. Should have a suffix in JSON: 1s, 1m, 1h." + } + }, + "description": "MetricsResolutions represents Prometheus exporters metrics resolutions." + }, + "v1ReadOnlySettings": { + "type": "object", + "properties": { + "updates_enabled": { + "type": "boolean", + "description": "True if updates are enabled." + }, + "telemetry_enabled": { + "type": "boolean", + "description": "True if telemetry is enabled." + }, + "advisor_enabled": { + "type": "boolean", + "description": "True if Advisor is enabled." + }, + "alerting_enabled": { + "type": "boolean", + "description": "True if Alerting is enabled." + }, + "pmm_public_address": { + "type": "string", + "description": "PMM Server public address." + }, + "backup_management_enabled": { + "type": "boolean", + "description": "True if Backup Management is enabled." + }, + "azurediscover_enabled": { + "type": "boolean", + "description": "True if Azure Discover is enabled." + }, + "enable_access_control": { + "type": "boolean", + "description": "True if Access Control is enabled." + } + }, + "description": "ReadOnlySettings represents a stripped-down version of PMM Server settings that can be accessed by users of all roles." + }, + "v1ReadinessResponse": { + "type": "object", + "description": "This probe is available without authentication, so it should not contain any data." + }, + "v1RemoveLogParserPresetResponse": { + "type": "object" + }, + "v1Settings": { + "type": "object", + "properties": { + "updates_enabled": { + "type": "boolean", + "description": "True if updates are enabled." + }, + "telemetry_enabled": { + "type": "boolean", + "description": "True if telemetry is enabled." + }, + "metrics_resolutions": { + "$ref": "#/definitions/v1MetricsResolutions" + }, + "data_retention": { + "type": "string" + }, + "ssh_key": { + "type": "string" + }, + "aws_partitions": { + "type": "array", + "items": { + "type": "string" + } + }, + "advisor_enabled": { + "type": "boolean", + "description": "True if Advisor is enabled." + }, + "platform_email": { + "type": "string" + }, + "alerting_enabled": { + "type": "boolean", + "description": "True if Alerting is enabled." + }, + "pmm_public_address": { + "type": "string", + "description": "PMM Server public address." + }, + "advisor_run_intervals": { + "$ref": "#/definitions/v1AdvisorRunIntervals", + "description": "Intervals between Advisor runs." + }, + "backup_management_enabled": { + "type": "boolean", + "description": "True if Backup Management is enabled." + }, + "azurediscover_enabled": { + "type": "boolean", + "description": "True if Azure Discover is enabled." + }, + "connected_to_platform": { + "type": "boolean", + "title": "True if the PMM instance is connected to Platform" + }, + "telemetry_summaries": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Includes list of collected telemetry" + }, + "enable_access_control": { + "type": "boolean", + "description": "True if Access Control is enabled." + }, + "default_role_id": { + "type": "integer", + "format": "int64", + "description": "Default Access Control role ID for new users." + }, + "enable_internal_pg_qan": { + "type": "boolean", + "description": "True if Query Analytics for PMM's internal PG database is enabled." + }, + "update_snooze_duration": { + "type": "string", + "title": "Duration for which an update is snoozed" + } + }, + "description": "Settings represents PMM Server settings." + }, + "v1StartUpdateRequest": { + "type": "object", + "properties": { + "new_image": { + "type": "string" + } + } + }, + "v1StartUpdateResponse": { + "type": "object", + "properties": { + "auth_token": { + "type": "string", + "description": "Authentication token for getting update statuses." + }, + "log_offset": { + "type": "integer", + "format": "int64", + "description": "Progress log offset." + } + } + }, + "v1UpdateStatusRequest": { + "type": "object", + "properties": { + "auth_token": { + "type": "string", + "description": "Authentication token." + }, + "log_offset": { + "type": "integer", + "format": "int64", + "description": "Progress log offset." + } + } + }, + "v1UpdateStatusResponse": { + "type": "object", + "properties": { + "log_lines": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Progress log lines." + }, + "log_offset": { + "type": "integer", + "format": "int64", + "description": "Progress log offset for the next request." + }, + "done": { + "type": "boolean", + "description": "True when update is done." + } + } + }, + "v1VersionInfo": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "User-visible version." + }, + "full_version": { + "type": "string", + "description": "Full version for debugging." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Build or release date." + } + }, + "description": "VersionInfo describes component version, or PMM Server as a whole." + }, + "v1VersionResponse": { + "type": "object", + "properties": { + "version": { + "type": "string", + "description": "PMM Server version." + }, + "server": { + "$ref": "#/definitions/v1VersionInfo", + "description": "Detailed PMM Server version information." + }, + "managed": { + "$ref": "#/definitions/v1VersionInfo", + "description": "pmm-managed version information for debugging." + }, + "distribution_method": { + "$ref": "#/definitions/v1DistributionMethod", + "description": "PMM Server distribution method.\n\nTODO Versions and statuses of Grafana, Prometheus, PostgreSQL, qan-api2, ClickHouse, pmm-agent, etc." + } + } + } + } +} diff --git a/api/server/v1/server_grpc.pb.go b/api/server/v1/server_grpc.pb.go index 29719f730c8..52da0d08fb5 100644 --- a/api/server/v1/server_grpc.pb.go +++ b/api/server/v1/server_grpc.pb.go @@ -8,7 +8,6 @@ package serverv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -20,16 +19,21 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - ServerService_Version_FullMethodName = "/server.v1.ServerService/Version" - ServerService_Readiness_FullMethodName = "/server.v1.ServerService/Readiness" - ServerService_LeaderHealthCheck_FullMethodName = "/server.v1.ServerService/LeaderHealthCheck" - ServerService_CheckUpdates_FullMethodName = "/server.v1.ServerService/CheckUpdates" - ServerService_ListChangeLogs_FullMethodName = "/server.v1.ServerService/ListChangeLogs" - ServerService_StartUpdate_FullMethodName = "/server.v1.ServerService/StartUpdate" - ServerService_UpdateStatus_FullMethodName = "/server.v1.ServerService/UpdateStatus" - ServerService_GetSettings_FullMethodName = "/server.v1.ServerService/GetSettings" - ServerService_GetReadOnlySettings_FullMethodName = "/server.v1.ServerService/GetReadOnlySettings" - ServerService_ChangeSettings_FullMethodName = "/server.v1.ServerService/ChangeSettings" + ServerService_Version_FullMethodName = "/server.v1.ServerService/Version" + ServerService_Readiness_FullMethodName = "/server.v1.ServerService/Readiness" + ServerService_LeaderHealthCheck_FullMethodName = "/server.v1.ServerService/LeaderHealthCheck" + ServerService_CheckUpdates_FullMethodName = "/server.v1.ServerService/CheckUpdates" + ServerService_ListChangeLogs_FullMethodName = "/server.v1.ServerService/ListChangeLogs" + ServerService_StartUpdate_FullMethodName = "/server.v1.ServerService/StartUpdate" + ServerService_UpdateStatus_FullMethodName = "/server.v1.ServerService/UpdateStatus" + ServerService_GetSettings_FullMethodName = "/server.v1.ServerService/GetSettings" + ServerService_GetReadOnlySettings_FullMethodName = "/server.v1.ServerService/GetReadOnlySettings" + ServerService_ChangeSettings_FullMethodName = "/server.v1.ServerService/ChangeSettings" + ServerService_ListLogParserPresets_FullMethodName = "/server.v1.ServerService/ListLogParserPresets" + ServerService_GetLogParserPreset_FullMethodName = "/server.v1.ServerService/GetLogParserPreset" + ServerService_AddLogParserPreset_FullMethodName = "/server.v1.ServerService/AddLogParserPreset" + ServerService_ChangeLogParserPreset_FullMethodName = "/server.v1.ServerService/ChangeLogParserPreset" + ServerService_RemoveLogParserPreset_FullMethodName = "/server.v1.ServerService/RemoveLogParserPreset" ) // ServerServiceClient is the client API for ServerService service. @@ -59,6 +63,16 @@ type ServerServiceClient interface { GetReadOnlySettings(ctx context.Context, in *GetReadOnlySettingsRequest, opts ...grpc.CallOption) (*GetReadOnlySettingsResponse, error) // ChangeSettings changes PMM Server settings. ChangeSettings(ctx context.Context, in *ChangeSettingsRequest, opts ...grpc.CallOption) (*ChangeSettingsResponse, error) + // ListLogParserPresets returns all OTEL log parser presets (built-in and custom). + ListLogParserPresets(ctx context.Context, in *ListLogParserPresetsRequest, opts ...grpc.CallOption) (*ListLogParserPresetsResponse, error) + // GetLogParserPreset returns a single preset by id. + GetLogParserPreset(ctx context.Context, in *GetLogParserPresetRequest, opts ...grpc.CallOption) (*GetLogParserPresetResponse, error) + // AddLogParserPreset creates a custom preset (built_in = false). + AddLogParserPreset(ctx context.Context, in *AddLogParserPresetRequest, opts ...grpc.CallOption) (*AddLogParserPresetResponse, error) + // ChangeLogParserPreset updates description and/or operator_yaml. built_in and name are not changed. + ChangeLogParserPreset(ctx context.Context, in *ChangeLogParserPresetRequest, opts ...grpc.CallOption) (*ChangeLogParserPresetResponse, error) + // RemoveLogParserPreset deletes a custom preset if no OTEL collector references it. + RemoveLogParserPreset(ctx context.Context, in *RemoveLogParserPresetRequest, opts ...grpc.CallOption) (*RemoveLogParserPresetResponse, error) } type serverServiceClient struct { @@ -169,6 +183,56 @@ func (c *serverServiceClient) ChangeSettings(ctx context.Context, in *ChangeSett return out, nil } +func (c *serverServiceClient) ListLogParserPresets(ctx context.Context, in *ListLogParserPresetsRequest, opts ...grpc.CallOption) (*ListLogParserPresetsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ListLogParserPresetsResponse) + err := c.cc.Invoke(ctx, ServerService_ListLogParserPresets_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) GetLogParserPreset(ctx context.Context, in *GetLogParserPresetRequest, opts ...grpc.CallOption) (*GetLogParserPresetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetLogParserPresetResponse) + err := c.cc.Invoke(ctx, ServerService_GetLogParserPreset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) AddLogParserPreset(ctx context.Context, in *AddLogParserPresetRequest, opts ...grpc.CallOption) (*AddLogParserPresetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AddLogParserPresetResponse) + err := c.cc.Invoke(ctx, ServerService_AddLogParserPreset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) ChangeLogParserPreset(ctx context.Context, in *ChangeLogParserPresetRequest, opts ...grpc.CallOption) (*ChangeLogParserPresetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(ChangeLogParserPresetResponse) + err := c.cc.Invoke(ctx, ServerService_ChangeLogParserPreset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serverServiceClient) RemoveLogParserPreset(ctx context.Context, in *RemoveLogParserPresetRequest, opts ...grpc.CallOption) (*RemoveLogParserPresetResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RemoveLogParserPresetResponse) + err := c.cc.Invoke(ctx, ServerService_RemoveLogParserPreset_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // ServerServiceServer is the server API for ServerService service. // All implementations must embed UnimplementedServerServiceServer // for forward compatibility. @@ -196,6 +260,16 @@ type ServerServiceServer interface { GetReadOnlySettings(context.Context, *GetReadOnlySettingsRequest) (*GetReadOnlySettingsResponse, error) // ChangeSettings changes PMM Server settings. ChangeSettings(context.Context, *ChangeSettingsRequest) (*ChangeSettingsResponse, error) + // ListLogParserPresets returns all OTEL log parser presets (built-in and custom). + ListLogParserPresets(context.Context, *ListLogParserPresetsRequest) (*ListLogParserPresetsResponse, error) + // GetLogParserPreset returns a single preset by id. + GetLogParserPreset(context.Context, *GetLogParserPresetRequest) (*GetLogParserPresetResponse, error) + // AddLogParserPreset creates a custom preset (built_in = false). + AddLogParserPreset(context.Context, *AddLogParserPresetRequest) (*AddLogParserPresetResponse, error) + // ChangeLogParserPreset updates description and/or operator_yaml. built_in and name are not changed. + ChangeLogParserPreset(context.Context, *ChangeLogParserPresetRequest) (*ChangeLogParserPresetResponse, error) + // RemoveLogParserPreset deletes a custom preset if no OTEL collector references it. + RemoveLogParserPreset(context.Context, *RemoveLogParserPresetRequest) (*RemoveLogParserPresetResponse, error) mustEmbedUnimplementedServerServiceServer() } @@ -209,42 +283,48 @@ type UnimplementedServerServiceServer struct{} func (UnimplementedServerServiceServer) Version(context.Context, *VersionRequest) (*VersionResponse, error) { return nil, status.Error(codes.Unimplemented, "method Version not implemented") } - func (UnimplementedServerServiceServer) Readiness(context.Context, *ReadinessRequest) (*ReadinessResponse, error) { return nil, status.Error(codes.Unimplemented, "method Readiness not implemented") } - func (UnimplementedServerServiceServer) LeaderHealthCheck(context.Context, *LeaderHealthCheckRequest) (*LeaderHealthCheckResponse, error) { return nil, status.Error(codes.Unimplemented, "method LeaderHealthCheck not implemented") } - func (UnimplementedServerServiceServer) CheckUpdates(context.Context, *CheckUpdatesRequest) (*CheckUpdatesResponse, error) { return nil, status.Error(codes.Unimplemented, "method CheckUpdates not implemented") } - func (UnimplementedServerServiceServer) ListChangeLogs(context.Context, *ListChangeLogsRequest) (*ListChangeLogsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListChangeLogs not implemented") } - func (UnimplementedServerServiceServer) StartUpdate(context.Context, *StartUpdateRequest) (*StartUpdateResponse, error) { return nil, status.Error(codes.Unimplemented, "method StartUpdate not implemented") } - func (UnimplementedServerServiceServer) UpdateStatus(context.Context, *UpdateStatusRequest) (*UpdateStatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method UpdateStatus not implemented") } - func (UnimplementedServerServiceServer) GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetSettings not implemented") } - func (UnimplementedServerServiceServer) GetReadOnlySettings(context.Context, *GetReadOnlySettingsRequest) (*GetReadOnlySettingsResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetReadOnlySettings not implemented") } - func (UnimplementedServerServiceServer) ChangeSettings(context.Context, *ChangeSettingsRequest) (*ChangeSettingsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ChangeSettings not implemented") } +func (UnimplementedServerServiceServer) ListLogParserPresets(context.Context, *ListLogParserPresetsRequest) (*ListLogParserPresetsResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ListLogParserPresets not implemented") +} +func (UnimplementedServerServiceServer) GetLogParserPreset(context.Context, *GetLogParserPresetRequest) (*GetLogParserPresetResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetLogParserPreset not implemented") +} +func (UnimplementedServerServiceServer) AddLogParserPreset(context.Context, *AddLogParserPresetRequest) (*AddLogParserPresetResponse, error) { + return nil, status.Error(codes.Unimplemented, "method AddLogParserPreset not implemented") +} +func (UnimplementedServerServiceServer) ChangeLogParserPreset(context.Context, *ChangeLogParserPresetRequest) (*ChangeLogParserPresetResponse, error) { + return nil, status.Error(codes.Unimplemented, "method ChangeLogParserPreset not implemented") +} +func (UnimplementedServerServiceServer) RemoveLogParserPreset(context.Context, *RemoveLogParserPresetRequest) (*RemoveLogParserPresetResponse, error) { + return nil, status.Error(codes.Unimplemented, "method RemoveLogParserPreset not implemented") +} func (UnimplementedServerServiceServer) mustEmbedUnimplementedServerServiceServer() {} func (UnimplementedServerServiceServer) testEmbeddedByValue() {} @@ -446,6 +526,96 @@ func _ServerService_ChangeSettings_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _ServerService_ListLogParserPresets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListLogParserPresetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).ListLogParserPresets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServerService_ListLogParserPresets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).ListLogParserPresets(ctx, req.(*ListLogParserPresetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_GetLogParserPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetLogParserPresetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).GetLogParserPreset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServerService_GetLogParserPreset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).GetLogParserPreset(ctx, req.(*GetLogParserPresetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_AddLogParserPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddLogParserPresetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).AddLogParserPreset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServerService_AddLogParserPreset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).AddLogParserPreset(ctx, req.(*AddLogParserPresetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_ChangeLogParserPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeLogParserPresetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).ChangeLogParserPreset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServerService_ChangeLogParserPreset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).ChangeLogParserPreset(ctx, req.(*ChangeLogParserPresetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ServerService_RemoveLogParserPreset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveLogParserPresetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServiceServer).RemoveLogParserPreset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ServerService_RemoveLogParserPreset_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServiceServer).RemoveLogParserPreset(ctx, req.(*RemoveLogParserPresetRequest)) + } + return interceptor(ctx, in, info, handler) +} + // ServerService_ServiceDesc is the grpc.ServiceDesc for ServerService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -493,6 +663,26 @@ var ServerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ChangeSettings", Handler: _ServerService_ChangeSettings_Handler, }, + { + MethodName: "ListLogParserPresets", + Handler: _ServerService_ListLogParserPresets_Handler, + }, + { + MethodName: "GetLogParserPreset", + Handler: _ServerService_GetLogParserPreset_Handler, + }, + { + MethodName: "AddLogParserPreset", + Handler: _ServerService_AddLogParserPreset_Handler, + }, + { + MethodName: "ChangeLogParserPreset", + Handler: _ServerService_ChangeLogParserPreset_Handler, + }, + { + MethodName: "RemoveLogParserPreset", + Handler: _ServerService_RemoveLogParserPreset_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "server/v1/server.proto", diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index 1ca1471e02b..80d5757a573 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -5336,7 +5336,8 @@ "AGENT_TYPE_RDS_EXPORTER", "AGENT_TYPE_AZURE_DATABASE_EXPORTER", "AGENT_TYPE_NOMAD_AGENT", - "AGENT_TYPE_RTA_MONGODB_AGENT" + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_OTEL_COLLECTOR" ], "type": "string", "default": "AGENT_TYPE_UNSPECIFIED", @@ -7450,6 +7451,55 @@ } }, "x-order": 18 + }, + "otel_collector": { + "type": "array", + "items": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + } + }, + "x-order": 19 } } } @@ -9021,6 +9071,50 @@ } }, "x-order": 16 + }, + "otel_collector": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 1 + }, + "log_file_paths": { + "description": "Deprecated: use log_sources for per-path preset. If log_sources is empty, these are used with preset \"raw\".", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 2 + }, + "log_sources": { + "type": "array", + "items": { + "description": "LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing).", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + }, + "preset": { + "description": "Preset name from log_parser_presets table, or \"raw\" for no operators.", + "type": "string", + "x-order": 1 + } + } + }, + "x-order": 3 + } + }, + "x-order": 17 } } } @@ -10982,6 +11076,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 17 } } } @@ -13085,6 +13225,52 @@ } }, "x-order": 18 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 19 } } } @@ -15143,6 +15329,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "ChangeOtelCollectorParams patches the single otel_collector agent per pmm-agent (merge_labels must not use keys log_sources or log_file_paths).", + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "merge_labels": { + "description": "Keys to merge into custom labels (overwrite per key). Reserved keys log_sources and log_file_paths are rejected.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 1 + }, + "add_log_sources": { + "description": "Append or update log sources; same path appears twice — last preset wins.", + "type": "array", + "items": { + "description": "LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing).", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + }, + "preset": { + "description": "Preset name from log_parser_presets table, or \"raw\" for no operators.", + "type": "string", + "x-order": 1 + } + } + }, + "x-order": 2 + }, + "remove_legacy_log_file_paths": { + "description": "If true, remove legacy log_file_paths label when present.", + "type": "boolean", + "x-order": 3 + } + }, + "x-order": 17 } } } @@ -17117,6 +17349,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 17 } } } @@ -31765,6 +32043,482 @@ } } }, + "/v1/server/log-parser-presets": { + "get": { + "description": "Returns all rows from log_parser_presets.", + "tags": [ + "ServerService" + ], + "summary": "List OTEL log parser presets", + "operationId": "ListLogParserPresets", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "presets": { + "type": "array", + "items": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "post": { + "description": "Creates a custom log parser preset.", + "tags": [ + "ServerService" + ], + "summary": "Add OTEL log parser preset", + "operationId": "AddLogParserPreset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "x-order": 0 + }, + "description": { + "type": "string", + "x-order": 1 + }, + "operator_yaml": { + "type": "string", + "x-order": 2 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/server/log-parser-presets/{id}": { + "get": { + "description": "Returns one log parser preset.", + "tags": [ + "ServerService" + ], + "summary": "Get OTEL log parser preset", + "operationId": "GetLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "put": { + "description": "Updates description and/or operator YAML for any preset.", + "tags": [ + "ServerService" + ], + "summary": "Change OTEL log parser preset", + "operationId": "ChangeLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "x-nullable": true, + "x-order": 0 + }, + "operator_yaml": { + "type": "string", + "x-nullable": true, + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "delete": { + "description": "Deletes a non-built-in preset when it is not in use.", + "tags": [ + "ServerService" + ], + "summary": "Remove OTEL log parser preset", + "operationId": "RemoveLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + } + }, "/v1/server/logs.zip": { "get": { "description": "Returns the PMM Server logs.", diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 6650f3b8266..0534c2f5f43 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -4378,7 +4378,8 @@ "AGENT_TYPE_RDS_EXPORTER", "AGENT_TYPE_AZURE_DATABASE_EXPORTER", "AGENT_TYPE_NOMAD_AGENT", - "AGENT_TYPE_RTA_MONGODB_AGENT" + "AGENT_TYPE_RTA_MONGODB_AGENT", + "AGENT_TYPE_OTEL_COLLECTOR" ], "type": "string", "default": "AGENT_TYPE_UNSPECIFIED", @@ -6492,6 +6493,55 @@ } }, "x-order": 18 + }, + "otel_collector": { + "type": "array", + "items": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + } + }, + "x-order": 19 } } } @@ -8063,6 +8113,50 @@ } }, "x-order": 16 + }, + "otel_collector": { + "type": "object", + "properties": { + "pmm_agent_id": { + "type": "string", + "x-order": 0 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 1 + }, + "log_file_paths": { + "description": "Deprecated: use log_sources for per-path preset. If log_sources is empty, these are used with preset \"raw\".", + "type": "array", + "items": { + "type": "string" + }, + "x-order": 2 + }, + "log_sources": { + "type": "array", + "items": { + "description": "LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing).", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + }, + "preset": { + "description": "Preset name from log_parser_presets table, or \"raw\" for no operators.", + "type": "string", + "x-order": 1 + } + } + }, + "x-order": 3 + } + }, + "x-order": 17 } } } @@ -10024,6 +10118,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 17 } } } @@ -12127,6 +12267,52 @@ } }, "x-order": 18 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 19 } } } @@ -14185,6 +14371,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "ChangeOtelCollectorParams patches the single otel_collector agent per pmm-agent (merge_labels must not use keys log_sources or log_file_paths).", + "type": "object", + "properties": { + "enable": { + "description": "Enable this Agent. Agents are enabled by default when they get added.", + "type": "boolean", + "x-nullable": true, + "x-order": 0 + }, + "merge_labels": { + "description": "Keys to merge into custom labels (overwrite per key). Reserved keys log_sources and log_file_paths are rejected.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 1 + }, + "add_log_sources": { + "description": "Append or update log sources; same path appears twice — last preset wins.", + "type": "array", + "items": { + "description": "LogSource binds a log file path to a parser preset (e.g. mysql_error or raw for no parsing).", + "type": "object", + "properties": { + "path": { + "type": "string", + "x-order": 0 + }, + "preset": { + "description": "Preset name from log_parser_presets table, or \"raw\" for no operators.", + "type": "string", + "x-order": 1 + } + } + }, + "x-order": 2 + }, + "remove_legacy_log_file_paths": { + "description": "If true, remove legacy log_file_paths label when present.", + "type": "boolean", + "x-order": 3 + } + }, + "x-order": 17 } } } @@ -16159,6 +16391,52 @@ } }, "x-order": 16 + }, + "otel_collector": { + "description": "OtelCollector runs on the same node as pmm-agent and collects logs (and later traces, profiles) for OTEL.", + "type": "object", + "properties": { + "agent_id": { + "type": "string", + "x-order": 0 + }, + "pmm_agent_id": { + "type": "string", + "x-order": 1 + }, + "disabled": { + "type": "boolean", + "x-order": 2 + }, + "custom_labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-order": 3 + }, + "status": { + "description": "AgentStatus represents actual Agent status.\n\n - AGENT_STATUS_STARTING: Agent is starting.\n - AGENT_STATUS_INITIALIZATION_ERROR: Agent encountered error when 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 has been stopped or disabled.\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_INITIALIZATION_ERROR", + "AGENT_STATUS_RUNNING", + "AGENT_STATUS_WAITING", + "AGENT_STATUS_STOPPING", + "AGENT_STATUS_DONE", + "AGENT_STATUS_UNKNOWN" + ], + "x-order": 4 + }, + "process_exec_path": { + "type": "string", + "x-order": 5 + } + }, + "x-order": 17 } } } @@ -30807,6 +31085,482 @@ } } }, + "/v1/server/log-parser-presets": { + "get": { + "description": "Returns all rows from log_parser_presets.", + "tags": [ + "ServerService" + ], + "summary": "List OTEL log parser presets", + "operationId": "ListLogParserPresets", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "presets": { + "type": "array", + "items": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "post": { + "description": "Creates a custom log parser preset.", + "tags": [ + "ServerService" + ], + "summary": "Add OTEL log parser preset", + "operationId": "AddLogParserPreset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "x-order": 0 + }, + "description": { + "type": "string", + "x-order": 1 + }, + "operator_yaml": { + "type": "string", + "x-order": 2 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + } + }, + "/v1/server/log-parser-presets/{id}": { + "get": { + "description": "Returns one log parser preset.", + "tags": [ + "ServerService" + ], + "summary": "Get OTEL log parser preset", + "operationId": "GetLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "put": { + "description": "Updates description and/or operator YAML for any preset.", + "tags": [ + "ServerService" + ], + "summary": "Change OTEL log parser preset", + "operationId": "ChangeLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "x-nullable": true, + "x-order": 0 + }, + "operator_yaml": { + "type": "string", + "x-nullable": true, + "x-order": 1 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": { + "preset": { + "description": "LogParserPreset is one row in PostgreSQL log_parser_presets (OTEL filelog operator YAML).", + "type": "object", + "properties": { + "id": { + "type": "string", + "x-order": 0 + }, + "name": { + "type": "string", + "x-order": 1 + }, + "description": { + "type": "string", + "x-order": 2 + }, + "operator_yaml": { + "type": "string", + "x-order": 3 + }, + "built_in": { + "type": "boolean", + "x-order": 4 + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-order": 5 + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-order": 6 + } + }, + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + }, + "delete": { + "description": "Deletes a non-built-in preset when it is not in use.", + "tags": [ + "ServerService" + ], + "summary": "Remove OTEL log parser preset", + "operationId": "RemoveLogParserPreset", + "parameters": [ + { + "type": "string", + "name": "id", + "in": "path", + "required": true + } + ], + "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": { + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }", + "type": "object", + "properties": { + "@type": { + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics.", + "type": "string", + "x-order": 0 + } + }, + "additionalProperties": {} + }, + "x-order": 2 + } + } + } + } + } + } + }, "/v1/server/logs.zip": { "get": { "description": "Returns the PMM Server logs.", diff --git a/api/uievents/v1/server.pb.go b/api/uievents/v1/server.pb.go index 41d144b9c29..6f3472d1deb 100644 --- a/api/uievents/v1/server.pb.go +++ b/api/uievents/v1/server.pb.go @@ -7,14 +7,13 @@ package uieventsv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -468,19 +467,16 @@ func file_uievents_v1_server_proto_rawDescGZIP() []byte { return file_uievents_v1_server_proto_rawDescData } -var ( - file_uievents_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_uievents_v1_server_proto_goTypes = []any{ - (*NotificationEvent)(nil), // 0: uievents.v1.NotificationEvent - (*FetchingEvent)(nil), // 1: uievents.v1.FetchingEvent - (*DashboardUsageEvent)(nil), // 2: uievents.v1.DashboardUsageEvent - (*UserFlowEvent)(nil), // 3: uievents.v1.UserFlowEvent - (*StoreRequest)(nil), // 4: uievents.v1.StoreRequest - (*StoreResponse)(nil), // 5: uievents.v1.StoreResponse - nil, // 6: uievents.v1.UserFlowEvent.ParamsEntry - } -) - +var file_uievents_v1_server_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_uievents_v1_server_proto_goTypes = []any{ + (*NotificationEvent)(nil), // 0: uievents.v1.NotificationEvent + (*FetchingEvent)(nil), // 1: uievents.v1.FetchingEvent + (*DashboardUsageEvent)(nil), // 2: uievents.v1.DashboardUsageEvent + (*UserFlowEvent)(nil), // 3: uievents.v1.UserFlowEvent + (*StoreRequest)(nil), // 4: uievents.v1.StoreRequest + (*StoreResponse)(nil), // 5: uievents.v1.StoreResponse + nil, // 6: uievents.v1.UserFlowEvent.ParamsEntry +} var file_uievents_v1_server_proto_depIdxs = []int32{ 6, // 0: uievents.v1.UserFlowEvent.params:type_name -> uievents.v1.UserFlowEvent.ParamsEntry 0, // 1: uievents.v1.StoreRequest.notifications:type_name -> uievents.v1.NotificationEvent diff --git a/api/uievents/v1/server.pb.gw.go b/api/uievents/v1/server.pb.gw.go index 7a044e6b3ba..e968c8546df 100644 --- a/api/uievents/v1/server.pb.gw.go +++ b/api/uievents/v1/server.pb.gw.go @@ -148,6 +148,10 @@ func RegisterUIEventsServiceHandlerClient(ctx context.Context, mux *runtime.Serv return nil } -var pattern_UIEventsService_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) +var ( + pattern_UIEventsService_Store_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "ui-events", "Store"}, "")) +) -var forward_UIEventsService_Store_0 = runtime.ForwardResponseMessage +var ( + forward_UIEventsService_Store_0 = runtime.ForwardResponseMessage +) diff --git a/api/uievents/v1/server.swagger.json b/api/uievents/v1/server.swagger.json new file mode 100644 index 00000000000..b77aec150ac --- /dev/null +++ b/api/uievents/v1/server.swagger.json @@ -0,0 +1,202 @@ +{ + "swagger": "2.0", + "info": { + "title": "uievents/v1/server.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "UIEventsService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/ui-events/Store": { + "post": { + "summary": "Persist UI events", + "description": "Persists received UI events for further processing.", + "operationId": "Store", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1StoreResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1StoreRequest" + } + } + ], + "tags": [ + "UIEventsService" + ] + } + } + }, + "definitions": { + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1DashboardUsageEvent": { + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "title": { + "type": "string" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "load_time": { + "type": "integer", + "format": "int32" + }, + "location": { + "type": "string" + }, + "location_params": { + "type": "string" + } + } + }, + "v1FetchingEvent": { + "type": "object", + "properties": { + "component": { + "type": "string" + }, + "load_time": { + "type": "integer", + "format": "int32" + }, + "location": { + "type": "string" + }, + "location_params": { + "type": "string" + } + } + }, + "v1NotificationEvent": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "text": { + "type": "string" + }, + "location": { + "type": "string" + }, + "location_params": { + "type": "string" + } + } + }, + "v1StoreRequest": { + "type": "object", + "properties": { + "notifications": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1NotificationEvent" + } + }, + "fetching": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1FetchingEvent" + } + }, + "dashboard_usage": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1DashboardUsageEvent" + } + }, + "user_flow_events": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1UserFlowEvent" + } + } + } + }, + "v1StoreResponse": { + "type": "object" + }, + "v1UserFlowEvent": { + "type": "object", + "properties": { + "flow_id": { + "type": "string" + }, + "story_id": { + "type": "string" + }, + "event": { + "type": "string" + }, + "params": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } +} diff --git a/api/uievents/v1/server_grpc.pb.go b/api/uievents/v1/server_grpc.pb.go index f4343f61ac3..3a3848baa05 100644 --- a/api/uievents/v1/server_grpc.pb.go +++ b/api/uievents/v1/server_grpc.pb.go @@ -8,7 +8,6 @@ package uieventsv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/api/user/v1/json/client/user_service/get_user_parameters.go b/api/user/v1/json/client/user_service/get_user_parameters.go index 9d7ebe5ff7d..8bf63bd7f8b 100644 --- a/api/user/v1/json/client/user_service/get_user_parameters.go +++ b/api/user/v1/json/client/user_service/get_user_parameters.go @@ -115,6 +115,7 @@ func (o *GetUserParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *GetUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/get_user_responses.go b/api/user/v1/json/client/user_service/get_user_responses.go index 44687c0b774..15440682187 100644 --- a/api/user/v1/json/client/user_service/get_user_responses.go +++ b/api/user/v1/json/client/user_service/get_user_responses.go @@ -105,6 +105,7 @@ func (o *GetUserOK) GetPayload() *GetUserOKBody { } func (o *GetUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetUserOKBody) // response payload @@ -178,6 +179,7 @@ func (o *GetUserDefault) GetPayload() *GetUserDefaultBody { } func (o *GetUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(GetUserDefaultBody) // response payload @@ -193,6 +195,7 @@ GetUserDefaultBody get user default body swagger:model GetUserDefaultBody */ type GetUserDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -262,7 +265,9 @@ func (o *GetUserDefaultBody) ContextValidate(ctx context.Context, formats strfmt } func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -282,6 +287,7 @@ func (o *GetUserDefaultBody) contextValidateDetails(ctx context.Context, formats return err } } + } return nil @@ -310,6 +316,7 @@ GetUserDefaultBodyDetailsItems0 get user default body details items0 swagger:model GetUserDefaultBodyDetailsItems0 */ type GetUserDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -321,6 +328,7 @@ type GetUserDefaultBodyDetailsItems0 struct { func (o *GetUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -358,6 +366,7 @@ func (o *GetUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o GetUserDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -421,6 +430,7 @@ GetUserOKBody get user OK body swagger:model GetUserOKBody */ type GetUserOKBody struct { + // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/json/client/user_service/list_users_parameters.go b/api/user/v1/json/client/user_service/list_users_parameters.go index 1d3c35510b7..d5b20ea07cd 100644 --- a/api/user/v1/json/client/user_service/list_users_parameters.go +++ b/api/user/v1/json/client/user_service/list_users_parameters.go @@ -115,6 +115,7 @@ func (o *ListUsersParams) SetHTTPClient(client *http.Client) { // WriteToRequest writes these params to a swagger request func (o *ListUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/list_users_responses.go b/api/user/v1/json/client/user_service/list_users_responses.go index ae9f445a45b..464f768ba29 100644 --- a/api/user/v1/json/client/user_service/list_users_responses.go +++ b/api/user/v1/json/client/user_service/list_users_responses.go @@ -104,6 +104,7 @@ func (o *ListUsersOK) GetPayload() *ListUsersOKBody { } func (o *ListUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListUsersOKBody) // response payload @@ -177,6 +178,7 @@ func (o *ListUsersDefault) GetPayload() *ListUsersDefaultBody { } func (o *ListUsersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(ListUsersDefaultBody) // response payload @@ -192,6 +194,7 @@ ListUsersDefaultBody list users default body swagger:model ListUsersDefaultBody */ type ListUsersDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -261,7 +264,9 @@ func (o *ListUsersDefaultBody) ContextValidate(ctx context.Context, formats strf } func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -281,6 +286,7 @@ func (o *ListUsersDefaultBody) contextValidateDetails(ctx context.Context, forma return err } } + } return nil @@ -309,6 +315,7 @@ ListUsersDefaultBodyDetailsItems0 list users default body details items0 swagger:model ListUsersDefaultBodyDetailsItems0 */ type ListUsersDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -320,6 +327,7 @@ type ListUsersDefaultBodyDetailsItems0 struct { func (o *ListUsersDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -357,6 +365,7 @@ func (o *ListUsersDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o ListUsersDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -420,6 +429,7 @@ ListUsersOKBody list users OK body swagger:model ListUsersOKBody */ type ListUsersOKBody struct { + // users Users []*ListUsersOKBodyUsersItems0 `json:"users"` } @@ -483,7 +493,9 @@ func (o *ListUsersOKBody) ContextValidate(ctx context.Context, formats strfmt.Re } func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Users); i++ { + if o.Users[i] != nil { if swag.IsZero(o.Users[i]) { // not required @@ -503,6 +515,7 @@ func (o *ListUsersOKBody) contextValidateUsers(ctx context.Context, formats strf return err } } + } return nil @@ -531,6 +544,7 @@ ListUsersOKBodyUsersItems0 list users OK body users items0 swagger:model ListUsersOKBodyUsersItems0 */ type ListUsersOKBodyUsersItems0 struct { + // user id UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/json/client/user_service/update_user_parameters.go b/api/user/v1/json/client/user_service/update_user_parameters.go index c1e0a19fa5d..d98c9c45bb0 100644 --- a/api/user/v1/json/client/user_service/update_user_parameters.go +++ b/api/user/v1/json/client/user_service/update_user_parameters.go @@ -60,6 +60,7 @@ UpdateUserParams contains all the parameters to send to the API endpoint Typically these are written to a http.Request. */ type UpdateUserParams struct { + // Body. Body UpdateUserBody @@ -129,6 +130,7 @@ func (o *UpdateUserParams) SetBody(body UpdateUserBody) { // WriteToRequest writes these params to a swagger request func (o *UpdateUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + if err := r.SetTimeout(o.timeout); err != nil { return err } diff --git a/api/user/v1/json/client/user_service/update_user_responses.go b/api/user/v1/json/client/user_service/update_user_responses.go index f169cbad858..73f31851bae 100644 --- a/api/user/v1/json/client/user_service/update_user_responses.go +++ b/api/user/v1/json/client/user_service/update_user_responses.go @@ -105,6 +105,7 @@ func (o *UpdateUserOK) GetPayload() *UpdateUserOKBody { } func (o *UpdateUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateUserOKBody) // response payload @@ -178,6 +179,7 @@ func (o *UpdateUserDefault) GetPayload() *UpdateUserDefaultBody { } func (o *UpdateUserDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(UpdateUserDefaultBody) // response payload @@ -193,6 +195,7 @@ UpdateUserBody update user body swagger:model UpdateUserBody */ type UpdateUserBody struct { + // Product Tour ProductTourCompleted *bool `json:"product_tour_completed,omitempty"` @@ -236,6 +239,7 @@ UpdateUserDefaultBody update user default body swagger:model UpdateUserDefaultBody */ type UpdateUserDefaultBody struct { + // code Code int32 `json:"code,omitempty"` @@ -305,7 +309,9 @@ func (o *UpdateUserDefaultBody) ContextValidate(ctx context.Context, formats str } func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, formats strfmt.Registry) error { + for i := 0; i < len(o.Details); i++ { + if o.Details[i] != nil { if swag.IsZero(o.Details[i]) { // not required @@ -325,6 +331,7 @@ func (o *UpdateUserDefaultBody) contextValidateDetails(ctx context.Context, form return err } } + } return nil @@ -353,6 +360,7 @@ UpdateUserDefaultBodyDetailsItems0 update user default body details items0 swagger:model UpdateUserDefaultBodyDetailsItems0 */ type UpdateUserDefaultBodyDetailsItems0 struct { + // at type AtType string `json:"@type,omitempty"` @@ -364,6 +372,7 @@ type UpdateUserDefaultBodyDetailsItems0 struct { func (o *UpdateUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // stage 1, bind the properties var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -401,6 +410,7 @@ func (o *UpdateUserDefaultBodyDetailsItems0) UnmarshalJSON(data []byte) error { // MarshalJSON marshals this object with additional properties into a JSON object func (o UpdateUserDefaultBodyDetailsItems0) MarshalJSON() ([]byte, error) { var stage1 struct { + // at type AtType string `json:"@type,omitempty"` } @@ -464,6 +474,7 @@ UpdateUserOKBody update user OK body swagger:model UpdateUserOKBody */ type UpdateUserOKBody struct { + // User ID UserID int64 `json:"user_id,omitempty"` diff --git a/api/user/v1/user.pb.go b/api/user/v1/user.pb.go index 12a954ca3f4..ea4c06a469e 100644 --- a/api/user/v1/user.pb.go +++ b/api/user/v1/user.pb.go @@ -7,15 +7,14 @@ package userv1 import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" ) const ( @@ -494,20 +493,17 @@ func file_user_v1_user_proto_rawDescGZIP() []byte { return file_user_v1_user_proto_rawDescData } -var ( - file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 7) - file_user_v1_user_proto_goTypes = []any{ - (*GetUserRequest)(nil), // 0: user.v1.GetUserRequest - (*GetUserResponse)(nil), // 1: user.v1.GetUserResponse - (*UpdateUserRequest)(nil), // 2: user.v1.UpdateUserRequest - (*UpdateUserResponse)(nil), // 3: user.v1.UpdateUserResponse - (*ListUsersRequest)(nil), // 4: user.v1.ListUsersRequest - (*ListUsersResponse)(nil), // 5: user.v1.ListUsersResponse - (*ListUsersResponse_UserDetail)(nil), // 6: user.v1.ListUsersResponse.UserDetail - (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp - } -) - +var file_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_user_v1_user_proto_goTypes = []any{ + (*GetUserRequest)(nil), // 0: user.v1.GetUserRequest + (*GetUserResponse)(nil), // 1: user.v1.GetUserResponse + (*UpdateUserRequest)(nil), // 2: user.v1.UpdateUserRequest + (*UpdateUserResponse)(nil), // 3: user.v1.UpdateUserResponse + (*ListUsersRequest)(nil), // 4: user.v1.ListUsersRequest + (*ListUsersResponse)(nil), // 5: user.v1.ListUsersResponse + (*ListUsersResponse_UserDetail)(nil), // 6: user.v1.ListUsersResponse.UserDetail + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp +} var file_user_v1_user_proto_depIdxs = []int32{ 7, // 0: user.v1.GetUserResponse.snoozed_at:type_name -> google.protobuf.Timestamp 7, // 1: user.v1.UpdateUserResponse.snoozed_at:type_name -> google.protobuf.Timestamp diff --git a/api/user/v1/user.swagger.json b/api/user/v1/user.swagger.json new file mode 100644 index 00000000000..736cc43bfc0 --- /dev/null +++ b/api/user/v1/user.swagger.json @@ -0,0 +1,243 @@ +{ + "swagger": "2.0", + "info": { + "title": "User API", + "version": "version not set" + }, + "tags": [ + { + "name": "UserService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/users": { + "get": { + "summary": "List all users", + "description": "Retrieve user details for all users from PMM server", + "operationId": "ListUsers", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListUsersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "UserService" + ] + } + }, + "/v1/users/me": { + "get": { + "summary": "Get user details", + "description": "Retrieve user details from PMM server", + "operationId": "GetUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1GetUserResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "UserService" + ] + }, + "put": { + "summary": "Update a user", + "description": "Update user details in PMM server", + "operationId": "UpdateUser", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1UpdateUserResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UpdateUserRequest" + } + } + ], + "tags": [ + "UserService" + ] + } + } + }, + "definitions": { + "ListUsersResponseUserDetail": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "format": "int64" + }, + "role_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of role IDs assigned to the user." + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1GetUserResponse": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "format": "int64", + "title": "User ID" + }, + "product_tour_completed": { + "type": "boolean", + "title": "Product Tour" + }, + "alerting_tour_completed": { + "type": "boolean", + "title": "Alerting Tour" + }, + "snoozed_pmm_version": { + "type": "string", + "title": "Snoozed PMM version update" + }, + "snoozed_at": { + "type": "string", + "format": "date-time", + "title": "Timestamp of last snooze" + }, + "snooze_count": { + "type": "integer", + "format": "int64", + "title": "Number of times the update was snoozed" + } + } + }, + "v1ListUsersResponse": { + "type": "object", + "properties": { + "users": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ListUsersResponseUserDetail" + } + } + } + }, + "v1UpdateUserRequest": { + "type": "object", + "properties": { + "product_tour_completed": { + "type": "boolean", + "x-nullable": true, + "title": "Product Tour" + }, + "alerting_tour_completed": { + "type": "boolean", + "x-nullable": true, + "title": "Alerting Tour" + }, + "snoozed_pmm_version": { + "type": "string", + "x-nullable": true, + "title": "Snooze update alert for a PMM version" + } + } + }, + "v1UpdateUserResponse": { + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "format": "int64", + "title": "User ID" + }, + "product_tour_completed": { + "type": "boolean", + "title": "Product Tour" + }, + "alerting_tour_completed": { + "type": "boolean", + "title": "Alerting Tour" + }, + "snoozed_pmm_version": { + "type": "string", + "title": "Snooze update alert for a PMM version" + }, + "snoozed_at": { + "type": "string", + "format": "date-time", + "title": "Timestamp of last snooze" + }, + "snooze_count": { + "type": "integer", + "format": "int64", + "title": "Number of times the update was snoozed" + } + } + } + } +} diff --git a/api/user/v1/user_grpc.pb.go b/api/user/v1/user_grpc.pb.go index 4201de2b381..5166f03fc21 100644 --- a/api/user/v1/user_grpc.pb.go +++ b/api/user/v1/user_grpc.pb.go @@ -8,7 +8,6 @@ package userv1 import ( context "context" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -96,11 +95,9 @@ type UnimplementedUserServiceServer struct{} func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetUser not implemented") } - func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error) { return nil, status.Error(codes.Unimplemented, "method UpdateUser not implemented") } - func (UnimplementedUserServiceServer) ListUsers(context.Context, *ListUsersRequest) (*ListUsersResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListUsers not implemented") } diff --git a/build/ansible/pmm-docker/post-build.yml b/build/ansible/pmm-docker/post-build.yml index 483e3f7bcea..2d608d2b8c1 100644 --- a/build/ansible/pmm-docker/post-build.yml +++ b/build/ansible/pmm-docker/post-build.yml @@ -120,6 +120,14 @@ group: root mode: 0775 + - name: Create '/srv/otelcol' directory for otel-collector config + file: + path: /srv/otelcol + state: directory + owner: pmm + group: root + mode: 0775 + - name: Set ownership for Grafana plugins directory file: path: /srv/grafana/plugins diff --git a/build/ansible/roles/grafana/files/datasources.yml b/build/ansible/roles/grafana/files/datasources.yml index de39551a3ba..1eacda7e859 100644 --- a/build/ansible/roles/grafana/files/datasources.yml +++ b/build/ansible/roles/grafana/files/datasources.yml @@ -51,3 +51,17 @@ datasources: tlsSkipVerify: false secureJsonData: password: ${PMM_CLICKHOUSE_PASSWORD} + +# OTEL logs (and later traces) stored in ClickHouse otel.logs +- name: ClickHouse-OTEL + orgId: 1 + version: 2 + type: grafana-clickhouse-datasource + jsonData: + username: ${PMM_CLICKHOUSE_USER} + port: ${PMM_CLICKHOUSE_PORT} + host: ${PMM_CLICKHOUSE_HOST} + defaultDatabase: otel + tlsSkipVerify: false + secureJsonData: + password: ${PMM_CLICKHOUSE_PASSWORD} diff --git a/build/ansible/roles/nginx/files/conf.d/pmm.conf b/build/ansible/roles/nginx/files/conf.d/pmm.conf index 87be969e376..4814305c4bb 100644 --- a/build/ansible/roles/nginx/files/conf.d/pmm.conf +++ b/build/ansible/roles/nginx/files/conf.d/pmm.conf @@ -40,6 +40,11 @@ server 127.0.0.1:3000; } + upstream otel-collector { + server 127.0.0.1:4318; + keepalive 32; + } + server { listen 8080; listen 8443 ssl http2; @@ -200,6 +205,14 @@ } # Nomad + # OTLP HTTP receiver (auth via auth_request); agents send logs/traces here. + location /otlp/ { + proxy_pass http://otel-collector/; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + location /nomad/ { rewrite /nomad/(.*) /$1 break; proxy_pass https://nomad-server-json; diff --git a/build/docker/server/entrypoint.sh b/build/docker/server/entrypoint.sh index a5b6b15198b..267f7937669 100755 --- a/build/docker/server/entrypoint.sh +++ b/build/docker/server/entrypoint.sh @@ -91,7 +91,7 @@ declare DIST_FILE=/srv/pmm-distribution if [ ! -f "$DIST_FILE" ]; then echo -n "$PMM_DISTRIBUTION_METHOD" > "$DIST_FILE" echo "Initializing /srv..." - mkdir -p /srv/{backup,clickhouse,grafana,logs,nginx,prometheus,victoriametrics} + mkdir -p /srv/{backup,clickhouse,grafana,logs,nginx,otelcol,prometheus,victoriametrics} echo "Copying grafana plugins and the VERSION file..." mkdir -p /srv/grafana/plugins cp -r /usr/share/percona-dashboards/panels/* /srv/grafana/plugins diff --git a/build/packages/deb/files b/build/packages/deb/files index 3f0a5fb09f4..05b833c768e 100644 --- a/build/packages/deb/files +++ b/build/packages/deb/files @@ -42,6 +42,7 @@ install -m 0755 bin/pt-mysql-summary $RPM_BUILD_ROOT/usr/local/percona/pmm/tools install -m 0755 bin/pt-mongodb-summary $RPM_BUILD_ROOT/usr/local/percona/pmm/tools/ install -m 0755 bin/pt-pg-summary $RPM_BUILD_ROOT/usr/local/percona/pmm/tools/ install -m 0755 bin/nomad $RPM_BUILD_ROOT/usr/local/percona/pmm/tools/ +install -m 0755 bin/otelcol-contrib $RPM_BUILD_ROOT/usr/local/percona/pmm/tools/ install -m 0660 example.prom $RPM_BUILD_ROOT/usr/local/percona/pmm/collectors/textfile-collector/low-resolution/ install -m 0660 example.prom $RPM_BUILD_ROOT/usr/local/percona/pmm/collectors/textfile-collector/medium-resolution/ diff --git a/build/packages/deb/install b/build/packages/deb/install index fd6bb19f782..a089e34cc37 100644 --- a/build/packages/deb/install +++ b/build/packages/deb/install @@ -5,6 +5,7 @@ pt-mysql-summary /usr/local/percona/pmm/tools/ pt-mongodb-summary /usr/local/percona/pmm/tools/ pt-pg-summary /usr/local/percona/pmm/tools/ nomad /usr/local/percona/pmm/tools/ +otelcol-contrib /usr/local/percona/pmm/tools/ node_exporter /usr/local/percona/pmm/exporters/ mysqld_exporter /usr/local/percona/pmm/exporters/ postgres_exporter /usr/local/percona/pmm/exporters/ diff --git a/build/packages/rpm/client/pmm-client.spec b/build/packages/rpm/client/pmm-client.spec index 5ddbf30c406..67c3b18b2f2 100644 --- a/build/packages/rpm/client/pmm-client.spec +++ b/build/packages/rpm/client/pmm-client.spec @@ -111,6 +111,7 @@ install -m 0755 bin/pt-mysql-summary $RPM_BUILD_ROOT/usr/local/percona/pmm/tools install -m 0755 bin/pt-mongodb-summary $RPM_BUILD_ROOT/usr/local/percona/pmm/tools install -m 0755 bin/pt-pg-summary $RPM_BUILD_ROOT/usr/local/percona/pmm/tools install -m 0755 bin/nomad $RPM_BUILD_ROOT/usr/local/percona/pmm/tools +install -m 0755 bin/otelcol-contrib $RPM_BUILD_ROOT/usr/local/percona/pmm/tools install -m 0660 example.prom $RPM_BUILD_ROOT/usr/local/percona/pmm/collectors/textfile-collector/low-resolution/ install -m 0660 example.prom $RPM_BUILD_ROOT/usr/local/percona/pmm/collectors/textfile-collector/medium-resolution/ install -m 0660 example.prom $RPM_BUILD_ROOT/usr/local/percona/pmm/collectors/textfile-collector/high-resolution/ diff --git a/build/scripts/build-client-binary b/build/scripts/build-client-binary index 8fa3edf58f6..1849706b7e0 100755 --- a/build/scripts/build-client-binary +++ b/build/scripts/build-client-binary @@ -169,6 +169,31 @@ main() { cp -r ${tmp_dir}/go/src/github.com/hashicorp/nomad/pkg/linux_*/nomad ${binary_dir}/bin/nomad cp -r ${tmp_dir}/go/src/github.com/oliver006/redis_exporter/redis_exporter ${binary_dir}/bin/valkey_exporter + # OpenTelemetry Collector Contrib (prebuilt binary for OTEL) + case "$(uname -m)" in + x86_64) otelcol_arch=linux_amd64 ;; + aarch64) otelcol_arch=linux_arm64 ;; + *) echo "Unsupported arch for otelcol-contrib: $(uname -m)"; exit 1 ;; + esac + otelcol_tarball="${source_dir}/otelcol-contrib_${otelcol_contrib_version}_${otelcol_arch}.tar.gz" + if [ ! -x "${binary_dir}/bin/otelcol-contrib" ]; then + if [ ! -f "${otelcol_tarball}" ]; then + curl -fsSL -o "${otelcol_tarball}" \ + "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v${otelcol_contrib_version}/otelcol-contrib_${otelcol_contrib_version}_${otelcol_arch}.tar.gz" + fi + otelcol_extract_dir=$(mktemp -d) + tar -xzf "${otelcol_tarball}" -C "${otelcol_extract_dir}" + otelcol_binary=$(find "${otelcol_extract_dir}" -name 'otelcol-contrib' -type f | head -1) + if [ -z "${otelcol_binary}" ] || [ ! -f "${otelcol_binary}" ]; then + echo "Could not find otelcol-contrib binary inside ${otelcol_tarball}" + rm -rf "${otelcol_extract_dir}" + exit 1 + fi + cp "${otelcol_binary}" "${binary_dir}/bin/otelcol-contrib" + chmod 0755 "${binary_dir}/bin/otelcol-contrib" + rm -rf "${otelcol_extract_dir}" + fi + if [[ "${BUILD_TYPE}" = "dynamic" ]]; then rm -f ${dynamic_binary_tarball} mkdir -p $(dirname ${dynamic_binary_tarball}) || : diff --git a/build/scripts/install_tarball b/build/scripts/install_tarball index ac2f8774ed4..e6d37393e83 100755 --- a/build/scripts/install_tarball +++ b/build/scripts/install_tarball @@ -82,7 +82,7 @@ for FILE in "${PWD}"/bin/*; do FILE=$(basename "${FILE}") if [ "${FILE}" = "pmm-admin" ] || [ "${FILE}" = "pmm-agent" ] || [ "${FILE}" = "pmm-agent-entrypoint" ]; then ${INSTALL_COMMAND} -m 0755 "${PWD}/bin/${FILE}" "${PMM_DIR}"/bin - elif [[ "${FILE}" =~ pt-summary|pt-mysql-summary|pt-pg-summary|pt-mongodb-summary|nomad ]]; then + elif [[ "${FILE}" =~ pt-summary|pt-mysql-summary|pt-pg-summary|pt-mongodb-summary|nomad|otelcol-contrib ]]; then ${INSTALL_COMMAND} -m 0755 "${PWD}/bin/${FILE}" "${PMM_DIR}"/tools else ${INSTALL_COMMAND} -m 0755 "${PWD}/bin/${FILE}" "${PMM_DIR}"/exporters diff --git a/build/scripts/vars b/build/scripts/vars index f3831575b18..f2490ddbc4a 100644 --- a/build/scripts/vars +++ b/build/scripts/vars @@ -70,3 +70,6 @@ vmagent_commit_hash=bcd5d31b54598dfb3c43420c2b3abe4f0a812493 redis_exporter_commit_hash=1f3d89a11af0f0fd10f4f6e56b24a1687ae85776 # https://github.com/hashicorp/nomad/releases/tag/v1.11.3 nomad_commit_hash=173ab08a0210789da531847c4ce3c3518f7fb34b +# OpenTelemetry Collector Contrib (prebuilt binary for PMM client/server OTEL) +# https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.148.0 +otelcol_contrib_version=0.148.0 diff --git a/dev/otel/README.md b/dev/otel/README.md new file mode 100644 index 00000000000..cd454b8bf2d --- /dev/null +++ b/dev/otel/README.md @@ -0,0 +1,70 @@ +# OTEL (OpenTelemetry) in PMM + +Phase 1 adds **log collection** via an OTEL collector: agents send logs to the PMM server, which stores them in ClickHouse. + +## Architecture + +- **Server supervisord OTEL** = **receiver only**: OTLP receiver (for all agents) → transform (sets `pmm_source` from `node_name`) → batch → ClickHouse. No filelog on the server; all log collection uses the same pipeline below. +- **All log collection** (including server logs) is done by **pmm-agent** (pmm-client) using **filelog** receivers and **parser presets** from the DB. On the server host there are two processes: (1) supervisord `otel-collector` (receiver only), (2) pmm-agent’s OTEL collector (filelog for server logs, e.g. nginx, grafana, pmm-managed, postgres), which sends OTLP to localhost. Remote nodes run only the pmm-agent OTEL collector and send to the server. +- **Presets** live in the `log_parser_presets` table (PostgreSQL). The server’s default log_sources (nginx, grafana, etc.) are created in **UpdateConfigurations** when OTEL is enabled (idempotent: create OTEL collector agent on the server node only if missing). +- **ClickHouse**: database `otel`, table `otel.logs` with configurable TTL (retention). Schema is created automatically when OTEL is enabled. + +## Enabling OTEL + +1. **Server**: Enable the OTEL collector and set log retention in PMM settings. This starts the supervisord `otel-collector` (receiver), ensures the `otel` ClickHouse schema exists, and ensures the **server node** has an OTEL collector agent with default log_sources (nginx, grafana, pmm-managed, pmm-agent, postgres) so server logs are collected by pmm-agent on the server. +2. **Agent** (any node, including the server): Run `pmm-admin add otel` with log paths and presets. Example: + ```bash + # Raw logs (no parsing): + pmm-admin add otel --log-file-paths=/path/to/app.log + + # One preset for all paths: + pmm-admin add otel --log-file-paths=/var/log/mysql/error.log --parser-preset=mysql_error + + # Per-path preset (path:preset pairs): + pmm-admin add otel --log-sources=/var/log/mysql/error.log:mysql_error,/var/log/messages:syslog_mysql_systemd,/var/log/app.log:raw + ``` + Run `pmm-admin add otel --help` to see all available presets. If no log paths or log-sources are given, only OTLP receivers are configured (no file tailing). + +## Log parser presets + +Presets define the OTEL filelog operator chain (regex, time, severity, etc.) and are stored in `log_parser_presets`. Each path can be bound to a preset (or `raw` for no parsing). + +- **Built-in presets**: `mysql_error`, `syslog_mysql_systemd` (journal/syslog-style ISO8601 lines: `timestamp host tag[pid]: message`), `nginx_access`, `nginx_error`, `grafana`, `pmm_managed`, `pmm_agent`, `postgres`, `clickhouse_server`, `otel_collector`, `supervisord`, `raw`. Manage presets in the UI under **Configuration → OTEL → Log parser presets** (or add rows via API / migrations). +- **Storage**: Table columns: `id`, `name`, `description`, `operator_yaml`, `built_in`, timestamps. The server validates preset names and stores `log_sources` as JSON in the agent’s `custom_labels`. +- **API**: Add/change OTEL collector with `log_sources`: list of `{ path, preset }`. Config generator groups paths by preset and emits one filelog receiver per preset. + +### Why we did this + +- **Single model**: Server and remote nodes both use pmm-agent + DB presets; no hardcoded server-side filelog. +- **Per-path preset**: Different files can use different parsers. +- **Extensible**: New preset = new row in `log_parser_presets` (or a new migration for built-ins). + +## Configuration + +- **Settings**: `Otel.CollectorEnabled`, `Otel.LogsRetentionDays` (default 7). +- **Agent config**: In the OTEL collector agent’s `custom_labels`: **Legacy** `log_file_paths` (treated as `raw`); **Current** `log_sources` = JSON array of `{"path":"...","preset":"..."}`. + +## Implemented vs remaining + +### Implemented + +- Server-side OTEL collector (supervisord): **receiver only** (OTLP → transform → batch → ClickHouse); configurable TTL. +- Server log collection by pmm-agent on the server with default log_sources (nginx, grafana, pmm-managed, pmm-agent, postgres), created in UpdateConfigurations when OTEL is enabled. +- Client-side OTEL collector (pmm-agent), config pushed from server; filelog receivers with per-preset operator YAML from `log_parser_presets`. +- `log_parser_presets` table: migration 127 (`mysql_error`), 128/129 (nginx, grafana, PMM, postgres, clickhouse_server, otel_collector, supervisord), migration 130 (`syslog_mysql_systemd`). +- API: `LogSource`, `log_sources` in `AddOtelCollectorParams`; validation and storage in custom_labels. +- `pmm-admin add otel` with `--log-file-paths`, `--log-sources`, `--parser-preset`; help lists all built-in presets. +- Backward compatibility: agents with only `log_file_paths` still work (treated as raw). + +### Still to implement (future) + +- **More built-in presets**: e.g. mysql_general, mongodb, orchestrator. + +### Recently added + +- **Preset management API** and **UI** (Configuration → OTEL → Log parser presets): list/get/add/change/remove custom presets; built-in rows editable; delete blocked while an OTEL collector still references the preset. +- **Traces, profiles, eBPF**: Same agent type and server pipeline can be extended later. + +## See also + +- [TESTING.md](TESTING.md) for how to test Phase 1. diff --git a/dev/otel/TESTING.md b/dev/otel/TESTING.md new file mode 100644 index 00000000000..ebca1803551 --- /dev/null +++ b/dev/otel/TESTING.md @@ -0,0 +1,52 @@ +# Testing OTEL Phase 1 + +## Prerequisites + +1. Run **make gen** from the repo root so that generated API types (e.g. `AddAgentParamsBodyOtelCollector`, `AddAgentOKBodyOtelCollector`, inventory v1 agents.pb.go) exist. +2. Build and run PMM server and pmm-agent (e.g. from source or use a dev setup). +3. Ensure the server has **OTEL enabled** in settings (`Otel.CollectorEnabled` = true) and optional **Otel.LogsRetentionDays**. +4. Ensure the server’s **otel-collector** (supervisord) and **nginx** `/otlp/` location are deployed (e.g. via Ansible or your deployment). +5. **otelcol-contrib** is included in pmm-client and pmm-server packages/tarballs; when using a dev build, ensure the client tarball was built with the OTEL download step so `tools/otelcol-contrib` exists. + +## 1. Add OTEL collector from the agent host + +From the machine where pmm-agent runs: + +```bash +# OTLP-only collector (e.g. before adding log files) +pmm-admin management add otel ebpf + +# With log files (e.g. MySQL error log); merges into the single node collector +pmm-admin management add otel logs --log-file-paths=/var/log/mysql/error.log + +# With custom labels +pmm-admin management add otel logs --custom-labels=env=prod,team=db +``` + +Check that the agent is listed and the collector process is running (e.g. `pmm-admin list` or Inventory API). + +## 2. Send logs via OTLP (optional) + +If you have an OTLP client or another collector that can send to the PMM server: + +- Endpoint: `https:///otlp/` (HTTP OTLP). Use the same credentials as for the PMM API. +- The server’s nginx proxies `/otlp/` to the otel-collector; auth_request applies. + +## 3. Verify data in ClickHouse + +- Connect to ClickHouse (e.g. `clickhouse-client` or Grafana). +- Database `otel` and table `otel.logs` should exist (created automatically when OTEL is enabled). +- Example query: + ```sql + SELECT Timestamp, ServiceName, Body FROM otel.logs ORDER BY Timestamp DESC LIMIT 10; + ``` + +## 4. Grafana + +- The **ClickHouse-OTEL** datasource (if provisioned) uses the same ClickHouse with default database `otel` for building dashboards over `otel.logs`. + +## Troubleshooting + +- **Collector not starting**: Check pmm-agent logs and that `otelcol-contrib` exists at the path in config (e.g. `tools/otelcol-contrib`). It is shipped with pmm-client and pmm-server; for custom builds, the build-client-binary script downloads it from OpenTelemetry releases. +- **No logs in ClickHouse**: Ensure the server’s otel-collector is running and writing to ClickHouse; check server logs and that `PMM_CLICKHOUSE_*` env is set for the collector. +- **Auth errors on /otlp/**: Use valid PMM API credentials (e.g. the same used by pmm-agent). diff --git a/docs/internal/ebpf-clickhouse-ingestion-profile.md b/docs/internal/ebpf-clickhouse-ingestion-profile.md new file mode 100644 index 00000000000..168b7660e9d --- /dev/null +++ b/docs/internal/ebpf-clickhouse-ingestion-profile.md @@ -0,0 +1,29 @@ +# Phase 1 ClickHouse ingestion profile (eBPF / OTLP) + +Aligned with PMM server OTEL collector → ClickHouse (`otel` database). + +## Collector (server) + +- Receivers: OTLP gRPC `:4317`, HTTP `:4318`. +- Processors: `memory_limiter`, `transform` (logs only), `batch` (1s / 1024–2048). +- Exporters: three ClickHouse exporter instances — `clickhouse/logs`, `clickhouse/traces`, `clickhouse/metrics` (OTEL component type `clickhouse` with distinct names) — `create_schema: false` (PMM-managed DDL). + +## TTL + +- Logs: from PMM settings `GetOtelLogsRetentionDays()` (default 7d). +- Traces (`otel.otel_traces`): **7d** (MVP). +- Sum metrics (`otel.otel_metrics_sum`): **90d** (MVP RED). +- Service map rollup tables (`service_map_*_1m`): 32d partition TTL (adjust with product defaults). + +## Batching / reliability (client agent `otelcol-contrib`) + +- `batch`: timeout **2s**, `send_batch_size` **10000** (existing PMM client template). +- Server export: OTLP HTTP to PMM `/otlp` with auth headers. + +## Async inserts / compression + +- Rely on ClickHouse exporter defaults (`async_insert`, `lz4`) where supported by the bundled `otelcol-contrib` version. + +## Cardinality + +- Enforce identity contract label allow-list; never emit raw SQL text as metric labels. diff --git a/docs/internal/ebpf-kernel-matrix.md b/docs/internal/ebpf-kernel-matrix.md new file mode 100644 index 00000000000..be86daf5db0 --- /dev/null +++ b/docs/internal/ebpf-kernel-matrix.md @@ -0,0 +1,11 @@ +# Kernel compatibility matrix (Phase 1 hardening) + +Representative targets for CI / manual validation (extend with your fleet images): + +| Environment | Kernel | Notes | +|-------------|--------|-------| +| RHEL / OL 8/9 LTS | 4.18+ / 5.14+ | Verify BTF (`/sys/kernel/btf/vmlinux`) for CO-RE when probes ship | +| Ubuntu 22.04 / 24.04 LTS | 5.15 / 6.8 | cgroup v2 hybrid paths | +| EKS / GKE / AKS node images | vendor track | Confirm SYS_ADMIN / CAP_BPF / CAP_PERMON policy for DaemonSet | + +**Preflight (future agent checks):** kernel version, BTF presence, mount namespaces, attach errors surfaced as `degraded_reason`. diff --git a/docs/internal/ebpf-kubernetes-daemonset.md b/docs/internal/ebpf-kubernetes-daemonset.md new file mode 100644 index 00000000000..12ae21012d9 --- /dev/null +++ b/docs/internal/ebpf-kubernetes-daemonset.md @@ -0,0 +1,19 @@ +# Kubernetes DaemonSet notes (Phase 1 eBPF collector) + +Use the same `pmm-client` image as bare metal. PMM agent registers with the server; `otelcol-contrib` exports OTLP to PMM. + +## Security context (indicative) + +- Capabilities: typically `CAP_BPF`, `CAP_PERFMON`, `CAP_SYS_ADMIN` (trim to least privilege validated on your kernel). +- `hostPID`: often required for meaningful host-wide capture (validate against threat model). +- Volume mounts: `/sys` / `debugfs` / BTF paths as required by CO-RE probes when enabled. + +## Resources + +- Set CPU/memory requests and limits; eBPF map and ring-buffer sizes must fit within the cgroup. + +## Priority + +- Consider `priorityClassName` so the DaemonSet is not evicted before workloads on saturated nodes. + +See also `docs/runbooks/ebpf-rollout-canary.md`. diff --git a/docs/internal/ebpf-mvp-acceptance-criteria.md b/docs/internal/ebpf-mvp-acceptance-criteria.md new file mode 100644 index 00000000000..28773c4c283 --- /dev/null +++ b/docs/internal/ebpf-mvp-acceptance-criteria.md @@ -0,0 +1,10 @@ +# Phase 1 eBPF MVP — acceptance criteria (locked defaults) + +| Area | MVP | +|------|-----| +| Sources | PMM-managed collectors only | +| Identity | Strict required attributes for map rollups (`docs/internal/ebpf-otel-identity-v1.md`) | +| Ingestion SLO | Drop rate **< 1%** under reference load (measure at collector queue + CH exporter) | +| Retention | Metrics-oriented sum table **90d**; spans **7d**; logs per PMM setting (default 7d) | +| UX | Grafana-first service map + drilldown links; PMM-app pages post-MVP | +| Delivery | Vertical slice first: stub OTLP → server → CH → Grafana; real CO-RE probes per protocol after | diff --git a/docs/internal/ebpf-otel-identity-v1.md b/docs/internal/ebpf-otel-identity-v1.md new file mode 100644 index 00000000000..b00dcadca57 --- /dev/null +++ b/docs/internal/ebpf-otel-identity-v1.md @@ -0,0 +1,49 @@ +# eBPF / OTLP identity contract v1 (Phase 1) + +Version: **v1** (2026-03-28). Applies to **metrics** and **spans** emitted by PMM-managed collectors (stub, synthetic, or eBPF-backed) exported via OTLP to PMM Server. + +## Purpose + +Enable **service map rollups**, **inventory correlation**, and **Grafana Node Graph** without unbounded cardinality. Records that do not satisfy this contract are **excluded from service-map rollups** (they may still be stored for other uses if the pipeline accepts them). + +## Resource attributes (required) + +| Attribute | Semantics | +|-----------|-----------| +| `service.name` | Logical client/service name for the emitting process. | +| `pmm.node_id` | PMM inventory node identifier (`runs_on_node_id` / container node). | +| `pmm.agent_id` | PMM inventory agent identifier for the collector. | +| `net.peer.name` OR `net.peer.ip`+`net.peer.port` | Stable peer key for the remote leg (normalized IP:port or DNS). At least one of these must be present. | +| `db.system` | For database legs: `mysql`, `postgresql`, or `mongodb`. For non-DB hops use `generic` or omit only if `pmm.component_role` is not `database`. | +| `pmm.component_role` | One of: `app`, `proxy`, `database`, `router`, `unknown`. | + +## Span attributes (required when exporting spans) + +Same resource attributes are expected on the span’s resource. Additionally: + +| Attribute | When | +|-----------|------| +| `error.type` | Present on error spans. | +| `pmm.map_edge_target` | Optional; **directed edge** for Node Graph: target service id (string) for MVP rollups derived from spans. | + +## Metric names (RED — canonical Phase 1) + +- Counter: `db.client.requests` (labels: `db.system`, result/status dimension as allowed label set). +- Counter: `db.client.errors` +- Histogram (preferred) or summary: `db.client.operation.duration` (bounded labels; **no raw SQL** as label). + +Label allow-list and cardinality caps are enforced in collector and server configuration (see `docs/internal/ebpf-clickhouse-ingestion-profile.md`). + +## Span naming + +- `db..` (e.g. `db.mysql.query`) +- `net.flow` when protocol parsing is not yet available + +## Sampling + +- Default: head-based sampling for spans. +- Optional: error-biased sampling for incidents (collector flag). + +## Observability + +Implementations SHOULD increment a rejection counter (e.g. `otel_identity_rejected_total`) when map-critical telemetry is dropped due to missing required attributes. diff --git a/docs/internal/ebpf-phase-boundaries.md b/docs/internal/ebpf-phase-boundaries.md new file mode 100644 index 00000000000..15703d29f8e --- /dev/null +++ b/docs/internal/ebpf-phase-boundaries.md @@ -0,0 +1,16 @@ +# Phase 1 vs Phase 2 boundaries (eBPF / service map) + +## Phase 1 (in scope) + +- OTLP metrics + sampled spans to existing PMM ClickHouse (`otel` DB extension). +- RED metrics as canonical DB client signal for MySQL, PostgreSQL, MongoDB. +- Grafana service map MVP (Node Graph target; tabular / trace-derived edges acceptable for early builds). +- Proxy legs as first-class network entities: HAProxy, ProxySQL, pgBouncer, mongos (role tags + edges). +- Patroni (and similar) as **control-plane markers** (failover windows), not deep parser metrics. +- `pmm-admin management add otel ebpf` (merges Phase 1 eBPF labels on the single node OTEL collector). + +## Phase 2 (explicitly out of scope for Phase 1) + +- Deep per-component parsers (full proxy query semantics, orchestrator internals). +- External OTLP tenants beyond PMM-managed collectors. +- Advanced PMM-app-only map UX (beyond Grafana MVP). diff --git a/docs/internal/ebpf-proxy-ha-correlation.md b/docs/internal/ebpf-proxy-ha-correlation.md new file mode 100644 index 00000000000..6bb2e3068ef --- /dev/null +++ b/docs/internal/ebpf-proxy-ha-correlation.md @@ -0,0 +1,13 @@ +# Proxy and HA correlation (Phase 1) + +## Proxies (traffic path) + +Model HAProxy, ProxySQL, pgBouncer, and mongos as **nodes** or **annotated edges** using `pmm.component_role=proxy` (or `router`) plus stable `service.name` / peer attributes. Deep protocol parsing is Phase 2. + +## Orchestrators (control plane) + +Patroni (and equivalents) provide **failover windows** and role-change markers attached to database-side nodes or edges (`AnnotateFailoverWindow` in `managed/otel/correlation.go`). MVP depth: coarse time ranges + text note, not full DCS event stream. + +## Stitching + +User journeys: **app → proxy → database**, with optional failover shading when orchestrator annotations overlap the selected time range. diff --git a/docs/internal/ebpf-service-map-four-layers.md b/docs/internal/ebpf-service-map-four-layers.md new file mode 100644 index 00000000000..0114afd75e1 --- /dev/null +++ b/docs/internal/ebpf-service-map-four-layers.md @@ -0,0 +1,8 @@ +# Service map four layers (Phase 1) + +1. **Flow extraction** — eBPF (later) or stub OTLP emits RED metrics + sampled spans; enrichment with node/pod metadata. +2. **Identity / topology** — stable `service_id` / `pmm.node_id` / peer keys; directed edges; proxy/HA roles (`docs/internal/ebpf-proxy-ha-correlation.md`). +3. **Graph rollups** — ClickHouse tables `otel.otel_traces`, `otel.otel_metrics_sum`, rollups `otel.service_map_nodes_1m`, `otel.service_map_edges_1m` (MVs / scheduled aggregations as load requires). +4. **UX** — Grafana Node Graph + drilldowns to traces / PMM dashboards; PMM-app custom map deferred post-MVP. + +Dependency order for implementation: **1 → 2 → 3 → 4**; stub OTLP validates 3–4 before real probes land. diff --git a/docs/internal/post-mvp-ebpf-backlog.md b/docs/internal/post-mvp-ebpf-backlog.md new file mode 100644 index 00000000000..eef991dc4aa --- /dev/null +++ b/docs/internal/post-mvp-ebpf-backlog.md @@ -0,0 +1,8 @@ +# Post-MVP backlog (eBPF / service map) + +- External OTLP onboarding and trust boundaries. +- Multi-tenant isolation and per-tenant cardinality policies. +- Cost / capacity tuning at fleet scale; agent → gateway → backend topology as default for large estates. +- Custom PMM-app service map UX and advanced overlays. +- Rollup schema migrations + backfill playbooks. +- Broader kernel/distro matrix beyond Phase 1 CI representatives. diff --git a/docs/runbooks/ebpf-rollout-canary.md b/docs/runbooks/ebpf-rollout-canary.md new file mode 100644 index 00000000000..72f2da471fc --- /dev/null +++ b/docs/runbooks/ebpf-rollout-canary.md @@ -0,0 +1,21 @@ +# Runbook: eBPF / OTLP collector canary rollout + +## Preconditions + +- PMM server OTEL collector enabled; `/srv/otelcol/config.yaml` managed by `pmm-managed`. +- ClickHouse schemas applied (`otel.logs`, `otel.otel_traces`, `otel.otel_metrics_sum`, `otel.service_map_*`). + +## Canary steps + +1. **Enable on one host** — `pmm-admin management add otel ebpf` (or `add otel traces` / `add otel logs` as needed). Confirm agent connects and no sustained scrape errors. +2. **Stub validation** — from a workstation with CA trust, run `go run ./managed/cmd/ebpf-otlp-stub` with `PMM_OTLP_URL` pointing at `https:///otlp/v1/traces` and `PMM_OTLP_INSECURE=1` only on lab systems. Verify rows in `otel.otel_traces`. +3. **SLO spot-check** — watch collector queue depth / dropped batches; target **< 1%** drops over 30 minutes at expected QPS. +4. **Expand** — repeat per cluster / node pool; document kernel version and BTF availability per image. + +## Rollback + +- `pmm-admin inventory remove-agent ` (or management remove flow) for the OTEL collector agent; server-side OTEL continues to serve other agents. + +## Kernel / caps failures + +- Agent should stay healthy with **degraded** eBPF state once probes exist; OTLP-only path remains for logs/traces/metrics from other receivers. diff --git a/go.mod b/go.mod index 90e592991a8..ae7ea60faf9 100644 --- a/go.mod +++ b/go.mod @@ -63,6 +63,8 @@ require ( github.com/stretchr/testify v1.11.1 github.com/tink-crypto/tink-go v0.0.0-20230613075026-d6de17e3f164 go.mongodb.org/mongo-driver v1.17.6 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0 + go.opentelemetry.io/otel/sdk v1.40.0 go.starlark.net v0.0.0-20230717150657-8a3343210976 go.yaml.in/yaml/v3 v3.0.4 golang.org/x/crypto v0.49.0 @@ -92,6 +94,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.13 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.41.6 // indirect github.com/boltdb/bolt v1.3.1 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/fatih/color v1.18.0 // indirect github.com/go-logr/logr v1.4.3 // indirect @@ -128,7 +131,9 @@ require ( github.com/xhit/go-str2duration/v2 v2.1.0 // indirect go.etcd.io/bbolt v1.3.5 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect go.opentelemetry.io/otel/metric v1.41.0 // indirect + go.opentelemetry.io/proto/otlp v1.9.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect gopkg.in/ini.v1 v1.67.1 // indirect @@ -186,7 +191,7 @@ require ( github.com/xdg-go/scram v1.2.0 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 - go.opentelemetry.io/otel v1.41.0 // indirect + go.opentelemetry.io/otel v1.41.0 go.opentelemetry.io/otel/trace v1.41.0 // indirect golang.org/x/mod v0.34.0 // indirect golang.org/x/net v0.52.0 // indirect diff --git a/go.sum b/go.sum index 93053204936..d0f849c05af 100644 --- a/go.sum +++ b/go.sum @@ -112,6 +112,8 @@ github.com/brianvoe/gofakeit v3.18.0+incompatible h1:wDOmHc9DLG4nRjUVVaxA+CEglKO github.com/brianvoe/gofakeit v3.18.0+incompatible/go.mod h1:kfwdRA90vvNhPutZWfH7WPaDzUjz+CZFqG+rPkOjGOc= github.com/brianvoe/gofakeit/v6 v6.28.0 h1:Xib46XXuQfmlLS2EXRuJpqcw8St6qSZz75OUo0tgAW4= github.com/brianvoe/gofakeit/v6 v6.28.0/go.mod h1:Xj58BMSnFqcn/fAQeSK+/PLtC5kSb7FJIq4JyGa8vEs= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -595,14 +597,20 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0 h1:7iP2uCb go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.65.0/go.mod h1:c7hN3ddxs/z6q9xwvfLPk+UHlWRQyaeR1LdgfL/66l0= go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0/go.mod h1:bTdK1nhqF76qiPoCCdyFIV+N/sRHYXYCTQc+3VCi3MI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0 h1:wVZXIWjQSeSmMoxF74LzAnpVQOAFDo3pPji9Y4SOFKc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.40.0/go.mod h1:khvBS2IggMFNwZK/6lEeHg/W57h/IX6J4URh57fuI40= go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= go.opentelemetry.io/otel/sdk v1.40.0 h1:KHW/jUzgo6wsPh9At46+h4upjtccTmuZCFAc9OJ71f8= go.opentelemetry.io/otel/sdk v1.40.0/go.mod h1:Ph7EFdYvxq72Y8Li9q8KebuYUr2KoeyHx0DRMKrYBUE= -go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2WKg+sEJTtB8= -go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= +go.opentelemetry.io/otel/sdk/metric v1.40.0 h1:mtmdVqgQkeRxHgRv4qhyJduP3fYJRMX4AtAlbuWdCYw= +go.opentelemetry.io/otel/sdk/metric v1.40.0/go.mod h1:4Z2bGMf0KSK3uRjlczMOeMhKU2rhUqdWNoKcYrtcBPg= go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= go.starlark.net v0.0.0-20230717150657-8a3343210976 h1:7ljYNcZU84T2N0tZdDgvL7U3M4iFmglAUUU1gRFE/2Q= go.starlark.net v0.0.0-20230717150657-8a3343210976/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= diff --git a/managed/cmd/ebpf-otlp-stub/main.go b/managed/cmd/ebpf-otlp-stub/main.go new file mode 100644 index 00000000000..917ca9605a6 --- /dev/null +++ b/managed/cmd/ebpf-otlp-stub/main.go @@ -0,0 +1,73 @@ +// Command ebpf-otlp-stub sends minimal OTLP traces to PMM Server for Phase 1 pipeline validation (no eBPF). +// +// Example: +// +// PMM_OTLP_URL=https://127.0.0.1:8443/otlp/v1/traces PMM_OTLP_INSECURE=1 go run ./managed/cmd/ebpf-otlp-stub +package main + +import ( + "context" + "fmt" + "os" + "time" + + "go.opentelemetry.io/otel" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" + "go.opentelemetry.io/otel/sdk/resource" + sdktrace "go.opentelemetry.io/otel/sdk/trace" +) + +func main() { + if err := run(context.Background()); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} + +func run(ctx context.Context) error { + endpoint := os.Getenv("PMM_OTLP_URL") + if endpoint == "" { + return fmt.Errorf("set PMM_OTLP_URL to OTLP HTTP traces endpoint (e.g. https://pmm.example:8443/otlp/v1/traces)") + } + opts := []otlptracehttp.Option{otlptracehttp.WithEndpointURL(endpoint)} + if os.Getenv("PMM_OTLP_INSECURE") == "1" { + opts = append(opts, otlptracehttp.WithInsecure()) + } + exp, err := otlptracehttp.New(ctx, opts...) + if err != nil { + return err + } + res, err := resource.New(ctx, + resource.WithAttributes( + attribute.String("service.name", "ebpf-otlp-stub"), + attribute.String("pmm.node_id", getenv("PMM_NODE_ID", "stub-node")), + attribute.String("pmm.agent_id", getenv("PMM_AGENT_ID", "stub-agent")), + attribute.String("net.peer.name", getenv("PMM_PEER", "db.example:3306")), + attribute.String("db.system", getenv("PMM_DB_SYSTEM", "mysql")), + attribute.String("pmm.component_role", "app"), + ), + ) + if err != nil { + return err + } + tp := sdktrace.NewTracerProvider(sdktrace.WithBatcher(exp), sdktrace.WithResource(res)) + otel.SetTracerProvider(tp) + defer func() { _ = tp.Shutdown(ctx) }() + + tr := tp.Tracer("pmm.ebpf.stub") + _, span := tr.Start(ctx, "db.mysql.query") + span.SetAttributes( + attribute.String("pmm.map_edge_target", getenv("PMM_MAP_TARGET", "mysql-primary")), + ) + span.End() + time.Sleep(2 * time.Second) + return nil +} + +func getenv(k, def string) string { + if v := os.Getenv(k); v != "" { + return v + } + return def +} diff --git a/managed/cmd/pmm-managed/packages.dot b/managed/cmd/pmm-managed/packages.dot index fdcfc42bf83..7bdcb365513 100644 --- a/managed/cmd/pmm-managed/packages.dot +++ b/managed/cmd/pmm-managed/packages.dot @@ -42,6 +42,7 @@ digraph packages { "/services/qan" -> "/models"; "/services/qan.test" -> "/services/qan"; "/services/server" -> "/models"; + "/services/server" -> "/otel"; "/services/server" -> "/services"; "/services/server.test" -> "/services/server"; "/services/supervisord" -> "/models"; diff --git a/managed/models/agent_model.go b/managed/models/agent_model.go index 75840e8e8de..4cb93a6fca3 100644 --- a/managed/models/agent_model.go +++ b/managed/models/agent_model.go @@ -79,6 +79,7 @@ const ( NomadAgentType AgentType = "nomad-agent" ValkeyExporterType AgentType = "valkey_exporter" RTAMongoDBAgentType AgentType = "rta-mongodb-agent" + OtelCollectorType AgentType = "otel-collector" ) // GetRTAAgentTypes returns all Real-Time Analytics Agent types. diff --git a/managed/models/database.go b/managed/models/database.go index 85c11fac28e..068c6cfac6f 100644 --- a/managed/models/database.go +++ b/managed/models/database.go @@ -1177,6 +1177,338 @@ var databaseSchema = [][]string{ `ALTER TABLE agents ADD COLUMN rta_options JSONB`, `UPDATE agents SET rta_options = '{}'::jsonb`, }, + 127: { + `CREATE TABLE log_parser_presets ( + id VARCHAR NOT NULL, + name VARCHAR NOT NULL, + description TEXT, + operator_yaml TEXT NOT NULL, + built_in BOOLEAN NOT NULL DEFAULT false, + created_at TIMESTAMP NOT NULL, + updated_at TIMESTAMP NOT NULL, + PRIMARY KEY (id), + UNIQUE (name) + )`, + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + '00000000-0000-4000-8000-000000000001', + 'mysql_error', + 'MySQL 8 error log format (timestamp thread_id [Subsystem] [CODE] [Component] message)', + $yaml$ - type: regex_parser + regex: '^(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+Z) (?P\d+) \[(?P[^\]]+)\] \[(?P[^\]]+)\] \[(?P[^\]]+)\] (?P.*)$' + parse_from: body + parse_to: attributes + - type: time_parser + parse_from: attributes.timestamp + layout: '2006-01-02T15:04:05.000000Z' + layout_type: gotime + - type: severity_parser + parse_from: attributes.subsystem + preset: none + mapping: + System: info + Warning: warn + Error: error + - type: move + from: attributes.message + to: body +$yaml$, + true, + NOW(), + NOW() + )`, + }, + 128: { + // Server log presets: used by pmm-agent on the server (and optionally elsewhere) for nginx, grafana, pmm-managed, pmm-agent, postgres. + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'nginx_access', + 'nginx_access', + 'Nginx access log (logfmt: time=..., host=..., status=...)', + $yaml$- type: key_value_parser + parse_from: body + parse_to: attributes + pair_delimiter: " " + key_value_delimiter: "=" +- type: time_parser + parse_from: attributes.time + layout: '2006-01-02T15:04:05Z07:00' + layout_type: gotime +- type: add + field: attributes.level + value: 'EXPR(int(attributes.status) >= 500 ? "error" : (int(attributes.status) >= 400 ? "warn" : "info"))' +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + info: info + warn: warn + error: error +$yaml$, + true, + NOW(), + NOW() + )`, + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'nginx_error', + 'nginx_error', + 'Nginx error log (timestamp [level] pid#tid: message)', + $yaml$- type: regex_parser + regex: '^(?P\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}) \[(?P\w+)\] (?P\d+)#(?P\d+): (?P.*?)(?:, client: (?P[^,]+))?(?:, server: (?P[^,]+))?(?:, request: "(?P[^"]*)")?(?:, host: "(?P[^"]*)")?.*' + parse_from: body + parse_to: attributes +- type: time_parser + parse_from: attributes.timestamp + layout: '2006/01/02 15:04:05' + layout_type: gotime +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + debug: debug + info: info + notice: info + warn: warn + error: error + crit: fatal + alert: fatal + emerg: fatal +$yaml$, + true, + NOW(), + NOW() + )`, + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'grafana', + 'grafana', + 'Grafana log (logfmt, time with 9 fractional digits)', + $yaml$- type: key_value_parser + parse_from: body + parse_to: attributes + pair_delimiter: " " + key_value_delimiter: "=" +- type: time_parser + parse_from: attributes.t + layout: '2006-01-02T15:04:05.000000000Z07:00' + layout_type: gotime + on_error: drop +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + debug: debug + info: info + warn: warn + error: error +$yaml$, + true, + NOW(), + NOW() + )`, + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'pmm_managed', + 'pmm_managed', + 'PMM-managed log (logfmt)', + $yaml$- type: key_value_parser + parse_from: body + parse_to: attributes + pair_delimiter: " " + key_value_delimiter: "=" +- type: time_parser + parse_from: attributes.time + layout: '2006-01-02T15:04:05.000Z07:00' + layout_type: gotime +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + debug: debug + info: info + warning: warn + warn: warn + error: error + fatal: fatal + panic: fatal +$yaml$, + true, + NOW(), + NOW() + )`, + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'pmm_agent', + 'pmm_agent', + 'PMM-agent log (logfmt)', + $yaml$- type: key_value_parser + parse_from: body + parse_to: attributes + pair_delimiter: " " + key_value_delimiter: "=" +- type: time_parser + parse_from: attributes.time + layout: '2006-01-02T15:04:05.000Z07:00' + layout_type: gotime +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + debug: debug + info: info + warning: warn + warn: warn + error: error + fatal: fatal + panic: fatal +$yaml$, + true, + NOW(), + NOW() + )`, + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'postgres', + 'postgres', + 'PostgreSQL log (timestamp UTC [pid] level: message)', + $yaml$- type: regex_parser + regex: '^(?P\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+) UTC \[(?P\d+)\] (?P\w+):\s*(?P.*)$' + parse_from: body + parse_to: attributes +- type: time_parser + parse_from: attributes.timestamp + layout: '2006-01-02 15:04:05.000 UTC' + layout_type: gotime +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + debug: debug + info: info + notice: info + warning: warn + warn: warn + error: error + fatal: fatal + panic: fatal + LOG: info + STATEMENT: info +- type: move + from: attributes.message + to: body +$yaml$, + true, + NOW(), + NOW() + )`, + }, + 129: { + // Additional PMM server log presets: clickhouse, otel-collector, supervisord. + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'clickhouse_server', + 'clickhouse_server', + 'ClickHouse server log (timestamp [pid] {} message)', + $yaml$- type: regex_parser + regex: '^(?P\d{4}\.\d{2}\.\d{2} \d{2}:\d{2}:\d{2}\.\d+) .*? <(?P\w+)> (?P.*)$' + parse_from: body + parse_to: attributes +- type: time_parser + parse_from: attributes.timestamp + layout: '2006.01.02 15:04:05.000000' + layout_type: gotime +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + Trace: debug + Debug: debug + Information: info + Warning: warn + Error: error +- type: move + from: attributes.message + to: body +$yaml$, + true, + NOW(), + NOW() + )`, + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'otel_collector', + 'otel_collector', + 'OTEL Collector log (tab-separated: timestamp, level, message)', + $yaml$- type: regex_parser + regex: '^(?P[\d\-T:Z\.]+)\t(?P\w+)\t(?P.*)$' + parse_from: body + parse_to: attributes +- type: time_parser + parse_from: attributes.timestamp + layout: '2006-01-02T15:04:05.000Z' + layout_type: gotime + on_error: drop +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + debug: debug + info: info + warn: warn + error: error +- type: move + from: attributes.message + to: body +$yaml$, + true, + NOW(), + NOW() + )`, + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'supervisord', + 'supervisord', + 'Supervisord log (timestamp,ms LEVEL message)', + $yaml$- type: regex_parser + regex: '^(?P\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d+) (?P\w+) (?P.*)$' + parse_from: body + parse_to: attributes +- type: time_parser + parse_from: attributes.timestamp + layout: '2006-01-02 15:04:05,000' + layout_type: gotime +- type: severity_parser + parse_from: attributes.level + preset: none + mapping: + INFO: info + WARN: warn + ERROR: error + CRIT: fatal +- type: move + from: attributes.message + to: body +$yaml$, + true, + NOW(), + NOW() + )`, + }, + 130: { + // Syslog / journal-style line: ISO8601 host tag[pid]: message (mysqld[8794], (mysqled)[9049], systemd[1], CRON[123], …). + `INSERT INTO log_parser_presets (id, name, description, operator_yaml, built_in, created_at, updated_at) VALUES ( + 'syslog_mysql_systemd', + 'syslog_mysql_systemd', + 'Syslog/journal line: ISO8601 host tag[pid]: message (e.g. mysqld[8794], systemd[1], (mysqled)[9049], CRON[1])', + $yaml$- type: regex_parser + regex: '^(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2}))\s+(?P\S+)\s+(?P\S+):\s*(?P.*)$' + parse_from: body + parse_to: attributes +- type: time_parser + parse_from: attributes.timestamp + layout: '2006-01-02T15:04:05.999999999Z07:00' + layout_type: gotime + on_error: send +- type: move + from: attributes.message + to: body +$yaml$, + true, + NOW(), + NOW() + )`, + }, 117: { `DROP TABLE IF EXISTS percona_sso_details`, }, diff --git a/managed/models/log_parser_preset_crud.go b/managed/models/log_parser_preset_crud.go new file mode 100644 index 00000000000..090745f09bd --- /dev/null +++ b/managed/models/log_parser_preset_crud.go @@ -0,0 +1,178 @@ +// Copyright (C) 2026 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +package models + +import ( + "fmt" + "regexp" + "strings" + "time" + + "github.com/google/uuid" + "github.com/pkg/errors" + "gopkg.in/reform.v1" + "gopkg.in/yaml.v3" +) + +var logParserPresetNameRe = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9_]*$`) + +// ValidateLogParserPresetName checks name matches OtelCollector receiver id rules (alphanumeric + underscore). +func ValidateLogParserPresetName(name string) error { + name = strings.TrimSpace(name) + if name == "" { + return errors.New("empty preset name") + } + if !logParserPresetNameRe.MatchString(name) { + return errors.Errorf("preset name %q must match %s", name, logParserPresetNameRe.String()) + } + return nil +} + +// ValidateLogParserOperatorYAML ensures operator_yaml is a non-empty YAML sequence of objects with a type field. +func ValidateLogParserOperatorYAML(operatorYAML string) error { + operatorYAML = strings.TrimSpace(operatorYAML) + if operatorYAML == "" { + return errors.New("operator_yaml is required") + } + var ops []map[string]interface{} + if err := yaml.Unmarshal([]byte(operatorYAML), &ops); err != nil { + return errors.Wrap(err, "operator_yaml must be a YAML array of operator objects") + } + if len(ops) == 0 { + return errors.New("operator_yaml must contain at least one operator") + } + for i, op := range ops { + t, ok := op["type"].(string) + if !ok || strings.TrimSpace(t) == "" { + return errors.Errorf("operator %d: missing or invalid type", i) + } + } + return nil +} + +// ListOtelCollectorAgentIDsReferencingLogParserPreset returns agent_ids of OTEL collectors using presetName in log_sources. +func ListOtelCollectorAgentIDsReferencingLogParserPreset(q *reform.Querier, presetName string) ([]string, error) { + presetName = strings.TrimSpace(presetName) + if presetName == "" { + return nil, errors.New("empty preset name") + } + t := OtelCollectorType + agents, err := FindAgents(q, AgentFilters{AgentType: &t}) + if err != nil { + return nil, err + } + var ids []string + for _, a := range agents { + labels, err := a.GetCustomLabels() + if err != nil { + return nil, errors.WithStack(err) + } + entries, err := ParseOtelLogSourcesFromLabels(labels) + if err != nil { + continue + } + for _, e := range entries { + p := e.Preset + if p == "" { + p = otelPresetRaw + } + if p == presetName { + ids = append(ids, a.AgentID) + break + } + } + } + return ids, nil +} + +// CreateLogParserPreset inserts a custom preset (built_in=false). +func CreateLogParserPreset(q *reform.Querier, name, description, operatorYAML string) (*LogParserPreset, error) { + if err := ValidateLogParserPresetName(name); err != nil { + return nil, err + } + if err := ValidateLogParserOperatorYAML(operatorYAML); err != nil { + return nil, err + } + existing, err := FindLogParserPresetByName(q, name) + if err != nil { + return nil, err + } + if existing != nil { + return nil, fmt.Errorf("log parser preset %q already exists", name) + } + now := time.Now() + var descPtr *string + if strings.TrimSpace(description) != "" { + d := strings.TrimSpace(description) + descPtr = &d + } + row := &LogParserPreset{ + ID: uuid.NewString(), + Name: name, + Description: descPtr, + OperatorYAML: operatorYAML, + BuiltIn: false, + CreatedAt: now, + UpdatedAt: now, + } + if err := q.Insert(row); err != nil { + return nil, errors.WithStack(err) + } + return row, nil +} + +// UpdateLogParserPreset updates description and/or operator_yaml. Name and built_in are not changed. +func UpdateLogParserPreset(q *reform.Querier, id string, description *string, operatorYAML *string) (*LogParserPreset, error) { + if id == "" { + return nil, errors.New("empty preset id") + } + row, err := FindLogParserPresetByID(q, id) + if err != nil { + return nil, err + } + if row == nil { + return nil, reform.ErrNoRows + } + if operatorYAML != nil { + if err := ValidateLogParserOperatorYAML(*operatorYAML); err != nil { + return nil, err + } + row.OperatorYAML = strings.TrimSpace(*operatorYAML) + } + if description != nil { + d := strings.TrimSpace(*description) + if d == "" { + row.Description = nil + } else { + row.Description = &d + } + } + row.UpdatedAt = time.Now() + if err := q.Update(row); err != nil { + return nil, errors.WithStack(err) + } + return row, nil +} + +// DeleteLogParserPreset removes a non-built-in preset. Caller must verify no references. +func DeleteLogParserPreset(q *reform.Querier, id string) error { + if id == "" { + return errors.New("empty preset id") + } + row, err := FindLogParserPresetByID(q, id) + if err != nil { + return err + } + if row == nil { + return reform.ErrNoRows + } + if row.BuiltIn { + return errors.New("cannot delete built-in log parser preset") + } + return errors.WithStack(q.Delete(row)) +} diff --git a/managed/models/log_parser_preset_helpers.go b/managed/models/log_parser_preset_helpers.go new file mode 100644 index 00000000000..3c9122ad29b --- /dev/null +++ b/managed/models/log_parser_preset_helpers.go @@ -0,0 +1,72 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package models + +import ( + "github.com/pkg/errors" + "gopkg.in/reform.v1" +) + +// FindLogParserPresetByID returns a log parser preset by ID. +func FindLogParserPresetByID(q *reform.Querier, id string) (*LogParserPreset, error) { + if id == "" { + return nil, errors.New("empty preset ID") + } + + s, err := q.FindOneFrom(LogParserPresetTable, "id", id) + if err != nil { + if errors.Is(err, reform.ErrNoRows) { + return nil, nil //nolint:nilnil + } + + return nil, errors.WithStack(err) + } + + return s.(*LogParserPreset), nil +} + +// FindLogParserPresetByName returns a log parser preset by name. +func FindLogParserPresetByName(q *reform.Querier, name string) (*LogParserPreset, error) { + if name == "" { + return nil, errors.New("empty preset name") + } + + s, err := q.FindOneFrom(LogParserPresetTable, "name", name) + if err != nil { + if errors.Is(err, reform.ErrNoRows) { + return nil, nil //nolint:nilnil + } + + return nil, errors.WithStack(err) + } + + return s.(*LogParserPreset), nil +} + +// FindAllLogParserPresets returns all log parser presets ordered by name. +func FindAllLogParserPresets(q *reform.Querier) ([]*LogParserPreset, error) { + structs, err := q.SelectAllFrom(LogParserPresetTable, "ORDER BY name") + if err != nil { + return nil, errors.WithStack(err) + } + + res := make([]*LogParserPreset, len(structs)) + for i, s := range structs { + res[i] = s.(*LogParserPreset) + } + + return res, nil +} diff --git a/managed/models/log_parser_preset_model.go b/managed/models/log_parser_preset_model.go new file mode 100644 index 00000000000..61933109f1d --- /dev/null +++ b/managed/models/log_parser_preset_model.go @@ -0,0 +1,35 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package models + +import "time" + +//go:generate ../../bin/reform + +// LogParserPreset represents a parser preset for OTEL filelog receivers (e.g. mysql_error). +// Presets define the operator YAML fragment used to parse log lines; they are stored in DB +// so custom presets can be added later via API. +// +//reform:log_parser_presets +type LogParserPreset struct { + ID string `reform:"id,pk"` + Name string `reform:"name"` + Description *string `reform:"description"` + OperatorYAML string `reform:"operator_yaml"` + BuiltIn bool `reform:"built_in"` + CreatedAt time.Time `reform:"created_at"` + UpdatedAt time.Time `reform:"updated_at"` +} diff --git a/managed/models/log_parser_preset_model_reform.go b/managed/models/log_parser_preset_model_reform.go new file mode 100644 index 00000000000..5eb23670130 --- /dev/null +++ b/managed/models/log_parser_preset_model_reform.go @@ -0,0 +1,161 @@ +// Code generated by gopkg.in/reform.v1. DO NOT EDIT. + +package models + +import ( + "fmt" + "strings" + + "gopkg.in/reform.v1" + "gopkg.in/reform.v1/parse" +) + +type logParserPresetTableType struct { + s parse.StructInfo + z []interface{} +} + +// Schema returns a schema name in SQL database (""). +func (v *logParserPresetTableType) Schema() string { + return v.s.SQLSchema +} + +// Name returns a view or table name in SQL database ("log_parser_presets"). +func (v *logParserPresetTableType) Name() string { + return v.s.SQLName +} + +// Columns returns a new slice of column names for that view or table in SQL database. +func (v *logParserPresetTableType) Columns() []string { + return []string{ + "id", + "name", + "description", + "operator_yaml", + "built_in", + "created_at", + "updated_at", + } +} + +// NewStruct makes a new struct for that view or table. +func (v *logParserPresetTableType) NewStruct() reform.Struct { + return new(LogParserPreset) +} + +// NewRecord makes a new record for that table. +func (v *logParserPresetTableType) NewRecord() reform.Record { + return new(LogParserPreset) +} + +// PKColumnIndex returns an index of primary key column for that table in SQL database. +func (v *logParserPresetTableType) PKColumnIndex() uint { + return uint(v.s.PKFieldIndex) +} + +// LogParserPresetTable represents log_parser_presets view or table in SQL database. +var LogParserPresetTable = &logParserPresetTableType{ + s: parse.StructInfo{ + Type: "LogParserPreset", + SQLName: "log_parser_presets", + Fields: []parse.FieldInfo{ + {Name: "ID", Type: "string", Column: "id"}, + {Name: "Name", Type: "string", Column: "name"}, + {Name: "Description", Type: "*string", Column: "description"}, + {Name: "OperatorYAML", Type: "string", Column: "operator_yaml"}, + {Name: "BuiltIn", Type: "bool", Column: "built_in"}, + {Name: "CreatedAt", Type: "time.Time", Column: "created_at"}, + {Name: "UpdatedAt", Type: "time.Time", Column: "updated_at"}, + }, + PKFieldIndex: 0, + }, + z: new(LogParserPreset).Values(), +} + +// String returns a string representation of this struct or record. +func (s LogParserPreset) String() string { + res := make([]string, 7) + res[0] = "ID: " + reform.Inspect(s.ID, true) + res[1] = "Name: " + reform.Inspect(s.Name, true) + res[2] = "Description: " + reform.Inspect(s.Description, true) + res[3] = "OperatorYAML: " + reform.Inspect(s.OperatorYAML, true) + res[4] = "BuiltIn: " + reform.Inspect(s.BuiltIn, true) + res[5] = "CreatedAt: " + reform.Inspect(s.CreatedAt, true) + res[6] = "UpdatedAt: " + reform.Inspect(s.UpdatedAt, true) + return strings.Join(res, ", ") +} + +// Values returns a slice of struct or record field values. +// Returned interface{} values are never untyped nils. +func (s *LogParserPreset) Values() []interface{} { + return []interface{}{ + s.ID, + s.Name, + s.Description, + s.OperatorYAML, + s.BuiltIn, + s.CreatedAt, + s.UpdatedAt, + } +} + +// Pointers returns a slice of pointers to struct or record fields. +// Returned interface{} values are never untyped nils. +func (s *LogParserPreset) Pointers() []interface{} { + return []interface{}{ + &s.ID, + &s.Name, + &s.Description, + &s.OperatorYAML, + &s.BuiltIn, + &s.CreatedAt, + &s.UpdatedAt, + } +} + +// View returns View object for that struct. +func (s *LogParserPreset) View() reform.View { + return LogParserPresetTable +} + +// Table returns Table object for that record. +func (s *LogParserPreset) Table() reform.Table { + return LogParserPresetTable +} + +// PKValue returns a value of primary key for that record. +// Returned interface{} value is never untyped nil. +func (s *LogParserPreset) PKValue() interface{} { + return s.ID +} + +// PKPointer returns a pointer to primary key field for that record. +// Returned interface{} value is never untyped nil. +func (s *LogParserPreset) PKPointer() interface{} { + return &s.ID +} + +// HasPK returns true if record has non-zero primary key set, false otherwise. +func (s *LogParserPreset) HasPK() bool { + return s.ID != LogParserPresetTable.z[LogParserPresetTable.s.PKFieldIndex] +} + +// SetPK sets record primary key, if possible. +// +// Deprecated: prefer direct field assignment where possible: s.ID = pk. +func (s *LogParserPreset) SetPK(pk interface{}) { + reform.SetPK(s, pk) +} + +// check interfaces +var ( + _ reform.View = LogParserPresetTable + _ reform.Struct = (*LogParserPreset)(nil) + _ reform.Table = LogParserPresetTable + _ reform.Record = (*LogParserPreset)(nil) + _ fmt.Stringer = (*LogParserPreset)(nil) +) + +func init() { + parse.AssertUpToDate(&LogParserPresetTable.s, new(LogParserPreset)) +} diff --git a/managed/models/otel_log_sources.go b/managed/models/otel_log_sources.go new file mode 100644 index 00000000000..9b454dcaf2a --- /dev/null +++ b/managed/models/otel_log_sources.go @@ -0,0 +1,53 @@ +// Copyright (C) 2026 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +package models + +import ( + "encoding/json" + "strings" + + "github.com/pkg/errors" +) + +const ( + otelLogSourcesLabel = "log_sources" + otelLogFilePathsLabel = "log_file_paths" + otelPresetRaw = "raw" +) + +// OtelLogSourceEntry mirrors agents.logSourceEntry and the JSON in custom_labels["log_sources"]. +type OtelLogSourceEntry struct { + Path string `json:"path"` + Preset string `json:"preset"` +} + +// ParseOtelLogSourcesFromLabels returns path+preset pairs from OTEL collector custom_labels. +// It matches the logic in managed/services/agents/otelcollector.go getLogSourcesFromAgent. +func ParseOtelLogSourcesFromLabels(labels map[string]string) ([]OtelLogSourceEntry, error) { + if labels == nil { + return nil, nil + } + if s := labels[otelLogSourcesLabel]; s != "" { + var entries []OtelLogSourceEntry + if err := json.Unmarshal([]byte(s), &entries); err != nil { + return nil, errors.WithStack(err) + } + return entries, nil + } + if s := labels[otelLogFilePathsLabel]; s != "" { + var entries []OtelLogSourceEntry + for _, p := range strings.Split(s, ",") { + p = strings.TrimSpace(p) + if p != "" { + entries = append(entries, OtelLogSourceEntry{Path: p, Preset: otelPresetRaw}) + } + } + return entries, nil + } + return nil, nil +} diff --git a/managed/models/settings.go b/managed/models/settings.go index 49be797841d..7db09463b8b 100644 --- a/managed/models/settings.go +++ b/managed/models/settings.go @@ -24,16 +24,20 @@ import ( // Default values for settings. These values are used when settings are not set. const ( - AdvisorsEnabledDefault = true - AlertingEnabledDefault = true - TelemetryEnabledDefault = true - UpdatesEnabledDefault = true - BackupManagementEnabledDefault = true - VictoriaMetricsCacheEnabledDefault = false - AzureDiscoverEnabledDefault = false - AccessControlEnabledDefault = false - InternalPgQANEnabledDefault = false - awsPartitionID = "aws" + AdvisorsEnabledDefault = true + AlertingEnabledDefault = true + TelemetryEnabledDefault = true + UpdatesEnabledDefault = true + BackupManagementEnabledDefault = true + VictoriaMetricsCacheEnabledDefault = false + AzureDiscoverEnabledDefault = false + AccessControlEnabledDefault = false + InternalPgQANEnabledDefault = false + OtelCollectorEnabledDefault = true + OtelLogsRetentionDaysDefault = 7 + OtelTracesRetentionDaysDefault = 7 + OtelClickHouseMetricsRetentionDaysDefault = 90 + awsPartitionID = "aws" ) // MetricsResolutions contains standard VictoriaMetrics metrics resolutions. @@ -93,6 +97,16 @@ type Settings struct { Enabled *bool `json:"enabled"` } + // Otel collector on server (receives OTLP from agents); retention for OTEL ClickHouse tables. + Otel struct { + CollectorEnabled *bool `json:"collector_enabled"` + LogsRetentionDays *int `json:"logs_retention_days"` + // TracesRetentionDays is TTL for otel.otel_traces (and trace TTL in server otel-collector exporters). + TracesRetentionDays *int `json:"traces_retention_days"` + // MetricsRetentionDays is TTL for otel.otel_metrics_sum (and sum-metric TTL in server otel-collector exporters). + MetricsRetentionDays *int `json:"metrics_retention_days"` + } `json:"otel"` + Alerting struct { Enabled *bool `json:"enabled"` } `json:"alerting"` @@ -191,6 +205,38 @@ func (s *Settings) IsVictoriaMetricsCacheEnabled() bool { return VictoriaMetricsCacheEnabledDefault } +// IsOtelCollectorEnabled returns true if the OTEL collector on the server is enabled. +func (s *Settings) IsOtelCollectorEnabled() bool { + if s.Otel.CollectorEnabled != nil { + return *s.Otel.CollectorEnabled + } + return OtelCollectorEnabledDefault +} + +// GetOtelLogsRetentionDays returns the TTL in days for otel.logs in ClickHouse. +func (s *Settings) GetOtelLogsRetentionDays() int { + if s.Otel.LogsRetentionDays != nil && *s.Otel.LogsRetentionDays > 0 { + return *s.Otel.LogsRetentionDays + } + return OtelLogsRetentionDaysDefault +} + +// GetOtelTracesRetentionDays returns the TTL in days for otel.otel_traces in ClickHouse. +func (s *Settings) GetOtelTracesRetentionDays() int { + if s.Otel.TracesRetentionDays != nil && *s.Otel.TracesRetentionDays > 0 { + return *s.Otel.TracesRetentionDays + } + return OtelTracesRetentionDaysDefault +} + +// GetOtelMetricsRetentionDays returns the TTL in days for otel.otel_metrics_sum in ClickHouse. +func (s *Settings) GetOtelMetricsRetentionDays() int { + if s.Otel.MetricsRetentionDays != nil && *s.Otel.MetricsRetentionDays > 0 { + return *s.Otel.MetricsRetentionDays + } + return OtelClickHouseMetricsRetentionDaysDefault +} + // AdvisorsRunIntervals represents intervals between Advisors checks. type AdvisorsRunIntervals struct { StandardInterval time.Duration `json:"standard_interval"` @@ -236,4 +282,14 @@ func (s *Settings) fillDefaults() { if s.Updates.SnoozeDuration == 0 { s.Updates.SnoozeDuration = DefaultSnoozeDuration } + + if s.Otel.LogsRetentionDays == nil || (s.Otel.LogsRetentionDays != nil && *s.Otel.LogsRetentionDays <= 0) { + s.Otel.LogsRetentionDays = pointer.ToInt(OtelLogsRetentionDaysDefault) + } + if s.Otel.TracesRetentionDays == nil || (s.Otel.TracesRetentionDays != nil && *s.Otel.TracesRetentionDays <= 0) { + s.Otel.TracesRetentionDays = pointer.ToInt(OtelTracesRetentionDaysDefault) + } + if s.Otel.MetricsRetentionDays == nil || (s.Otel.MetricsRetentionDays != nil && *s.Otel.MetricsRetentionDays <= 0) { + s.Otel.MetricsRetentionDays = pointer.ToInt(OtelClickHouseMetricsRetentionDaysDefault) + } } diff --git a/managed/models/settings_helpers_test.go b/managed/models/settings_helpers_test.go index 2fade2d6142..c173374f23c 100644 --- a/managed/models/settings_helpers_test.go +++ b/managed/models/settings_helpers_test.go @@ -57,6 +57,9 @@ func TestSettings(t *testing.T) { EncryptedItems: actual.EncryptedItems, } expected.Updates.SnoozeDuration = models.DefaultSnoozeDuration + expected.Otel.LogsRetentionDays = pointer.ToInt(models.OtelLogsRetentionDaysDefault) + expected.Otel.TracesRetentionDays = pointer.ToInt(models.OtelTracesRetentionDaysDefault) + expected.Otel.MetricsRetentionDays = pointer.ToInt(models.OtelClickHouseMetricsRetentionDaysDefault) assert.Equal(t, expected, actual) }) @@ -81,6 +84,9 @@ func TestSettings(t *testing.T) { }, } expected.Updates.SnoozeDuration = models.DefaultSnoozeDuration + expected.Otel.LogsRetentionDays = pointer.ToInt(models.OtelLogsRetentionDaysDefault) + expected.Otel.TracesRetentionDays = pointer.ToInt(models.OtelTracesRetentionDaysDefault) + expected.Otel.MetricsRetentionDays = pointer.ToInt(models.OtelClickHouseMetricsRetentionDaysDefault) assert.Equal(t, expected, s) }) diff --git a/managed/otel/config.go b/managed/otel/config.go new file mode 100644 index 00000000000..6b88d9febd2 --- /dev/null +++ b/managed/otel/config.go @@ -0,0 +1,173 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package otel + +import ( + "fmt" + "path/filepath" + "regexp" + "strings" + + "github.com/sirupsen/logrus" + "gopkg.in/reform.v1" + + "github.com/percona/pmm/managed/models" +) + +// IndentYAML prefixes each line of block with indent so it can be nested under a YAML key +// (e.g. filelog receiver operators under "operators:"). +func IndentYAML(block, indent string) string { + if block == "" { + return "" + } + lines := strings.Split(strings.TrimSuffix(block, "\n"), "\n") + for i, line := range lines { + lines[i] = indent + line + } + return strings.Join(lines, "\n") + "\n" +} + +// sanitizePresetName returns a safe receiver id suffix (alphanumeric and underscore only). +func sanitizePresetName(name string) string { + return regexp.MustCompile(`[^a-zA-Z0-9_]+`).ReplaceAllString(name, "_") +} + +func quoteYAMLString(s string) string { + if s == "" || (!strings.Contains(s, "'") && !strings.Contains(s, "\n")) { + return "'" + s + "'" + } + return "'" + strings.ReplaceAll(s, "'", "''") + "'" +} + +// BuildServerOtelConfigYAML builds the server-side otel-collector config YAML with filelog +// receivers (using presets from log_parser_presets) and OTLP receiver. Filelog uses start_at: beginning. +// If no presets can be loaded, returns receiver-only config (OTLP + processors + ClickHouse). +func BuildServerOtelConfigYAML(q *reform.Querier, endpoint, username, password string, retentionDays int) (string, error) { + if endpoint == "" { + endpoint = "127.0.0.1:9000" + } + if username == "" { + username = "default" + } + if password == "" { + password = "clickhouse" + } + if retentionDays <= 0 { + retentionDays = 7 + } + chEndpoint := "tcp://" + endpoint + ttl := fmt.Sprintf("%dh", retentionDays*24) + + processorsBlock := ` memory_limiter: + check_interval: 1s + limit_mib: 512 + resource/add_server_node: + attributes: + - key: node_name + value: pmm-server + action: insert + transform: + error_mode: ignore + log_statements: + - set(resource.attributes["pmm_source"], resource.attributes["node_name"]) where resource.attributes["node_name"] != nil + batch: + timeout: 1s + send_batch_size: 1024 + send_batch_max_size: 2048 +` + + exportersBlock := `exporters: + clickhouse: + endpoint: ` + chEndpoint + ` + database: otel + username: ` + quoteYAMLString(username) + ` + password: ` + quoteYAMLString(password) + ` + logs_table_name: logs + create_schema: false + ttl: ` + ttl + ` + timeout: 5s + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s +` + + // Build filelog receivers from DefaultServerOtelLogSources and DB presets. + var filelogReceivers []string + var receiversYaml strings.Builder + receiversYaml.WriteString("receivers:\n") + receiversYaml.WriteString(" otlp:\n protocols:\n grpc:\n endpoint: 0.0.0.0:4317\n http:\n endpoint: 0.0.0.0:4318\n") + + for _, src := range DefaultServerOtelLogSources { + preset, err := models.FindLogParserPresetByName(q, src.Preset) + if err != nil { + return "", err + } + if preset == nil { + logrus.WithField("preset", src.Preset).Debugf("Skipping server log source %q: preset not found", src.Path) + continue + } + // Use path-derived ID to avoid duplicate YAML keys when multiple sources share the same preset (e.g. pmm_agent for pmm-agent.log, qan-api2.log, vmproxy.log). + stem := strings.TrimSuffix(filepath.Base(src.Path), filepath.Ext(src.Path)) + receiverID := "filelog/server_" + sanitizePresetName(stem) + filelogReceivers = append(filelogReceivers, receiverID) + receiversYaml.WriteString(" " + receiverID + ":\n") + receiversYaml.WriteString(" include: [" + fmt.Sprintf("%q", src.Path) + "]\n") + receiversYaml.WriteString(" start_at: beginning\n") + if preset.OperatorYAML != "" { + receiversYaml.WriteString(" operators:\n") + receiversYaml.WriteString(IndentYAML(preset.OperatorYAML, " ")) + } + } + + if len(filelogReceivers) == 0 { + // Fallback: receiver-only config (OTLP only). + logrus.Warn("No server log presets loaded; using receiver-only OTEL config") + pipelineReceivers := "[otlp]" + return `# Managed by pmm-managed. DO NOT EDIT. +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 +processors: +` + processorsBlock + exportersBlock + ` +service: + pipelines: + logs: + receivers: ` + pipelineReceivers + ` + processors: [memory_limiter, resource/add_server_node, transform, batch] + exporters: [clickhouse] +`, nil + } + + // Full config: filelog + OTLP. + pipelineReceivers := "[" + strings.Join(filelogReceivers, ", ") + ", otlp]" + return `# Managed by pmm-managed. DO NOT EDIT. +` + receiversYaml.String() + ` +processors: +` + processorsBlock + exportersBlock + ` +service: + pipelines: + logs: + receivers: ` + pipelineReceivers + ` + processors: [memory_limiter, resource/add_server_node, transform, batch] + exporters: [clickhouse] +`, nil +} diff --git a/managed/otel/config_test.go b/managed/otel/config_test.go new file mode 100644 index 00000000000..e15f34c6787 --- /dev/null +++ b/managed/otel/config_test.go @@ -0,0 +1,89 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package otel + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "gopkg.in/reform.v1" + "gopkg.in/reform.v1/dialects/postgresql" + + "github.com/percona/pmm/managed/models" + "github.com/percona/pmm/managed/utils/testdb" +) + +func TestIndentYAML(t *testing.T) { + t.Run("empty", func(t *testing.T) { + assert.Equal(t, "", IndentYAML("", " ")) + }) + t.Run("single_line", func(t *testing.T) { + assert.Equal(t, " - type: foo\n", IndentYAML("- type: foo", " ")) + }) + t.Run("multi_line", func(t *testing.T) { + block := "- type: key_value_parser\n parse_from: body\n" + got := IndentYAML(block, " ") + assert.True(t, strings.HasPrefix(got, " - type: key_value_parser")) + assert.Contains(t, got, " parse_from: body") + }) +} + +func TestBuildServerOtelConfigYAML(t *testing.T) { + sqlDB := testdb.Open(t, models.SkipFixtures, nil) + db := reform.NewDB(sqlDB, postgresql.Dialect, nil) + t.Cleanup(func() { + _ = sqlDB.Close() + }) + + t.Run("receiver_only_when_no_presets", func(t *testing.T) { + // SkipFixtures: log_parser_presets table exists but is empty, so no filelog receivers. + yaml, err := BuildServerOtelConfigYAML(db.Querier, "127.0.0.1:9000", "default", "clickhouse", 7) + require.NoError(t, err) + assert.Contains(t, yaml, "receivers:") + assert.Contains(t, yaml, "otlp:") + assert.Contains(t, yaml, "endpoint: 0.0.0.0:4317") + assert.Contains(t, yaml, "processors:") + assert.Contains(t, yaml, "memory_limiter:") + assert.Contains(t, yaml, "transform:") + assert.Contains(t, yaml, "exporters:") + assert.Contains(t, yaml, "clickhouse:") + assert.Contains(t, yaml, "receivers: [otlp]") + assert.NotContains(t, yaml, "filelog/") + }) + + t.Run("full_config_with_presets", func(t *testing.T) { + // Use DB with fixtures so log_parser_presets has rows. + sqlDB2 := testdb.Open(t, models.SetupFixtures, nil) + db2 := reform.NewDB(sqlDB2, postgresql.Dialect, nil) + t.Cleanup(func() { _ = sqlDB2.Close() }) + + yaml, err := BuildServerOtelConfigYAML(db2.Querier, "127.0.0.1:9000", "ch", "secret", 14) + require.NoError(t, err) + assert.Contains(t, yaml, "receivers:") + assert.Contains(t, yaml, "otlp:") + assert.Contains(t, yaml, "filelog/server_") + assert.Contains(t, yaml, "start_at: beginning") + assert.Contains(t, yaml, "include:") + assert.Contains(t, yaml, "/srv/logs/") + assert.Contains(t, yaml, "operators:") + assert.Contains(t, yaml, "processors:") + assert.Contains(t, yaml, "clickhouse:") + assert.Contains(t, yaml, "receivers: [") + assert.Contains(t, yaml, ", otlp]") + }) +} diff --git a/managed/otel/correlation.go b/managed/otel/correlation.go new file mode 100644 index 00000000000..66eb4fb702d --- /dev/null +++ b/managed/otel/correlation.go @@ -0,0 +1,33 @@ +// Copyright (C) 2026 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +package otel + +// ProxyComponent identifies proxy / router legs for Phase 1 topology stitching (see docs/internal/ebpf-proxy-ha-correlation.md). +type ProxyComponent string + +const ( + ProxyHAProxy ProxyComponent = "haproxy" + ProxyProxySQL ProxyComponent = "proxysql" + ProxyPgBouncer ProxyComponent = "pgbouncer" + ProxyMongos ProxyComponent = "mongos" +) + +// OrchestratorKind marks control-plane enrichers (Patroni, etc.). +type OrchestratorKind string + +const ( + OrchestratorPatroni OrchestratorKind = "patroni" +) + +// AnnotateFailoverWindow describes a coarse failover interval attached to edges or nodes in rollups (MVP depth). +type AnnotateFailoverWindow struct { + StartUnix int64 + EndUnix int64 + Kind OrchestratorKind + Note string +} diff --git a/managed/otel/ebpf_schema.go b/managed/otel/ebpf_schema.go new file mode 100644 index 00000000000..3fc13456b11 --- /dev/null +++ b/managed/otel/ebpf_schema.go @@ -0,0 +1,167 @@ +// Copyright (C) 2026 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +package otel + +import ( + "context" + "database/sql" + "fmt" + + _ "github.com/ClickHouse/clickhouse-go/v2" // register ClickHouse driver + "github.com/sirupsen/logrus" +) + +// EnsureOtelTracesMetricsAndServiceMapTables creates ClickHouse tables used by the OTEL ClickHouse exporter +// for traces and sum metrics, plus Phase 1 service map rollup targets. DDL aligns with +// opentelemetry-collector-contrib clickhouseexporter (MergeTree, column names). +// create_schema on the collector remains false; PMM-managed owns DDL. +func EnsureOtelTracesMetricsAndServiceMapTables(ctx context.Context, dsn string, spanRetentionDays, metricRetentionDays int) error { + if spanRetentionDays <= 0 { + spanRetentionDays = 7 + } + if metricRetentionDays <= 0 { + metricRetentionDays = 90 + } + db, err := sql.Open("clickhouse", dsn) + if err != nil { + return fmt.Errorf("open clickhouse: %w", err) + } + defer db.Close() //nolint:errcheck + + db.SetConnMaxLifetime(0) + + if _, err := db.ExecContext(ctx, "CREATE DATABASE IF NOT EXISTS otel"); err != nil { + return fmt.Errorf("create database otel: %w", err) + } + + tracesDDL := fmt.Sprintf(`CREATE TABLE IF NOT EXISTS otel.otel_traces +( + Timestamp DateTime64(9) CODEC(Delta, ZSTD(1)), + TraceId String CODEC(ZSTD(1)), + SpanId String CODEC(ZSTD(1)), + ParentSpanId String CODEC(ZSTD(1)), + TraceState String CODEC(ZSTD(1)), + SpanName LowCardinality(String) CODEC(ZSTD(1)), + SpanKind LowCardinality(String) CODEC(ZSTD(1)), + ServiceName LowCardinality(String) CODEC(ZSTD(1)), + ResourceAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), + ScopeName String CODEC(ZSTD(1)), + ScopeVersion String CODEC(ZSTD(1)), + SpanAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), + Duration UInt64 CODEC(ZSTD(1)), + StatusCode LowCardinality(String) CODEC(ZSTD(1)), + StatusMessage String CODEC(ZSTD(1)), + Events Nested ( + Timestamp DateTime64(9), + Name LowCardinality(String), + Attributes Map(LowCardinality(String), String) + ) CODEC(ZSTD(1)), + Links Nested ( + TraceId String, + SpanId String, + TraceState String, + Attributes Map(LowCardinality(String), String) + ) CODEC(ZSTD(1)), + INDEX idx_trace_id TraceId TYPE bloom_filter(0.001) GRANULARITY 1, + INDEX idx_res_attr_key mapKeys(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_span_attr_key mapKeys(SpanAttributes) TYPE bloom_filter(0.01) GRANULARITY 1 +) ENGINE = MergeTree +PARTITION BY toDate(Timestamp) +ORDER BY (ServiceName, SpanName, toDateTime(Timestamp)) +TTL toDateTime(Timestamp) + toIntervalDay(%d) +SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1`, spanRetentionDays) + + if _, err := db.ExecContext(ctx, tracesDDL); err != nil { + return fmt.Errorf("create otel.otel_traces: %w", err) + } + logrus.Debug("OTEL schema: table otel.otel_traces ensured") + + metricsSumDDL := fmt.Sprintf(`CREATE TABLE IF NOT EXISTS otel.otel_metrics_sum +( + ResourceAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), + ResourceSchemaUrl String CODEC(ZSTD(1)), + ScopeName String CODEC(ZSTD(1)), + ScopeVersion String CODEC(ZSTD(1)), + ScopeAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), + ScopeDroppedAttrCount UInt32 CODEC(ZSTD(1)), + ScopeSchemaUrl String CODEC(ZSTD(1)), + ServiceName LowCardinality(String) CODEC(ZSTD(1)), + MetricName String CODEC(ZSTD(1)), + MetricDescription String CODEC(ZSTD(1)), + MetricUnit String CODEC(ZSTD(1)), + Attributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), + StartTimeUnix DateTime64(9) CODEC(Delta, ZSTD(1)), + TimeUnix DateTime64(9) CODEC(Delta, ZSTD(1)), + Value Float64 CODEC(ZSTD(1)), + Flags UInt32 CODEC(ZSTD(1)), + Exemplars Nested ( + FilteredAttributes Map(LowCardinality(String), String), + TimeUnix DateTime64(9), + Value Float64, + SpanId String, + TraceId String + ) CODEC(ZSTD(1)), + AggregationTemporality Int32 CODEC(ZSTD(1)), + IsMonotonic Boolean CODEC(Delta, ZSTD(1)), + INDEX idx_res_attr_key mapKeys(ResourceAttributes) TYPE bloom_filter(0.01) GRANULARITY 1, + INDEX idx_attr_key mapKeys(Attributes) TYPE bloom_filter(0.01) GRANULARITY 1 +) ENGINE = MergeTree +PARTITION BY toDate(TimeUnix) +ORDER BY (ServiceName, MetricName, Attributes, toUnixTimestamp64Nano(TimeUnix)) +TTL toDateTime(TimeUnix) + toIntervalDay(%d) +SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1`, metricRetentionDays) + + if _, err := db.ExecContext(ctx, metricsSumDDL); err != nil { + return fmt.Errorf("create otel.otel_metrics_sum: %w", err) + } + logrus.Debug("OTEL schema: table otel.otel_metrics_sum ensured") + + nodesDDL := `CREATE TABLE IF NOT EXISTS otel.service_map_nodes_1m +( + bucket DateTime, + id String, + title String, + subtitle String, + mainstat String, + secondarystat String, + color String, + pmm_node_id String, + pmm_agent_id String +) ENGINE = MergeTree +PARTITION BY toDate(bucket) +ORDER BY (bucket, id) +TTL bucket + toIntervalDay(32) +SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1` + + if _, err := db.ExecContext(ctx, nodesDDL); err != nil { + return fmt.Errorf("create otel.service_map_nodes_1m: %w", err) + } + + edgesDDL := `CREATE TABLE IF NOT EXISTS otel.service_map_edges_1m +( + bucket DateTime, + id String, + source String, + target String, + mainstat String, + secondarystat String, + thickness Float64, + pmm_node_id String +) ENGINE = MergeTree +PARTITION BY toDate(bucket) +ORDER BY (bucket, source, target) +TTL bucket + toIntervalDay(32) +SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1` + + if _, err := db.ExecContext(ctx, edgesDDL); err != nil { + return fmt.Errorf("create otel.service_map_edges_1m: %w", err) + } + + logrus.Debug("OTEL schema: service map rollup tables ensured") + return nil +} diff --git a/managed/otel/identity.go b/managed/otel/identity.go new file mode 100644 index 00000000000..5d76443c884 --- /dev/null +++ b/managed/otel/identity.go @@ -0,0 +1,68 @@ +// Copyright (C) 2026 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +package otel + +import ( + "strings" +) + +// Phase1 identity: resource attribute keys required for service-map rollups (see docs/internal/ebpf-otel-identity-v1.md). +const ( + AttrServiceName = "service.name" + AttrPMMNodeID = "pmm.node_id" + AttrPMMAgentID = "pmm.agent_id" + AttrNetPeerName = "net.peer.name" + AttrNetPeerIP = "net.peer.ip" + AttrNetPeerPort = "net.peer.port" + AttrDBSystem = "db.system" + AttrPMMComponentRole = "pmm.component_role" + AttrPMMMapEdgeTarget = "pmm.map_edge_target" + AttrErrorType = "error.type" +) + +// IdentityCheck reports whether resource attributes satisfy Phase 1 map eligibility. +type IdentityCheck struct { + OK bool + Missing []string + HasPeer bool + HasDBSys bool +} + +// CheckPhase1ResourceIdentity validates resource attributes (string map as stored in CH Map or OTLP). +func CheckPhase1ResourceIdentity(attrs map[string]string) IdentityCheck { + var missing []string + add := func(ok bool, name string) { + if !ok { + missing = append(missing, name) + } + } + + add(strings.TrimSpace(attrs[AttrServiceName]) != "", AttrServiceName) + add(strings.TrimSpace(attrs[AttrPMMNodeID]) != "", AttrPMMNodeID) + add(strings.TrimSpace(attrs[AttrPMMAgentID]) != "", AttrPMMAgentID) + + hasPeer := strings.TrimSpace(attrs[AttrNetPeerName]) != "" || + (strings.TrimSpace(attrs[AttrNetPeerIP]) != "" && strings.TrimSpace(attrs[AttrNetPeerPort]) != "") + add(hasPeer, "net.peer.name_or_ip_port") + role := strings.TrimSpace(attrs[AttrPMMComponentRole]) + add(role != "", AttrPMMComponentRole) + + dbSys := strings.TrimSpace(attrs[AttrDBSystem]) + hasDB := dbSys != "" + // For database role, db.system should be set; for other roles it is still recommended. + if strings.EqualFold(role, "database") { + add(hasDB, AttrDBSystem) + } + + return IdentityCheck{ + OK: len(missing) == 0, + Missing: missing, + HasPeer: hasPeer, + HasDBSys: hasDB, + } +} diff --git a/managed/otel/identity_test.go b/managed/otel/identity_test.go new file mode 100644 index 00000000000..90f3c24fd32 --- /dev/null +++ b/managed/otel/identity_test.go @@ -0,0 +1,44 @@ +package otel + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCheckPhase1ResourceIdentity_OK(t *testing.T) { + t.Parallel() + c := CheckPhase1ResourceIdentity(map[string]string{ + AttrServiceName: "checkout", + AttrPMMNodeID: "node-1", + AttrPMMAgentID: "agent-1", + AttrNetPeerName: "10.0.0.5:3306", + AttrDBSystem: "mysql", + AttrPMMComponentRole: "app", + }) + assert.True(t, c.OK) + assert.Empty(t, c.Missing) +} + +func TestCheckPhase1ResourceIdentity_Missing(t *testing.T) { + t.Parallel() + c := CheckPhase1ResourceIdentity(map[string]string{ + AttrServiceName: "checkout", + }) + assert.False(t, c.OK) + assert.NotEmpty(t, c.Missing) +} + +func TestCheckPhase1ResourceIdentity_PeerIPPort(t *testing.T) { + t.Parallel() + c := CheckPhase1ResourceIdentity(map[string]string{ + AttrServiceName: "checkout", + AttrPMMNodeID: "node-1", + AttrPMMAgentID: "agent-1", + AttrNetPeerIP: "10.0.0.5", + AttrNetPeerPort: "3306", + AttrDBSystem: "mysql", + AttrPMMComponentRole: "database", + }) + assert.True(t, c.OK) +} diff --git a/managed/otel/schema.go b/managed/otel/schema.go new file mode 100644 index 00000000000..37b3f05d614 --- /dev/null +++ b/managed/otel/schema.go @@ -0,0 +1,106 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +// Package otel contains helpers for managing the ClickHouse schema used by OTEL logs. +package otel + +import ( + "context" + "database/sql" + "fmt" + "net/url" + + _ "github.com/ClickHouse/clickhouse-go/v2" // register ClickHouse driver + "github.com/sirupsen/logrus" + + "github.com/percona/pmm/managed/utils/envvars" +) + +const ( + defaultClickhouseAddr = "127.0.0.1:9000" + defaultClickhouseUser = "default" + defaultClickhousePassword = "clickhouse" +) + +// EnsureOtelSchema creates the ClickHouse database `otel` and table `otel.logs` if they do not exist. +// DSN must be a ClickHouse connection string (e.g. "tcp://user:password@host:port/default"). RetentionDays is used for the TTL of otel.logs. +func EnsureOtelSchema(ctx context.Context, dsn string, retentionDays int) error { + if retentionDays <= 0 { + retentionDays = 7 + } + db, err := sql.Open("clickhouse", dsn) + if err != nil { + return fmt.Errorf("open clickhouse: %w", err) + } + defer db.Close() //nolint:errcheck + + db.SetConnMaxLifetime(0) + + if _, err := db.ExecContext(ctx, "CREATE DATABASE IF NOT EXISTS otel"); err != nil { + return fmt.Errorf("create database otel: %w", err) + } + logrus.Debug("OTEL schema: database otel ensured") + + createTable := fmt.Sprintf(`CREATE TABLE IF NOT EXISTS otel.logs +( + Timestamp DateTime64(9) CODEC(Delta(8), ZSTD(1)), + TimestampTime DateTime DEFAULT toDateTime(Timestamp), + TraceId String CODEC(ZSTD(1)), + SpanId String CODEC(ZSTD(1)), + TraceFlags UInt8, + SeverityText LowCardinality(String) CODEC(ZSTD(1)), + SeverityNumber UInt8, + ServiceName LowCardinality(String) CODEC(ZSTD(1)), + Body String CODEC(ZSTD(1)), + ResourceSchemaUrl LowCardinality(String) CODEC(ZSTD(1)), + ResourceAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), + ScopeSchemaUrl LowCardinality(String) CODEC(ZSTD(1)), + ScopeName String CODEC(ZSTD(1)), + ScopeVersion LowCardinality(String) CODEC(ZSTD(1)), + ScopeAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), + LogAttributes Map(LowCardinality(String), String) CODEC(ZSTD(1)), + INDEX idx_trace_id TraceId TYPE bloom_filter(0.001) GRANULARITY 1, + INDEX idx_body Body TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 8 +) +ENGINE = MergeTree +PARTITION BY toDate(TimestampTime) +PRIMARY KEY (ServiceName, TimestampTime) +ORDER BY (ServiceName, TimestampTime, Timestamp) +TTL TimestampTime + toIntervalDay(%d) +SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1`, retentionDays) + + if _, err := db.ExecContext(ctx, createTable); err != nil { + return fmt.Errorf("create table otel.logs: %w", err) + } + logrus.Debug("OTEL schema: table otel.logs ensured") + return nil +} + +// EnsureOtelSchemaFromEnv creates the OTEL schema using PMM ClickHouse env vars (same as pmm-managed main). +// Uses PMM_CLICKHOUSE_ADDR, PMM_CLICKHOUSE_USER, PMM_CLICKHOUSE_PASSWORD. Safe to call when OTEL is disabled (no-op). Logs errors but does not fail the caller. +func EnsureOtelSchemaFromEnv(ctx context.Context, retentionDays int) { + addr := envvars.GetEnv("PMM_CLICKHOUSE_ADDR", defaultClickhouseAddr) + username := envvars.GetEnv("PMM_CLICKHOUSE_USER", defaultClickhouseUser) + password := envvars.GetEnv("PMM_CLICKHOUSE_PASSWORD", defaultClickhousePassword) + chURI := url.URL{ + Scheme: "tcp", + User: url.UserPassword(username, password), + Host: addr, + Path: "/default", + } + if err := EnsureOtelSchema(ctx, chURI.String(), retentionDays); err != nil { + logrus.WithError(err).Warn("Failed to ensure OTEL ClickHouse schema") + } +} diff --git a/managed/otel/server_sources.go b/managed/otel/server_sources.go new file mode 100644 index 00000000000..e83d8612cb4 --- /dev/null +++ b/managed/otel/server_sources.go @@ -0,0 +1,37 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package otel + +// LogSourceEntry defines a path and preset name for server-side filelog receivers. +type LogSourceEntry struct { + Path string + Preset string +} + +// DefaultServerOtelLogSources is the default list of (path, preset name) for the server's +// OTEL collector filelog receivers. Matches actual PMM server layout in /srv/logs/. +var DefaultServerOtelLogSources = []LogSourceEntry{ + {Path: "/srv/logs/nginx.log", Preset: "nginx_access"}, + {Path: "/srv/logs/grafana.log", Preset: "grafana"}, + {Path: "/srv/logs/pmm-managed.log", Preset: "pmm_managed"}, + {Path: "/srv/logs/pmm-agent.log", Preset: "pmm_agent"}, + {Path: "/srv/logs/postgresql14.log", Preset: "postgres"}, + {Path: "/srv/logs/clickhouse-server.log", Preset: "clickhouse_server"}, + {Path: "/srv/logs/otel-collector.log", Preset: "otel_collector"}, + {Path: "/srv/logs/supervisord.log", Preset: "supervisord"}, + {Path: "/srv/logs/qan-api2.log", Preset: "pmm_agent"}, + {Path: "/srv/logs/vmproxy.log", Preset: "pmm_agent"}, +} diff --git a/managed/pmm-managed b/managed/pmm-managed new file mode 100755 index 00000000000..8522038ccfb Binary files /dev/null and b/managed/pmm-managed differ diff --git a/managed/services/agents/otelcollector.go b/managed/services/agents/otelcollector.go new file mode 100644 index 00000000000..08e5183072c --- /dev/null +++ b/managed/services/agents/otelcollector.go @@ -0,0 +1,309 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package agents + +import ( + "encoding/json" + "fmt" + "regexp" + "sort" + "strings" + + "github.com/AlekSi/pointer" + "gopkg.in/reform.v1" + + agentv1 "github.com/percona/pmm/api/agent/v1" + inventoryv1 "github.com/percona/pmm/api/inventory/v1" + "github.com/percona/pmm/managed/models" + "github.com/percona/pmm/managed/otel" +) + +const ( + logFilePathsLabel = "log_file_paths" + logSourcesLabel = "log_sources" + presetRaw = "raw" +) + +var presetNameSanitizer = regexp.MustCompile(`[^a-zA-Z0-9_]+`) + +// logSourceEntry matches the JSON stored in custom_labels["log_sources"]. +type logSourceEntry struct { + Path string `json:"path"` + Preset string `json:"preset"` +} + +// getLogSourcesFromAgent returns path+preset pairs from agent custom_labels. +// Prefers log_sources JSON; falls back to log_file_paths with preset "raw". +func getLogSourcesFromAgent(row *models.Agent) ([]logSourceEntry, error) { + labels, err := row.GetCustomLabels() + if err != nil { + return nil, err + } + if s := labels[logSourcesLabel]; s != "" { + var entries []logSourceEntry + if err := json.Unmarshal([]byte(s), &entries); err != nil { + return nil, err + } + return entries, nil + } + // Legacy: log_file_paths as comma-separated paths with preset "raw". + if s := labels[logFilePathsLabel]; s != "" { + var entries []logSourceEntry + for _, p := range strings.Split(s, ",") { + p = strings.TrimSpace(p) + if p != "" { + entries = append(entries, logSourceEntry{Path: p, Preset: presetRaw}) + } + } + return entries, nil + } + return nil, nil +} + +// sanitizePresetName returns a safe receiver id suffix (alphanumeric and underscore only). +func sanitizePresetName(name string) string { + return presetNameSanitizer.ReplaceAllString(name, "_") +} + +// otelResourceAttributes returns resource attributes (agent_id, node_id, service_name, etc.) for the OTEL collector +// so that logs in ClickHouse can be correlated with the same labels as VictoriaMetrics. +// If node or service lookup fails, returns agent-only labels so logs still have at least agent_id and agent_type. +func otelResourceAttributes(row *models.Agent, q *reform.Querier) (map[string]string, error) { + var node *models.Node + var service *models.Service + + if nodeID := pointer.GetString(row.NodeID); nodeID != "" { + n, err := models.FindNodeByID(q, nodeID) + if err == nil { + node = n + } + } + + if serviceID := pointer.GetString(row.ServiceID); serviceID != "" { + s, err := models.FindServiceByID(q, serviceID) + if err == nil { + service = s + } + } + + labels, err := models.MergeLabels(node, service, row) + if err != nil { + return nil, err + } + + // Match scrape config: instance = agent_id for filtering/grouping. + labels["instance"] = row.AgentID + + return labels, nil +} + +// otelCollectorConfig returns desired configuration of otel-collector process for log collection (OTLP to PMM Server). +func otelCollectorConfig(row *models.Agent, q *reform.Querier) *agentv1.SetStateRequest_AgentProcess { + args := []string{ + "--config={{ .TextFiles.otelconfig }}", + } + + resourceAttrs, err := otelResourceAttributes(row, q) + if err != nil { + resourceAttrs = nil + } + + sources, err := getLogSourcesFromAgent(row) + if err != nil || len(sources) == 0 { + // No log sources or parse error: OTLP-only config. + configYaml := `receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 +` + baseOtelConfigYaml([]string{"otlp"}, []string{"otlp"}, resourceAttrs) + tdp := models.TemplateDelimsPair() + return &agentv1.SetStateRequest_AgentProcess{ + Type: inventoryv1.AgentType_AGENT_TYPE_OTEL_COLLECTOR, + TemplateLeftDelim: tdp.Left, + TemplateRightDelim: tdp.Right, + Args: args, + TextFiles: map[string]string{ + "otelconfig": configYaml, + }, + } + } + + // Group paths by preset. + byPreset := make(map[string][]string) + for _, e := range sources { + preset := e.Preset + if preset == "" { + preset = presetRaw + } + byPreset[preset] = append(byPreset[preset], e.Path) + } + + // Load preset operator YAML from DB for non-raw presets. + presetYAML := make(map[string]string) + for name := range byPreset { + if name == presetRaw { + continue + } + p, err := models.FindLogParserPresetByName(q, name) + if err != nil || p == nil { + continue + } + presetYAML[name] = p.OperatorYAML + } + + var receivers []string + configYaml := `receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 +` + for preset, paths := range byPreset { + if len(paths) == 0 { + continue + } + receiverID := "filelog/preset_" + sanitizePresetName(preset) + receivers = append(receivers, receiverID) + var quoted []string + for _, p := range paths { + if p != "" { + quoted = append(quoted, fmt.Sprintf("%q", p)) + } + } + if len(quoted) == 0 { + continue + } + configYaml += fmt.Sprintf(" %s:\n include: [%s]\n start_at: end\n", receiverID, strings.Join(quoted, ", ")) + if preset != presetRaw { + if yaml, ok := presetYAML[preset]; ok && yaml != "" { + configYaml += " operators:\n" + otel.IndentYAML(yaml, " ") + } + } + } + sort.Strings(receivers) + receivers = append(receivers, "otlp") + configYaml += baseOtelConfigYaml(receivers, []string{"otlp"}, resourceAttrs) + + tdp := models.TemplateDelimsPair() + return &agentv1.SetStateRequest_AgentProcess{ + Type: inventoryv1.AgentType_AGENT_TYPE_OTEL_COLLECTOR, + TemplateLeftDelim: tdp.Left, + TemplateRightDelim: tdp.Right, + Args: args, + TextFiles: map[string]string{ + "otelconfig": configYaml, + }, + } +} + +// quoteYAMLAttrValue returns a YAML-safe quoted value for resource processor attributes. +func quoteYAMLAttrValue(v string) string { + if v == "" { + return `""` + } + // Use double quotes and escape backslash and double quote. + var b strings.Builder + b.WriteByte('"') + for _, r := range v { + switch r { + case '\\': + b.WriteString(`\\`) + case '"': + b.WriteString(`\"`) + default: + b.WriteRune(r) + } + } + b.WriteByte('"') + return b.String() +} + +// baseOtelConfigYaml returns processors, exporters, and service.pipelines. +// logPipelineReceivers lists receivers for the logs pipeline (OTLP plus any filelog/* receivers). +// tracesMetricsReceivers lists receivers for traces and metrics only — must not include filelog, +// which emits logs only and cannot be wired into traces or metrics pipelines. +// If resourceAttrs is non-nil and non-empty, a resource processor is added to set PMM context (agent_id, node_id, etc.) +// so logs in ClickHouse match VictoriaMetrics labels. +func baseOtelConfigYaml(logPipelineReceivers, tracesMetricsReceivers []string, resourceAttrs map[string]string) string { + logReceiversYaml := "[" + strings.Join(logPipelineReceivers, ", ") + "]" + tracesMetricsReceiversYaml := "[" + strings.Join(tracesMetricsReceivers, ", ") + "]" + + processorsBlock := ` memory_limiter: + check_interval: 1s + limit_mib: 128 + batch: + timeout: 2s + send_batch_size: 10000 +` + pipelineProcessors := "[memory_limiter, batch]" + + if len(resourceAttrs) != 0 { + // Resource processor adds agent_id, node_id, service_name, etc. to every log record. + processorsBlock = ` resource/add_pmm_context: + attributes: +` + keys := make([]string, 0, len(resourceAttrs)) + for k := range resourceAttrs { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + processorsBlock += fmt.Sprintf(" - key: %s\n value: %s\n action: upsert\n", k, quoteYAMLAttrValue(resourceAttrs[k])) + } + processorsBlock += ` memory_limiter: + check_interval: 1s + limit_mib: 128 + batch: + timeout: 2s + send_batch_size: 10000 +` + pipelineProcessors = "[resource/add_pmm_context, memory_limiter, batch]" + } + + return `processors: +` + processorsBlock + ` +exporters: + otlp_http: + endpoint: '{{ .server_otlp_url }}' + headers: + "Authorization": "Basic {{ .server_auth_b64 }}" + tls: + insecure_skip_verify: {{ .server_insecure }} + +service: + telemetry: + metrics: + level: none + pipelines: + logs: + receivers: ` + logReceiversYaml + ` + processors: ` + pipelineProcessors + ` + exporters: [otlp_http] + traces: + receivers: ` + tracesMetricsReceiversYaml + ` + processors: ` + pipelineProcessors + ` + exporters: [otlp_http] + metrics: + receivers: ` + tracesMetricsReceiversYaml + ` + processors: ` + pipelineProcessors + ` + exporters: [otlp_http] +` +} diff --git a/managed/services/agents/otelcollector_test.go b/managed/services/agents/otelcollector_test.go new file mode 100644 index 00000000000..38f075846e8 --- /dev/null +++ b/managed/services/agents/otelcollector_test.go @@ -0,0 +1,50 @@ +// Copyright (C) 2026 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package agents + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/percona/pmm/managed/otel" +) + +// TestOtelCollectorOperatorsYAMLIndent verifies filelog operators are indented under +// "operators:" the same way as managed/otel.BuildServerOtelConfigYAML (flush-left DB YAML). +func TestOtelCollectorOperatorsYAMLIndent(t *testing.T) { + raw := "- type: regex_parser\n regex: '.*'\n parse_from: body" + merged := " operators:\n" + otel.IndentYAML(raw, " ") + assert.Contains(t, merged, " operators:\n") + lines := strings.Split(strings.TrimSuffix(merged, "\n"), "\n") + opIdx := -1 + for i, ln := range lines { + if strings.HasPrefix(ln, " operators:") { + opIdx = i + break + } + } + require.NotEqual(t, -1, opIdx, "operators block missing") + if opIdx+1 < len(lines) { + first := lines[opIdx+1] + assert.True(t, strings.HasPrefix(first, " - type:"), + "first list item must be nested under operators: got %q", first) + assert.Greater(t, len(first), len(" operators:"), + "list item must be indented deeper than operators key") + } +} diff --git a/managed/services/agents/state.go b/managed/services/agents/state.go index c0dfea31035..7e1853ac433 100644 --- a/managed/services/agents/state.go +++ b/managed/services/agents/state.go @@ -202,6 +202,9 @@ func (u *StateUpdater) sendSetStateRequest(ctx context.Context, agent *pmmAgentI } agentProcesses[row.AgentID] = params + case models.OtelCollectorType: + agentProcesses[row.AgentID] = otelCollectorConfig(row, u.db.Querier) + case models.NodeExporterType: node, err := models.FindNodeByID(u.db.Querier, pointer.GetString(row.NodeID)) if err != nil { diff --git a/managed/services/converters.go b/managed/services/converters.go index f28a4567a2b..90b9c6e3243 100644 --- a/managed/services/converters.go +++ b/managed/services/converters.go @@ -553,6 +553,16 @@ func ToAPIAgent(q *reform.Querier, agent *models.Agent) (inventoryv1.Agent, erro ListenPort: uint32(pointer.GetUint16(agent.ListenPort)), }, nil + case models.OtelCollectorType: + return &inventoryv1.OtelCollector{ + AgentId: agent.AgentID, + PmmAgentId: pointer.GetString(agent.PMMAgentID), + Disabled: agent.Disabled, + CustomLabels: labels, + Status: inventoryv1.AgentStatus(inventoryv1.AgentStatus_value[agent.Status]), + ProcessExecPath: processExecPath, + }, nil + case models.ValkeyExporterType: exporter := &inventoryv1.ValkeyExporter{ AgentId: agent.AgentID, diff --git a/managed/services/grafana/auth_server.go b/managed/services/grafana/auth_server.go index bc47cbd0447..f9d3186051c 100644 --- a/managed/services/grafana/auth_server.go +++ b/managed/services/grafana/auth_server.go @@ -98,6 +98,8 @@ var rules = map[string]role{ "/v1/qan": viewer, "/v1/qan:": viewer, + "/otlp": viewer, // OTLP ingest from pmm-agent (logs/traces); viewer is enough for push + "/prometheus": admin, "/victoriametrics": admin, "/nomad": admin, diff --git a/managed/services/inventory/agents.go b/managed/services/inventory/agents.go index 2508aadf64e..df5cff1a639 100644 --- a/managed/services/inventory/agents.go +++ b/managed/services/inventory/agents.go @@ -18,6 +18,7 @@ package inventory import ( "context" + "encoding/json" "os" "strings" @@ -1804,6 +1805,284 @@ func (as *AgentsService) AddRTAMongoDBAgent(ctx context.Context, p *inventoryv1. return res, e } +// logSourceEntry is the shape stored in custom_labels["log_sources"] JSON. +type logSourceEntry struct { + Path string `json:"path"` + Preset string `json:"preset"` +} + +// AddOtelCollector adds an OTEL Collector agent (log collection; extensible for traces, profiles later). +func (as *AgentsService) AddOtelCollector(ctx context.Context, p *inventoryv1.AddOtelCollectorParams) (*inventoryv1.AddAgentResponse, error) { + if p == nil { + return nil, status.Error(codes.InvalidArgument, "params are required") + } + existing, err := models.FindAgents(as.db.Querier, models.AgentFilters{ + PMMAgentID: p.PmmAgentId, + AgentType: pointer.To(models.OtelCollectorType), + }) + if err != nil { + return nil, err + } + if len(existing) > 0 { + return nil, status.Errorf(codes.AlreadyExists, "An otel_collector agent already exists for pmm-agent %q; use ChangeAgent to update it.", p.PmmAgentId) + } + + customLabels := make(map[string]string) + if p.CustomLabels != nil { + for k, v := range p.CustomLabels { + customLabels[k] = v + } + } + + var logSources []logSourceEntry + if len(p.LogSources) != 0 { + for _, ls := range p.LogSources { + if ls == nil || ls.Path == "" { + continue + } + preset := ls.Preset + if preset == "" { + preset = "raw" + } + logSources = append(logSources, logSourceEntry{Path: ls.Path, Preset: preset}) + } + } else if len(p.LogFilePaths) != 0 { + for _, path := range p.LogFilePaths { + if path != "" { + logSources = append(logSources, logSourceEntry{Path: strings.TrimSpace(path), Preset: "raw"}) + } + } + } + if len(logSources) != 0 { + // Validate preset names and store log_sources JSON. + var agent *inventoryv1.OtelCollector + e := as.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { + q := tx.Querier + for _, ls := range logSources { + if ls.Preset == "raw" { + continue + } + preset, err := models.FindLogParserPresetByName(q, ls.Preset) + if err != nil { + return err + } + if preset == nil { + return status.Errorf(codes.InvalidArgument, "unknown log parser preset %q", ls.Preset) + } + } + raw, err := json.Marshal(logSources) + if err != nil { + return err + } + customLabels["log_sources"] = string(raw) + pmmAgent, err := models.FindAgentByID(q, p.PmmAgentId) + if err != nil { + return err + } + nodeID := "" + if pmmAgent.RunsOnNodeID != nil { + nodeID = *pmmAgent.RunsOnNodeID + } + params := &models.CreateAgentParams{ + PMMAgentID: p.PmmAgentId, + NodeID: nodeID, + CustomLabels: customLabels, + } + row, err := models.CreateAgent(q, models.OtelCollectorType, params) + if err != nil { + return err + } + aa, err := services.ToAPIAgent(q, row) + if err != nil { + return err + } + agent = aa.(*inventoryv1.OtelCollector) //nolint:forcetypeassert + return nil + }) + if e != nil { + return nil, e + } + as.state.RequestStateUpdate(ctx, p.PmmAgentId) + res := &inventoryv1.AddAgentResponse{ + Agent: &inventoryv1.AddAgentResponse_OtelCollector{ + OtelCollector: agent, + }, + } + return res, nil + } + + // No log sources: keep legacy log_file_paths behavior for backward compat (empty collector). + if len(p.LogFilePaths) != 0 { + customLabels["log_file_paths"] = strings.Join(p.LogFilePaths, ",") + } + + var agent *inventoryv1.OtelCollector + e := as.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { + q := tx.Querier + pmmAgent, err := models.FindAgentByID(q, p.PmmAgentId) + if err != nil { + return err + } + nodeID := "" + if pmmAgent.RunsOnNodeID != nil { + nodeID = *pmmAgent.RunsOnNodeID + } + params := &models.CreateAgentParams{ + PMMAgentID: p.PmmAgentId, + NodeID: nodeID, + CustomLabels: customLabels, + } + row, err := models.CreateAgent(q, models.OtelCollectorType, params) + if err != nil { + return err + } + aa, err := services.ToAPIAgent(q, row) + if err != nil { + return err + } + agent = aa.(*inventoryv1.OtelCollector) //nolint:forcetypeassert + return nil + }) + if e != nil { + return nil, e + } + as.state.RequestStateUpdate(ctx, p.PmmAgentId) + res := &inventoryv1.AddAgentResponse{ + Agent: &inventoryv1.AddAgentResponse_OtelCollector{ + OtelCollector: agent, + }, + } + return res, nil +} + +// ChangeOtelCollector updates the single otel_collector agent: merges custom labels (except reserved keys) +// and merges log sources (last wins per path). +func (as *AgentsService) ChangeOtelCollector(ctx context.Context, agentID string, p *inventoryv1.ChangeOtelCollectorParams) (*inventoryv1.ChangeAgentResponse, error) { + if p == nil { + return nil, status.Error(codes.InvalidArgument, "params are required") + } + + const labelLogSources = "log_sources" + const labelLogFilePaths = "log_file_paths" + + var out *inventoryv1.OtelCollector + e := as.db.InTransactionContext(ctx, nil, func(tx *reform.TX) error { + q := tx.Querier + row, err := models.FindAgentByID(q, agentID) + if err != nil { + return err + } + if row.AgentType != models.OtelCollectorType { + return status.Errorf(codes.InvalidArgument, "Expected otel_collector agent type, got %s.", row.AgentType) + } + + for k := range p.MergeLabels { + if k == labelLogSources || k == labelLogFilePaths { + return status.Errorf(codes.InvalidArgument, "merge_labels must not use reserved key %q (use add_log_sources instead)", k) + } + } + + if p.Enable != nil { + row.Disabled = !*p.Enable + } + + labels, err := row.GetCustomLabels() + if err != nil { + return err + } + if labels == nil { + labels = make(map[string]string) + } + for k, v := range p.MergeLabels { + labels[k] = v + } + if p.RemoveLegacyLogFilePaths { + delete(labels, labelLogFilePaths) + } + + if len(p.AddLogSources) > 0 { + var cur []logSourceEntry + if s := labels[labelLogSources]; s != "" { + if err := json.Unmarshal([]byte(s), &cur); err != nil { + return status.Errorf(codes.Internal, "invalid log_sources JSON on agent: %v", err) + } + } else if s := labels[labelLogFilePaths]; s != "" { + for _, path := range strings.Split(s, ",") { + path = strings.TrimSpace(path) + if path != "" { + cur = append(cur, logSourceEntry{Path: path, Preset: "raw"}) + } + } + } + byPath := make(map[string]int) + for i := range cur { + byPath[cur[i].Path] = i + } + for _, ls := range p.AddLogSources { + if ls == nil || ls.Path == "" { + continue + } + preset := ls.Preset + if preset == "" { + preset = "raw" + } + if preset != "raw" { + presetRow, perr := models.FindLogParserPresetByName(q, preset) + if perr != nil { + return perr + } + if presetRow == nil { + return status.Errorf(codes.InvalidArgument, "unknown log parser preset %q", preset) + } + } + entry := logSourceEntry{Path: ls.Path, Preset: preset} + if idx, ok := byPath[ls.Path]; ok { + cur[idx] = entry + } else { + byPath[ls.Path] = len(cur) + cur = append(cur, entry) + } + } + raw, mErr := json.Marshal(cur) + if mErr != nil { + return mErr + } + labels[labelLogSources] = string(raw) + delete(labels, labelLogFilePaths) + } + + if err := row.SetCustomLabels(labels); err != nil { + return err + } + + encrypted := pointer.To(models.EncryptAgent(*row)) + if err := q.Update(encrypted); err != nil { + return err + } + decrypted := pointer.To(models.DecryptAgent(*encrypted)) + aa, err := services.ToAPIAgent(q, decrypted) + if err != nil { + return err + } + var ok bool + out, ok = aa.(*inventoryv1.OtelCollector) + if !ok { + return status.Error(codes.Internal, "unexpected agent type after otel_collector change") + } + return nil + }) + if e != nil { + return nil, e + } + + as.state.RequestStateUpdate(ctx, out.PmmAgentId) + return &inventoryv1.ChangeAgentResponse{ + Agent: &inventoryv1.ChangeAgentResponse_OtelCollector{ + OtelCollector: out, + }, + }, nil +} + // ChangeRTAMongoDBAgent updates MongoDB Real-Time Analytics Agent with given parameters. func (as *AgentsService) ChangeRTAMongoDBAgent(ctx context.Context, agentID string, p *inventoryv1.ChangeRTAMongoDBAgentParams) (*inventoryv1.ChangeAgentResponse, error) { //nolint:lll changeParams := &models.ChangeAgentParams{ diff --git a/managed/services/inventory/grpc/agents_server.go b/managed/services/inventory/grpc/agents_server.go index 06aeaf9162a..46f0717c630 100644 --- a/managed/services/inventory/grpc/agents_server.go +++ b/managed/services/inventory/grpc/agents_server.go @@ -58,6 +58,7 @@ var agentTypes = map[inventoryv1.AgentType]models.AgentType{ inventoryv1.AgentType_AGENT_TYPE_VM_AGENT: models.VMAgentType, inventoryv1.AgentType_AGENT_TYPE_NOMAD_AGENT: models.NomadAgentType, inventoryv1.AgentType_AGENT_TYPE_RTA_MONGODB_AGENT: models.RTAMongoDBAgentType, + inventoryv1.AgentType_AGENT_TYPE_OTEL_COLLECTOR: models.OtelCollectorType, } func agentType(req *inventoryv1.ListAgentsRequest) *models.AgentType { @@ -122,6 +123,8 @@ func (s *agentsServer) ListAgents(ctx context.Context, req *inventoryv1.ListAgen res.NomadAgent = append(res.NomadAgent, agent) case *inventoryv1.RTAMongoDBAgent: res.RtaMongodbAgent = append(res.RtaMongodbAgent, agent) + case *inventoryv1.OtelCollector: + res.OtelCollector = append(res.OtelCollector, agent) default: panic(fmt.Errorf("unhandled inventory Agent type %T", agent)) } @@ -176,6 +179,8 @@ func (s *agentsServer) GetAgent(ctx context.Context, req *inventoryv1.GetAgentRe res.Agent = &inventoryv1.GetAgentResponse_NomadAgent{NomadAgent: agent} case *inventoryv1.RTAMongoDBAgent: res.Agent = &inventoryv1.GetAgentResponse_RtaMongodbAgent{RtaMongodbAgent: agent} + case *inventoryv1.OtelCollector: + res.Agent = &inventoryv1.GetAgentResponse_OtelCollector{OtelCollector: agent} default: panic(fmt.Errorf("unhandled inventory Agent type %T", agent)) } @@ -232,6 +237,12 @@ func (s *agentsServer) AddAgent(ctx context.Context, req *inventoryv1.AddAgentRe return s.s.AddQANPostgreSQLPgStatMonitorAgent(ctx, req.GetQanPostgresqlPgstatmonitorAgent()) case *inventoryv1.AddAgentRequest_RtaMongodbAgent: return s.s.AddRTAMongoDBAgent(ctx, req.GetRtaMongodbAgent()) + case *inventoryv1.AddAgentRequest_OtelCollector: + params := req.GetOtelCollector() + if params == nil { + return nil, status.Error(codes.InvalidArgument, "otel_collector params are required") + } + return s.s.AddOtelCollector(ctx, params) default: return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid agent type %T", req.Agent)) } @@ -276,6 +287,8 @@ func (s *agentsServer) ChangeAgent(ctx context.Context, req *inventoryv1.ChangeA return s.s.ChangeNomadAgent(ctx, agentID, req.GetNomadAgent()) case *inventoryv1.ChangeAgentRequest_RtaMongodbAgent: return s.s.ChangeRTAMongoDBAgent(ctx, agentID, req.GetRtaMongodbAgent()) + case *inventoryv1.ChangeAgentRequest_OtelCollector: + return s.s.ChangeOtelCollector(ctx, agentID, req.GetOtelCollector()) default: return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("invalid agent type %T", req.Agent)) } diff --git a/managed/services/inventory/otel_collector_test.go b/managed/services/inventory/otel_collector_test.go new file mode 100644 index 00000000000..94ec3018e27 --- /dev/null +++ b/managed/services/inventory/otel_collector_test.go @@ -0,0 +1,91 @@ +// Copyright (C) 2026 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +package inventory + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + inventoryv1 "github.com/percona/pmm/api/inventory/v1" + "github.com/percona/pmm/managed/models" +) + +func TestOtelCollectorDuplicateAddAndChange(t *testing.T) { + _, as, _, teardown, ctx, _ := setup(t) + t.Cleanup(func() { teardown(t) }) + + as.r.(*mockAgentsRegistry).On("IsConnected", models.PMMServerAgentID).Return(true) + as.r.(*mockAgentsRegistry).On("IsConnected", "00000000-0000-4000-8000-000000000005").Return(true) + as.state.(*mockAgentsStateUpdater).On("RequestStateUpdate", ctx, mock.AnythingOfType("string")).Return() + + pmmAgent, err := as.AddPMMAgent(ctx, &inventoryv1.AddPMMAgentParams{ + RunsOnNodeId: models.PMMServerNodeID, + }) + require.NoError(t, err) + pmmAgentID := pmmAgent.GetPmmAgent().AgentId + + otelResp, err := as.AddOtelCollector(ctx, &inventoryv1.AddOtelCollectorParams{ + PmmAgentId: pmmAgentID, + CustomLabels: map[string]string{"tier": "test"}, + }) + require.NoError(t, err) + otelID := otelResp.GetOtelCollector().AgentId + require.Contains(t, otelResp.GetOtelCollector().CustomLabels, "tier") + assert.Equal(t, "test", otelResp.GetOtelCollector().CustomLabels["tier"]) + + _, err = as.AddOtelCollector(ctx, &inventoryv1.AddOtelCollectorParams{ + PmmAgentId: pmmAgentID, + }) + require.Error(t, err) + assert.Equal(t, codes.AlreadyExists, status.Convert(err).Code()) + + ch, err := as.ChangeOtelCollector(ctx, otelID, &inventoryv1.ChangeOtelCollectorParams{ + MergeLabels: map[string]string{"extra": "1"}, + AddLogSources: []*inventoryv1.LogSource{ + {Path: "/var/log/one.log", Preset: "raw"}, + {Path: "/var/log/two.log", Preset: "raw"}, + }, + }) + require.NoError(t, err) + labels := ch.GetOtelCollector().CustomLabels + assert.Equal(t, "test", labels["tier"]) + assert.Equal(t, "1", labels["extra"]) + var sources []struct { + Path string `json:"path"` + Preset string `json:"preset"` + } + require.NoError(t, json.Unmarshal([]byte(labels["log_sources"]), &sources)) + require.Len(t, sources, 2) + + ch2, err := as.ChangeOtelCollector(ctx, otelID, &inventoryv1.ChangeOtelCollectorParams{ + AddLogSources: []*inventoryv1.LogSource{ + {Path: "/var/log/one.log", Preset: "raw"}, + }, + }) + require.NoError(t, err) + require.NoError(t, json.Unmarshal([]byte(ch2.GetOtelCollector().CustomLabels["log_sources"]), &sources)) + require.Len(t, sources, 2) + + _, err = as.ChangeOtelCollector(ctx, otelID, &inventoryv1.ChangeOtelCollectorParams{ + MergeLabels: map[string]string{"log_sources": "nope"}, + }) + require.Error(t, err) + assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) + + _, err = as.ChangeOtelCollector(ctx, "00000000-0000-4000-8000-000000000006", &inventoryv1.ChangeOtelCollectorParams{ + MergeLabels: map[string]string{"x": "y"}, + }) + require.Error(t, err) + assert.Equal(t, codes.InvalidArgument, status.Convert(err).Code()) +} diff --git a/managed/services/server/log_parser_presets.go b/managed/services/server/log_parser_presets.go new file mode 100644 index 00000000000..8827dc88f89 --- /dev/null +++ b/managed/services/server/log_parser_presets.go @@ -0,0 +1,169 @@ +// Copyright (C) 2026 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +package server + +import ( + "context" + "strings" + + "github.com/pkg/errors" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" + "gopkg.in/reform.v1" + + serverv1 "github.com/percona/pmm/api/server/v1" + "github.com/percona/pmm/managed/models" +) + +func convertLogParserPreset(p *models.LogParserPreset) *serverv1.LogParserPreset { + if p == nil { + return nil + } + desc := "" + if p.Description != nil { + desc = *p.Description + } + return &serverv1.LogParserPreset{ + Id: p.ID, + Name: p.Name, + Description: desc, + OperatorYaml: p.OperatorYAML, + BuiltIn: p.BuiltIn, + CreatedAt: timestamppb.New(p.CreatedAt), + UpdatedAt: timestamppb.New(p.UpdatedAt), + } +} + +func mapLogParserPresetErr(err error) error { + switch { + case err == nil: + return nil + case errors.Is(err, reform.ErrNoRows): + return status.Error(codes.NotFound, "Log parser preset not found.") + default: + } + msg := err.Error() + switch { + case strings.Contains(msg, "already exists"): + return status.Errorf(codes.AlreadyExists, "%s", msg) + case strings.Contains(msg, "preset name"), strings.Contains(msg, "operator_yaml"), + strings.Contains(msg, "operator "), strings.Contains(msg, "empty preset"): + return status.Errorf(codes.InvalidArgument, "%s", msg) + case strings.Contains(msg, "cannot delete built-in"): + return status.Errorf(codes.FailedPrecondition, "%s", msg) + default: + return err + } +} + +// ListLogParserPresets returns all log parser presets. +func (s *Server) ListLogParserPresets(ctx context.Context, _ *serverv1.ListLogParserPresetsRequest) (*serverv1.ListLogParserPresetsResponse, error) { + rows, err := models.FindAllLogParserPresets(s.db.Querier) + if err != nil { + return nil, err + } + out := make([]*serverv1.LogParserPreset, 0, len(rows)) + for _, r := range rows { + out = append(out, convertLogParserPreset(r)) + } + return &serverv1.ListLogParserPresetsResponse{Presets: out}, nil +} + +// GetLogParserPreset returns one preset by id. +func (s *Server) GetLogParserPreset(ctx context.Context, req *serverv1.GetLogParserPresetRequest) (*serverv1.GetLogParserPresetResponse, error) { + if strings.TrimSpace(req.GetId()) == "" { + return nil, status.Error(codes.InvalidArgument, "id is required.") + } + row, err := models.FindLogParserPresetByID(s.db.Querier, req.GetId()) + if err != nil { + return nil, err + } + if row == nil { + return nil, status.Error(codes.NotFound, "Log parser preset not found.") + } + return &serverv1.GetLogParserPresetResponse{Preset: convertLogParserPreset(row)}, nil +} + +// AddLogParserPreset creates a custom preset. +func (s *Server) AddLogParserPreset(ctx context.Context, req *serverv1.AddLogParserPresetRequest) (*serverv1.AddLogParserPresetResponse, error) { + row, err := models.CreateLogParserPreset(s.db.Querier, req.GetName(), req.GetDescription(), req.GetOperatorYaml()) + if err != nil { + return nil, mapLogParserPresetErr(err) + } + if err := s.agentsState.UpdateAgentsState(ctx); err != nil { + return nil, status.Errorf(codes.Internal, "Failed to refresh agents state: %s.", err.Error()) + } + return &serverv1.AddLogParserPresetResponse{Preset: convertLogParserPreset(row)}, nil +} + +// ChangeLogParserPreset updates description and/or operator YAML. +func (s *Server) ChangeLogParserPreset(ctx context.Context, req *serverv1.ChangeLogParserPresetRequest) (*serverv1.ChangeLogParserPresetResponse, error) { + if strings.TrimSpace(req.GetId()) == "" { + return nil, status.Error(codes.InvalidArgument, "id is required.") + } + if req.Description == nil && req.OperatorYaml == nil { + return nil, status.Error(codes.InvalidArgument, "At least one of description or operator_yaml must be set.") + } + var descPtr *string + if req.Description != nil { + descPtr = req.Description + } + var yamlPtr *string + if req.OperatorYaml != nil { + y := strings.TrimSpace(*req.OperatorYaml) + yamlPtr = &y + } + row, err := models.UpdateLogParserPreset(s.db.Querier, req.GetId(), descPtr, yamlPtr) + if err != nil { + if errors.Is(err, reform.ErrNoRows) { + return nil, status.Error(codes.NotFound, "Log parser preset not found.") + } + return nil, mapLogParserPresetErr(err) + } + if err := s.agentsState.UpdateAgentsState(ctx); err != nil { + return nil, status.Errorf(codes.Internal, "Failed to refresh agents state: %s.", err.Error()) + } + return &serverv1.ChangeLogParserPresetResponse{Preset: convertLogParserPreset(row)}, nil +} + +// RemoveLogParserPreset deletes a custom preset that is not in use. +func (s *Server) RemoveLogParserPreset(ctx context.Context, req *serverv1.RemoveLogParserPresetRequest) (*serverv1.RemoveLogParserPresetResponse, error) { + if strings.TrimSpace(req.GetId()) == "" { + return nil, status.Error(codes.InvalidArgument, "id is required.") + } + row, err := models.FindLogParserPresetByID(s.db.Querier, req.GetId()) + if err != nil { + return nil, err + } + if row == nil { + return nil, status.Error(codes.NotFound, "Log parser preset not found.") + } + if row.BuiltIn { + return nil, status.Error(codes.FailedPrecondition, "Cannot delete built-in log parser preset.") + } + ids, err := models.ListOtelCollectorAgentIDsReferencingLogParserPreset(s.db.Querier, row.Name) + if err != nil { + return nil, err + } + if len(ids) > 0 { + return nil, status.Errorf( + codes.FailedPrecondition, + "Preset %q is used by OTEL collector agent(s): %s. Remove log_sources first.", + row.Name, + strings.Join(ids, ", "), + ) + } + if err := models.DeleteLogParserPreset(s.db.Querier, req.GetId()); err != nil { + return nil, mapLogParserPresetErr(err) + } + if err := s.agentsState.UpdateAgentsState(ctx); err != nil { + return nil, status.Errorf(codes.Internal, "Failed to refresh agents state: %s.", err.Error()) + } + return &serverv1.RemoveLogParserPresetResponse{}, nil +} diff --git a/managed/services/supervisord/otelconfig.go b/managed/services/supervisord/otelconfig.go new file mode 100644 index 00000000000..3ac7b259633 --- /dev/null +++ b/managed/services/supervisord/otelconfig.go @@ -0,0 +1,143 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package supervisord + +import ( + "fmt" + "strings" +) + +// buildOtelCollectorConfigYAML returns the server-side otel-collector config YAML. +// OTLP receives logs, traces, and metrics; separate ClickHouse exporter instances apply TTL per signal. +// logRetentionDays, spanRetentionDays, metricsRetentionDays control exporter TTL (table-level TTL also set in PMM DDL). +func buildOtelCollectorConfigYAML(endpoint, username, password string, logRetentionDays, spanRetentionDays, metricsRetentionDays int) string { + if endpoint == "" { + endpoint = "127.0.0.1:9000" + } + if username == "" { + username = "default" + } + if logRetentionDays <= 0 { + logRetentionDays = 7 + } + if spanRetentionDays <= 0 { + spanRetentionDays = 7 + } + if metricsRetentionDays <= 0 { + metricsRetentionDays = 90 + } + chEndpoint := "tcp://" + endpoint + logsTTL := fmt.Sprintf("%dh", logRetentionDays*24) + tracesTTL := fmt.Sprintf("%dh", spanRetentionDays*24) + metricsTTL := fmt.Sprintf("%dh", metricsRetentionDays*24) + + // Exporter blocks: component type is "clickhouse"; multiple instances use type/name keys (e.g. clickhouse/logs). + // Underscore-only keys like "clickhouse_logs" are invalid — the loader treats them as unknown types. + // create_schema false — PMM-managed applies DDL (otel.logs, otel.otel_traces, otel.otel_metrics_sum, ...). + exporters := fmt.Sprintf(`exporters: + clickhouse/logs: + endpoint: %s + database: otel + username: %s + password: %s + logs_table_name: logs + create_schema: false + ttl: %s + timeout: 5s + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s + clickhouse/traces: + endpoint: %s + database: otel + username: %s + password: %s + traces_table_name: otel_traces + create_schema: false + ttl: %s + timeout: 5s + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s + clickhouse/metrics: + endpoint: %s + database: otel + username: %s + password: %s + create_schema: false + ttl: %s + timeout: 5s + metrics_tables: + sum: + name: otel_metrics_sum + retry_on_failure: + enabled: true + initial_interval: 5s + max_interval: 30s + max_elapsed_time: 300s +`, chEndpoint, quoteYAMLString(username), quoteYAMLString(password), logsTTL, + chEndpoint, quoteYAMLString(username), quoteYAMLString(password), tracesTTL, + chEndpoint, quoteYAMLString(username), quoteYAMLString(password), metricsTTL) + + return `# Managed by pmm-managed. DO NOT EDIT. +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 +processors: + memory_limiter: + check_interval: 1s + limit_mib: 512 + transform: + error_mode: ignore + log_statements: + - set(resource.attributes["pmm_source"], resource.attributes["node_name"]) where resource.attributes["node_name"] != nil + batch: + timeout: 1s + send_batch_size: 1024 + send_batch_max_size: 2048 +` + exporters + ` +service: + pipelines: + logs: + receivers: [otlp] + processors: [memory_limiter, transform, batch] + exporters: [clickhouse/logs] + traces: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [clickhouse/traces] + metrics: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [clickhouse/metrics] +` +} + +// quoteYAMLString doubles single quotes for YAML single-quoted style when needed. +func quoteYAMLString(s string) string { + if s == "" || (!strings.Contains(s, "'") && !strings.Contains(s, "\n")) { + return "'" + s + "'" + } + return "'" + strings.ReplaceAll(s, "'", "''") + "'" +} diff --git a/managed/services/supervisord/otelconfig_test.go b/managed/services/supervisord/otelconfig_test.go new file mode 100644 index 00000000000..78c81bbba62 --- /dev/null +++ b/managed/services/supervisord/otelconfig_test.go @@ -0,0 +1,92 @@ +// Copyright (C) 2023 Percona LLC +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +package supervisord + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestBuildOtelCollectorConfigYAML(t *testing.T) { + t.Parallel() + + yaml := buildOtelCollectorConfigYAML("127.0.0.1:9000", "default", "clickhouse", 7, 7, 90) + + require.Contains(t, yaml, "receivers:") + require.Contains(t, yaml, "processors:") + require.Contains(t, yaml, "exporters:") + require.Contains(t, yaml, "service:") + + require.Contains(t, yaml, "otlp:") + require.Contains(t, yaml, "endpoint: 0.0.0.0:4317") + require.Contains(t, yaml, "endpoint: 0.0.0.0:4318") + + require.Contains(t, yaml, "clickhouse/logs:") + require.Contains(t, yaml, "clickhouse/traces:") + require.Contains(t, yaml, "clickhouse/metrics:") + require.Contains(t, yaml, "logs_table_name: logs") + require.Contains(t, yaml, "traces_table_name: otel_traces") + require.Contains(t, yaml, "otel_metrics_sum") + require.Contains(t, yaml, "create_schema: false") + + require.Contains(t, yaml, "pipelines:") + require.Contains(t, yaml, "exporters: [clickhouse/logs]") + require.Contains(t, yaml, "exporters: [clickhouse/traces]") + require.Contains(t, yaml, "exporters: [clickhouse/metrics]") + require.Contains(t, yaml, "ttl: 168h", "logs and traces 7d") + require.Contains(t, yaml, "ttl: 2160h", "metrics 90d") +} + +func TestBuildOtelCollectorConfigYAML_CustomParams(t *testing.T) { + t.Parallel() + + yaml := buildOtelCollectorConfigYAML("ch-host:9000", "myuser", "mypass", 14, 3, 30) + + require.Contains(t, yaml, "endpoint: tcp://ch-host:9000") + require.Contains(t, yaml, "username: 'myuser'") + require.Contains(t, yaml, "password: 'mypass'") + require.True(t, strings.Contains(yaml, "ttl: 336h") || strings.Contains(yaml, "ttl: 72h")) +} + +func TestBuildOtelCollectorConfigYAML_Defaults(t *testing.T) { + t.Parallel() + + yaml := buildOtelCollectorConfigYAML("", "", "", 0, 0, 0) + + require.Contains(t, yaml, "endpoint: tcp://127.0.0.1:9000") + require.Contains(t, yaml, "username: 'default'") +} + +func TestQuoteYAMLString(t *testing.T) { + t.Parallel() + + require.Equal(t, "'simple'", quoteYAMLString("simple")) + require.Equal(t, "''''", quoteYAMLString("'")) + require.Equal(t, "'a''b'", quoteYAMLString("a'b")) +} + +func TestBuildOtelCollectorConfigYAML_ValidYAMLStructure(t *testing.T) { + t.Parallel() + + yaml := buildOtelCollectorConfigYAML("127.0.0.1:9000", "default", "clickhouse", 7, 7, 90) + + require.Contains(t, yaml, "receivers:") + require.Contains(t, yaml, "processors:") + require.Contains(t, yaml, "exporters:") + require.Contains(t, yaml, "service:") +} diff --git a/managed/services/supervisord/supervisord.go b/managed/services/supervisord/supervisord.go index 8697c6566a9..ddb02e61cd5 100644 --- a/managed/services/supervisord/supervisord.go +++ b/managed/services/supervisord/supervisord.go @@ -40,11 +40,13 @@ import ( "golang.org/x/sys/unix" "github.com/percona/pmm/managed/models" + "github.com/percona/pmm/managed/otel" "github.com/percona/pmm/managed/utils/envvars" "github.com/percona/pmm/utils/pdeathsig" ) const ( + otelCollectorConfigPath = "/srv/otelcol/config.yaml" defaultClickhouseDatabase = "pmm" defaultClickhouseAddr = "127.0.0.1:9000" defaultClickhouseUser = "default" @@ -265,6 +267,8 @@ func (s *Service) marshalConfig(tmpl *template.Template, settings *models.Settin s.addPostgresParams(templateParams) s.addClusterParams(templateParams) + templateParams["OtelCollectorAutostart"] = settings.IsOtelCollectorEnabled() + if settings.PMMPublicAddress != "" { pmmPublicAddress := settings.PMMPublicAddress if !strings.HasPrefix(pmmPublicAddress, "https://") && !strings.HasPrefix(pmmPublicAddress, "http://") { @@ -370,6 +374,11 @@ func (s *Service) UpdateConfiguration(settings *models.Settings) error { s.supervisordConfigsM.Lock() defer s.supervisordConfigsM.Unlock() + s.ensureOtelClickHouseSchemas(settings) + if werr := s.writeOtelCollectorConfigFile(settings); werr != nil { + s.l.Warnf("Failed to write OTEL collector YAML: %s.", werr) + } + var err error err = s.vmParams.UpdateParams() @@ -425,6 +434,37 @@ func (s *Service) StopSupervisedService(serviceName string) error { return err } +func (s *Service) ensureOtelClickHouseSchemas(settings *models.Settings) { + ctx := context.Background() + addr := envvars.GetEnv("PMM_CLICKHOUSE_ADDR", defaultClickhouseAddr) + username := envvars.GetEnv("PMM_CLICKHOUSE_USER", defaultClickhouseUser) + password := envvars.GetEnv("PMM_CLICKHOUSE_PASSWORD", defaultClickhousePassword) + chURI := url.URL{ + Scheme: "tcp", + User: url.UserPassword(username, password), + Host: addr, + Path: "/default", + } + dsn := chURI.String() + if err := otel.EnsureOtelSchema(ctx, dsn, settings.GetOtelLogsRetentionDays()); err != nil { + s.l.Warnf("Failed to ensure OTEL logs ClickHouse schema: %s.", err) + } + if err := otel.EnsureOtelTracesMetricsAndServiceMapTables(ctx, dsn, settings.GetOtelTracesRetentionDays(), settings.GetOtelMetricsRetentionDays()); err != nil { + s.l.Warnf("Failed to ensure OTEL traces/metrics/service map ClickHouse schema: %s.", err) + } +} + +func (s *Service) writeOtelCollectorConfigFile(settings *models.Settings) error { + addr := envvars.GetEnv("PMM_CLICKHOUSE_ADDR", defaultClickhouseAddr) + username := envvars.GetEnv("PMM_CLICKHOUSE_USER", defaultClickhouseUser) + password := envvars.GetEnv("PMM_CLICKHOUSE_PASSWORD", defaultClickhousePassword) + yaml := buildOtelCollectorConfigYAML(addr, username, password, settings.GetOtelLogsRetentionDays(), settings.GetOtelTracesRetentionDays(), settings.GetOtelMetricsRetentionDays()) + if err := os.MkdirAll(filepath.Dir(otelCollectorConfigPath), 0o755); err != nil { //nolint:mnd + return errors.Wrap(err, "mkdir otelcol") + } + return errors.WithStack(os.WriteFile(otelCollectorConfigPath, []byte(yaml), 0o644)) //nolint:gosec,mnd +} + var templates = template.Must(template.New("").Option("missingkey=error").Parse(` {{define "victoriametrics"}} @@ -588,4 +628,20 @@ stdout_logfile_maxbytes = 10MB stdout_logfile_backups = 3 redirect_stderr = true {{end}} + +{{define "otel-collector"}} +[program:otel-collector] +priority = 6 +command = /usr/local/percona/pmm/tools/otelcol-contrib --config=/srv/otelcol/config.yaml +autorestart = true +autostart = {{ .OtelCollectorAutostart }} +startretries = 10 +startsecs = 1 +stopsignal = INT +stopwaitsecs = 60 +stdout_logfile = /srv/logs/otel-collector.log +stdout_logfile_maxbytes = 10MB +stdout_logfile_backups = 3 +redirect_stderr = true +{{end}} `)) diff --git a/managed/services/supervisord/supervisord_test.go b/managed/services/supervisord/supervisord_test.go index 314499fa7a6..6ed63ce0722 100644 --- a/managed/services/supervisord/supervisord_test.go +++ b/managed/services/supervisord/supervisord_test.go @@ -51,6 +51,7 @@ func TestConfig(t *testing.T) { } settings.VictoriaMetrics.CacheEnabled = pointer.ToBool(false) settings.Nomad.Enabled = pointer.ToBool(true) + settings.Otel.CollectorEnabled = pointer.ToBool(false) for _, tmpl := range templates.Templates() { n := tmpl.Name() @@ -88,6 +89,7 @@ func TestConfigVictoriaMetricsEnvvars(t *testing.T) { PMMPublicAddress: "192.168.0.42:8443", } settings.VictoriaMetrics.CacheEnabled = pointer.ToBool(false) + settings.Otel.CollectorEnabled = pointer.ToBool(false) // Test environment variables being passed to VictoriaMetrics. t.Setenv("VM_search_maxQueryLen", "2MB") diff --git a/managed/testdata/supervisord.d/otel-collector.ini b/managed/testdata/supervisord.d/otel-collector.ini new file mode 100644 index 00000000000..f1ba1bc1b09 --- /dev/null +++ b/managed/testdata/supervisord.d/otel-collector.ini @@ -0,0 +1,15 @@ +; Managed by pmm-managed. DO NOT EDIT. + +[program:otel-collector] +priority = 6 +command = /usr/local/percona/pmm/tools/otelcol-contrib --config=/srv/otelcol/config.yaml +autorestart = true +autostart = false +startretries = 10 +startsecs = 1 +stopsignal = INT +stopwaitsecs = 60 +stdout_logfile = /srv/logs/otel-collector.log +stdout_logfile_maxbytes = 10MB +stdout_logfile_backups = 3 +redirect_stderr = true