From 5a29a9a99ff417a753daa345cf2197cd81659e0d Mon Sep 17 00:00:00 2001 From: Kiran Girish Date: Mon, 6 May 2024 11:07:32 -0700 Subject: [PATCH] update gcp swagger --- Makefile | 2 +- src/generated/cli/configunstable/cli.gen.go | 17 - src/generated/cli/configv1/cli.gen.go | 17 + .../gcp_metrics_integrations.gen.go | 50 +- ..._telemetry_metrics_ingestion_parameters.go | 150 ------ ...n_telemetry_metrics_ingestion_responses.go | 402 --------------- ...reate_otel_metrics_ingestion_parameters.go | 150 ++++++ ...create_otel_metrics_ingestion_responses.go | 402 +++++++++++++++ ..._telemetry_metrics_ingestion_parameters.go | 128 ----- ...n_telemetry_metrics_ingestion_responses.go | 400 --------------- ...elete_otel_metrics_ingestion_parameters.go | 128 +++++ ...delete_otel_metrics_ingestion_responses.go | 400 +++++++++++++++ .../client/operations/operations_client.go | 267 ++-------- ..._telemetry_metrics_ingestion_parameters.go | 128 ----- ...n_telemetry_metrics_ingestion_responses.go | 328 ------------ .../read_otel_metrics_ingestion_parameters.go | 128 +++++ .../read_otel_metrics_ingestion_responses.go | 328 ++++++++++++ ..._telemetry_metrics_ingestion_parameters.go | 150 ------ ...n_telemetry_metrics_ingestion_responses.go | 402 --------------- ...pdate_otel_metrics_ingestion_parameters.go | 150 ++++++ ...update_otel_metrics_ingestion_responses.go | 402 +++++++++++++++ .../configunstable/mocks/client_mock.go | 156 +----- ...pen_telemetry_metrics_ingestion_request.go | 112 ---- ...en_telemetry_metrics_ingestion_response.go | 109 ---- ...e_create_otel_metrics_ingestion_request.go | 112 ++++ ..._create_otel_metrics_ingestion_response.go | 109 ++++ ...delete_gcp_metrics_integration_response.go | 11 - ...en_telemetry_metrics_ingestion_response.go | 11 - ..._delete_otel_metrics_ingestion_response.go | 11 + ... configunstable_otel_metrics_ingestion.go} | 38 +- ...en_telemetry_metrics_ingestion_response.go | 109 ---- ...le_read_otel_metrics_ingestion_response.go | 109 ++++ ...pen_telemetry_metrics_ingestion_request.go | 115 ----- ...en_telemetry_metrics_ingestion_response.go | 109 ---- ...e_update_otel_metrics_ingestion_request.go | 115 +++++ ..._update_otel_metrics_ingestion_response.go | 109 ++++ ...gcp_metrics_integration_service_account.go | 50 -- ..._metrics_ingestion_resource_attributes.go} | 28 +- .../swagger/configunstable/spec.json | 481 ++---------------- ...eate_gcp_metrics_integration_parameters.go | 8 +- ...reate_gcp_metrics_integration_responses.go | 28 +- ...lete_gcp_metrics_integration_parameters.go | 0 ...elete_gcp_metrics_integration_responses.go | 26 +- ...ist_gcp_metrics_integrations_parameters.go | 0 ...list_gcp_metrics_integrations_responses.go | 20 +- .../client/operations/operations_client.go | 195 +++++++ ...read_gcp_metrics_integration_parameters.go | 0 .../read_gcp_metrics_integration_responses.go | 24 +- ...date_gcp_metrics_integration_parameters.go | 0 ...pdate_gcp_metrics_integration_responses.go | 34 +- .../swagger/configv1/mocks/client_mock.go | 100 ++++ ...create_gcp_metrics_integration_request.go} | 26 +- ...reate_gcp_metrics_integration_response.go} | 26 +- ...delete_gcp_metrics_integration_response.go | 11 + .../configv1_gcp_metrics_integration.go} | 38 +- ...gcp_metrics_integration_service_account.go | 50 ++ ...list_gcp_metrics_integrations_response.go} | 30 +- ..._read_gcp_metrics_integration_response.go} | 26 +- ...pdate_gcp_metrics_integration_response.go} | 26 +- .../gcp_metrics_integration_metric_group.go | 0 src/generated/swagger/configv1/spec.json | 385 ++++++++++++++ 61 files changed, 3738 insertions(+), 3738 deletions(-) rename src/generated/cli/{configunstable => configv1}/gcp_metrics_integrations.gen.go (90%) delete mode 100644 src/generated/swagger/configunstable/client/operations/create_open_telemetry_metrics_ingestion_parameters.go delete mode 100644 src/generated/swagger/configunstable/client/operations/create_open_telemetry_metrics_ingestion_responses.go create mode 100644 src/generated/swagger/configunstable/client/operations/create_otel_metrics_ingestion_parameters.go create mode 100644 src/generated/swagger/configunstable/client/operations/create_otel_metrics_ingestion_responses.go delete mode 100644 src/generated/swagger/configunstable/client/operations/delete_open_telemetry_metrics_ingestion_parameters.go delete mode 100644 src/generated/swagger/configunstable/client/operations/delete_open_telemetry_metrics_ingestion_responses.go create mode 100644 src/generated/swagger/configunstable/client/operations/delete_otel_metrics_ingestion_parameters.go create mode 100644 src/generated/swagger/configunstable/client/operations/delete_otel_metrics_ingestion_responses.go delete mode 100644 src/generated/swagger/configunstable/client/operations/read_open_telemetry_metrics_ingestion_parameters.go delete mode 100644 src/generated/swagger/configunstable/client/operations/read_open_telemetry_metrics_ingestion_responses.go create mode 100644 src/generated/swagger/configunstable/client/operations/read_otel_metrics_ingestion_parameters.go create mode 100644 src/generated/swagger/configunstable/client/operations/read_otel_metrics_ingestion_responses.go delete mode 100644 src/generated/swagger/configunstable/client/operations/update_open_telemetry_metrics_ingestion_parameters.go delete mode 100644 src/generated/swagger/configunstable/client/operations/update_open_telemetry_metrics_ingestion_responses.go create mode 100644 src/generated/swagger/configunstable/client/operations/update_otel_metrics_ingestion_parameters.go create mode 100644 src/generated/swagger/configunstable/client/operations/update_otel_metrics_ingestion_responses.go delete mode 100644 src/generated/swagger/configunstable/models/configunstable_create_open_telemetry_metrics_ingestion_request.go delete mode 100644 src/generated/swagger/configunstable/models/configunstable_create_open_telemetry_metrics_ingestion_response.go create mode 100644 src/generated/swagger/configunstable/models/configunstable_create_otel_metrics_ingestion_request.go create mode 100644 src/generated/swagger/configunstable/models/configunstable_create_otel_metrics_ingestion_response.go delete mode 100644 src/generated/swagger/configunstable/models/configunstable_delete_gcp_metrics_integration_response.go delete mode 100644 src/generated/swagger/configunstable/models/configunstable_delete_open_telemetry_metrics_ingestion_response.go create mode 100644 src/generated/swagger/configunstable/models/configunstable_delete_otel_metrics_ingestion_response.go rename src/generated/swagger/configunstable/models/{configunstable_open_telemetry_metrics_ingestion.go => configunstable_otel_metrics_ingestion.go} (62%) delete mode 100644 src/generated/swagger/configunstable/models/configunstable_read_open_telemetry_metrics_ingestion_response.go create mode 100644 src/generated/swagger/configunstable/models/configunstable_read_otel_metrics_ingestion_response.go delete mode 100644 src/generated/swagger/configunstable/models/configunstable_update_open_telemetry_metrics_ingestion_request.go delete mode 100644 src/generated/swagger/configunstable/models/configunstable_update_open_telemetry_metrics_ingestion_response.go create mode 100644 src/generated/swagger/configunstable/models/configunstable_update_otel_metrics_ingestion_request.go create mode 100644 src/generated/swagger/configunstable/models/configunstable_update_otel_metrics_ingestion_response.go delete mode 100644 src/generated/swagger/configunstable/models/gcp_metrics_integration_service_account.go rename src/generated/swagger/configunstable/models/{open_telemetry_metrics_ingestion_resource_attributes.go => otel_metrics_ingestion_resource_attributes.go} (69%) rename src/generated/swagger/{configunstable => configv1}/client/operations/create_gcp_metrics_integration_parameters.go (95%) rename src/generated/swagger/{configunstable => configv1}/client/operations/create_gcp_metrics_integration_responses.go (88%) rename src/generated/swagger/{configunstable => configv1}/client/operations/delete_gcp_metrics_integration_parameters.go (100%) rename src/generated/swagger/{configunstable => configv1}/client/operations/delete_gcp_metrics_integration_responses.go (88%) rename src/generated/swagger/{configunstable => configv1}/client/operations/list_gcp_metrics_integrations_parameters.go (100%) rename src/generated/swagger/{configunstable => configv1}/client/operations/list_gcp_metrics_integrations_responses.go (88%) rename src/generated/swagger/{configunstable => configv1}/client/operations/read_gcp_metrics_integration_parameters.go (100%) rename src/generated/swagger/{configunstable => configv1}/client/operations/read_gcp_metrics_integration_responses.go (88%) rename src/generated/swagger/{configunstable => configv1}/client/operations/update_gcp_metrics_integration_parameters.go (100%) rename src/generated/swagger/{configunstable => configv1}/client/operations/update_gcp_metrics_integration_responses.go (90%) rename src/generated/swagger/{configunstable/models/configunstable_create_gcp_metrics_integration_request.go => configv1/models/configv1_create_gcp_metrics_integration_request.go} (62%) rename src/generated/swagger/{configunstable/models/configunstable_read_gcp_metrics_integration_response.go => configv1/models/configv1_create_gcp_metrics_integration_response.go} (59%) create mode 100644 src/generated/swagger/configv1/models/configv1_delete_gcp_metrics_integration_response.go rename src/generated/swagger/{configunstable/models/configunstable_gcp_metrics_integration.go => configv1/models/configv1_gcp_metrics_integration.go} (74%) create mode 100644 src/generated/swagger/configv1/models/configv1_gcp_metrics_integration_service_account.go rename src/generated/swagger/{configunstable/models/configunstable_list_gcp_metrics_integrations_response.go => configv1/models/configv1_list_gcp_metrics_integrations_response.go} (67%) rename src/generated/swagger/{configunstable/models/configunstable_update_gcp_metrics_integration_response.go => configv1/models/configv1_read_gcp_metrics_integration_response.go} (59%) rename src/generated/swagger/{configunstable/models/configunstable_create_gcp_metrics_integration_response.go => configv1/models/configv1_update_gcp_metrics_integration_response.go} (59%) rename src/generated/swagger/{configunstable => configv1}/models/gcp_metrics_integration_metric_group.go (100%) diff --git a/Makefile b/Makefile index 9e6ad53..5b6944d 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ GO_BUILD_COMMON_ENV := CGO_ENABLED=0 GO_RELEASER_WORKING_DIR := /go/src/github.com/chronosphere/chronoctl GO_RELEASER_RELEASE_ARGS ?= --rm-dist -UNSTABLE_ENTITIES := link-templates,saved-trace-searches,dashboards,trace-tail-sampling-rules,services,gcp-metrics-integrations +UNSTABLE_ENTITIES := link-templates,saved-trace-searches,dashboards,trace-tail-sampling-rules,services .PHONY: clean-build clean-build: diff --git a/src/generated/cli/configunstable/cli.gen.go b/src/generated/cli/configunstable/cli.gen.go index c03663c..1c8ebae 100644 --- a/src/generated/cli/configunstable/cli.gen.go +++ b/src/generated/cli/configunstable/cli.gen.go @@ -13,7 +13,6 @@ import ( // AddCommandsTo adds all entity subcommands to the given root command. func AddCommandsTo(root *cobra.Command) { root.AddCommand(NewDashboardCmd()) - root.AddCommand(NewGcpMetricsIntegrationCmd()) root.AddCommand(NewLinkTemplateCmd()) root.AddCommand(NewSavedTraceSearchCmd()) root.AddCommand(NewServiceCmd()) @@ -38,22 +37,6 @@ func ApplyMappings() map[types.TypeMeta]func(context.Context, client.Clients, ty } return nil }, - GcpMetricsIntegrationTypeMeta: func(ctx context.Context, clients client.Clients, obj types.Object, dryRun bool) error { - entity, ok := obj.(*GcpMetricsIntegration) - if !ok { - return types.WrongObjectErr((&GcpMetricsIntegration{}), obj) - } - - updateOpts := UpdateOptions{ - DryRun: dryRun, - CreateIfMissing: true, - } - _, err := UpdateGcpMetricsIntegration(ctx, clients.ConfigUnstable, entity, updateOpts) - if err != nil { - return err - } - return nil - }, LinkTemplateTypeMeta: func(ctx context.Context, clients client.Clients, obj types.Object, dryRun bool) error { entity, ok := obj.(*LinkTemplate) if !ok { diff --git a/src/generated/cli/configv1/cli.gen.go b/src/generated/cli/configv1/cli.gen.go index 90899e8..4379030 100644 --- a/src/generated/cli/configv1/cli.gen.go +++ b/src/generated/cli/configv1/cli.gen.go @@ -20,6 +20,7 @@ func AddCommandsTo(root *cobra.Command) { root.AddCommand(NewDerivedLabelCmd()) root.AddCommand(NewDerivedMetricCmd()) root.AddCommand(NewDropRuleCmd()) + root.AddCommand(NewGcpMetricsIntegrationCmd()) root.AddCommand(NewGrafanaDashboardCmd()) root.AddCommand(NewMappingRuleCmd()) root.AddCommand(NewMonitorCmd()) @@ -166,6 +167,22 @@ func ApplyMappings() map[types.TypeMeta]func(context.Context, client.Clients, ty } return nil }, + GcpMetricsIntegrationTypeMeta: func(ctx context.Context, clients client.Clients, obj types.Object, dryRun bool) error { + entity, ok := obj.(*GcpMetricsIntegration) + if !ok { + return types.WrongObjectErr((&GcpMetricsIntegration{}), obj) + } + + updateOpts := UpdateOptions{ + DryRun: dryRun, + CreateIfMissing: true, + } + _, err := UpdateGcpMetricsIntegration(ctx, clients.ConfigV1, entity, updateOpts) + if err != nil { + return err + } + return nil + }, GrafanaDashboardTypeMeta: func(ctx context.Context, clients client.Clients, obj types.Object, dryRun bool) error { entity, ok := obj.(*GrafanaDashboard) if !ok { diff --git a/src/generated/cli/configunstable/gcp_metrics_integrations.gen.go b/src/generated/cli/configv1/gcp_metrics_integrations.gen.go similarity index 90% rename from src/generated/cli/configunstable/gcp_metrics_integrations.gen.go rename to src/generated/cli/configv1/gcp_metrics_integrations.gen.go index e4411a4..a92a468 100644 --- a/src/generated/cli/configunstable/gcp_metrics_integrations.gen.go +++ b/src/generated/cli/configv1/gcp_metrics_integrations.gen.go @@ -1,5 +1,5 @@ // Code generated by chronogen; DO NOT EDIT -package configunstable +package configv1 import ( "context" @@ -14,8 +14,8 @@ import ( "github.com/chronosphereio/chronoctl-core/src/cmd/pkg/output" "github.com/chronosphereio/chronoctl-core/src/cmd/pkg/pagination" "github.com/chronosphereio/chronoctl-core/src/cmd/pkg/ptr" - config_unstable "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/client/operations" - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" + config_v1 "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configv1/client/operations" + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configv1/models" "github.com/chronosphereio/chronoctl-core/src/types" "github.com/spf13/cobra" flag "github.com/spf13/pflag" @@ -26,16 +26,16 @@ func init() { types.MustRegisterObject(GcpMetricsIntegrationTypeMeta, &GcpMetric var _ types.Object = &GcpMetricsIntegration{} var GcpMetricsIntegrationTypeMeta = types.TypeMeta{ - APIVersion: "unstable/config", + APIVersion: "v1/config", Kind: "GcpMetricsIntegration", } type GcpMetricsIntegration struct { types.TypeMeta `json:",inline"` - Spec *models.ConfigunstableGcpMetricsIntegration `json:"spec"` + Spec *models.Configv1GcpMetricsIntegration `json:"spec"` } -func NewGcpMetricsIntegration(spec *models.ConfigunstableGcpMetricsIntegration) *GcpMetricsIntegration { +func NewGcpMetricsIntegration(spec *models.Configv1GcpMetricsIntegration) *GcpMetricsIntegration { return &GcpMetricsIntegration{ TypeMeta: GcpMetricsIntegrationTypeMeta, Spec: spec, @@ -52,13 +52,13 @@ func (e *GcpMetricsIntegration) Identifier() string { func CreateGcpMetricsIntegration( ctx context.Context, - client config_unstable.ClientService, + client config_v1.ClientService, entity *GcpMetricsIntegration, dryRun bool, ) (*GcpMetricsIntegration, error) { - res, err := client.CreateGcpMetricsIntegration(&config_unstable.CreateGcpMetricsIntegrationParams{ + res, err := client.CreateGcpMetricsIntegration(&config_v1.CreateGcpMetricsIntegrationParams{ Context: ctx, - Body: &models.ConfigunstableCreateGcpMetricsIntegrationRequest{ + Body: &models.Configv1CreateGcpMetricsIntegrationRequest{ DryRun: dryRun, GcpMetricsIntegration: entity.Spec, }, @@ -98,7 +98,7 @@ func newGcpMetricsIntegrationCreateCmd() *cobra.Command { defer outputFlags.Close(cmd.OutOrStdout()) stderr := output.NewStderrPrinter(cmd) - client, err := clientFlags.ConfigUnstableClient() + client, err := clientFlags.ConfigV1Client() if err != nil { return err } @@ -145,10 +145,10 @@ func newGcpMetricsIntegrationCreateCmd() *cobra.Command { func GetGcpMetricsIntegration( ctx context.Context, - client config_unstable.ClientService, + client config_v1.ClientService, slug string, ) (*GcpMetricsIntegration, error) { - res, err := client.ReadGcpMetricsIntegration(&config_unstable.ReadGcpMetricsIntegrationParams{ + res, err := client.ReadGcpMetricsIntegration(&config_v1.ReadGcpMetricsIntegrationParams{ Context: ctx, Slug: slug, }) @@ -183,7 +183,7 @@ func newGcpMetricsIntegrationReadCmd() *cobra.Command { } defer outputFlags.Close(cmd.OutOrStdout()) - client, err := clientFlags.ConfigUnstableClient() + client, err := clientFlags.ConfigV1Client() if err != nil { return err } @@ -206,14 +206,14 @@ func newGcpMetricsIntegrationReadCmd() *cobra.Command { func UpdateGcpMetricsIntegration( ctx context.Context, - client config_unstable.ClientService, + client config_v1.ClientService, entity *GcpMetricsIntegration, opts UpdateOptions, ) (*GcpMetricsIntegration, error) { - res, err := client.UpdateGcpMetricsIntegration(&config_unstable.UpdateGcpMetricsIntegrationParams{ + res, err := client.UpdateGcpMetricsIntegration(&config_v1.UpdateGcpMetricsIntegrationParams{ Context: ctx, Slug: entity.Spec.Slug, - Body: config_unstable.UpdateGcpMetricsIntegrationBody{ + Body: config_v1.UpdateGcpMetricsIntegrationBody{ CreateIfMissing: opts.CreateIfMissing, DryRun: opts.DryRun, GcpMetricsIntegration: entity.Spec, @@ -249,7 +249,7 @@ func newGcpMetricsIntegrationUpdateCmd() *cobra.Command { defer outputFlags.Close(cmd.OutOrStdout()) stderr := output.NewStderrPrinter(cmd) - client, err := clientFlags.ConfigUnstableClient() + client, err := clientFlags.ConfigV1Client() if err != nil { return err } @@ -303,10 +303,10 @@ func newGcpMetricsIntegrationUpdateCmd() *cobra.Command { func DeleteGcpMetricsIntegration( ctx context.Context, - client config_unstable.ClientService, + client config_v1.ClientService, slug string, ) error { - _, err := client.DeleteGcpMetricsIntegration(&config_unstable.DeleteGcpMetricsIntegrationParams{ + _, err := client.DeleteGcpMetricsIntegration(&config_v1.DeleteGcpMetricsIntegrationParams{ Context: ctx, Slug: slug, }) @@ -333,12 +333,12 @@ func newGcpMetricsIntegrationDeleteCmd() *cobra.Command { } defer outputFlags.Close(cmd.OutOrStdout()) - client, err := clientFlags.ConfigUnstableClient() + client, err := clientFlags.ConfigV1Client() if err != nil { return err } - res, err := client.DeleteGcpMetricsIntegration(&config_unstable.DeleteGcpMetricsIntegrationParams{ + res, err := client.DeleteGcpMetricsIntegration(&config_v1.DeleteGcpMetricsIntegrationParams{ Context: ctx, Slug: args[0], }) @@ -379,7 +379,7 @@ func (r *GcpMetricsIntegrationListOpts) registerFlags(flags *flag.FlagSet) { func ListGcpMetricsIntegrations( ctx context.Context, - client config_unstable.ClientService, + client config_v1.ClientService, streamer output.Streamer[*GcpMetricsIntegration], opts GcpMetricsIntegrationListOpts, ) (pagination.Token, error) { @@ -395,7 +395,7 @@ func ListGcpMetricsIntegrations( } for { - res, err := client.ListGcpMetricsIntegrations(&config_unstable.ListGcpMetricsIntegrationsParams{ + res, err := client.ListGcpMetricsIntegrations(&config_v1.ListGcpMetricsIntegrationsParams{ Context: ctx, PageToken: &nextToken, PageMaxSize: ptr.Int64(int64(pageMaxSize)), @@ -452,7 +452,7 @@ func newGcpMetricsIntegrationListCmd() *cobra.Command { } defer writer.Close() - client, err := clientFlags.ConfigUnstableClient() + client, err := clientFlags.ConfigV1Client() if err != nil { return err } @@ -488,7 +488,7 @@ func newGcpMetricsIntegrationListCmd() *cobra.Command { return cmd } -const GcpMetricsIntegrationScaffoldYAML = `api_version: unstable/config +const GcpMetricsIntegrationScaffoldYAML = `api_version: v1/config kind: GcpMetricsIntegration spec: # Unique identifier of the GcpMetricsIntegration. If slug is not provided, one will be generated based of the name field. Cannot be modified after the GcpMetricsIntegration is created. diff --git a/src/generated/swagger/configunstable/client/operations/create_open_telemetry_metrics_ingestion_parameters.go b/src/generated/swagger/configunstable/client/operations/create_open_telemetry_metrics_ingestion_parameters.go deleted file mode 100644 index ecd67bd..0000000 --- a/src/generated/swagger/configunstable/client/operations/create_open_telemetry_metrics_ingestion_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" -) - -// NewCreateOpenTelemetryMetricsIngestionParams creates a new CreateOpenTelemetryMetricsIngestionParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewCreateOpenTelemetryMetricsIngestionParams() *CreateOpenTelemetryMetricsIngestionParams { - return &CreateOpenTelemetryMetricsIngestionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateOpenTelemetryMetricsIngestionParamsWithTimeout creates a new CreateOpenTelemetryMetricsIngestionParams object -// with the ability to set a timeout on a request. -func NewCreateOpenTelemetryMetricsIngestionParamsWithTimeout(timeout time.Duration) *CreateOpenTelemetryMetricsIngestionParams { - return &CreateOpenTelemetryMetricsIngestionParams{ - timeout: timeout, - } -} - -// NewCreateOpenTelemetryMetricsIngestionParamsWithContext creates a new CreateOpenTelemetryMetricsIngestionParams object -// with the ability to set a context for a request. -func NewCreateOpenTelemetryMetricsIngestionParamsWithContext(ctx context.Context) *CreateOpenTelemetryMetricsIngestionParams { - return &CreateOpenTelemetryMetricsIngestionParams{ - Context: ctx, - } -} - -// NewCreateOpenTelemetryMetricsIngestionParamsWithHTTPClient creates a new CreateOpenTelemetryMetricsIngestionParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateOpenTelemetryMetricsIngestionParamsWithHTTPClient(client *http.Client) *CreateOpenTelemetryMetricsIngestionParams { - return &CreateOpenTelemetryMetricsIngestionParams{ - HTTPClient: client, - } -} - -/* -CreateOpenTelemetryMetricsIngestionParams contains all the parameters to send to the API endpoint - - for the create open telemetry metrics ingestion operation. - - Typically these are written to a http.Request. -*/ -type CreateOpenTelemetryMetricsIngestionParams struct { - - // Body. - Body *models.ConfigunstableCreateOpenTelemetryMetricsIngestionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create open telemetry metrics ingestion params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOpenTelemetryMetricsIngestionParams) WithDefaults() *CreateOpenTelemetryMetricsIngestionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create open telemetry metrics ingestion params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateOpenTelemetryMetricsIngestionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create open telemetry metrics ingestion params -func (o *CreateOpenTelemetryMetricsIngestionParams) WithTimeout(timeout time.Duration) *CreateOpenTelemetryMetricsIngestionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create open telemetry metrics ingestion params -func (o *CreateOpenTelemetryMetricsIngestionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create open telemetry metrics ingestion params -func (o *CreateOpenTelemetryMetricsIngestionParams) WithContext(ctx context.Context) *CreateOpenTelemetryMetricsIngestionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create open telemetry metrics ingestion params -func (o *CreateOpenTelemetryMetricsIngestionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create open telemetry metrics ingestion params -func (o *CreateOpenTelemetryMetricsIngestionParams) WithHTTPClient(client *http.Client) *CreateOpenTelemetryMetricsIngestionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create open telemetry metrics ingestion params -func (o *CreateOpenTelemetryMetricsIngestionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create open telemetry metrics ingestion params -func (o *CreateOpenTelemetryMetricsIngestionParams) WithBody(body *models.ConfigunstableCreateOpenTelemetryMetricsIngestionRequest) *CreateOpenTelemetryMetricsIngestionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create open telemetry metrics ingestion params -func (o *CreateOpenTelemetryMetricsIngestionParams) SetBody(body *models.ConfigunstableCreateOpenTelemetryMetricsIngestionRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateOpenTelemetryMetricsIngestionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/create_open_telemetry_metrics_ingestion_responses.go b/src/generated/swagger/configunstable/client/operations/create_open_telemetry_metrics_ingestion_responses.go deleted file mode 100644 index e7dd80d..0000000 --- a/src/generated/swagger/configunstable/client/operations/create_open_telemetry_metrics_ingestion_responses.go +++ /dev/null @@ -1,402 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" -) - -// CreateOpenTelemetryMetricsIngestionReader is a Reader for the CreateOpenTelemetryMetricsIngestion structure. -type CreateOpenTelemetryMetricsIngestionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateOpenTelemetryMetricsIngestionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateOpenTelemetryMetricsIngestionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateOpenTelemetryMetricsIngestionBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 409: - result := NewCreateOpenTelemetryMetricsIngestionConflict() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateOpenTelemetryMetricsIngestionInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewCreateOpenTelemetryMetricsIngestionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreateOpenTelemetryMetricsIngestionOK creates a CreateOpenTelemetryMetricsIngestionOK with default headers values -func NewCreateOpenTelemetryMetricsIngestionOK() *CreateOpenTelemetryMetricsIngestionOK { - return &CreateOpenTelemetryMetricsIngestionOK{} -} - -/* -CreateOpenTelemetryMetricsIngestionOK describes a response with status code 200, with default header values. - -A successful response containing the created OpenTelemetryMetricsIngestion. -*/ -type CreateOpenTelemetryMetricsIngestionOK struct { - Payload *models.ConfigunstableCreateOpenTelemetryMetricsIngestionResponse -} - -// IsSuccess returns true when this create open telemetry metrics ingestion o k response has a 2xx status code -func (o *CreateOpenTelemetryMetricsIngestionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create open telemetry metrics ingestion o k response has a 3xx status code -func (o *CreateOpenTelemetryMetricsIngestionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create open telemetry metrics ingestion o k response has a 4xx status code -func (o *CreateOpenTelemetryMetricsIngestionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create open telemetry metrics ingestion o k response has a 5xx status code -func (o *CreateOpenTelemetryMetricsIngestionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create open telemetry metrics ingestion o k response a status code equal to that given -func (o *CreateOpenTelemetryMetricsIngestionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create open telemetry metrics ingestion o k response -func (o *CreateOpenTelemetryMetricsIngestionOK) Code() int { - return 200 -} - -func (o *CreateOpenTelemetryMetricsIngestionOK) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] createOpenTelemetryMetricsIngestionOK %+v", 200, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionOK) String() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] createOpenTelemetryMetricsIngestionOK %+v", 200, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionOK) GetPayload() *models.ConfigunstableCreateOpenTelemetryMetricsIngestionResponse { - return o.Payload -} - -func (o *CreateOpenTelemetryMetricsIngestionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ConfigunstableCreateOpenTelemetryMetricsIngestionResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOpenTelemetryMetricsIngestionBadRequest creates a CreateOpenTelemetryMetricsIngestionBadRequest with default headers values -func NewCreateOpenTelemetryMetricsIngestionBadRequest() *CreateOpenTelemetryMetricsIngestionBadRequest { - return &CreateOpenTelemetryMetricsIngestionBadRequest{} -} - -/* -CreateOpenTelemetryMetricsIngestionBadRequest describes a response with status code 400, with default header values. - -Cannot create the OpenTelemetryMetricsIngestion because the request is invalid. -*/ -type CreateOpenTelemetryMetricsIngestionBadRequest struct { - Payload *models.APIError -} - -// IsSuccess returns true when this create open telemetry metrics ingestion bad request response has a 2xx status code -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create open telemetry metrics ingestion bad request response has a 3xx status code -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create open telemetry metrics ingestion bad request response has a 4xx status code -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create open telemetry metrics ingestion bad request response has a 5xx status code -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create open telemetry metrics ingestion bad request response a status code equal to that given -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create open telemetry metrics ingestion bad request response -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) Code() int { - return 400 -} - -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] createOpenTelemetryMetricsIngestionBadRequest %+v", 400, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) String() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] createOpenTelemetryMetricsIngestionBadRequest %+v", 400, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) GetPayload() *models.APIError { - return o.Payload -} - -func (o *CreateOpenTelemetryMetricsIngestionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOpenTelemetryMetricsIngestionConflict creates a CreateOpenTelemetryMetricsIngestionConflict with default headers values -func NewCreateOpenTelemetryMetricsIngestionConflict() *CreateOpenTelemetryMetricsIngestionConflict { - return &CreateOpenTelemetryMetricsIngestionConflict{} -} - -/* -CreateOpenTelemetryMetricsIngestionConflict describes a response with status code 409, with default header values. - -Cannot create the OpenTelemetryMetricsIngestion because there is a conflict with an existing OpenTelemetryMetricsIngestion. -*/ -type CreateOpenTelemetryMetricsIngestionConflict struct { - Payload *models.APIError -} - -// IsSuccess returns true when this create open telemetry metrics ingestion conflict response has a 2xx status code -func (o *CreateOpenTelemetryMetricsIngestionConflict) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create open telemetry metrics ingestion conflict response has a 3xx status code -func (o *CreateOpenTelemetryMetricsIngestionConflict) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create open telemetry metrics ingestion conflict response has a 4xx status code -func (o *CreateOpenTelemetryMetricsIngestionConflict) IsClientError() bool { - return true -} - -// IsServerError returns true when this create open telemetry metrics ingestion conflict response has a 5xx status code -func (o *CreateOpenTelemetryMetricsIngestionConflict) IsServerError() bool { - return false -} - -// IsCode returns true when this create open telemetry metrics ingestion conflict response a status code equal to that given -func (o *CreateOpenTelemetryMetricsIngestionConflict) IsCode(code int) bool { - return code == 409 -} - -// Code gets the status code for the create open telemetry metrics ingestion conflict response -func (o *CreateOpenTelemetryMetricsIngestionConflict) Code() int { - return 409 -} - -func (o *CreateOpenTelemetryMetricsIngestionConflict) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] createOpenTelemetryMetricsIngestionConflict %+v", 409, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionConflict) String() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] createOpenTelemetryMetricsIngestionConflict %+v", 409, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionConflict) GetPayload() *models.APIError { - return o.Payload -} - -func (o *CreateOpenTelemetryMetricsIngestionConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOpenTelemetryMetricsIngestionInternalServerError creates a CreateOpenTelemetryMetricsIngestionInternalServerError with default headers values -func NewCreateOpenTelemetryMetricsIngestionInternalServerError() *CreateOpenTelemetryMetricsIngestionInternalServerError { - return &CreateOpenTelemetryMetricsIngestionInternalServerError{} -} - -/* -CreateOpenTelemetryMetricsIngestionInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type CreateOpenTelemetryMetricsIngestionInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this create open telemetry metrics ingestion internal server error response has a 2xx status code -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create open telemetry metrics ingestion internal server error response has a 3xx status code -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create open telemetry metrics ingestion internal server error response has a 4xx status code -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create open telemetry metrics ingestion internal server error response has a 5xx status code -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create open telemetry metrics ingestion internal server error response a status code equal to that given -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create open telemetry metrics ingestion internal server error response -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) Code() int { - return 500 -} - -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] createOpenTelemetryMetricsIngestionInternalServerError %+v", 500, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) String() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] createOpenTelemetryMetricsIngestionInternalServerError %+v", 500, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *CreateOpenTelemetryMetricsIngestionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateOpenTelemetryMetricsIngestionDefault creates a CreateOpenTelemetryMetricsIngestionDefault with default headers values -func NewCreateOpenTelemetryMetricsIngestionDefault(code int) *CreateOpenTelemetryMetricsIngestionDefault { - return &CreateOpenTelemetryMetricsIngestionDefault{ - _statusCode: code, - } -} - -/* -CreateOpenTelemetryMetricsIngestionDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type CreateOpenTelemetryMetricsIngestionDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this create open telemetry metrics ingestion default response has a 2xx status code -func (o *CreateOpenTelemetryMetricsIngestionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create open telemetry metrics ingestion default response has a 3xx status code -func (o *CreateOpenTelemetryMetricsIngestionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create open telemetry metrics ingestion default response has a 4xx status code -func (o *CreateOpenTelemetryMetricsIngestionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create open telemetry metrics ingestion default response has a 5xx status code -func (o *CreateOpenTelemetryMetricsIngestionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create open telemetry metrics ingestion default response a status code equal to that given -func (o *CreateOpenTelemetryMetricsIngestionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create open telemetry metrics ingestion default response -func (o *CreateOpenTelemetryMetricsIngestionDefault) Code() int { - return o._statusCode -} - -func (o *CreateOpenTelemetryMetricsIngestionDefault) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] CreateOpenTelemetryMetricsIngestion default %+v", o._statusCode, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionDefault) String() string { - return fmt.Sprintf("[POST /api/unstable/config/open-telemetry-metrics-ingestion][%d] CreateOpenTelemetryMetricsIngestion default %+v", o._statusCode, o.Payload) -} - -func (o *CreateOpenTelemetryMetricsIngestionDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *CreateOpenTelemetryMetricsIngestionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/create_otel_metrics_ingestion_parameters.go b/src/generated/swagger/configunstable/client/operations/create_otel_metrics_ingestion_parameters.go new file mode 100644 index 0000000..8281987 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/create_otel_metrics_ingestion_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" +) + +// NewCreateOtelMetricsIngestionParams creates a new CreateOtelMetricsIngestionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewCreateOtelMetricsIngestionParams() *CreateOtelMetricsIngestionParams { + return &CreateOtelMetricsIngestionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCreateOtelMetricsIngestionParamsWithTimeout creates a new CreateOtelMetricsIngestionParams object +// with the ability to set a timeout on a request. +func NewCreateOtelMetricsIngestionParamsWithTimeout(timeout time.Duration) *CreateOtelMetricsIngestionParams { + return &CreateOtelMetricsIngestionParams{ + timeout: timeout, + } +} + +// NewCreateOtelMetricsIngestionParamsWithContext creates a new CreateOtelMetricsIngestionParams object +// with the ability to set a context for a request. +func NewCreateOtelMetricsIngestionParamsWithContext(ctx context.Context) *CreateOtelMetricsIngestionParams { + return &CreateOtelMetricsIngestionParams{ + Context: ctx, + } +} + +// NewCreateOtelMetricsIngestionParamsWithHTTPClient creates a new CreateOtelMetricsIngestionParams object +// with the ability to set a custom HTTPClient for a request. +func NewCreateOtelMetricsIngestionParamsWithHTTPClient(client *http.Client) *CreateOtelMetricsIngestionParams { + return &CreateOtelMetricsIngestionParams{ + HTTPClient: client, + } +} + +/* +CreateOtelMetricsIngestionParams contains all the parameters to send to the API endpoint + + for the create otel metrics ingestion operation. + + Typically these are written to a http.Request. +*/ +type CreateOtelMetricsIngestionParams struct { + + // Body. + Body *models.ConfigunstableCreateOtelMetricsIngestionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the create otel metrics ingestion params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateOtelMetricsIngestionParams) WithDefaults() *CreateOtelMetricsIngestionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the create otel metrics ingestion params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateOtelMetricsIngestionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the create otel metrics ingestion params +func (o *CreateOtelMetricsIngestionParams) WithTimeout(timeout time.Duration) *CreateOtelMetricsIngestionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the create otel metrics ingestion params +func (o *CreateOtelMetricsIngestionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the create otel metrics ingestion params +func (o *CreateOtelMetricsIngestionParams) WithContext(ctx context.Context) *CreateOtelMetricsIngestionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the create otel metrics ingestion params +func (o *CreateOtelMetricsIngestionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the create otel metrics ingestion params +func (o *CreateOtelMetricsIngestionParams) WithHTTPClient(client *http.Client) *CreateOtelMetricsIngestionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the create otel metrics ingestion params +func (o *CreateOtelMetricsIngestionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the create otel metrics ingestion params +func (o *CreateOtelMetricsIngestionParams) WithBody(body *models.ConfigunstableCreateOtelMetricsIngestionRequest) *CreateOtelMetricsIngestionParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the create otel metrics ingestion params +func (o *CreateOtelMetricsIngestionParams) SetBody(body *models.ConfigunstableCreateOtelMetricsIngestionRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CreateOtelMetricsIngestionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/create_otel_metrics_ingestion_responses.go b/src/generated/swagger/configunstable/client/operations/create_otel_metrics_ingestion_responses.go new file mode 100644 index 0000000..84f2394 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/create_otel_metrics_ingestion_responses.go @@ -0,0 +1,402 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" +) + +// CreateOtelMetricsIngestionReader is a Reader for the CreateOtelMetricsIngestion structure. +type CreateOtelMetricsIngestionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CreateOtelMetricsIngestionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCreateOtelMetricsIngestionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCreateOtelMetricsIngestionBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewCreateOtelMetricsIngestionConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCreateOtelMetricsIngestionInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewCreateOtelMetricsIngestionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCreateOtelMetricsIngestionOK creates a CreateOtelMetricsIngestionOK with default headers values +func NewCreateOtelMetricsIngestionOK() *CreateOtelMetricsIngestionOK { + return &CreateOtelMetricsIngestionOK{} +} + +/* +CreateOtelMetricsIngestionOK describes a response with status code 200, with default header values. + +A successful response containing the created OtelMetricsIngestion. +*/ +type CreateOtelMetricsIngestionOK struct { + Payload *models.ConfigunstableCreateOtelMetricsIngestionResponse +} + +// IsSuccess returns true when this create otel metrics ingestion o k response has a 2xx status code +func (o *CreateOtelMetricsIngestionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create otel metrics ingestion o k response has a 3xx status code +func (o *CreateOtelMetricsIngestionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create otel metrics ingestion o k response has a 4xx status code +func (o *CreateOtelMetricsIngestionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this create otel metrics ingestion o k response has a 5xx status code +func (o *CreateOtelMetricsIngestionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this create otel metrics ingestion o k response a status code equal to that given +func (o *CreateOtelMetricsIngestionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the create otel metrics ingestion o k response +func (o *CreateOtelMetricsIngestionOK) Code() int { + return 200 +} + +func (o *CreateOtelMetricsIngestionOK) Error() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] createOtelMetricsIngestionOK %+v", 200, o.Payload) +} + +func (o *CreateOtelMetricsIngestionOK) String() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] createOtelMetricsIngestionOK %+v", 200, o.Payload) +} + +func (o *CreateOtelMetricsIngestionOK) GetPayload() *models.ConfigunstableCreateOtelMetricsIngestionResponse { + return o.Payload +} + +func (o *CreateOtelMetricsIngestionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigunstableCreateOtelMetricsIngestionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateOtelMetricsIngestionBadRequest creates a CreateOtelMetricsIngestionBadRequest with default headers values +func NewCreateOtelMetricsIngestionBadRequest() *CreateOtelMetricsIngestionBadRequest { + return &CreateOtelMetricsIngestionBadRequest{} +} + +/* +CreateOtelMetricsIngestionBadRequest describes a response with status code 400, with default header values. + +Cannot create the OtelMetricsIngestion because the request is invalid. +*/ +type CreateOtelMetricsIngestionBadRequest struct { + Payload *models.APIError +} + +// IsSuccess returns true when this create otel metrics ingestion bad request response has a 2xx status code +func (o *CreateOtelMetricsIngestionBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create otel metrics ingestion bad request response has a 3xx status code +func (o *CreateOtelMetricsIngestionBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create otel metrics ingestion bad request response has a 4xx status code +func (o *CreateOtelMetricsIngestionBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create otel metrics ingestion bad request response has a 5xx status code +func (o *CreateOtelMetricsIngestionBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create otel metrics ingestion bad request response a status code equal to that given +func (o *CreateOtelMetricsIngestionBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the create otel metrics ingestion bad request response +func (o *CreateOtelMetricsIngestionBadRequest) Code() int { + return 400 +} + +func (o *CreateOtelMetricsIngestionBadRequest) Error() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] createOtelMetricsIngestionBadRequest %+v", 400, o.Payload) +} + +func (o *CreateOtelMetricsIngestionBadRequest) String() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] createOtelMetricsIngestionBadRequest %+v", 400, o.Payload) +} + +func (o *CreateOtelMetricsIngestionBadRequest) GetPayload() *models.APIError { + return o.Payload +} + +func (o *CreateOtelMetricsIngestionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateOtelMetricsIngestionConflict creates a CreateOtelMetricsIngestionConflict with default headers values +func NewCreateOtelMetricsIngestionConflict() *CreateOtelMetricsIngestionConflict { + return &CreateOtelMetricsIngestionConflict{} +} + +/* +CreateOtelMetricsIngestionConflict describes a response with status code 409, with default header values. + +Cannot create the OtelMetricsIngestion because there is a conflict with an existing OtelMetricsIngestion. +*/ +type CreateOtelMetricsIngestionConflict struct { + Payload *models.APIError +} + +// IsSuccess returns true when this create otel metrics ingestion conflict response has a 2xx status code +func (o *CreateOtelMetricsIngestionConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create otel metrics ingestion conflict response has a 3xx status code +func (o *CreateOtelMetricsIngestionConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create otel metrics ingestion conflict response has a 4xx status code +func (o *CreateOtelMetricsIngestionConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this create otel metrics ingestion conflict response has a 5xx status code +func (o *CreateOtelMetricsIngestionConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this create otel metrics ingestion conflict response a status code equal to that given +func (o *CreateOtelMetricsIngestionConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the create otel metrics ingestion conflict response +func (o *CreateOtelMetricsIngestionConflict) Code() int { + return 409 +} + +func (o *CreateOtelMetricsIngestionConflict) Error() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] createOtelMetricsIngestionConflict %+v", 409, o.Payload) +} + +func (o *CreateOtelMetricsIngestionConflict) String() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] createOtelMetricsIngestionConflict %+v", 409, o.Payload) +} + +func (o *CreateOtelMetricsIngestionConflict) GetPayload() *models.APIError { + return o.Payload +} + +func (o *CreateOtelMetricsIngestionConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateOtelMetricsIngestionInternalServerError creates a CreateOtelMetricsIngestionInternalServerError with default headers values +func NewCreateOtelMetricsIngestionInternalServerError() *CreateOtelMetricsIngestionInternalServerError { + return &CreateOtelMetricsIngestionInternalServerError{} +} + +/* +CreateOtelMetricsIngestionInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type CreateOtelMetricsIngestionInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this create otel metrics ingestion internal server error response has a 2xx status code +func (o *CreateOtelMetricsIngestionInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create otel metrics ingestion internal server error response has a 3xx status code +func (o *CreateOtelMetricsIngestionInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create otel metrics ingestion internal server error response has a 4xx status code +func (o *CreateOtelMetricsIngestionInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this create otel metrics ingestion internal server error response has a 5xx status code +func (o *CreateOtelMetricsIngestionInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this create otel metrics ingestion internal server error response a status code equal to that given +func (o *CreateOtelMetricsIngestionInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the create otel metrics ingestion internal server error response +func (o *CreateOtelMetricsIngestionInternalServerError) Code() int { + return 500 +} + +func (o *CreateOtelMetricsIngestionInternalServerError) Error() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] createOtelMetricsIngestionInternalServerError %+v", 500, o.Payload) +} + +func (o *CreateOtelMetricsIngestionInternalServerError) String() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] createOtelMetricsIngestionInternalServerError %+v", 500, o.Payload) +} + +func (o *CreateOtelMetricsIngestionInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *CreateOtelMetricsIngestionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateOtelMetricsIngestionDefault creates a CreateOtelMetricsIngestionDefault with default headers values +func NewCreateOtelMetricsIngestionDefault(code int) *CreateOtelMetricsIngestionDefault { + return &CreateOtelMetricsIngestionDefault{ + _statusCode: code, + } +} + +/* +CreateOtelMetricsIngestionDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type CreateOtelMetricsIngestionDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this create otel metrics ingestion default response has a 2xx status code +func (o *CreateOtelMetricsIngestionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this create otel metrics ingestion default response has a 3xx status code +func (o *CreateOtelMetricsIngestionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this create otel metrics ingestion default response has a 4xx status code +func (o *CreateOtelMetricsIngestionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this create otel metrics ingestion default response has a 5xx status code +func (o *CreateOtelMetricsIngestionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this create otel metrics ingestion default response a status code equal to that given +func (o *CreateOtelMetricsIngestionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the create otel metrics ingestion default response +func (o *CreateOtelMetricsIngestionDefault) Code() int { + return o._statusCode +} + +func (o *CreateOtelMetricsIngestionDefault) Error() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] CreateOtelMetricsIngestion default %+v", o._statusCode, o.Payload) +} + +func (o *CreateOtelMetricsIngestionDefault) String() string { + return fmt.Sprintf("[POST /api/unstable/config/otel-metrics-ingestion][%d] CreateOtelMetricsIngestion default %+v", o._statusCode, o.Payload) +} + +func (o *CreateOtelMetricsIngestionDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *CreateOtelMetricsIngestionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/delete_open_telemetry_metrics_ingestion_parameters.go b/src/generated/swagger/configunstable/client/operations/delete_open_telemetry_metrics_ingestion_parameters.go deleted file mode 100644 index 8fda58f..0000000 --- a/src/generated/swagger/configunstable/client/operations/delete_open_telemetry_metrics_ingestion_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewDeleteOpenTelemetryMetricsIngestionParams creates a new DeleteOpenTelemetryMetricsIngestionParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewDeleteOpenTelemetryMetricsIngestionParams() *DeleteOpenTelemetryMetricsIngestionParams { - return &DeleteOpenTelemetryMetricsIngestionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteOpenTelemetryMetricsIngestionParamsWithTimeout creates a new DeleteOpenTelemetryMetricsIngestionParams object -// with the ability to set a timeout on a request. -func NewDeleteOpenTelemetryMetricsIngestionParamsWithTimeout(timeout time.Duration) *DeleteOpenTelemetryMetricsIngestionParams { - return &DeleteOpenTelemetryMetricsIngestionParams{ - timeout: timeout, - } -} - -// NewDeleteOpenTelemetryMetricsIngestionParamsWithContext creates a new DeleteOpenTelemetryMetricsIngestionParams object -// with the ability to set a context for a request. -func NewDeleteOpenTelemetryMetricsIngestionParamsWithContext(ctx context.Context) *DeleteOpenTelemetryMetricsIngestionParams { - return &DeleteOpenTelemetryMetricsIngestionParams{ - Context: ctx, - } -} - -// NewDeleteOpenTelemetryMetricsIngestionParamsWithHTTPClient creates a new DeleteOpenTelemetryMetricsIngestionParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteOpenTelemetryMetricsIngestionParamsWithHTTPClient(client *http.Client) *DeleteOpenTelemetryMetricsIngestionParams { - return &DeleteOpenTelemetryMetricsIngestionParams{ - HTTPClient: client, - } -} - -/* -DeleteOpenTelemetryMetricsIngestionParams contains all the parameters to send to the API endpoint - - for the delete open telemetry metrics ingestion operation. - - Typically these are written to a http.Request. -*/ -type DeleteOpenTelemetryMetricsIngestionParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete open telemetry metrics ingestion params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteOpenTelemetryMetricsIngestionParams) WithDefaults() *DeleteOpenTelemetryMetricsIngestionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete open telemetry metrics ingestion params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteOpenTelemetryMetricsIngestionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete open telemetry metrics ingestion params -func (o *DeleteOpenTelemetryMetricsIngestionParams) WithTimeout(timeout time.Duration) *DeleteOpenTelemetryMetricsIngestionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete open telemetry metrics ingestion params -func (o *DeleteOpenTelemetryMetricsIngestionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete open telemetry metrics ingestion params -func (o *DeleteOpenTelemetryMetricsIngestionParams) WithContext(ctx context.Context) *DeleteOpenTelemetryMetricsIngestionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete open telemetry metrics ingestion params -func (o *DeleteOpenTelemetryMetricsIngestionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete open telemetry metrics ingestion params -func (o *DeleteOpenTelemetryMetricsIngestionParams) WithHTTPClient(client *http.Client) *DeleteOpenTelemetryMetricsIngestionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete open telemetry metrics ingestion params -func (o *DeleteOpenTelemetryMetricsIngestionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteOpenTelemetryMetricsIngestionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/delete_open_telemetry_metrics_ingestion_responses.go b/src/generated/swagger/configunstable/client/operations/delete_open_telemetry_metrics_ingestion_responses.go deleted file mode 100644 index 3e9924c..0000000 --- a/src/generated/swagger/configunstable/client/operations/delete_open_telemetry_metrics_ingestion_responses.go +++ /dev/null @@ -1,400 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" -) - -// DeleteOpenTelemetryMetricsIngestionReader is a Reader for the DeleteOpenTelemetryMetricsIngestion structure. -type DeleteOpenTelemetryMetricsIngestionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteOpenTelemetryMetricsIngestionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteOpenTelemetryMetricsIngestionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteOpenTelemetryMetricsIngestionBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteOpenTelemetryMetricsIngestionNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteOpenTelemetryMetricsIngestionInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewDeleteOpenTelemetryMetricsIngestionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeleteOpenTelemetryMetricsIngestionOK creates a DeleteOpenTelemetryMetricsIngestionOK with default headers values -func NewDeleteOpenTelemetryMetricsIngestionOK() *DeleteOpenTelemetryMetricsIngestionOK { - return &DeleteOpenTelemetryMetricsIngestionOK{} -} - -/* -DeleteOpenTelemetryMetricsIngestionOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type DeleteOpenTelemetryMetricsIngestionOK struct { - Payload models.ConfigunstableDeleteOpenTelemetryMetricsIngestionResponse -} - -// IsSuccess returns true when this delete open telemetry metrics ingestion o k response has a 2xx status code -func (o *DeleteOpenTelemetryMetricsIngestionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete open telemetry metrics ingestion o k response has a 3xx status code -func (o *DeleteOpenTelemetryMetricsIngestionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete open telemetry metrics ingestion o k response has a 4xx status code -func (o *DeleteOpenTelemetryMetricsIngestionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete open telemetry metrics ingestion o k response has a 5xx status code -func (o *DeleteOpenTelemetryMetricsIngestionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete open telemetry metrics ingestion o k response a status code equal to that given -func (o *DeleteOpenTelemetryMetricsIngestionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete open telemetry metrics ingestion o k response -func (o *DeleteOpenTelemetryMetricsIngestionOK) Code() int { - return 200 -} - -func (o *DeleteOpenTelemetryMetricsIngestionOK) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] deleteOpenTelemetryMetricsIngestionOK %+v", 200, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionOK) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] deleteOpenTelemetryMetricsIngestionOK %+v", 200, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionOK) GetPayload() models.ConfigunstableDeleteOpenTelemetryMetricsIngestionResponse { - return o.Payload -} - -func (o *DeleteOpenTelemetryMetricsIngestionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOpenTelemetryMetricsIngestionBadRequest creates a DeleteOpenTelemetryMetricsIngestionBadRequest with default headers values -func NewDeleteOpenTelemetryMetricsIngestionBadRequest() *DeleteOpenTelemetryMetricsIngestionBadRequest { - return &DeleteOpenTelemetryMetricsIngestionBadRequest{} -} - -/* -DeleteOpenTelemetryMetricsIngestionBadRequest describes a response with status code 400, with default header values. - -Cannot delete the OpenTelemetryMetricsIngestion because it is in use. -*/ -type DeleteOpenTelemetryMetricsIngestionBadRequest struct { - Payload *models.APIError -} - -// IsSuccess returns true when this delete open telemetry metrics ingestion bad request response has a 2xx status code -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete open telemetry metrics ingestion bad request response has a 3xx status code -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete open telemetry metrics ingestion bad request response has a 4xx status code -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete open telemetry metrics ingestion bad request response has a 5xx status code -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete open telemetry metrics ingestion bad request response a status code equal to that given -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the delete open telemetry metrics ingestion bad request response -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) Code() int { - return 400 -} - -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] deleteOpenTelemetryMetricsIngestionBadRequest %+v", 400, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] deleteOpenTelemetryMetricsIngestionBadRequest %+v", 400, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) GetPayload() *models.APIError { - return o.Payload -} - -func (o *DeleteOpenTelemetryMetricsIngestionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOpenTelemetryMetricsIngestionNotFound creates a DeleteOpenTelemetryMetricsIngestionNotFound with default headers values -func NewDeleteOpenTelemetryMetricsIngestionNotFound() *DeleteOpenTelemetryMetricsIngestionNotFound { - return &DeleteOpenTelemetryMetricsIngestionNotFound{} -} - -/* -DeleteOpenTelemetryMetricsIngestionNotFound describes a response with status code 404, with default header values. - -Cannot delete the OpenTelemetryMetricsIngestion because the slug does not exist. -*/ -type DeleteOpenTelemetryMetricsIngestionNotFound struct { - Payload *models.APIError -} - -// IsSuccess returns true when this delete open telemetry metrics ingestion not found response has a 2xx status code -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete open telemetry metrics ingestion not found response has a 3xx status code -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete open telemetry metrics ingestion not found response has a 4xx status code -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete open telemetry metrics ingestion not found response has a 5xx status code -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete open telemetry metrics ingestion not found response a status code equal to that given -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete open telemetry metrics ingestion not found response -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) Code() int { - return 404 -} - -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] deleteOpenTelemetryMetricsIngestionNotFound %+v", 404, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] deleteOpenTelemetryMetricsIngestionNotFound %+v", 404, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) GetPayload() *models.APIError { - return o.Payload -} - -func (o *DeleteOpenTelemetryMetricsIngestionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOpenTelemetryMetricsIngestionInternalServerError creates a DeleteOpenTelemetryMetricsIngestionInternalServerError with default headers values -func NewDeleteOpenTelemetryMetricsIngestionInternalServerError() *DeleteOpenTelemetryMetricsIngestionInternalServerError { - return &DeleteOpenTelemetryMetricsIngestionInternalServerError{} -} - -/* -DeleteOpenTelemetryMetricsIngestionInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type DeleteOpenTelemetryMetricsIngestionInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this delete open telemetry metrics ingestion internal server error response has a 2xx status code -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete open telemetry metrics ingestion internal server error response has a 3xx status code -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete open telemetry metrics ingestion internal server error response has a 4xx status code -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete open telemetry metrics ingestion internal server error response has a 5xx status code -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this delete open telemetry metrics ingestion internal server error response a status code equal to that given -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the delete open telemetry metrics ingestion internal server error response -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) Code() int { - return 500 -} - -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] deleteOpenTelemetryMetricsIngestionInternalServerError %+v", 500, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] deleteOpenTelemetryMetricsIngestionInternalServerError %+v", 500, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *DeleteOpenTelemetryMetricsIngestionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteOpenTelemetryMetricsIngestionDefault creates a DeleteOpenTelemetryMetricsIngestionDefault with default headers values -func NewDeleteOpenTelemetryMetricsIngestionDefault(code int) *DeleteOpenTelemetryMetricsIngestionDefault { - return &DeleteOpenTelemetryMetricsIngestionDefault{ - _statusCode: code, - } -} - -/* -DeleteOpenTelemetryMetricsIngestionDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type DeleteOpenTelemetryMetricsIngestionDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this delete open telemetry metrics ingestion default response has a 2xx status code -func (o *DeleteOpenTelemetryMetricsIngestionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete open telemetry metrics ingestion default response has a 3xx status code -func (o *DeleteOpenTelemetryMetricsIngestionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete open telemetry metrics ingestion default response has a 4xx status code -func (o *DeleteOpenTelemetryMetricsIngestionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete open telemetry metrics ingestion default response has a 5xx status code -func (o *DeleteOpenTelemetryMetricsIngestionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete open telemetry metrics ingestion default response a status code equal to that given -func (o *DeleteOpenTelemetryMetricsIngestionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete open telemetry metrics ingestion default response -func (o *DeleteOpenTelemetryMetricsIngestionDefault) Code() int { - return o._statusCode -} - -func (o *DeleteOpenTelemetryMetricsIngestionDefault) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] DeleteOpenTelemetryMetricsIngestion default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionDefault) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/open-telemetry-metrics-ingestion][%d] DeleteOpenTelemetryMetricsIngestion default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteOpenTelemetryMetricsIngestionDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *DeleteOpenTelemetryMetricsIngestionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/delete_otel_metrics_ingestion_parameters.go b/src/generated/swagger/configunstable/client/operations/delete_otel_metrics_ingestion_parameters.go new file mode 100644 index 0000000..d8a990e --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/delete_otel_metrics_ingestion_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteOtelMetricsIngestionParams creates a new DeleteOtelMetricsIngestionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewDeleteOtelMetricsIngestionParams() *DeleteOtelMetricsIngestionParams { + return &DeleteOtelMetricsIngestionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteOtelMetricsIngestionParamsWithTimeout creates a new DeleteOtelMetricsIngestionParams object +// with the ability to set a timeout on a request. +func NewDeleteOtelMetricsIngestionParamsWithTimeout(timeout time.Duration) *DeleteOtelMetricsIngestionParams { + return &DeleteOtelMetricsIngestionParams{ + timeout: timeout, + } +} + +// NewDeleteOtelMetricsIngestionParamsWithContext creates a new DeleteOtelMetricsIngestionParams object +// with the ability to set a context for a request. +func NewDeleteOtelMetricsIngestionParamsWithContext(ctx context.Context) *DeleteOtelMetricsIngestionParams { + return &DeleteOtelMetricsIngestionParams{ + Context: ctx, + } +} + +// NewDeleteOtelMetricsIngestionParamsWithHTTPClient creates a new DeleteOtelMetricsIngestionParams object +// with the ability to set a custom HTTPClient for a request. +func NewDeleteOtelMetricsIngestionParamsWithHTTPClient(client *http.Client) *DeleteOtelMetricsIngestionParams { + return &DeleteOtelMetricsIngestionParams{ + HTTPClient: client, + } +} + +/* +DeleteOtelMetricsIngestionParams contains all the parameters to send to the API endpoint + + for the delete otel metrics ingestion operation. + + Typically these are written to a http.Request. +*/ +type DeleteOtelMetricsIngestionParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the delete otel metrics ingestion params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteOtelMetricsIngestionParams) WithDefaults() *DeleteOtelMetricsIngestionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the delete otel metrics ingestion params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteOtelMetricsIngestionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the delete otel metrics ingestion params +func (o *DeleteOtelMetricsIngestionParams) WithTimeout(timeout time.Duration) *DeleteOtelMetricsIngestionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete otel metrics ingestion params +func (o *DeleteOtelMetricsIngestionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete otel metrics ingestion params +func (o *DeleteOtelMetricsIngestionParams) WithContext(ctx context.Context) *DeleteOtelMetricsIngestionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete otel metrics ingestion params +func (o *DeleteOtelMetricsIngestionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete otel metrics ingestion params +func (o *DeleteOtelMetricsIngestionParams) WithHTTPClient(client *http.Client) *DeleteOtelMetricsIngestionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete otel metrics ingestion params +func (o *DeleteOtelMetricsIngestionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteOtelMetricsIngestionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/delete_otel_metrics_ingestion_responses.go b/src/generated/swagger/configunstable/client/operations/delete_otel_metrics_ingestion_responses.go new file mode 100644 index 0000000..036227d --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/delete_otel_metrics_ingestion_responses.go @@ -0,0 +1,400 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" +) + +// DeleteOtelMetricsIngestionReader is a Reader for the DeleteOtelMetricsIngestion structure. +type DeleteOtelMetricsIngestionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteOtelMetricsIngestionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteOtelMetricsIngestionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewDeleteOtelMetricsIngestionBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteOtelMetricsIngestionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteOtelMetricsIngestionInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewDeleteOtelMetricsIngestionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewDeleteOtelMetricsIngestionOK creates a DeleteOtelMetricsIngestionOK with default headers values +func NewDeleteOtelMetricsIngestionOK() *DeleteOtelMetricsIngestionOK { + return &DeleteOtelMetricsIngestionOK{} +} + +/* +DeleteOtelMetricsIngestionOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type DeleteOtelMetricsIngestionOK struct { + Payload models.ConfigunstableDeleteOtelMetricsIngestionResponse +} + +// IsSuccess returns true when this delete otel metrics ingestion o k response has a 2xx status code +func (o *DeleteOtelMetricsIngestionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete otel metrics ingestion o k response has a 3xx status code +func (o *DeleteOtelMetricsIngestionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete otel metrics ingestion o k response has a 4xx status code +func (o *DeleteOtelMetricsIngestionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete otel metrics ingestion o k response has a 5xx status code +func (o *DeleteOtelMetricsIngestionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete otel metrics ingestion o k response a status code equal to that given +func (o *DeleteOtelMetricsIngestionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the delete otel metrics ingestion o k response +func (o *DeleteOtelMetricsIngestionOK) Code() int { + return 200 +} + +func (o *DeleteOtelMetricsIngestionOK) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] deleteOtelMetricsIngestionOK %+v", 200, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionOK) String() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] deleteOtelMetricsIngestionOK %+v", 200, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionOK) GetPayload() models.ConfigunstableDeleteOtelMetricsIngestionResponse { + return o.Payload +} + +func (o *DeleteOtelMetricsIngestionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOtelMetricsIngestionBadRequest creates a DeleteOtelMetricsIngestionBadRequest with default headers values +func NewDeleteOtelMetricsIngestionBadRequest() *DeleteOtelMetricsIngestionBadRequest { + return &DeleteOtelMetricsIngestionBadRequest{} +} + +/* +DeleteOtelMetricsIngestionBadRequest describes a response with status code 400, with default header values. + +Cannot delete the OtelMetricsIngestion because it is in use. +*/ +type DeleteOtelMetricsIngestionBadRequest struct { + Payload *models.APIError +} + +// IsSuccess returns true when this delete otel metrics ingestion bad request response has a 2xx status code +func (o *DeleteOtelMetricsIngestionBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete otel metrics ingestion bad request response has a 3xx status code +func (o *DeleteOtelMetricsIngestionBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete otel metrics ingestion bad request response has a 4xx status code +func (o *DeleteOtelMetricsIngestionBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete otel metrics ingestion bad request response has a 5xx status code +func (o *DeleteOtelMetricsIngestionBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete otel metrics ingestion bad request response a status code equal to that given +func (o *DeleteOtelMetricsIngestionBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the delete otel metrics ingestion bad request response +func (o *DeleteOtelMetricsIngestionBadRequest) Code() int { + return 400 +} + +func (o *DeleteOtelMetricsIngestionBadRequest) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] deleteOtelMetricsIngestionBadRequest %+v", 400, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionBadRequest) String() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] deleteOtelMetricsIngestionBadRequest %+v", 400, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionBadRequest) GetPayload() *models.APIError { + return o.Payload +} + +func (o *DeleteOtelMetricsIngestionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOtelMetricsIngestionNotFound creates a DeleteOtelMetricsIngestionNotFound with default headers values +func NewDeleteOtelMetricsIngestionNotFound() *DeleteOtelMetricsIngestionNotFound { + return &DeleteOtelMetricsIngestionNotFound{} +} + +/* +DeleteOtelMetricsIngestionNotFound describes a response with status code 404, with default header values. + +Cannot delete the OtelMetricsIngestion because the slug does not exist. +*/ +type DeleteOtelMetricsIngestionNotFound struct { + Payload *models.APIError +} + +// IsSuccess returns true when this delete otel metrics ingestion not found response has a 2xx status code +func (o *DeleteOtelMetricsIngestionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete otel metrics ingestion not found response has a 3xx status code +func (o *DeleteOtelMetricsIngestionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete otel metrics ingestion not found response has a 4xx status code +func (o *DeleteOtelMetricsIngestionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete otel metrics ingestion not found response has a 5xx status code +func (o *DeleteOtelMetricsIngestionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this delete otel metrics ingestion not found response a status code equal to that given +func (o *DeleteOtelMetricsIngestionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the delete otel metrics ingestion not found response +func (o *DeleteOtelMetricsIngestionNotFound) Code() int { + return 404 +} + +func (o *DeleteOtelMetricsIngestionNotFound) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] deleteOtelMetricsIngestionNotFound %+v", 404, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionNotFound) String() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] deleteOtelMetricsIngestionNotFound %+v", 404, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionNotFound) GetPayload() *models.APIError { + return o.Payload +} + +func (o *DeleteOtelMetricsIngestionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOtelMetricsIngestionInternalServerError creates a DeleteOtelMetricsIngestionInternalServerError with default headers values +func NewDeleteOtelMetricsIngestionInternalServerError() *DeleteOtelMetricsIngestionInternalServerError { + return &DeleteOtelMetricsIngestionInternalServerError{} +} + +/* +DeleteOtelMetricsIngestionInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type DeleteOtelMetricsIngestionInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this delete otel metrics ingestion internal server error response has a 2xx status code +func (o *DeleteOtelMetricsIngestionInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete otel metrics ingestion internal server error response has a 3xx status code +func (o *DeleteOtelMetricsIngestionInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete otel metrics ingestion internal server error response has a 4xx status code +func (o *DeleteOtelMetricsIngestionInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete otel metrics ingestion internal server error response has a 5xx status code +func (o *DeleteOtelMetricsIngestionInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this delete otel metrics ingestion internal server error response a status code equal to that given +func (o *DeleteOtelMetricsIngestionInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the delete otel metrics ingestion internal server error response +func (o *DeleteOtelMetricsIngestionInternalServerError) Code() int { + return 500 +} + +func (o *DeleteOtelMetricsIngestionInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] deleteOtelMetricsIngestionInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionInternalServerError) String() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] deleteOtelMetricsIngestionInternalServerError %+v", 500, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *DeleteOtelMetricsIngestionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteOtelMetricsIngestionDefault creates a DeleteOtelMetricsIngestionDefault with default headers values +func NewDeleteOtelMetricsIngestionDefault(code int) *DeleteOtelMetricsIngestionDefault { + return &DeleteOtelMetricsIngestionDefault{ + _statusCode: code, + } +} + +/* +DeleteOtelMetricsIngestionDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type DeleteOtelMetricsIngestionDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this delete otel metrics ingestion default response has a 2xx status code +func (o *DeleteOtelMetricsIngestionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this delete otel metrics ingestion default response has a 3xx status code +func (o *DeleteOtelMetricsIngestionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this delete otel metrics ingestion default response has a 4xx status code +func (o *DeleteOtelMetricsIngestionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this delete otel metrics ingestion default response has a 5xx status code +func (o *DeleteOtelMetricsIngestionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this delete otel metrics ingestion default response a status code equal to that given +func (o *DeleteOtelMetricsIngestionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the delete otel metrics ingestion default response +func (o *DeleteOtelMetricsIngestionDefault) Code() int { + return o._statusCode +} + +func (o *DeleteOtelMetricsIngestionDefault) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] DeleteOtelMetricsIngestion default %+v", o._statusCode, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionDefault) String() string { + return fmt.Sprintf("[DELETE /api/unstable/config/otel-metrics-ingestion][%d] DeleteOtelMetricsIngestion default %+v", o._statusCode, o.Payload) +} + +func (o *DeleteOtelMetricsIngestionDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *DeleteOtelMetricsIngestionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/operations_client.go b/src/generated/swagger/configunstable/client/operations/operations_client.go index da18945..83ce577 100644 --- a/src/generated/swagger/configunstable/client/operations/operations_client.go +++ b/src/generated/swagger/configunstable/client/operations/operations_client.go @@ -32,15 +32,13 @@ type ClientService interface { CreateDataset(params *CreateDatasetParams, opts ...ClientOption) (*CreateDatasetOK, error) - CreateGcpMetricsIntegration(params *CreateGcpMetricsIntegrationParams, opts ...ClientOption) (*CreateGcpMetricsIntegrationOK, error) - CreateLinkTemplate(params *CreateLinkTemplateParams, opts ...ClientOption) (*CreateLinkTemplateOK, error) CreateLogAllocationConfig(params *CreateLogAllocationConfigParams, opts ...ClientOption) (*CreateLogAllocationConfigOK, error) CreateNoopEntity(params *CreateNoopEntityParams, opts ...ClientOption) (*CreateNoopEntityOK, error) - CreateOpenTelemetryMetricsIngestion(params *CreateOpenTelemetryMetricsIngestionParams, opts ...ClientOption) (*CreateOpenTelemetryMetricsIngestionOK, error) + CreateOtelMetricsIngestion(params *CreateOtelMetricsIngestionParams, opts ...ClientOption) (*CreateOtelMetricsIngestionOK, error) CreateSavedTraceSearch(params *CreateSavedTraceSearchParams, opts ...ClientOption) (*CreateSavedTraceSearchOK, error) @@ -58,15 +56,13 @@ type ClientService interface { DeleteDataset(params *DeleteDatasetParams, opts ...ClientOption) (*DeleteDatasetOK, error) - DeleteGcpMetricsIntegration(params *DeleteGcpMetricsIntegrationParams, opts ...ClientOption) (*DeleteGcpMetricsIntegrationOK, error) - DeleteLinkTemplate(params *DeleteLinkTemplateParams, opts ...ClientOption) (*DeleteLinkTemplateOK, error) DeleteLogAllocationConfig(params *DeleteLogAllocationConfigParams, opts ...ClientOption) (*DeleteLogAllocationConfigOK, error) DeleteNoopEntity(params *DeleteNoopEntityParams, opts ...ClientOption) (*DeleteNoopEntityOK, error) - DeleteOpenTelemetryMetricsIngestion(params *DeleteOpenTelemetryMetricsIngestionParams, opts ...ClientOption) (*DeleteOpenTelemetryMetricsIngestionOK, error) + DeleteOtelMetricsIngestion(params *DeleteOtelMetricsIngestionParams, opts ...ClientOption) (*DeleteOtelMetricsIngestionOK, error) DeleteSavedTraceSearch(params *DeleteSavedTraceSearchParams, opts ...ClientOption) (*DeleteSavedTraceSearchOK, error) @@ -84,8 +80,6 @@ type ClientService interface { ListDatasets(params *ListDatasetsParams, opts ...ClientOption) (*ListDatasetsOK, error) - ListGcpMetricsIntegrations(params *ListGcpMetricsIntegrationsParams, opts ...ClientOption) (*ListGcpMetricsIntegrationsOK, error) - ListLinkTemplates(params *ListLinkTemplatesParams, opts ...ClientOption) (*ListLinkTemplatesOK, error) ListSavedTraceSearches(params *ListSavedTraceSearchesParams, opts ...ClientOption) (*ListSavedTraceSearchesOK, error) @@ -100,15 +94,13 @@ type ClientService interface { ReadDataset(params *ReadDatasetParams, opts ...ClientOption) (*ReadDatasetOK, error) - ReadGcpMetricsIntegration(params *ReadGcpMetricsIntegrationParams, opts ...ClientOption) (*ReadGcpMetricsIntegrationOK, error) - ReadLinkTemplate(params *ReadLinkTemplateParams, opts ...ClientOption) (*ReadLinkTemplateOK, error) ReadLogAllocationConfig(params *ReadLogAllocationConfigParams, opts ...ClientOption) (*ReadLogAllocationConfigOK, error) ReadNoopEntity(params *ReadNoopEntityParams, opts ...ClientOption) (*ReadNoopEntityOK, error) - ReadOpenTelemetryMetricsIngestion(params *ReadOpenTelemetryMetricsIngestionParams, opts ...ClientOption) (*ReadOpenTelemetryMetricsIngestionOK, error) + ReadOtelMetricsIngestion(params *ReadOtelMetricsIngestionParams, opts ...ClientOption) (*ReadOtelMetricsIngestionOK, error) ReadSavedTraceSearch(params *ReadSavedTraceSearchParams, opts ...ClientOption) (*ReadSavedTraceSearchOK, error) @@ -128,15 +120,13 @@ type ClientService interface { UpdateDataset(params *UpdateDatasetParams, opts ...ClientOption) (*UpdateDatasetOK, error) - UpdateGcpMetricsIntegration(params *UpdateGcpMetricsIntegrationParams, opts ...ClientOption) (*UpdateGcpMetricsIntegrationOK, error) - UpdateLinkTemplate(params *UpdateLinkTemplateParams, opts ...ClientOption) (*UpdateLinkTemplateOK, error) UpdateLogAllocationConfig(params *UpdateLogAllocationConfigParams, opts ...ClientOption) (*UpdateLogAllocationConfigOK, error) UpdateNoopEntity(params *UpdateNoopEntityParams, opts ...ClientOption) (*UpdateNoopEntityOK, error) - UpdateOpenTelemetryMetricsIngestion(params *UpdateOpenTelemetryMetricsIngestionParams, opts ...ClientOption) (*UpdateOpenTelemetryMetricsIngestionOK, error) + UpdateOtelMetricsIngestion(params *UpdateOtelMetricsIngestionParams, opts ...ClientOption) (*UpdateOtelMetricsIngestionOK, error) UpdateSavedTraceSearch(params *UpdateSavedTraceSearchParams, opts ...ClientOption) (*UpdateSavedTraceSearchOK, error) @@ -227,43 +217,6 @@ func (a *Client) CreateDataset(params *CreateDatasetParams, opts ...ClientOption return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -CreateGcpMetricsIntegration create gcp metrics integration API -*/ -func (a *Client) CreateGcpMetricsIntegration(params *CreateGcpMetricsIntegrationParams, opts ...ClientOption) (*CreateGcpMetricsIntegrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewCreateGcpMetricsIntegrationParams() - } - op := &runtime.ClientOperation{ - ID: "CreateGcpMetricsIntegration", - Method: "POST", - PathPattern: "/api/unstable/config/gcp-metrics-integrations", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &CreateGcpMetricsIntegrationReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*CreateGcpMetricsIntegrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*CreateGcpMetricsIntegrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* CreateLinkTemplate create link template API */ @@ -376,22 +329,22 @@ func (a *Client) CreateNoopEntity(params *CreateNoopEntityParams, opts ...Client } /* -CreateOpenTelemetryMetricsIngestion create open telemetry metrics ingestion API +CreateOtelMetricsIngestion create otel metrics ingestion API */ -func (a *Client) CreateOpenTelemetryMetricsIngestion(params *CreateOpenTelemetryMetricsIngestionParams, opts ...ClientOption) (*CreateOpenTelemetryMetricsIngestionOK, error) { +func (a *Client) CreateOtelMetricsIngestion(params *CreateOtelMetricsIngestionParams, opts ...ClientOption) (*CreateOtelMetricsIngestionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreateOpenTelemetryMetricsIngestionParams() + params = NewCreateOtelMetricsIngestionParams() } op := &runtime.ClientOperation{ - ID: "CreateOpenTelemetryMetricsIngestion", + ID: "CreateOtelMetricsIngestion", Method: "POST", - PathPattern: "/api/unstable/config/open-telemetry-metrics-ingestion", + PathPattern: "/api/unstable/config/otel-metrics-ingestion", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &CreateOpenTelemetryMetricsIngestionReader{formats: a.formats}, + Reader: &CreateOtelMetricsIngestionReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -403,12 +356,12 @@ func (a *Client) CreateOpenTelemetryMetricsIngestion(params *CreateOpenTelemetry if err != nil { return nil, err } - success, ok := result.(*CreateOpenTelemetryMetricsIngestionOK) + success, ok := result.(*CreateOtelMetricsIngestionOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*CreateOpenTelemetryMetricsIngestionDefault) + unexpectedSuccess := result.(*CreateOtelMetricsIngestionDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -711,43 +664,6 @@ func (a *Client) DeleteDataset(params *DeleteDatasetParams, opts ...ClientOption return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -DeleteGcpMetricsIntegration delete gcp metrics integration API -*/ -func (a *Client) DeleteGcpMetricsIntegration(params *DeleteGcpMetricsIntegrationParams, opts ...ClientOption) (*DeleteGcpMetricsIntegrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteGcpMetricsIntegrationParams() - } - op := &runtime.ClientOperation{ - ID: "DeleteGcpMetricsIntegration", - Method: "DELETE", - PathPattern: "/api/unstable/config/gcp-metrics-integrations/{slug}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteGcpMetricsIntegrationReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteGcpMetricsIntegrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteGcpMetricsIntegrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* DeleteLinkTemplate delete link template API */ @@ -860,22 +776,22 @@ func (a *Client) DeleteNoopEntity(params *DeleteNoopEntityParams, opts ...Client } /* -DeleteOpenTelemetryMetricsIngestion delete open telemetry metrics ingestion API +DeleteOtelMetricsIngestion delete otel metrics ingestion API */ -func (a *Client) DeleteOpenTelemetryMetricsIngestion(params *DeleteOpenTelemetryMetricsIngestionParams, opts ...ClientOption) (*DeleteOpenTelemetryMetricsIngestionOK, error) { +func (a *Client) DeleteOtelMetricsIngestion(params *DeleteOtelMetricsIngestionParams, opts ...ClientOption) (*DeleteOtelMetricsIngestionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDeleteOpenTelemetryMetricsIngestionParams() + params = NewDeleteOtelMetricsIngestionParams() } op := &runtime.ClientOperation{ - ID: "DeleteOpenTelemetryMetricsIngestion", + ID: "DeleteOtelMetricsIngestion", Method: "DELETE", - PathPattern: "/api/unstable/config/open-telemetry-metrics-ingestion", + PathPattern: "/api/unstable/config/otel-metrics-ingestion", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &DeleteOpenTelemetryMetricsIngestionReader{formats: a.formats}, + Reader: &DeleteOtelMetricsIngestionReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -887,12 +803,12 @@ func (a *Client) DeleteOpenTelemetryMetricsIngestion(params *DeleteOpenTelemetry if err != nil { return nil, err } - success, ok := result.(*DeleteOpenTelemetryMetricsIngestionOK) + success, ok := result.(*DeleteOtelMetricsIngestionOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*DeleteOpenTelemetryMetricsIngestionDefault) + unexpectedSuccess := result.(*DeleteOtelMetricsIngestionDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -1192,43 +1108,6 @@ func (a *Client) ListDatasets(params *ListDatasetsParams, opts ...ClientOption) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -ListGcpMetricsIntegrations list gcp metrics integrations API -*/ -func (a *Client) ListGcpMetricsIntegrations(params *ListGcpMetricsIntegrationsParams, opts ...ClientOption) (*ListGcpMetricsIntegrationsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewListGcpMetricsIntegrationsParams() - } - op := &runtime.ClientOperation{ - ID: "ListGcpMetricsIntegrations", - Method: "GET", - PathPattern: "/api/unstable/config/gcp-metrics-integrations", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ListGcpMetricsIntegrationsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ListGcpMetricsIntegrationsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ListGcpMetricsIntegrationsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* ListLinkTemplates list link templates API */ @@ -1488,43 +1367,6 @@ func (a *Client) ReadDataset(params *ReadDatasetParams, opts ...ClientOption) (* return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -ReadGcpMetricsIntegration read gcp metrics integration API -*/ -func (a *Client) ReadGcpMetricsIntegration(params *ReadGcpMetricsIntegrationParams, opts ...ClientOption) (*ReadGcpMetricsIntegrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewReadGcpMetricsIntegrationParams() - } - op := &runtime.ClientOperation{ - ID: "ReadGcpMetricsIntegration", - Method: "GET", - PathPattern: "/api/unstable/config/gcp-metrics-integrations/{slug}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &ReadGcpMetricsIntegrationReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*ReadGcpMetricsIntegrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*ReadGcpMetricsIntegrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* ReadLinkTemplate read link template API */ @@ -1637,22 +1479,22 @@ func (a *Client) ReadNoopEntity(params *ReadNoopEntityParams, opts ...ClientOpti } /* -ReadOpenTelemetryMetricsIngestion read open telemetry metrics ingestion API +ReadOtelMetricsIngestion read otel metrics ingestion API */ -func (a *Client) ReadOpenTelemetryMetricsIngestion(params *ReadOpenTelemetryMetricsIngestionParams, opts ...ClientOption) (*ReadOpenTelemetryMetricsIngestionOK, error) { +func (a *Client) ReadOtelMetricsIngestion(params *ReadOtelMetricsIngestionParams, opts ...ClientOption) (*ReadOtelMetricsIngestionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewReadOpenTelemetryMetricsIngestionParams() + params = NewReadOtelMetricsIngestionParams() } op := &runtime.ClientOperation{ - ID: "ReadOpenTelemetryMetricsIngestion", + ID: "ReadOtelMetricsIngestion", Method: "GET", - PathPattern: "/api/unstable/config/open-telemetry-metrics-ingestion", + PathPattern: "/api/unstable/config/otel-metrics-ingestion", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &ReadOpenTelemetryMetricsIngestionReader{formats: a.formats}, + Reader: &ReadOtelMetricsIngestionReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -1664,12 +1506,12 @@ func (a *Client) ReadOpenTelemetryMetricsIngestion(params *ReadOpenTelemetryMetr if err != nil { return nil, err } - success, ok := result.(*ReadOpenTelemetryMetricsIngestionOK) + success, ok := result.(*ReadOtelMetricsIngestionOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ReadOpenTelemetryMetricsIngestionDefault) + unexpectedSuccess := result.(*ReadOtelMetricsIngestionDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -2009,43 +1851,6 @@ func (a *Client) UpdateDataset(params *UpdateDatasetParams, opts ...ClientOption return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } -/* -UpdateGcpMetricsIntegration update gcp metrics integration API -*/ -func (a *Client) UpdateGcpMetricsIntegration(params *UpdateGcpMetricsIntegrationParams, opts ...ClientOption) (*UpdateGcpMetricsIntegrationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewUpdateGcpMetricsIntegrationParams() - } - op := &runtime.ClientOperation{ - ID: "UpdateGcpMetricsIntegration", - Method: "PUT", - PathPattern: "/api/unstable/config/gcp-metrics-integrations/{slug}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &UpdateGcpMetricsIntegrationReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*UpdateGcpMetricsIntegrationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*UpdateGcpMetricsIntegrationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - /* UpdateLinkTemplate update link template API */ @@ -2158,22 +1963,22 @@ func (a *Client) UpdateNoopEntity(params *UpdateNoopEntityParams, opts ...Client } /* -UpdateOpenTelemetryMetricsIngestion update open telemetry metrics ingestion API +UpdateOtelMetricsIngestion update otel metrics ingestion API */ -func (a *Client) UpdateOpenTelemetryMetricsIngestion(params *UpdateOpenTelemetryMetricsIngestionParams, opts ...ClientOption) (*UpdateOpenTelemetryMetricsIngestionOK, error) { +func (a *Client) UpdateOtelMetricsIngestion(params *UpdateOtelMetricsIngestionParams, opts ...ClientOption) (*UpdateOtelMetricsIngestionOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewUpdateOpenTelemetryMetricsIngestionParams() + params = NewUpdateOtelMetricsIngestionParams() } op := &runtime.ClientOperation{ - ID: "UpdateOpenTelemetryMetricsIngestion", + ID: "UpdateOtelMetricsIngestion", Method: "PUT", - PathPattern: "/api/unstable/config/open-telemetry-metrics-ingestion", + PathPattern: "/api/unstable/config/otel-metrics-ingestion", ProducesMediaTypes: []string{"application/json"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, - Reader: &UpdateOpenTelemetryMetricsIngestionReader{formats: a.formats}, + Reader: &UpdateOtelMetricsIngestionReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -2185,12 +1990,12 @@ func (a *Client) UpdateOpenTelemetryMetricsIngestion(params *UpdateOpenTelemetry if err != nil { return nil, err } - success, ok := result.(*UpdateOpenTelemetryMetricsIngestionOK) + success, ok := result.(*UpdateOtelMetricsIngestionOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*UpdateOpenTelemetryMetricsIngestionDefault) + unexpectedSuccess := result.(*UpdateOtelMetricsIngestionDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } diff --git a/src/generated/swagger/configunstable/client/operations/read_open_telemetry_metrics_ingestion_parameters.go b/src/generated/swagger/configunstable/client/operations/read_open_telemetry_metrics_ingestion_parameters.go deleted file mode 100644 index fa9dff2..0000000 --- a/src/generated/swagger/configunstable/client/operations/read_open_telemetry_metrics_ingestion_parameters.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" -) - -// NewReadOpenTelemetryMetricsIngestionParams creates a new ReadOpenTelemetryMetricsIngestionParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewReadOpenTelemetryMetricsIngestionParams() *ReadOpenTelemetryMetricsIngestionParams { - return &ReadOpenTelemetryMetricsIngestionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewReadOpenTelemetryMetricsIngestionParamsWithTimeout creates a new ReadOpenTelemetryMetricsIngestionParams object -// with the ability to set a timeout on a request. -func NewReadOpenTelemetryMetricsIngestionParamsWithTimeout(timeout time.Duration) *ReadOpenTelemetryMetricsIngestionParams { - return &ReadOpenTelemetryMetricsIngestionParams{ - timeout: timeout, - } -} - -// NewReadOpenTelemetryMetricsIngestionParamsWithContext creates a new ReadOpenTelemetryMetricsIngestionParams object -// with the ability to set a context for a request. -func NewReadOpenTelemetryMetricsIngestionParamsWithContext(ctx context.Context) *ReadOpenTelemetryMetricsIngestionParams { - return &ReadOpenTelemetryMetricsIngestionParams{ - Context: ctx, - } -} - -// NewReadOpenTelemetryMetricsIngestionParamsWithHTTPClient creates a new ReadOpenTelemetryMetricsIngestionParams object -// with the ability to set a custom HTTPClient for a request. -func NewReadOpenTelemetryMetricsIngestionParamsWithHTTPClient(client *http.Client) *ReadOpenTelemetryMetricsIngestionParams { - return &ReadOpenTelemetryMetricsIngestionParams{ - HTTPClient: client, - } -} - -/* -ReadOpenTelemetryMetricsIngestionParams contains all the parameters to send to the API endpoint - - for the read open telemetry metrics ingestion operation. - - Typically these are written to a http.Request. -*/ -type ReadOpenTelemetryMetricsIngestionParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the read open telemetry metrics ingestion params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadOpenTelemetryMetricsIngestionParams) WithDefaults() *ReadOpenTelemetryMetricsIngestionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the read open telemetry metrics ingestion params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadOpenTelemetryMetricsIngestionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the read open telemetry metrics ingestion params -func (o *ReadOpenTelemetryMetricsIngestionParams) WithTimeout(timeout time.Duration) *ReadOpenTelemetryMetricsIngestionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the read open telemetry metrics ingestion params -func (o *ReadOpenTelemetryMetricsIngestionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the read open telemetry metrics ingestion params -func (o *ReadOpenTelemetryMetricsIngestionParams) WithContext(ctx context.Context) *ReadOpenTelemetryMetricsIngestionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the read open telemetry metrics ingestion params -func (o *ReadOpenTelemetryMetricsIngestionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the read open telemetry metrics ingestion params -func (o *ReadOpenTelemetryMetricsIngestionParams) WithHTTPClient(client *http.Client) *ReadOpenTelemetryMetricsIngestionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the read open telemetry metrics ingestion params -func (o *ReadOpenTelemetryMetricsIngestionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *ReadOpenTelemetryMetricsIngestionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/read_open_telemetry_metrics_ingestion_responses.go b/src/generated/swagger/configunstable/client/operations/read_open_telemetry_metrics_ingestion_responses.go deleted file mode 100644 index 1ce455e..0000000 --- a/src/generated/swagger/configunstable/client/operations/read_open_telemetry_metrics_ingestion_responses.go +++ /dev/null @@ -1,328 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" -) - -// ReadOpenTelemetryMetricsIngestionReader is a Reader for the ReadOpenTelemetryMetricsIngestion structure. -type ReadOpenTelemetryMetricsIngestionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReadOpenTelemetryMetricsIngestionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewReadOpenTelemetryMetricsIngestionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewReadOpenTelemetryMetricsIngestionNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewReadOpenTelemetryMetricsIngestionInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewReadOpenTelemetryMetricsIngestionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewReadOpenTelemetryMetricsIngestionOK creates a ReadOpenTelemetryMetricsIngestionOK with default headers values -func NewReadOpenTelemetryMetricsIngestionOK() *ReadOpenTelemetryMetricsIngestionOK { - return &ReadOpenTelemetryMetricsIngestionOK{} -} - -/* -ReadOpenTelemetryMetricsIngestionOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ReadOpenTelemetryMetricsIngestionOK struct { - Payload *models.ConfigunstableReadOpenTelemetryMetricsIngestionResponse -} - -// IsSuccess returns true when this read open telemetry metrics ingestion o k response has a 2xx status code -func (o *ReadOpenTelemetryMetricsIngestionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this read open telemetry metrics ingestion o k response has a 3xx status code -func (o *ReadOpenTelemetryMetricsIngestionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read open telemetry metrics ingestion o k response has a 4xx status code -func (o *ReadOpenTelemetryMetricsIngestionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this read open telemetry metrics ingestion o k response has a 5xx status code -func (o *ReadOpenTelemetryMetricsIngestionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this read open telemetry metrics ingestion o k response a status code equal to that given -func (o *ReadOpenTelemetryMetricsIngestionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the read open telemetry metrics ingestion o k response -func (o *ReadOpenTelemetryMetricsIngestionOK) Code() int { - return 200 -} - -func (o *ReadOpenTelemetryMetricsIngestionOK) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/open-telemetry-metrics-ingestion][%d] readOpenTelemetryMetricsIngestionOK %+v", 200, o.Payload) -} - -func (o *ReadOpenTelemetryMetricsIngestionOK) String() string { - return fmt.Sprintf("[GET /api/unstable/config/open-telemetry-metrics-ingestion][%d] readOpenTelemetryMetricsIngestionOK %+v", 200, o.Payload) -} - -func (o *ReadOpenTelemetryMetricsIngestionOK) GetPayload() *models.ConfigunstableReadOpenTelemetryMetricsIngestionResponse { - return o.Payload -} - -func (o *ReadOpenTelemetryMetricsIngestionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ConfigunstableReadOpenTelemetryMetricsIngestionResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReadOpenTelemetryMetricsIngestionNotFound creates a ReadOpenTelemetryMetricsIngestionNotFound with default headers values -func NewReadOpenTelemetryMetricsIngestionNotFound() *ReadOpenTelemetryMetricsIngestionNotFound { - return &ReadOpenTelemetryMetricsIngestionNotFound{} -} - -/* -ReadOpenTelemetryMetricsIngestionNotFound describes a response with status code 404, with default header values. - -Cannot read the OpenTelemetryMetricsIngestion because OpenTelemetryMetricsIngestion has not been created. -*/ -type ReadOpenTelemetryMetricsIngestionNotFound struct { - Payload *models.APIError -} - -// IsSuccess returns true when this read open telemetry metrics ingestion not found response has a 2xx status code -func (o *ReadOpenTelemetryMetricsIngestionNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this read open telemetry metrics ingestion not found response has a 3xx status code -func (o *ReadOpenTelemetryMetricsIngestionNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read open telemetry metrics ingestion not found response has a 4xx status code -func (o *ReadOpenTelemetryMetricsIngestionNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this read open telemetry metrics ingestion not found response has a 5xx status code -func (o *ReadOpenTelemetryMetricsIngestionNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this read open telemetry metrics ingestion not found response a status code equal to that given -func (o *ReadOpenTelemetryMetricsIngestionNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the read open telemetry metrics ingestion not found response -func (o *ReadOpenTelemetryMetricsIngestionNotFound) Code() int { - return 404 -} - -func (o *ReadOpenTelemetryMetricsIngestionNotFound) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/open-telemetry-metrics-ingestion][%d] readOpenTelemetryMetricsIngestionNotFound %+v", 404, o.Payload) -} - -func (o *ReadOpenTelemetryMetricsIngestionNotFound) String() string { - return fmt.Sprintf("[GET /api/unstable/config/open-telemetry-metrics-ingestion][%d] readOpenTelemetryMetricsIngestionNotFound %+v", 404, o.Payload) -} - -func (o *ReadOpenTelemetryMetricsIngestionNotFound) GetPayload() *models.APIError { - return o.Payload -} - -func (o *ReadOpenTelemetryMetricsIngestionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReadOpenTelemetryMetricsIngestionInternalServerError creates a ReadOpenTelemetryMetricsIngestionInternalServerError with default headers values -func NewReadOpenTelemetryMetricsIngestionInternalServerError() *ReadOpenTelemetryMetricsIngestionInternalServerError { - return &ReadOpenTelemetryMetricsIngestionInternalServerError{} -} - -/* -ReadOpenTelemetryMetricsIngestionInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type ReadOpenTelemetryMetricsIngestionInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this read open telemetry metrics ingestion internal server error response has a 2xx status code -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this read open telemetry metrics ingestion internal server error response has a 3xx status code -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read open telemetry metrics ingestion internal server error response has a 4xx status code -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this read open telemetry metrics ingestion internal server error response has a 5xx status code -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this read open telemetry metrics ingestion internal server error response a status code equal to that given -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the read open telemetry metrics ingestion internal server error response -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) Code() int { - return 500 -} - -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/open-telemetry-metrics-ingestion][%d] readOpenTelemetryMetricsIngestionInternalServerError %+v", 500, o.Payload) -} - -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) String() string { - return fmt.Sprintf("[GET /api/unstable/config/open-telemetry-metrics-ingestion][%d] readOpenTelemetryMetricsIngestionInternalServerError %+v", 500, o.Payload) -} - -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *ReadOpenTelemetryMetricsIngestionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReadOpenTelemetryMetricsIngestionDefault creates a ReadOpenTelemetryMetricsIngestionDefault with default headers values -func NewReadOpenTelemetryMetricsIngestionDefault(code int) *ReadOpenTelemetryMetricsIngestionDefault { - return &ReadOpenTelemetryMetricsIngestionDefault{ - _statusCode: code, - } -} - -/* -ReadOpenTelemetryMetricsIngestionDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type ReadOpenTelemetryMetricsIngestionDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this read open telemetry metrics ingestion default response has a 2xx status code -func (o *ReadOpenTelemetryMetricsIngestionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this read open telemetry metrics ingestion default response has a 3xx status code -func (o *ReadOpenTelemetryMetricsIngestionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this read open telemetry metrics ingestion default response has a 4xx status code -func (o *ReadOpenTelemetryMetricsIngestionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this read open telemetry metrics ingestion default response has a 5xx status code -func (o *ReadOpenTelemetryMetricsIngestionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this read open telemetry metrics ingestion default response a status code equal to that given -func (o *ReadOpenTelemetryMetricsIngestionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the read open telemetry metrics ingestion default response -func (o *ReadOpenTelemetryMetricsIngestionDefault) Code() int { - return o._statusCode -} - -func (o *ReadOpenTelemetryMetricsIngestionDefault) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/open-telemetry-metrics-ingestion][%d] ReadOpenTelemetryMetricsIngestion default %+v", o._statusCode, o.Payload) -} - -func (o *ReadOpenTelemetryMetricsIngestionDefault) String() string { - return fmt.Sprintf("[GET /api/unstable/config/open-telemetry-metrics-ingestion][%d] ReadOpenTelemetryMetricsIngestion default %+v", o._statusCode, o.Payload) -} - -func (o *ReadOpenTelemetryMetricsIngestionDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *ReadOpenTelemetryMetricsIngestionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/read_otel_metrics_ingestion_parameters.go b/src/generated/swagger/configunstable/client/operations/read_otel_metrics_ingestion_parameters.go new file mode 100644 index 0000000..0a3f077 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/read_otel_metrics_ingestion_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewReadOtelMetricsIngestionParams creates a new ReadOtelMetricsIngestionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewReadOtelMetricsIngestionParams() *ReadOtelMetricsIngestionParams { + return &ReadOtelMetricsIngestionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewReadOtelMetricsIngestionParamsWithTimeout creates a new ReadOtelMetricsIngestionParams object +// with the ability to set a timeout on a request. +func NewReadOtelMetricsIngestionParamsWithTimeout(timeout time.Duration) *ReadOtelMetricsIngestionParams { + return &ReadOtelMetricsIngestionParams{ + timeout: timeout, + } +} + +// NewReadOtelMetricsIngestionParamsWithContext creates a new ReadOtelMetricsIngestionParams object +// with the ability to set a context for a request. +func NewReadOtelMetricsIngestionParamsWithContext(ctx context.Context) *ReadOtelMetricsIngestionParams { + return &ReadOtelMetricsIngestionParams{ + Context: ctx, + } +} + +// NewReadOtelMetricsIngestionParamsWithHTTPClient creates a new ReadOtelMetricsIngestionParams object +// with the ability to set a custom HTTPClient for a request. +func NewReadOtelMetricsIngestionParamsWithHTTPClient(client *http.Client) *ReadOtelMetricsIngestionParams { + return &ReadOtelMetricsIngestionParams{ + HTTPClient: client, + } +} + +/* +ReadOtelMetricsIngestionParams contains all the parameters to send to the API endpoint + + for the read otel metrics ingestion operation. + + Typically these are written to a http.Request. +*/ +type ReadOtelMetricsIngestionParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the read otel metrics ingestion params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ReadOtelMetricsIngestionParams) WithDefaults() *ReadOtelMetricsIngestionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the read otel metrics ingestion params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ReadOtelMetricsIngestionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the read otel metrics ingestion params +func (o *ReadOtelMetricsIngestionParams) WithTimeout(timeout time.Duration) *ReadOtelMetricsIngestionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the read otel metrics ingestion params +func (o *ReadOtelMetricsIngestionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the read otel metrics ingestion params +func (o *ReadOtelMetricsIngestionParams) WithContext(ctx context.Context) *ReadOtelMetricsIngestionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the read otel metrics ingestion params +func (o *ReadOtelMetricsIngestionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the read otel metrics ingestion params +func (o *ReadOtelMetricsIngestionParams) WithHTTPClient(client *http.Client) *ReadOtelMetricsIngestionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the read otel metrics ingestion params +func (o *ReadOtelMetricsIngestionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *ReadOtelMetricsIngestionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/read_otel_metrics_ingestion_responses.go b/src/generated/swagger/configunstable/client/operations/read_otel_metrics_ingestion_responses.go new file mode 100644 index 0000000..383ee78 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/read_otel_metrics_ingestion_responses.go @@ -0,0 +1,328 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" +) + +// ReadOtelMetricsIngestionReader is a Reader for the ReadOtelMetricsIngestion structure. +type ReadOtelMetricsIngestionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ReadOtelMetricsIngestionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewReadOtelMetricsIngestionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 404: + result := NewReadOtelMetricsIngestionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewReadOtelMetricsIngestionInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewReadOtelMetricsIngestionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewReadOtelMetricsIngestionOK creates a ReadOtelMetricsIngestionOK with default headers values +func NewReadOtelMetricsIngestionOK() *ReadOtelMetricsIngestionOK { + return &ReadOtelMetricsIngestionOK{} +} + +/* +ReadOtelMetricsIngestionOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ReadOtelMetricsIngestionOK struct { + Payload *models.ConfigunstableReadOtelMetricsIngestionResponse +} + +// IsSuccess returns true when this read otel metrics ingestion o k response has a 2xx status code +func (o *ReadOtelMetricsIngestionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this read otel metrics ingestion o k response has a 3xx status code +func (o *ReadOtelMetricsIngestionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this read otel metrics ingestion o k response has a 4xx status code +func (o *ReadOtelMetricsIngestionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this read otel metrics ingestion o k response has a 5xx status code +func (o *ReadOtelMetricsIngestionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this read otel metrics ingestion o k response a status code equal to that given +func (o *ReadOtelMetricsIngestionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the read otel metrics ingestion o k response +func (o *ReadOtelMetricsIngestionOK) Code() int { + return 200 +} + +func (o *ReadOtelMetricsIngestionOK) Error() string { + return fmt.Sprintf("[GET /api/unstable/config/otel-metrics-ingestion][%d] readOtelMetricsIngestionOK %+v", 200, o.Payload) +} + +func (o *ReadOtelMetricsIngestionOK) String() string { + return fmt.Sprintf("[GET /api/unstable/config/otel-metrics-ingestion][%d] readOtelMetricsIngestionOK %+v", 200, o.Payload) +} + +func (o *ReadOtelMetricsIngestionOK) GetPayload() *models.ConfigunstableReadOtelMetricsIngestionResponse { + return o.Payload +} + +func (o *ReadOtelMetricsIngestionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigunstableReadOtelMetricsIngestionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewReadOtelMetricsIngestionNotFound creates a ReadOtelMetricsIngestionNotFound with default headers values +func NewReadOtelMetricsIngestionNotFound() *ReadOtelMetricsIngestionNotFound { + return &ReadOtelMetricsIngestionNotFound{} +} + +/* +ReadOtelMetricsIngestionNotFound describes a response with status code 404, with default header values. + +Cannot read the OtelMetricsIngestion because OtelMetricsIngestion has not been created. +*/ +type ReadOtelMetricsIngestionNotFound struct { + Payload *models.APIError +} + +// IsSuccess returns true when this read otel metrics ingestion not found response has a 2xx status code +func (o *ReadOtelMetricsIngestionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this read otel metrics ingestion not found response has a 3xx status code +func (o *ReadOtelMetricsIngestionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this read otel metrics ingestion not found response has a 4xx status code +func (o *ReadOtelMetricsIngestionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this read otel metrics ingestion not found response has a 5xx status code +func (o *ReadOtelMetricsIngestionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this read otel metrics ingestion not found response a status code equal to that given +func (o *ReadOtelMetricsIngestionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the read otel metrics ingestion not found response +func (o *ReadOtelMetricsIngestionNotFound) Code() int { + return 404 +} + +func (o *ReadOtelMetricsIngestionNotFound) Error() string { + return fmt.Sprintf("[GET /api/unstable/config/otel-metrics-ingestion][%d] readOtelMetricsIngestionNotFound %+v", 404, o.Payload) +} + +func (o *ReadOtelMetricsIngestionNotFound) String() string { + return fmt.Sprintf("[GET /api/unstable/config/otel-metrics-ingestion][%d] readOtelMetricsIngestionNotFound %+v", 404, o.Payload) +} + +func (o *ReadOtelMetricsIngestionNotFound) GetPayload() *models.APIError { + return o.Payload +} + +func (o *ReadOtelMetricsIngestionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewReadOtelMetricsIngestionInternalServerError creates a ReadOtelMetricsIngestionInternalServerError with default headers values +func NewReadOtelMetricsIngestionInternalServerError() *ReadOtelMetricsIngestionInternalServerError { + return &ReadOtelMetricsIngestionInternalServerError{} +} + +/* +ReadOtelMetricsIngestionInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type ReadOtelMetricsIngestionInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this read otel metrics ingestion internal server error response has a 2xx status code +func (o *ReadOtelMetricsIngestionInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this read otel metrics ingestion internal server error response has a 3xx status code +func (o *ReadOtelMetricsIngestionInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this read otel metrics ingestion internal server error response has a 4xx status code +func (o *ReadOtelMetricsIngestionInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this read otel metrics ingestion internal server error response has a 5xx status code +func (o *ReadOtelMetricsIngestionInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this read otel metrics ingestion internal server error response a status code equal to that given +func (o *ReadOtelMetricsIngestionInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the read otel metrics ingestion internal server error response +func (o *ReadOtelMetricsIngestionInternalServerError) Code() int { + return 500 +} + +func (o *ReadOtelMetricsIngestionInternalServerError) Error() string { + return fmt.Sprintf("[GET /api/unstable/config/otel-metrics-ingestion][%d] readOtelMetricsIngestionInternalServerError %+v", 500, o.Payload) +} + +func (o *ReadOtelMetricsIngestionInternalServerError) String() string { + return fmt.Sprintf("[GET /api/unstable/config/otel-metrics-ingestion][%d] readOtelMetricsIngestionInternalServerError %+v", 500, o.Payload) +} + +func (o *ReadOtelMetricsIngestionInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *ReadOtelMetricsIngestionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewReadOtelMetricsIngestionDefault creates a ReadOtelMetricsIngestionDefault with default headers values +func NewReadOtelMetricsIngestionDefault(code int) *ReadOtelMetricsIngestionDefault { + return &ReadOtelMetricsIngestionDefault{ + _statusCode: code, + } +} + +/* +ReadOtelMetricsIngestionDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type ReadOtelMetricsIngestionDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this read otel metrics ingestion default response has a 2xx status code +func (o *ReadOtelMetricsIngestionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this read otel metrics ingestion default response has a 3xx status code +func (o *ReadOtelMetricsIngestionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this read otel metrics ingestion default response has a 4xx status code +func (o *ReadOtelMetricsIngestionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this read otel metrics ingestion default response has a 5xx status code +func (o *ReadOtelMetricsIngestionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this read otel metrics ingestion default response a status code equal to that given +func (o *ReadOtelMetricsIngestionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the read otel metrics ingestion default response +func (o *ReadOtelMetricsIngestionDefault) Code() int { + return o._statusCode +} + +func (o *ReadOtelMetricsIngestionDefault) Error() string { + return fmt.Sprintf("[GET /api/unstable/config/otel-metrics-ingestion][%d] ReadOtelMetricsIngestion default %+v", o._statusCode, o.Payload) +} + +func (o *ReadOtelMetricsIngestionDefault) String() string { + return fmt.Sprintf("[GET /api/unstable/config/otel-metrics-ingestion][%d] ReadOtelMetricsIngestion default %+v", o._statusCode, o.Payload) +} + +func (o *ReadOtelMetricsIngestionDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *ReadOtelMetricsIngestionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/update_open_telemetry_metrics_ingestion_parameters.go b/src/generated/swagger/configunstable/client/operations/update_open_telemetry_metrics_ingestion_parameters.go deleted file mode 100644 index b421952..0000000 --- a/src/generated/swagger/configunstable/client/operations/update_open_telemetry_metrics_ingestion_parameters.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - "net/http" - "time" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - cr "github.com/go-openapi/runtime/client" - "github.com/go-openapi/strfmt" - - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" -) - -// NewUpdateOpenTelemetryMetricsIngestionParams creates a new UpdateOpenTelemetryMetricsIngestionParams object, -// with the default timeout for this client. -// -// Default values are not hydrated, since defaults are normally applied by the API server side. -// -// To enforce default values in parameter, use SetDefaults or WithDefaults. -func NewUpdateOpenTelemetryMetricsIngestionParams() *UpdateOpenTelemetryMetricsIngestionParams { - return &UpdateOpenTelemetryMetricsIngestionParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateOpenTelemetryMetricsIngestionParamsWithTimeout creates a new UpdateOpenTelemetryMetricsIngestionParams object -// with the ability to set a timeout on a request. -func NewUpdateOpenTelemetryMetricsIngestionParamsWithTimeout(timeout time.Duration) *UpdateOpenTelemetryMetricsIngestionParams { - return &UpdateOpenTelemetryMetricsIngestionParams{ - timeout: timeout, - } -} - -// NewUpdateOpenTelemetryMetricsIngestionParamsWithContext creates a new UpdateOpenTelemetryMetricsIngestionParams object -// with the ability to set a context for a request. -func NewUpdateOpenTelemetryMetricsIngestionParamsWithContext(ctx context.Context) *UpdateOpenTelemetryMetricsIngestionParams { - return &UpdateOpenTelemetryMetricsIngestionParams{ - Context: ctx, - } -} - -// NewUpdateOpenTelemetryMetricsIngestionParamsWithHTTPClient creates a new UpdateOpenTelemetryMetricsIngestionParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateOpenTelemetryMetricsIngestionParamsWithHTTPClient(client *http.Client) *UpdateOpenTelemetryMetricsIngestionParams { - return &UpdateOpenTelemetryMetricsIngestionParams{ - HTTPClient: client, - } -} - -/* -UpdateOpenTelemetryMetricsIngestionParams contains all the parameters to send to the API endpoint - - for the update open telemetry metrics ingestion operation. - - Typically these are written to a http.Request. -*/ -type UpdateOpenTelemetryMetricsIngestionParams struct { - - // Body. - Body *models.ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update open telemetry metrics ingestion params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateOpenTelemetryMetricsIngestionParams) WithDefaults() *UpdateOpenTelemetryMetricsIngestionParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update open telemetry metrics ingestion params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateOpenTelemetryMetricsIngestionParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update open telemetry metrics ingestion params -func (o *UpdateOpenTelemetryMetricsIngestionParams) WithTimeout(timeout time.Duration) *UpdateOpenTelemetryMetricsIngestionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update open telemetry metrics ingestion params -func (o *UpdateOpenTelemetryMetricsIngestionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update open telemetry metrics ingestion params -func (o *UpdateOpenTelemetryMetricsIngestionParams) WithContext(ctx context.Context) *UpdateOpenTelemetryMetricsIngestionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update open telemetry metrics ingestion params -func (o *UpdateOpenTelemetryMetricsIngestionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update open telemetry metrics ingestion params -func (o *UpdateOpenTelemetryMetricsIngestionParams) WithHTTPClient(client *http.Client) *UpdateOpenTelemetryMetricsIngestionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update open telemetry metrics ingestion params -func (o *UpdateOpenTelemetryMetricsIngestionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update open telemetry metrics ingestion params -func (o *UpdateOpenTelemetryMetricsIngestionParams) WithBody(body *models.ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest) *UpdateOpenTelemetryMetricsIngestionParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update open telemetry metrics ingestion params -func (o *UpdateOpenTelemetryMetricsIngestionParams) SetBody(body *models.ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateOpenTelemetryMetricsIngestionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if o.Body != nil { - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/update_open_telemetry_metrics_ingestion_responses.go b/src/generated/swagger/configunstable/client/operations/update_open_telemetry_metrics_ingestion_responses.go deleted file mode 100644 index 9ee69d3..0000000 --- a/src/generated/swagger/configunstable/client/operations/update_open_telemetry_metrics_ingestion_responses.go +++ /dev/null @@ -1,402 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" -) - -// UpdateOpenTelemetryMetricsIngestionReader is a Reader for the UpdateOpenTelemetryMetricsIngestion structure. -type UpdateOpenTelemetryMetricsIngestionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateOpenTelemetryMetricsIngestionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateOpenTelemetryMetricsIngestionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewUpdateOpenTelemetryMetricsIngestionBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewUpdateOpenTelemetryMetricsIngestionNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewUpdateOpenTelemetryMetricsIngestionInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewUpdateOpenTelemetryMetricsIngestionDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUpdateOpenTelemetryMetricsIngestionOK creates a UpdateOpenTelemetryMetricsIngestionOK with default headers values -func NewUpdateOpenTelemetryMetricsIngestionOK() *UpdateOpenTelemetryMetricsIngestionOK { - return &UpdateOpenTelemetryMetricsIngestionOK{} -} - -/* -UpdateOpenTelemetryMetricsIngestionOK describes a response with status code 200, with default header values. - -A successful response containing the updated OpenTelemetryMetricsIngestion. -*/ -type UpdateOpenTelemetryMetricsIngestionOK struct { - Payload *models.ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse -} - -// IsSuccess returns true when this update open telemetry metrics ingestion o k response has a 2xx status code -func (o *UpdateOpenTelemetryMetricsIngestionOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update open telemetry metrics ingestion o k response has a 3xx status code -func (o *UpdateOpenTelemetryMetricsIngestionOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update open telemetry metrics ingestion o k response has a 4xx status code -func (o *UpdateOpenTelemetryMetricsIngestionOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update open telemetry metrics ingestion o k response has a 5xx status code -func (o *UpdateOpenTelemetryMetricsIngestionOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update open telemetry metrics ingestion o k response a status code equal to that given -func (o *UpdateOpenTelemetryMetricsIngestionOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update open telemetry metrics ingestion o k response -func (o *UpdateOpenTelemetryMetricsIngestionOK) Code() int { - return 200 -} - -func (o *UpdateOpenTelemetryMetricsIngestionOK) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] updateOpenTelemetryMetricsIngestionOK %+v", 200, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionOK) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] updateOpenTelemetryMetricsIngestionOK %+v", 200, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionOK) GetPayload() *models.ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse { - return o.Payload -} - -func (o *UpdateOpenTelemetryMetricsIngestionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOpenTelemetryMetricsIngestionBadRequest creates a UpdateOpenTelemetryMetricsIngestionBadRequest with default headers values -func NewUpdateOpenTelemetryMetricsIngestionBadRequest() *UpdateOpenTelemetryMetricsIngestionBadRequest { - return &UpdateOpenTelemetryMetricsIngestionBadRequest{} -} - -/* -UpdateOpenTelemetryMetricsIngestionBadRequest describes a response with status code 400, with default header values. - -Cannot update the OpenTelemetryMetricsIngestion because the request is invalid. -*/ -type UpdateOpenTelemetryMetricsIngestionBadRequest struct { - Payload *models.APIError -} - -// IsSuccess returns true when this update open telemetry metrics ingestion bad request response has a 2xx status code -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update open telemetry metrics ingestion bad request response has a 3xx status code -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update open telemetry metrics ingestion bad request response has a 4xx status code -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update open telemetry metrics ingestion bad request response has a 5xx status code -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update open telemetry metrics ingestion bad request response a status code equal to that given -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update open telemetry metrics ingestion bad request response -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) Code() int { - return 400 -} - -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] updateOpenTelemetryMetricsIngestionBadRequest %+v", 400, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] updateOpenTelemetryMetricsIngestionBadRequest %+v", 400, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) GetPayload() *models.APIError { - return o.Payload -} - -func (o *UpdateOpenTelemetryMetricsIngestionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOpenTelemetryMetricsIngestionNotFound creates a UpdateOpenTelemetryMetricsIngestionNotFound with default headers values -func NewUpdateOpenTelemetryMetricsIngestionNotFound() *UpdateOpenTelemetryMetricsIngestionNotFound { - return &UpdateOpenTelemetryMetricsIngestionNotFound{} -} - -/* -UpdateOpenTelemetryMetricsIngestionNotFound describes a response with status code 404, with default header values. - -Cannot update the OpenTelemetryMetricsIngestion because OpenTelemetryMetricsIngestion has not been created. -*/ -type UpdateOpenTelemetryMetricsIngestionNotFound struct { - Payload *models.APIError -} - -// IsSuccess returns true when this update open telemetry metrics ingestion not found response has a 2xx status code -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update open telemetry metrics ingestion not found response has a 3xx status code -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update open telemetry metrics ingestion not found response has a 4xx status code -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update open telemetry metrics ingestion not found response has a 5xx status code -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update open telemetry metrics ingestion not found response a status code equal to that given -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update open telemetry metrics ingestion not found response -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) Code() int { - return 404 -} - -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] updateOpenTelemetryMetricsIngestionNotFound %+v", 404, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] updateOpenTelemetryMetricsIngestionNotFound %+v", 404, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) GetPayload() *models.APIError { - return o.Payload -} - -func (o *UpdateOpenTelemetryMetricsIngestionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOpenTelemetryMetricsIngestionInternalServerError creates a UpdateOpenTelemetryMetricsIngestionInternalServerError with default headers values -func NewUpdateOpenTelemetryMetricsIngestionInternalServerError() *UpdateOpenTelemetryMetricsIngestionInternalServerError { - return &UpdateOpenTelemetryMetricsIngestionInternalServerError{} -} - -/* -UpdateOpenTelemetryMetricsIngestionInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type UpdateOpenTelemetryMetricsIngestionInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this update open telemetry metrics ingestion internal server error response has a 2xx status code -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update open telemetry metrics ingestion internal server error response has a 3xx status code -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update open telemetry metrics ingestion internal server error response has a 4xx status code -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update open telemetry metrics ingestion internal server error response has a 5xx status code -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update open telemetry metrics ingestion internal server error response a status code equal to that given -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update open telemetry metrics ingestion internal server error response -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) Code() int { - return 500 -} - -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] updateOpenTelemetryMetricsIngestionInternalServerError %+v", 500, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] updateOpenTelemetryMetricsIngestionInternalServerError %+v", 500, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *UpdateOpenTelemetryMetricsIngestionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.APIError) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateOpenTelemetryMetricsIngestionDefault creates a UpdateOpenTelemetryMetricsIngestionDefault with default headers values -func NewUpdateOpenTelemetryMetricsIngestionDefault(code int) *UpdateOpenTelemetryMetricsIngestionDefault { - return &UpdateOpenTelemetryMetricsIngestionDefault{ - _statusCode: code, - } -} - -/* -UpdateOpenTelemetryMetricsIngestionDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type UpdateOpenTelemetryMetricsIngestionDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this update open telemetry metrics ingestion default response has a 2xx status code -func (o *UpdateOpenTelemetryMetricsIngestionDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update open telemetry metrics ingestion default response has a 3xx status code -func (o *UpdateOpenTelemetryMetricsIngestionDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update open telemetry metrics ingestion default response has a 4xx status code -func (o *UpdateOpenTelemetryMetricsIngestionDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update open telemetry metrics ingestion default response has a 5xx status code -func (o *UpdateOpenTelemetryMetricsIngestionDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update open telemetry metrics ingestion default response a status code equal to that given -func (o *UpdateOpenTelemetryMetricsIngestionDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update open telemetry metrics ingestion default response -func (o *UpdateOpenTelemetryMetricsIngestionDefault) Code() int { - return o._statusCode -} - -func (o *UpdateOpenTelemetryMetricsIngestionDefault) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] UpdateOpenTelemetryMetricsIngestion default %+v", o._statusCode, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionDefault) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/open-telemetry-metrics-ingestion][%d] UpdateOpenTelemetryMetricsIngestion default %+v", o._statusCode, o.Payload) -} - -func (o *UpdateOpenTelemetryMetricsIngestionDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *UpdateOpenTelemetryMetricsIngestionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/update_otel_metrics_ingestion_parameters.go b/src/generated/swagger/configunstable/client/operations/update_otel_metrics_ingestion_parameters.go new file mode 100644 index 0000000..7b5dc1d --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/update_otel_metrics_ingestion_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" +) + +// NewUpdateOtelMetricsIngestionParams creates a new UpdateOtelMetricsIngestionParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewUpdateOtelMetricsIngestionParams() *UpdateOtelMetricsIngestionParams { + return &UpdateOtelMetricsIngestionParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateOtelMetricsIngestionParamsWithTimeout creates a new UpdateOtelMetricsIngestionParams object +// with the ability to set a timeout on a request. +func NewUpdateOtelMetricsIngestionParamsWithTimeout(timeout time.Duration) *UpdateOtelMetricsIngestionParams { + return &UpdateOtelMetricsIngestionParams{ + timeout: timeout, + } +} + +// NewUpdateOtelMetricsIngestionParamsWithContext creates a new UpdateOtelMetricsIngestionParams object +// with the ability to set a context for a request. +func NewUpdateOtelMetricsIngestionParamsWithContext(ctx context.Context) *UpdateOtelMetricsIngestionParams { + return &UpdateOtelMetricsIngestionParams{ + Context: ctx, + } +} + +// NewUpdateOtelMetricsIngestionParamsWithHTTPClient creates a new UpdateOtelMetricsIngestionParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateOtelMetricsIngestionParamsWithHTTPClient(client *http.Client) *UpdateOtelMetricsIngestionParams { + return &UpdateOtelMetricsIngestionParams{ + HTTPClient: client, + } +} + +/* +UpdateOtelMetricsIngestionParams contains all the parameters to send to the API endpoint + + for the update otel metrics ingestion operation. + + Typically these are written to a http.Request. +*/ +type UpdateOtelMetricsIngestionParams struct { + + // Body. + Body *models.ConfigunstableUpdateOtelMetricsIngestionRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update otel metrics ingestion params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateOtelMetricsIngestionParams) WithDefaults() *UpdateOtelMetricsIngestionParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update otel metrics ingestion params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateOtelMetricsIngestionParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update otel metrics ingestion params +func (o *UpdateOtelMetricsIngestionParams) WithTimeout(timeout time.Duration) *UpdateOtelMetricsIngestionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update otel metrics ingestion params +func (o *UpdateOtelMetricsIngestionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update otel metrics ingestion params +func (o *UpdateOtelMetricsIngestionParams) WithContext(ctx context.Context) *UpdateOtelMetricsIngestionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update otel metrics ingestion params +func (o *UpdateOtelMetricsIngestionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update otel metrics ingestion params +func (o *UpdateOtelMetricsIngestionParams) WithHTTPClient(client *http.Client) *UpdateOtelMetricsIngestionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update otel metrics ingestion params +func (o *UpdateOtelMetricsIngestionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the update otel metrics ingestion params +func (o *UpdateOtelMetricsIngestionParams) WithBody(body *models.ConfigunstableUpdateOtelMetricsIngestionRequest) *UpdateOtelMetricsIngestionParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the update otel metrics ingestion params +func (o *UpdateOtelMetricsIngestionParams) SetBody(body *models.ConfigunstableUpdateOtelMetricsIngestionRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateOtelMetricsIngestionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/update_otel_metrics_ingestion_responses.go b/src/generated/swagger/configunstable/client/operations/update_otel_metrics_ingestion_responses.go new file mode 100644 index 0000000..dc069c1 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/update_otel_metrics_ingestion_responses.go @@ -0,0 +1,402 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" +) + +// UpdateOtelMetricsIngestionReader is a Reader for the UpdateOtelMetricsIngestion structure. +type UpdateOtelMetricsIngestionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateOtelMetricsIngestionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateOtelMetricsIngestionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewUpdateOtelMetricsIngestionBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateOtelMetricsIngestionNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateOtelMetricsIngestionInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewUpdateOtelMetricsIngestionDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewUpdateOtelMetricsIngestionOK creates a UpdateOtelMetricsIngestionOK with default headers values +func NewUpdateOtelMetricsIngestionOK() *UpdateOtelMetricsIngestionOK { + return &UpdateOtelMetricsIngestionOK{} +} + +/* +UpdateOtelMetricsIngestionOK describes a response with status code 200, with default header values. + +A successful response containing the updated OtelMetricsIngestion. +*/ +type UpdateOtelMetricsIngestionOK struct { + Payload *models.ConfigunstableUpdateOtelMetricsIngestionResponse +} + +// IsSuccess returns true when this update otel metrics ingestion o k response has a 2xx status code +func (o *UpdateOtelMetricsIngestionOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update otel metrics ingestion o k response has a 3xx status code +func (o *UpdateOtelMetricsIngestionOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update otel metrics ingestion o k response has a 4xx status code +func (o *UpdateOtelMetricsIngestionOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update otel metrics ingestion o k response has a 5xx status code +func (o *UpdateOtelMetricsIngestionOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update otel metrics ingestion o k response a status code equal to that given +func (o *UpdateOtelMetricsIngestionOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update otel metrics ingestion o k response +func (o *UpdateOtelMetricsIngestionOK) Code() int { + return 200 +} + +func (o *UpdateOtelMetricsIngestionOK) Error() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] updateOtelMetricsIngestionOK %+v", 200, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionOK) String() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] updateOtelMetricsIngestionOK %+v", 200, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionOK) GetPayload() *models.ConfigunstableUpdateOtelMetricsIngestionResponse { + return o.Payload +} + +func (o *UpdateOtelMetricsIngestionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigunstableUpdateOtelMetricsIngestionResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateOtelMetricsIngestionBadRequest creates a UpdateOtelMetricsIngestionBadRequest with default headers values +func NewUpdateOtelMetricsIngestionBadRequest() *UpdateOtelMetricsIngestionBadRequest { + return &UpdateOtelMetricsIngestionBadRequest{} +} + +/* +UpdateOtelMetricsIngestionBadRequest describes a response with status code 400, with default header values. + +Cannot update the OtelMetricsIngestion because the request is invalid. +*/ +type UpdateOtelMetricsIngestionBadRequest struct { + Payload *models.APIError +} + +// IsSuccess returns true when this update otel metrics ingestion bad request response has a 2xx status code +func (o *UpdateOtelMetricsIngestionBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update otel metrics ingestion bad request response has a 3xx status code +func (o *UpdateOtelMetricsIngestionBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update otel metrics ingestion bad request response has a 4xx status code +func (o *UpdateOtelMetricsIngestionBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this update otel metrics ingestion bad request response has a 5xx status code +func (o *UpdateOtelMetricsIngestionBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this update otel metrics ingestion bad request response a status code equal to that given +func (o *UpdateOtelMetricsIngestionBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the update otel metrics ingestion bad request response +func (o *UpdateOtelMetricsIngestionBadRequest) Code() int { + return 400 +} + +func (o *UpdateOtelMetricsIngestionBadRequest) Error() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] updateOtelMetricsIngestionBadRequest %+v", 400, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionBadRequest) String() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] updateOtelMetricsIngestionBadRequest %+v", 400, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionBadRequest) GetPayload() *models.APIError { + return o.Payload +} + +func (o *UpdateOtelMetricsIngestionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateOtelMetricsIngestionNotFound creates a UpdateOtelMetricsIngestionNotFound with default headers values +func NewUpdateOtelMetricsIngestionNotFound() *UpdateOtelMetricsIngestionNotFound { + return &UpdateOtelMetricsIngestionNotFound{} +} + +/* +UpdateOtelMetricsIngestionNotFound describes a response with status code 404, with default header values. + +Cannot update the OtelMetricsIngestion because OtelMetricsIngestion has not been created. +*/ +type UpdateOtelMetricsIngestionNotFound struct { + Payload *models.APIError +} + +// IsSuccess returns true when this update otel metrics ingestion not found response has a 2xx status code +func (o *UpdateOtelMetricsIngestionNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update otel metrics ingestion not found response has a 3xx status code +func (o *UpdateOtelMetricsIngestionNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update otel metrics ingestion not found response has a 4xx status code +func (o *UpdateOtelMetricsIngestionNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update otel metrics ingestion not found response has a 5xx status code +func (o *UpdateOtelMetricsIngestionNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update otel metrics ingestion not found response a status code equal to that given +func (o *UpdateOtelMetricsIngestionNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update otel metrics ingestion not found response +func (o *UpdateOtelMetricsIngestionNotFound) Code() int { + return 404 +} + +func (o *UpdateOtelMetricsIngestionNotFound) Error() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] updateOtelMetricsIngestionNotFound %+v", 404, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionNotFound) String() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] updateOtelMetricsIngestionNotFound %+v", 404, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionNotFound) GetPayload() *models.APIError { + return o.Payload +} + +func (o *UpdateOtelMetricsIngestionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateOtelMetricsIngestionInternalServerError creates a UpdateOtelMetricsIngestionInternalServerError with default headers values +func NewUpdateOtelMetricsIngestionInternalServerError() *UpdateOtelMetricsIngestionInternalServerError { + return &UpdateOtelMetricsIngestionInternalServerError{} +} + +/* +UpdateOtelMetricsIngestionInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type UpdateOtelMetricsIngestionInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this update otel metrics ingestion internal server error response has a 2xx status code +func (o *UpdateOtelMetricsIngestionInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update otel metrics ingestion internal server error response has a 3xx status code +func (o *UpdateOtelMetricsIngestionInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update otel metrics ingestion internal server error response has a 4xx status code +func (o *UpdateOtelMetricsIngestionInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update otel metrics ingestion internal server error response has a 5xx status code +func (o *UpdateOtelMetricsIngestionInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update otel metrics ingestion internal server error response a status code equal to that given +func (o *UpdateOtelMetricsIngestionInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update otel metrics ingestion internal server error response +func (o *UpdateOtelMetricsIngestionInternalServerError) Code() int { + return 500 +} + +func (o *UpdateOtelMetricsIngestionInternalServerError) Error() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] updateOtelMetricsIngestionInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionInternalServerError) String() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] updateOtelMetricsIngestionInternalServerError %+v", 500, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *UpdateOtelMetricsIngestionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.APIError) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateOtelMetricsIngestionDefault creates a UpdateOtelMetricsIngestionDefault with default headers values +func NewUpdateOtelMetricsIngestionDefault(code int) *UpdateOtelMetricsIngestionDefault { + return &UpdateOtelMetricsIngestionDefault{ + _statusCode: code, + } +} + +/* +UpdateOtelMetricsIngestionDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type UpdateOtelMetricsIngestionDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this update otel metrics ingestion default response has a 2xx status code +func (o *UpdateOtelMetricsIngestionDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this update otel metrics ingestion default response has a 3xx status code +func (o *UpdateOtelMetricsIngestionDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this update otel metrics ingestion default response has a 4xx status code +func (o *UpdateOtelMetricsIngestionDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this update otel metrics ingestion default response has a 5xx status code +func (o *UpdateOtelMetricsIngestionDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this update otel metrics ingestion default response a status code equal to that given +func (o *UpdateOtelMetricsIngestionDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the update otel metrics ingestion default response +func (o *UpdateOtelMetricsIngestionDefault) Code() int { + return o._statusCode +} + +func (o *UpdateOtelMetricsIngestionDefault) Error() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] UpdateOtelMetricsIngestion default %+v", o._statusCode, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionDefault) String() string { + return fmt.Sprintf("[PUT /api/unstable/config/otel-metrics-ingestion][%d] UpdateOtelMetricsIngestion default %+v", o._statusCode, o.Payload) +} + +func (o *UpdateOtelMetricsIngestionDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *UpdateOtelMetricsIngestionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/src/generated/swagger/configunstable/mocks/client_mock.go b/src/generated/swagger/configunstable/mocks/client_mock.go index c7aea76..46862be 100644 --- a/src/generated/swagger/configunstable/mocks/client_mock.go +++ b/src/generated/swagger/configunstable/mocks/client_mock.go @@ -75,26 +75,6 @@ func (mr *MockClientServiceMockRecorder) CreateDataset(params interface{}, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDataset", reflect.TypeOf((*MockClientService)(nil).CreateDataset), varargs...) } -// CreateGcpMetricsIntegration mocks base method. -func (m *MockClientService) CreateGcpMetricsIntegration(params *operations.CreateGcpMetricsIntegrationParams, opts ...operations.ClientOption) (*operations.CreateGcpMetricsIntegrationOK, error) { - m.ctrl.T.Helper() - varargs := []interface{}{params} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "CreateGcpMetricsIntegration", varargs...) - ret0, _ := ret[0].(*operations.CreateGcpMetricsIntegrationOK) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// CreateGcpMetricsIntegration indicates an expected call of CreateGcpMetricsIntegration. -func (mr *MockClientServiceMockRecorder) CreateGcpMetricsIntegration(params interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).CreateGcpMetricsIntegration), varargs...) -} - // CreateLinkTemplate mocks base method. func (m *MockClientService) CreateLinkTemplate(params *operations.CreateLinkTemplateParams, opts ...operations.ClientOption) (*operations.CreateLinkTemplateOK, error) { m.ctrl.T.Helper() @@ -155,24 +135,24 @@ func (mr *MockClientServiceMockRecorder) CreateNoopEntity(params interface{}, op return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNoopEntity", reflect.TypeOf((*MockClientService)(nil).CreateNoopEntity), varargs...) } -// CreateOpenTelemetryMetricsIngestion mocks base method. -func (m *MockClientService) CreateOpenTelemetryMetricsIngestion(params *operations.CreateOpenTelemetryMetricsIngestionParams, opts ...operations.ClientOption) (*operations.CreateOpenTelemetryMetricsIngestionOK, error) { +// CreateOtelMetricsIngestion mocks base method. +func (m *MockClientService) CreateOtelMetricsIngestion(params *operations.CreateOtelMetricsIngestionParams, opts ...operations.ClientOption) (*operations.CreateOtelMetricsIngestionOK, error) { m.ctrl.T.Helper() varargs := []interface{}{params} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "CreateOpenTelemetryMetricsIngestion", varargs...) - ret0, _ := ret[0].(*operations.CreateOpenTelemetryMetricsIngestionOK) + ret := m.ctrl.Call(m, "CreateOtelMetricsIngestion", varargs...) + ret0, _ := ret[0].(*operations.CreateOtelMetricsIngestionOK) ret1, _ := ret[1].(error) return ret0, ret1 } -// CreateOpenTelemetryMetricsIngestion indicates an expected call of CreateOpenTelemetryMetricsIngestion. -func (mr *MockClientServiceMockRecorder) CreateOpenTelemetryMetricsIngestion(params interface{}, opts ...interface{}) *gomock.Call { +// CreateOtelMetricsIngestion indicates an expected call of CreateOtelMetricsIngestion. +func (mr *MockClientServiceMockRecorder) CreateOtelMetricsIngestion(params interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOpenTelemetryMetricsIngestion", reflect.TypeOf((*MockClientService)(nil).CreateOpenTelemetryMetricsIngestion), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOtelMetricsIngestion", reflect.TypeOf((*MockClientService)(nil).CreateOtelMetricsIngestion), varargs...) } // CreateSavedTraceSearch mocks base method. @@ -335,26 +315,6 @@ func (mr *MockClientServiceMockRecorder) DeleteDataset(params interface{}, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDataset", reflect.TypeOf((*MockClientService)(nil).DeleteDataset), varargs...) } -// DeleteGcpMetricsIntegration mocks base method. -func (m *MockClientService) DeleteGcpMetricsIntegration(params *operations.DeleteGcpMetricsIntegrationParams, opts ...operations.ClientOption) (*operations.DeleteGcpMetricsIntegrationOK, error) { - m.ctrl.T.Helper() - varargs := []interface{}{params} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "DeleteGcpMetricsIntegration", varargs...) - ret0, _ := ret[0].(*operations.DeleteGcpMetricsIntegrationOK) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// DeleteGcpMetricsIntegration indicates an expected call of DeleteGcpMetricsIntegration. -func (mr *MockClientServiceMockRecorder) DeleteGcpMetricsIntegration(params interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).DeleteGcpMetricsIntegration), varargs...) -} - // DeleteLinkTemplate mocks base method. func (m *MockClientService) DeleteLinkTemplate(params *operations.DeleteLinkTemplateParams, opts ...operations.ClientOption) (*operations.DeleteLinkTemplateOK, error) { m.ctrl.T.Helper() @@ -415,24 +375,24 @@ func (mr *MockClientServiceMockRecorder) DeleteNoopEntity(params interface{}, op return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNoopEntity", reflect.TypeOf((*MockClientService)(nil).DeleteNoopEntity), varargs...) } -// DeleteOpenTelemetryMetricsIngestion mocks base method. -func (m *MockClientService) DeleteOpenTelemetryMetricsIngestion(params *operations.DeleteOpenTelemetryMetricsIngestionParams, opts ...operations.ClientOption) (*operations.DeleteOpenTelemetryMetricsIngestionOK, error) { +// DeleteOtelMetricsIngestion mocks base method. +func (m *MockClientService) DeleteOtelMetricsIngestion(params *operations.DeleteOtelMetricsIngestionParams, opts ...operations.ClientOption) (*operations.DeleteOtelMetricsIngestionOK, error) { m.ctrl.T.Helper() varargs := []interface{}{params} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "DeleteOpenTelemetryMetricsIngestion", varargs...) - ret0, _ := ret[0].(*operations.DeleteOpenTelemetryMetricsIngestionOK) + ret := m.ctrl.Call(m, "DeleteOtelMetricsIngestion", varargs...) + ret0, _ := ret[0].(*operations.DeleteOtelMetricsIngestionOK) ret1, _ := ret[1].(error) return ret0, ret1 } -// DeleteOpenTelemetryMetricsIngestion indicates an expected call of DeleteOpenTelemetryMetricsIngestion. -func (mr *MockClientServiceMockRecorder) DeleteOpenTelemetryMetricsIngestion(params interface{}, opts ...interface{}) *gomock.Call { +// DeleteOtelMetricsIngestion indicates an expected call of DeleteOtelMetricsIngestion. +func (mr *MockClientServiceMockRecorder) DeleteOtelMetricsIngestion(params interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOpenTelemetryMetricsIngestion", reflect.TypeOf((*MockClientService)(nil).DeleteOpenTelemetryMetricsIngestion), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOtelMetricsIngestion", reflect.TypeOf((*MockClientService)(nil).DeleteOtelMetricsIngestion), varargs...) } // DeleteSavedTraceSearch mocks base method. @@ -595,26 +555,6 @@ func (mr *MockClientServiceMockRecorder) ListDatasets(params interface{}, opts . return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDatasets", reflect.TypeOf((*MockClientService)(nil).ListDatasets), varargs...) } -// ListGcpMetricsIntegrations mocks base method. -func (m *MockClientService) ListGcpMetricsIntegrations(params *operations.ListGcpMetricsIntegrationsParams, opts ...operations.ClientOption) (*operations.ListGcpMetricsIntegrationsOK, error) { - m.ctrl.T.Helper() - varargs := []interface{}{params} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ListGcpMetricsIntegrations", varargs...) - ret0, _ := ret[0].(*operations.ListGcpMetricsIntegrationsOK) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ListGcpMetricsIntegrations indicates an expected call of ListGcpMetricsIntegrations. -func (mr *MockClientServiceMockRecorder) ListGcpMetricsIntegrations(params interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGcpMetricsIntegrations", reflect.TypeOf((*MockClientService)(nil).ListGcpMetricsIntegrations), varargs...) -} - // ListLinkTemplates mocks base method. func (m *MockClientService) ListLinkTemplates(params *operations.ListLinkTemplatesParams, opts ...operations.ClientOption) (*operations.ListLinkTemplatesOK, error) { m.ctrl.T.Helper() @@ -755,26 +695,6 @@ func (mr *MockClientServiceMockRecorder) ReadDataset(params interface{}, opts .. return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadDataset", reflect.TypeOf((*MockClientService)(nil).ReadDataset), varargs...) } -// ReadGcpMetricsIntegration mocks base method. -func (m *MockClientService) ReadGcpMetricsIntegration(params *operations.ReadGcpMetricsIntegrationParams, opts ...operations.ClientOption) (*operations.ReadGcpMetricsIntegrationOK, error) { - m.ctrl.T.Helper() - varargs := []interface{}{params} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "ReadGcpMetricsIntegration", varargs...) - ret0, _ := ret[0].(*operations.ReadGcpMetricsIntegrationOK) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// ReadGcpMetricsIntegration indicates an expected call of ReadGcpMetricsIntegration. -func (mr *MockClientServiceMockRecorder) ReadGcpMetricsIntegration(params interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).ReadGcpMetricsIntegration), varargs...) -} - // ReadLinkTemplate mocks base method. func (m *MockClientService) ReadLinkTemplate(params *operations.ReadLinkTemplateParams, opts ...operations.ClientOption) (*operations.ReadLinkTemplateOK, error) { m.ctrl.T.Helper() @@ -835,24 +755,24 @@ func (mr *MockClientServiceMockRecorder) ReadNoopEntity(params interface{}, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadNoopEntity", reflect.TypeOf((*MockClientService)(nil).ReadNoopEntity), varargs...) } -// ReadOpenTelemetryMetricsIngestion mocks base method. -func (m *MockClientService) ReadOpenTelemetryMetricsIngestion(params *operations.ReadOpenTelemetryMetricsIngestionParams, opts ...operations.ClientOption) (*operations.ReadOpenTelemetryMetricsIngestionOK, error) { +// ReadOtelMetricsIngestion mocks base method. +func (m *MockClientService) ReadOtelMetricsIngestion(params *operations.ReadOtelMetricsIngestionParams, opts ...operations.ClientOption) (*operations.ReadOtelMetricsIngestionOK, error) { m.ctrl.T.Helper() varargs := []interface{}{params} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "ReadOpenTelemetryMetricsIngestion", varargs...) - ret0, _ := ret[0].(*operations.ReadOpenTelemetryMetricsIngestionOK) + ret := m.ctrl.Call(m, "ReadOtelMetricsIngestion", varargs...) + ret0, _ := ret[0].(*operations.ReadOtelMetricsIngestionOK) ret1, _ := ret[1].(error) return ret0, ret1 } -// ReadOpenTelemetryMetricsIngestion indicates an expected call of ReadOpenTelemetryMetricsIngestion. -func (mr *MockClientServiceMockRecorder) ReadOpenTelemetryMetricsIngestion(params interface{}, opts ...interface{}) *gomock.Call { +// ReadOtelMetricsIngestion indicates an expected call of ReadOtelMetricsIngestion. +func (mr *MockClientServiceMockRecorder) ReadOtelMetricsIngestion(params interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadOpenTelemetryMetricsIngestion", reflect.TypeOf((*MockClientService)(nil).ReadOpenTelemetryMetricsIngestion), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadOtelMetricsIngestion", reflect.TypeOf((*MockClientService)(nil).ReadOtelMetricsIngestion), varargs...) } // ReadSavedTraceSearch mocks base method. @@ -1047,26 +967,6 @@ func (mr *MockClientServiceMockRecorder) UpdateDataset(params interface{}, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDataset", reflect.TypeOf((*MockClientService)(nil).UpdateDataset), varargs...) } -// UpdateGcpMetricsIntegration mocks base method. -func (m *MockClientService) UpdateGcpMetricsIntegration(params *operations.UpdateGcpMetricsIntegrationParams, opts ...operations.ClientOption) (*operations.UpdateGcpMetricsIntegrationOK, error) { - m.ctrl.T.Helper() - varargs := []interface{}{params} - for _, a := range opts { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "UpdateGcpMetricsIntegration", varargs...) - ret0, _ := ret[0].(*operations.UpdateGcpMetricsIntegrationOK) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// UpdateGcpMetricsIntegration indicates an expected call of UpdateGcpMetricsIntegration. -func (mr *MockClientServiceMockRecorder) UpdateGcpMetricsIntegration(params interface{}, opts ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).UpdateGcpMetricsIntegration), varargs...) -} - // UpdateLinkTemplate mocks base method. func (m *MockClientService) UpdateLinkTemplate(params *operations.UpdateLinkTemplateParams, opts ...operations.ClientOption) (*operations.UpdateLinkTemplateOK, error) { m.ctrl.T.Helper() @@ -1127,24 +1027,24 @@ func (mr *MockClientServiceMockRecorder) UpdateNoopEntity(params interface{}, op return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNoopEntity", reflect.TypeOf((*MockClientService)(nil).UpdateNoopEntity), varargs...) } -// UpdateOpenTelemetryMetricsIngestion mocks base method. -func (m *MockClientService) UpdateOpenTelemetryMetricsIngestion(params *operations.UpdateOpenTelemetryMetricsIngestionParams, opts ...operations.ClientOption) (*operations.UpdateOpenTelemetryMetricsIngestionOK, error) { +// UpdateOtelMetricsIngestion mocks base method. +func (m *MockClientService) UpdateOtelMetricsIngestion(params *operations.UpdateOtelMetricsIngestionParams, opts ...operations.ClientOption) (*operations.UpdateOtelMetricsIngestionOK, error) { m.ctrl.T.Helper() varargs := []interface{}{params} for _, a := range opts { varargs = append(varargs, a) } - ret := m.ctrl.Call(m, "UpdateOpenTelemetryMetricsIngestion", varargs...) - ret0, _ := ret[0].(*operations.UpdateOpenTelemetryMetricsIngestionOK) + ret := m.ctrl.Call(m, "UpdateOtelMetricsIngestion", varargs...) + ret0, _ := ret[0].(*operations.UpdateOtelMetricsIngestionOK) ret1, _ := ret[1].(error) return ret0, ret1 } -// UpdateOpenTelemetryMetricsIngestion indicates an expected call of UpdateOpenTelemetryMetricsIngestion. -func (mr *MockClientServiceMockRecorder) UpdateOpenTelemetryMetricsIngestion(params interface{}, opts ...interface{}) *gomock.Call { +// UpdateOtelMetricsIngestion indicates an expected call of UpdateOtelMetricsIngestion. +func (mr *MockClientServiceMockRecorder) UpdateOtelMetricsIngestion(params interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]interface{}{params}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOpenTelemetryMetricsIngestion", reflect.TypeOf((*MockClientService)(nil).UpdateOpenTelemetryMetricsIngestion), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOtelMetricsIngestion", reflect.TypeOf((*MockClientService)(nil).UpdateOtelMetricsIngestion), varargs...) } // UpdateSavedTraceSearch mocks base method. diff --git a/src/generated/swagger/configunstable/models/configunstable_create_open_telemetry_metrics_ingestion_request.go b/src/generated/swagger/configunstable/models/configunstable_create_open_telemetry_metrics_ingestion_request.go deleted file mode 100644 index 395b0b4..0000000 --- a/src/generated/swagger/configunstable/models/configunstable_create_open_telemetry_metrics_ingestion_request.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ConfigunstableCreateOpenTelemetryMetricsIngestionRequest configunstable create open telemetry metrics ingestion request -// -// swagger:model configunstableCreateOpenTelemetryMetricsIngestionRequest -type ConfigunstableCreateOpenTelemetryMetricsIngestionRequest struct { - - // open telemetry metrics ingestion - OpenTelemetryMetricsIngestion *ConfigunstableOpenTelemetryMetricsIngestion `json:"open_telemetry_metrics_ingestion,omitempty"` - - // If true, the OpenTelemetryMetricsIngestion will not be created, and no response OpenTelemetryMetricsIngestion will be returned. The response will return an error if the given OpenTelemetryMetricsIngestion is invalid. - DryRun bool `json:"dry_run,omitempty"` -} - -// Validate validates this configunstable create open telemetry metrics ingestion request -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOpenTelemetryMetricsIngestion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionRequest) validateOpenTelemetryMetricsIngestion(formats strfmt.Registry) error { - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if m.OpenTelemetryMetricsIngestion != nil { - if err := m.OpenTelemetryMetricsIngestion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// ContextValidate validate this configunstable create open telemetry metrics ingestion request based on the context it is used -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOpenTelemetryMetricsIngestion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionRequest) contextValidateOpenTelemetryMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { - - if m.OpenTelemetryMetricsIngestion != nil { - - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if err := m.OpenTelemetryMetricsIngestion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionRequest) UnmarshalBinary(b []byte) error { - var res ConfigunstableCreateOpenTelemetryMetricsIngestionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/src/generated/swagger/configunstable/models/configunstable_create_open_telemetry_metrics_ingestion_response.go b/src/generated/swagger/configunstable/models/configunstable_create_open_telemetry_metrics_ingestion_response.go deleted file mode 100644 index 4b1ce7c..0000000 --- a/src/generated/swagger/configunstable/models/configunstable_create_open_telemetry_metrics_ingestion_response.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ConfigunstableCreateOpenTelemetryMetricsIngestionResponse configunstable create open telemetry metrics ingestion response -// -// swagger:model configunstableCreateOpenTelemetryMetricsIngestionResponse -type ConfigunstableCreateOpenTelemetryMetricsIngestionResponse struct { - - // open telemetry metrics ingestion - OpenTelemetryMetricsIngestion *ConfigunstableOpenTelemetryMetricsIngestion `json:"open_telemetry_metrics_ingestion,omitempty"` -} - -// Validate validates this configunstable create open telemetry metrics ingestion response -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOpenTelemetryMetricsIngestion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionResponse) validateOpenTelemetryMetricsIngestion(formats strfmt.Registry) error { - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if m.OpenTelemetryMetricsIngestion != nil { - if err := m.OpenTelemetryMetricsIngestion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// ContextValidate validate this configunstable create open telemetry metrics ingestion response based on the context it is used -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOpenTelemetryMetricsIngestion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionResponse) contextValidateOpenTelemetryMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { - - if m.OpenTelemetryMetricsIngestion != nil { - - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if err := m.OpenTelemetryMetricsIngestion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConfigunstableCreateOpenTelemetryMetricsIngestionResponse) UnmarshalBinary(b []byte) error { - var res ConfigunstableCreateOpenTelemetryMetricsIngestionResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/src/generated/swagger/configunstable/models/configunstable_create_otel_metrics_ingestion_request.go b/src/generated/swagger/configunstable/models/configunstable_create_otel_metrics_ingestion_request.go new file mode 100644 index 0000000..3280c46 --- /dev/null +++ b/src/generated/swagger/configunstable/models/configunstable_create_otel_metrics_ingestion_request.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigunstableCreateOtelMetricsIngestionRequest configunstable create otel metrics ingestion request +// +// swagger:model configunstableCreateOtelMetricsIngestionRequest +type ConfigunstableCreateOtelMetricsIngestionRequest struct { + + // otel metrics ingestion + OtelMetricsIngestion *ConfigunstableOtelMetricsIngestion `json:"otel_metrics_ingestion,omitempty"` + + // If true, the OtelMetricsIngestion will not be created, and no response OtelMetricsIngestion will be returned. The response will return an error if the given OtelMetricsIngestion is invalid. + DryRun bool `json:"dry_run,omitempty"` +} + +// Validate validates this configunstable create otel metrics ingestion request +func (m *ConfigunstableCreateOtelMetricsIngestionRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOtelMetricsIngestion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableCreateOtelMetricsIngestionRequest) validateOtelMetricsIngestion(formats strfmt.Registry) error { + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if m.OtelMetricsIngestion != nil { + if err := m.OtelMetricsIngestion.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// ContextValidate validate this configunstable create otel metrics ingestion request based on the context it is used +func (m *ConfigunstableCreateOtelMetricsIngestionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOtelMetricsIngestion(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableCreateOtelMetricsIngestionRequest) contextValidateOtelMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { + + if m.OtelMetricsIngestion != nil { + + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if err := m.OtelMetricsIngestion.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigunstableCreateOtelMetricsIngestionRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigunstableCreateOtelMetricsIngestionRequest) UnmarshalBinary(b []byte) error { + var res ConfigunstableCreateOtelMetricsIngestionRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/src/generated/swagger/configunstable/models/configunstable_create_otel_metrics_ingestion_response.go b/src/generated/swagger/configunstable/models/configunstable_create_otel_metrics_ingestion_response.go new file mode 100644 index 0000000..6e5bf17 --- /dev/null +++ b/src/generated/swagger/configunstable/models/configunstable_create_otel_metrics_ingestion_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigunstableCreateOtelMetricsIngestionResponse configunstable create otel metrics ingestion response +// +// swagger:model configunstableCreateOtelMetricsIngestionResponse +type ConfigunstableCreateOtelMetricsIngestionResponse struct { + + // otel metrics ingestion + OtelMetricsIngestion *ConfigunstableOtelMetricsIngestion `json:"otel_metrics_ingestion,omitempty"` +} + +// Validate validates this configunstable create otel metrics ingestion response +func (m *ConfigunstableCreateOtelMetricsIngestionResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOtelMetricsIngestion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableCreateOtelMetricsIngestionResponse) validateOtelMetricsIngestion(formats strfmt.Registry) error { + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if m.OtelMetricsIngestion != nil { + if err := m.OtelMetricsIngestion.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// ContextValidate validate this configunstable create otel metrics ingestion response based on the context it is used +func (m *ConfigunstableCreateOtelMetricsIngestionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOtelMetricsIngestion(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableCreateOtelMetricsIngestionResponse) contextValidateOtelMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { + + if m.OtelMetricsIngestion != nil { + + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if err := m.OtelMetricsIngestion.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigunstableCreateOtelMetricsIngestionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigunstableCreateOtelMetricsIngestionResponse) UnmarshalBinary(b []byte) error { + var res ConfigunstableCreateOtelMetricsIngestionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/src/generated/swagger/configunstable/models/configunstable_delete_gcp_metrics_integration_response.go b/src/generated/swagger/configunstable/models/configunstable_delete_gcp_metrics_integration_response.go deleted file mode 100644 index cfb1605..0000000 --- a/src/generated/swagger/configunstable/models/configunstable_delete_gcp_metrics_integration_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// ConfigunstableDeleteGcpMetricsIntegrationResponse configunstable delete gcp metrics integration response -// -// swagger:model configunstableDeleteGcpMetricsIntegrationResponse -type ConfigunstableDeleteGcpMetricsIntegrationResponse interface{} diff --git a/src/generated/swagger/configunstable/models/configunstable_delete_open_telemetry_metrics_ingestion_response.go b/src/generated/swagger/configunstable/models/configunstable_delete_open_telemetry_metrics_ingestion_response.go deleted file mode 100644 index bbe9e77..0000000 --- a/src/generated/swagger/configunstable/models/configunstable_delete_open_telemetry_metrics_ingestion_response.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -// ConfigunstableDeleteOpenTelemetryMetricsIngestionResponse configunstable delete open telemetry metrics ingestion response -// -// swagger:model configunstableDeleteOpenTelemetryMetricsIngestionResponse -type ConfigunstableDeleteOpenTelemetryMetricsIngestionResponse interface{} diff --git a/src/generated/swagger/configunstable/models/configunstable_delete_otel_metrics_ingestion_response.go b/src/generated/swagger/configunstable/models/configunstable_delete_otel_metrics_ingestion_response.go new file mode 100644 index 0000000..8c7297e --- /dev/null +++ b/src/generated/swagger/configunstable/models/configunstable_delete_otel_metrics_ingestion_response.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// ConfigunstableDeleteOtelMetricsIngestionResponse configunstable delete otel metrics ingestion response +// +// swagger:model configunstableDeleteOtelMetricsIngestionResponse +type ConfigunstableDeleteOtelMetricsIngestionResponse interface{} diff --git a/src/generated/swagger/configunstable/models/configunstable_open_telemetry_metrics_ingestion.go b/src/generated/swagger/configunstable/models/configunstable_otel_metrics_ingestion.go similarity index 62% rename from src/generated/swagger/configunstable/models/configunstable_open_telemetry_metrics_ingestion.go rename to src/generated/swagger/configunstable/models/configunstable_otel_metrics_ingestion.go index e32be30..7b5047f 100644 --- a/src/generated/swagger/configunstable/models/configunstable_open_telemetry_metrics_ingestion.go +++ b/src/generated/swagger/configunstable/models/configunstable_otel_metrics_ingestion.go @@ -14,27 +14,27 @@ import ( "github.com/go-openapi/validate" ) -// ConfigunstableOpenTelemetryMetricsIngestion configunstable open telemetry metrics ingestion +// ConfigunstableOtelMetricsIngestion configunstable otel metrics ingestion // -// swagger:model configunstableOpenTelemetryMetricsIngestion -type ConfigunstableOpenTelemetryMetricsIngestion struct { +// swagger:model configunstableOtelMetricsIngestion +type ConfigunstableOtelMetricsIngestion struct { - // Timestamp of when the OpenTelemetryMetricsIngestion was created. Cannot be set by clients. + // Timestamp of when the OtelMetricsIngestion was created. Cannot be set by clients. // Read Only: true // Format: date-time CreatedAt strfmt.DateTime `json:"created_at,omitempty"` - // Timestamp of when the OpenTelemetryMetricsIngestion was last updated. Cannot be set by clients. + // Timestamp of when the OtelMetricsIngestion was last updated. Cannot be set by clients. // Read Only: true // Format: date-time UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` // resource attributes - ResourceAttributes *OpenTelemetryMetricsIngestionResourceAttributes `json:"resource_attributes,omitempty"` + ResourceAttributes *OtelMetricsIngestionResourceAttributes `json:"resource_attributes,omitempty"` } -// Validate validates this configunstable open telemetry metrics ingestion -func (m *ConfigunstableOpenTelemetryMetricsIngestion) Validate(formats strfmt.Registry) error { +// Validate validates this configunstable otel metrics ingestion +func (m *ConfigunstableOtelMetricsIngestion) Validate(formats strfmt.Registry) error { var res []error if err := m.validateCreatedAt(formats); err != nil { @@ -55,7 +55,7 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) Validate(formats strfmt.Re return nil } -func (m *ConfigunstableOpenTelemetryMetricsIngestion) validateCreatedAt(formats strfmt.Registry) error { +func (m *ConfigunstableOtelMetricsIngestion) validateCreatedAt(formats strfmt.Registry) error { if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -67,7 +67,7 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) validateCreatedAt(formats return nil } -func (m *ConfigunstableOpenTelemetryMetricsIngestion) validateUpdatedAt(formats strfmt.Registry) error { +func (m *ConfigunstableOtelMetricsIngestion) validateUpdatedAt(formats strfmt.Registry) error { if swag.IsZero(m.UpdatedAt) { // not required return nil } @@ -79,7 +79,7 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) validateUpdatedAt(formats return nil } -func (m *ConfigunstableOpenTelemetryMetricsIngestion) validateResourceAttributes(formats strfmt.Registry) error { +func (m *ConfigunstableOtelMetricsIngestion) validateResourceAttributes(formats strfmt.Registry) error { if swag.IsZero(m.ResourceAttributes) { // not required return nil } @@ -98,8 +98,8 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) validateResourceAttributes return nil } -// ContextValidate validate this configunstable open telemetry metrics ingestion based on the context it is used -func (m *ConfigunstableOpenTelemetryMetricsIngestion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this configunstable otel metrics ingestion based on the context it is used +func (m *ConfigunstableOtelMetricsIngestion) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateCreatedAt(ctx, formats); err != nil { @@ -120,7 +120,7 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) ContextValidate(ctx contex return nil } -func (m *ConfigunstableOpenTelemetryMetricsIngestion) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error { +func (m *ConfigunstableOtelMetricsIngestion) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created_at", "body", strfmt.DateTime(m.CreatedAt)); err != nil { return err @@ -129,7 +129,7 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) contextValidateCreatedAt(c return nil } -func (m *ConfigunstableOpenTelemetryMetricsIngestion) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error { +func (m *ConfigunstableOtelMetricsIngestion) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "updated_at", "body", strfmt.DateTime(m.UpdatedAt)); err != nil { return err @@ -138,7 +138,7 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) contextValidateUpdatedAt(c return nil } -func (m *ConfigunstableOpenTelemetryMetricsIngestion) contextValidateResourceAttributes(ctx context.Context, formats strfmt.Registry) error { +func (m *ConfigunstableOtelMetricsIngestion) contextValidateResourceAttributes(ctx context.Context, formats strfmt.Registry) error { if m.ResourceAttributes != nil { @@ -160,7 +160,7 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) contextValidateResourceAtt } // MarshalBinary interface implementation -func (m *ConfigunstableOpenTelemetryMetricsIngestion) MarshalBinary() ([]byte, error) { +func (m *ConfigunstableOtelMetricsIngestion) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -168,8 +168,8 @@ func (m *ConfigunstableOpenTelemetryMetricsIngestion) MarshalBinary() ([]byte, e } // UnmarshalBinary interface implementation -func (m *ConfigunstableOpenTelemetryMetricsIngestion) UnmarshalBinary(b []byte) error { - var res ConfigunstableOpenTelemetryMetricsIngestion +func (m *ConfigunstableOtelMetricsIngestion) UnmarshalBinary(b []byte) error { + var res ConfigunstableOtelMetricsIngestion if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_read_open_telemetry_metrics_ingestion_response.go b/src/generated/swagger/configunstable/models/configunstable_read_open_telemetry_metrics_ingestion_response.go deleted file mode 100644 index 8f4bff1..0000000 --- a/src/generated/swagger/configunstable/models/configunstable_read_open_telemetry_metrics_ingestion_response.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ConfigunstableReadOpenTelemetryMetricsIngestionResponse configunstable read open telemetry metrics ingestion response -// -// swagger:model configunstableReadOpenTelemetryMetricsIngestionResponse -type ConfigunstableReadOpenTelemetryMetricsIngestionResponse struct { - - // open telemetry metrics ingestion - OpenTelemetryMetricsIngestion *ConfigunstableOpenTelemetryMetricsIngestion `json:"open_telemetry_metrics_ingestion,omitempty"` -} - -// Validate validates this configunstable read open telemetry metrics ingestion response -func (m *ConfigunstableReadOpenTelemetryMetricsIngestionResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOpenTelemetryMetricsIngestion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableReadOpenTelemetryMetricsIngestionResponse) validateOpenTelemetryMetricsIngestion(formats strfmt.Registry) error { - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if m.OpenTelemetryMetricsIngestion != nil { - if err := m.OpenTelemetryMetricsIngestion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// ContextValidate validate this configunstable read open telemetry metrics ingestion response based on the context it is used -func (m *ConfigunstableReadOpenTelemetryMetricsIngestionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOpenTelemetryMetricsIngestion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableReadOpenTelemetryMetricsIngestionResponse) contextValidateOpenTelemetryMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { - - if m.OpenTelemetryMetricsIngestion != nil { - - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if err := m.OpenTelemetryMetricsIngestion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConfigunstableReadOpenTelemetryMetricsIngestionResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConfigunstableReadOpenTelemetryMetricsIngestionResponse) UnmarshalBinary(b []byte) error { - var res ConfigunstableReadOpenTelemetryMetricsIngestionResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/src/generated/swagger/configunstable/models/configunstable_read_otel_metrics_ingestion_response.go b/src/generated/swagger/configunstable/models/configunstable_read_otel_metrics_ingestion_response.go new file mode 100644 index 0000000..f94692e --- /dev/null +++ b/src/generated/swagger/configunstable/models/configunstable_read_otel_metrics_ingestion_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigunstableReadOtelMetricsIngestionResponse configunstable read otel metrics ingestion response +// +// swagger:model configunstableReadOtelMetricsIngestionResponse +type ConfigunstableReadOtelMetricsIngestionResponse struct { + + // otel metrics ingestion + OtelMetricsIngestion *ConfigunstableOtelMetricsIngestion `json:"otel_metrics_ingestion,omitempty"` +} + +// Validate validates this configunstable read otel metrics ingestion response +func (m *ConfigunstableReadOtelMetricsIngestionResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOtelMetricsIngestion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableReadOtelMetricsIngestionResponse) validateOtelMetricsIngestion(formats strfmt.Registry) error { + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if m.OtelMetricsIngestion != nil { + if err := m.OtelMetricsIngestion.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// ContextValidate validate this configunstable read otel metrics ingestion response based on the context it is used +func (m *ConfigunstableReadOtelMetricsIngestionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOtelMetricsIngestion(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableReadOtelMetricsIngestionResponse) contextValidateOtelMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { + + if m.OtelMetricsIngestion != nil { + + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if err := m.OtelMetricsIngestion.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigunstableReadOtelMetricsIngestionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigunstableReadOtelMetricsIngestionResponse) UnmarshalBinary(b []byte) error { + var res ConfigunstableReadOtelMetricsIngestionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/src/generated/swagger/configunstable/models/configunstable_update_open_telemetry_metrics_ingestion_request.go b/src/generated/swagger/configunstable/models/configunstable_update_open_telemetry_metrics_ingestion_request.go deleted file mode 100644 index aee6621..0000000 --- a/src/generated/swagger/configunstable/models/configunstable_update_open_telemetry_metrics_ingestion_request.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest configunstable update open telemetry metrics ingestion request -// -// swagger:model configunstableUpdateOpenTelemetryMetricsIngestionRequest -type ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest struct { - - // open telemetry metrics ingestion - OpenTelemetryMetricsIngestion *ConfigunstableOpenTelemetryMetricsIngestion `json:"open_telemetry_metrics_ingestion,omitempty"` - - // If true, the OpenTelemetryMetricsIngestion will be created if it does not already exist. If false, an error will be returned if the OpenTelemetryMetricsIngestion does not already exist. - CreateIfMissing bool `json:"create_if_missing,omitempty"` - - // If true, the OpenTelemetryMetricsIngestion will not be created nor updated, and no response OpenTelemetryMetricsIngestion will be returned. The response will return an error if the given OpenTelemetryMetricsIngestion is invalid. - DryRun bool `json:"dry_run,omitempty"` -} - -// Validate validates this configunstable update open telemetry metrics ingestion request -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOpenTelemetryMetricsIngestion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest) validateOpenTelemetryMetricsIngestion(formats strfmt.Registry) error { - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if m.OpenTelemetryMetricsIngestion != nil { - if err := m.OpenTelemetryMetricsIngestion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// ContextValidate validate this configunstable update open telemetry metrics ingestion request based on the context it is used -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOpenTelemetryMetricsIngestion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest) contextValidateOpenTelemetryMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { - - if m.OpenTelemetryMetricsIngestion != nil { - - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if err := m.OpenTelemetryMetricsIngestion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest) UnmarshalBinary(b []byte) error { - var res ConfigunstableUpdateOpenTelemetryMetricsIngestionRequest - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/src/generated/swagger/configunstable/models/configunstable_update_open_telemetry_metrics_ingestion_response.go b/src/generated/swagger/configunstable/models/configunstable_update_open_telemetry_metrics_ingestion_response.go deleted file mode 100644 index a8785db..0000000 --- a/src/generated/swagger/configunstable/models/configunstable_update_open_telemetry_metrics_ingestion_response.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse configunstable update open telemetry metrics ingestion response -// -// swagger:model configunstableUpdateOpenTelemetryMetricsIngestionResponse -type ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse struct { - - // open telemetry metrics ingestion - OpenTelemetryMetricsIngestion *ConfigunstableOpenTelemetryMetricsIngestion `json:"open_telemetry_metrics_ingestion,omitempty"` -} - -// Validate validates this configunstable update open telemetry metrics ingestion response -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOpenTelemetryMetricsIngestion(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse) validateOpenTelemetryMetricsIngestion(formats strfmt.Registry) error { - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if m.OpenTelemetryMetricsIngestion != nil { - if err := m.OpenTelemetryMetricsIngestion.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// ContextValidate validate this configunstable update open telemetry metrics ingestion response based on the context it is used -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := m.contextValidateOpenTelemetryMetricsIngestion(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse) contextValidateOpenTelemetryMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { - - if m.OpenTelemetryMetricsIngestion != nil { - - if swag.IsZero(m.OpenTelemetryMetricsIngestion) { // not required - return nil - } - - if err := m.OpenTelemetryMetricsIngestion.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("open_telemetry_metrics_ingestion") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("open_telemetry_metrics_ingestion") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse) UnmarshalBinary(b []byte) error { - var res ConfigunstableUpdateOpenTelemetryMetricsIngestionResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/src/generated/swagger/configunstable/models/configunstable_update_otel_metrics_ingestion_request.go b/src/generated/swagger/configunstable/models/configunstable_update_otel_metrics_ingestion_request.go new file mode 100644 index 0000000..e1802fa --- /dev/null +++ b/src/generated/swagger/configunstable/models/configunstable_update_otel_metrics_ingestion_request.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigunstableUpdateOtelMetricsIngestionRequest configunstable update otel metrics ingestion request +// +// swagger:model configunstableUpdateOtelMetricsIngestionRequest +type ConfigunstableUpdateOtelMetricsIngestionRequest struct { + + // otel metrics ingestion + OtelMetricsIngestion *ConfigunstableOtelMetricsIngestion `json:"otel_metrics_ingestion,omitempty"` + + // If true, the OtelMetricsIngestion will be created if it does not already exist. If false, an error will be returned if the OtelMetricsIngestion does not already exist. + CreateIfMissing bool `json:"create_if_missing,omitempty"` + + // If true, the OtelMetricsIngestion will not be created nor updated, and no response OtelMetricsIngestion will be returned. The response will return an error if the given OtelMetricsIngestion is invalid. + DryRun bool `json:"dry_run,omitempty"` +} + +// Validate validates this configunstable update otel metrics ingestion request +func (m *ConfigunstableUpdateOtelMetricsIngestionRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOtelMetricsIngestion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableUpdateOtelMetricsIngestionRequest) validateOtelMetricsIngestion(formats strfmt.Registry) error { + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if m.OtelMetricsIngestion != nil { + if err := m.OtelMetricsIngestion.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// ContextValidate validate this configunstable update otel metrics ingestion request based on the context it is used +func (m *ConfigunstableUpdateOtelMetricsIngestionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOtelMetricsIngestion(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableUpdateOtelMetricsIngestionRequest) contextValidateOtelMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { + + if m.OtelMetricsIngestion != nil { + + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if err := m.OtelMetricsIngestion.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigunstableUpdateOtelMetricsIngestionRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigunstableUpdateOtelMetricsIngestionRequest) UnmarshalBinary(b []byte) error { + var res ConfigunstableUpdateOtelMetricsIngestionRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/src/generated/swagger/configunstable/models/configunstable_update_otel_metrics_ingestion_response.go b/src/generated/swagger/configunstable/models/configunstable_update_otel_metrics_ingestion_response.go new file mode 100644 index 0000000..69f5303 --- /dev/null +++ b/src/generated/swagger/configunstable/models/configunstable_update_otel_metrics_ingestion_response.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// ConfigunstableUpdateOtelMetricsIngestionResponse configunstable update otel metrics ingestion response +// +// swagger:model configunstableUpdateOtelMetricsIngestionResponse +type ConfigunstableUpdateOtelMetricsIngestionResponse struct { + + // otel metrics ingestion + OtelMetricsIngestion *ConfigunstableOtelMetricsIngestion `json:"otel_metrics_ingestion,omitempty"` +} + +// Validate validates this configunstable update otel metrics ingestion response +func (m *ConfigunstableUpdateOtelMetricsIngestionResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOtelMetricsIngestion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableUpdateOtelMetricsIngestionResponse) validateOtelMetricsIngestion(formats strfmt.Registry) error { + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if m.OtelMetricsIngestion != nil { + if err := m.OtelMetricsIngestion.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// ContextValidate validate this configunstable update otel metrics ingestion response based on the context it is used +func (m *ConfigunstableUpdateOtelMetricsIngestionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOtelMetricsIngestion(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *ConfigunstableUpdateOtelMetricsIngestionResponse) contextValidateOtelMetricsIngestion(ctx context.Context, formats strfmt.Registry) error { + + if m.OtelMetricsIngestion != nil { + + if swag.IsZero(m.OtelMetricsIngestion) { // not required + return nil + } + + if err := m.OtelMetricsIngestion.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("otel_metrics_ingestion") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("otel_metrics_ingestion") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *ConfigunstableUpdateOtelMetricsIngestionResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *ConfigunstableUpdateOtelMetricsIngestionResponse) UnmarshalBinary(b []byte) error { + var res ConfigunstableUpdateOtelMetricsIngestionResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/src/generated/swagger/configunstable/models/gcp_metrics_integration_service_account.go b/src/generated/swagger/configunstable/models/gcp_metrics_integration_service_account.go deleted file mode 100644 index be28a9d..0000000 --- a/src/generated/swagger/configunstable/models/gcp_metrics_integration_service_account.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "context" - - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// GcpMetricsIntegrationServiceAccount gcp metrics integration service account -// -// swagger:model GcpMetricsIntegrationServiceAccount -type GcpMetricsIntegrationServiceAccount struct { - - // Email address of the service account to impersonate. - ClientEmail string `json:"client_email,omitempty"` -} - -// Validate validates this gcp metrics integration service account -func (m *GcpMetricsIntegrationServiceAccount) Validate(formats strfmt.Registry) error { - return nil -} - -// ContextValidate validates this gcp metrics integration service account based on context it is used -func (m *GcpMetricsIntegrationServiceAccount) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *GcpMetricsIntegrationServiceAccount) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *GcpMetricsIntegrationServiceAccount) UnmarshalBinary(b []byte) error { - var res GcpMetricsIntegrationServiceAccount - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/src/generated/swagger/configunstable/models/open_telemetry_metrics_ingestion_resource_attributes.go b/src/generated/swagger/configunstable/models/otel_metrics_ingestion_resource_attributes.go similarity index 69% rename from src/generated/swagger/configunstable/models/open_telemetry_metrics_ingestion_resource_attributes.go rename to src/generated/swagger/configunstable/models/otel_metrics_ingestion_resource_attributes.go index 45fed0d..76d8a16 100644 --- a/src/generated/swagger/configunstable/models/open_telemetry_metrics_ingestion_resource_attributes.go +++ b/src/generated/swagger/configunstable/models/otel_metrics_ingestion_resource_attributes.go @@ -13,10 +13,10 @@ import ( "github.com/go-openapi/swag" ) -// OpenTelemetryMetricsIngestionResourceAttributes open telemetry metrics ingestion resource attributes +// OtelMetricsIngestionResourceAttributes otel metrics ingestion resource attributes // -// swagger:model OpenTelemetryMetricsIngestionResourceAttributes -type OpenTelemetryMetricsIngestionResourceAttributes struct { +// swagger:model OtelMetricsIngestionResourceAttributes +type OtelMetricsIngestionResourceAttributes struct { // flatten mode FlattenMode ResourceAttributesFlattenMode `json:"flatten_mode,omitempty"` @@ -34,8 +34,8 @@ type OpenTelemetryMetricsIngestionResourceAttributes struct { GenerateTargetInfo bool `json:"generate_target_info,omitempty"` } -// Validate validates this open telemetry metrics ingestion resource attributes -func (m *OpenTelemetryMetricsIngestionResourceAttributes) Validate(formats strfmt.Registry) error { +// Validate validates this otel metrics ingestion resource attributes +func (m *OtelMetricsIngestionResourceAttributes) Validate(formats strfmt.Registry) error { var res []error if err := m.validateFlattenMode(formats); err != nil { @@ -52,7 +52,7 @@ func (m *OpenTelemetryMetricsIngestionResourceAttributes) Validate(formats strfm return nil } -func (m *OpenTelemetryMetricsIngestionResourceAttributes) validateFlattenMode(formats strfmt.Registry) error { +func (m *OtelMetricsIngestionResourceAttributes) validateFlattenMode(formats strfmt.Registry) error { if swag.IsZero(m.FlattenMode) { // not required return nil } @@ -69,7 +69,7 @@ func (m *OpenTelemetryMetricsIngestionResourceAttributes) validateFlattenMode(fo return nil } -func (m *OpenTelemetryMetricsIngestionResourceAttributes) validateFilterMode(formats strfmt.Registry) error { +func (m *OtelMetricsIngestionResourceAttributes) validateFilterMode(formats strfmt.Registry) error { if swag.IsZero(m.FilterMode) { // not required return nil } @@ -86,8 +86,8 @@ func (m *OpenTelemetryMetricsIngestionResourceAttributes) validateFilterMode(for return nil } -// ContextValidate validate this open telemetry metrics ingestion resource attributes based on the context it is used -func (m *OpenTelemetryMetricsIngestionResourceAttributes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this otel metrics ingestion resource attributes based on the context it is used +func (m *OtelMetricsIngestionResourceAttributes) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateFlattenMode(ctx, formats); err != nil { @@ -104,7 +104,7 @@ func (m *OpenTelemetryMetricsIngestionResourceAttributes) ContextValidate(ctx co return nil } -func (m *OpenTelemetryMetricsIngestionResourceAttributes) contextValidateFlattenMode(ctx context.Context, formats strfmt.Registry) error { +func (m *OtelMetricsIngestionResourceAttributes) contextValidateFlattenMode(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.FlattenMode) { // not required return nil @@ -122,7 +122,7 @@ func (m *OpenTelemetryMetricsIngestionResourceAttributes) contextValidateFlatten return nil } -func (m *OpenTelemetryMetricsIngestionResourceAttributes) contextValidateFilterMode(ctx context.Context, formats strfmt.Registry) error { +func (m *OtelMetricsIngestionResourceAttributes) contextValidateFilterMode(ctx context.Context, formats strfmt.Registry) error { if swag.IsZero(m.FilterMode) { // not required return nil @@ -141,7 +141,7 @@ func (m *OpenTelemetryMetricsIngestionResourceAttributes) contextValidateFilterM } // MarshalBinary interface implementation -func (m *OpenTelemetryMetricsIngestionResourceAttributes) MarshalBinary() ([]byte, error) { +func (m *OtelMetricsIngestionResourceAttributes) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -149,8 +149,8 @@ func (m *OpenTelemetryMetricsIngestionResourceAttributes) MarshalBinary() ([]byt } // UnmarshalBinary interface implementation -func (m *OpenTelemetryMetricsIngestionResourceAttributes) UnmarshalBinary(b []byte) error { - var res OpenTelemetryMetricsIngestionResourceAttributes +func (m *OtelMetricsIngestionResourceAttributes) UnmarshalBinary(b []byte) error { + var res OtelMetricsIngestionResourceAttributes if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/spec.json b/src/generated/swagger/configunstable/spec.json index 7f54729..7aac28d 100644 --- a/src/generated/swagger/configunstable/spec.json +++ b/src/generated/swagger/configunstable/spec.json @@ -130,31 +130,6 @@ ], "type": "string" }, - "GcpMetricsIntegrationMetricGroup": { - "properties": { - "project_id": { - "description": "Project ID that has access to the metric data.", - "type": "string" - }, - "prefixes": { - "description": "List of Gcp metric prefixes to ingest.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GcpMetricsIntegrationServiceAccount": { - "properties": { - "client_email": { - "description": "Email address of the service account to impersonate.", - "type": "string" - } - }, - "type": "object" - }, "LogAllocationConfigAllocation": { "description": "Configuration for allocating resources to a dataset.", "properties": { @@ -203,7 +178,7 @@ ], "type": "string" }, - "OpenTelemetryMetricsIngestionResourceAttributes": { + "OtelMetricsIngestionResourceAttributes": { "properties": { "flatten_mode": { "$ref": "#/definitions/ResourceAttributesFlattenMode" @@ -781,26 +756,6 @@ }, "type": "object" }, - "configunstableCreateGcpMetricsIntegrationRequest": { - "properties": { - "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGcpMetricsIntegration" - }, - "dry_run": { - "description": "If true, the GcpMetricsIntegration will not be created, and no response GcpMetricsIntegration will be returned. The response will return an error if the given GcpMetricsIntegration is invalid.", - "type": "boolean" - } - }, - "type": "object" - }, - "configunstableCreateGcpMetricsIntegrationResponse": { - "properties": { - "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGcpMetricsIntegration" - } - }, - "type": "object" - }, "configunstableCreateLinkTemplateRequest": { "properties": { "link_template": { @@ -857,22 +812,22 @@ }, "type": "object" }, - "configunstableCreateOpenTelemetryMetricsIngestionRequest": { + "configunstableCreateOtelMetricsIngestionRequest": { "properties": { - "open_telemetry_metrics_ingestion": { - "$ref": "#/definitions/configunstableOpenTelemetryMetricsIngestion" + "otel_metrics_ingestion": { + "$ref": "#/definitions/configunstableOtelMetricsIngestion" }, "dry_run": { - "description": "If true, the OpenTelemetryMetricsIngestion will not be created, and no response OpenTelemetryMetricsIngestion will be returned. The response will return an error if the given OpenTelemetryMetricsIngestion is invalid.", + "description": "If true, the OtelMetricsIngestion will not be created, and no response OtelMetricsIngestion will be returned. The response will return an error if the given OtelMetricsIngestion is invalid.", "type": "boolean" } }, "type": "object" }, - "configunstableCreateOpenTelemetryMetricsIngestionResponse": { + "configunstableCreateOtelMetricsIngestionResponse": { "properties": { - "open_telemetry_metrics_ingestion": { - "$ref": "#/definitions/configunstableOpenTelemetryMetricsIngestion" + "otel_metrics_ingestion": { + "$ref": "#/definitions/configunstableOtelMetricsIngestion" } }, "type": "object" @@ -1078,9 +1033,6 @@ "configunstableDeleteDatasetResponse": { "type": "object" }, - "configunstableDeleteGcpMetricsIntegrationResponse": { - "type": "object" - }, "configunstableDeleteLinkTemplateResponse": { "type": "object" }, @@ -1095,7 +1047,7 @@ }, "type": "object" }, - "configunstableDeleteOpenTelemetryMetricsIngestionResponse": { + "configunstableDeleteOtelMetricsIngestionResponse": { "type": "object" }, "configunstableDeleteSavedTraceSearchResponse": { @@ -1116,41 +1068,6 @@ "configunstableDeleteTraceTailSamplingRulesResponse": { "type": "object" }, - "configunstableGcpMetricsIntegration": { - "properties": { - "slug": { - "description": "Unique identifier of the GcpMetricsIntegration. If slug is not provided, one will be generated based of the name field. Cannot be modified after the GcpMetricsIntegration is created.", - "type": "string" - }, - "name": { - "description": "Required name of the GcpMetricsIntegration. May be modified after the GcpMetricsIntegration is created.", - "type": "string" - }, - "created_at": { - "description": "Timestamp of when the GcpMetricsIntegration was created. Cannot be set by clients.", - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "updated_at": { - "description": "Timestamp of when the GcpMetricsIntegration was last updated. Cannot be set by clients.", - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "service_account": { - "$ref": "#/definitions/GcpMetricsIntegrationServiceAccount" - }, - "metric_groups": { - "description": "Metric groups to be ingested for this integration.", - "items": { - "$ref": "#/definitions/GcpMetricsIntegrationMetricGroup" - }, - "type": "array" - } - }, - "type": "object" - }, "configunstableLinkTemplate": { "properties": { "slug": { @@ -1212,20 +1129,6 @@ }, "type": "object" }, - "configunstableListGcpMetricsIntegrationsResponse": { - "properties": { - "page": { - "$ref": "#/definitions/configv1PageResult" - }, - "gcp_metrics_integrations": { - "items": { - "$ref": "#/definitions/configunstableGcpMetricsIntegration" - }, - "type": "array" - } - }, - "type": "object" - }, "configunstableListLinkTemplatesResponse": { "properties": { "page": { @@ -1393,22 +1296,22 @@ ], "type": "string" }, - "configunstableOpenTelemetryMetricsIngestion": { + "configunstableOtelMetricsIngestion": { "properties": { "created_at": { - "description": "Timestamp of when the OpenTelemetryMetricsIngestion was created. Cannot be set by clients.", + "description": "Timestamp of when the OtelMetricsIngestion was created. Cannot be set by clients.", "format": "date-time", "readOnly": true, "type": "string" }, "updated_at": { - "description": "Timestamp of when the OpenTelemetryMetricsIngestion was last updated. Cannot be set by clients.", + "description": "Timestamp of when the OtelMetricsIngestion was last updated. Cannot be set by clients.", "format": "date-time", "readOnly": true, "type": "string" }, "resource_attributes": { - "$ref": "#/definitions/OpenTelemetryMetricsIngestionResourceAttributes" + "$ref": "#/definitions/OtelMetricsIngestionResourceAttributes" } }, "type": "object" @@ -1429,14 +1332,6 @@ }, "type": "object" }, - "configunstableReadGcpMetricsIntegrationResponse": { - "properties": { - "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGcpMetricsIntegration" - } - }, - "type": "object" - }, "configunstableReadLinkTemplateResponse": { "properties": { "link_template": { @@ -1461,10 +1356,10 @@ }, "type": "object" }, - "configunstableReadOpenTelemetryMetricsIngestionResponse": { + "configunstableReadOtelMetricsIngestionResponse": { "properties": { - "open_telemetry_metrics_ingestion": { - "$ref": "#/definitions/configunstableOpenTelemetryMetricsIngestion" + "otel_metrics_ingestion": { + "$ref": "#/definitions/configunstableOtelMetricsIngestion" } }, "type": "object" @@ -1811,14 +1706,6 @@ }, "type": "object" }, - "configunstableUpdateGcpMetricsIntegrationResponse": { - "properties": { - "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGcpMetricsIntegration" - } - }, - "type": "object" - }, "configunstableUpdateLinkTemplateResponse": { "properties": { "link_template": { @@ -1859,26 +1746,26 @@ }, "type": "object" }, - "configunstableUpdateOpenTelemetryMetricsIngestionRequest": { + "configunstableUpdateOtelMetricsIngestionRequest": { "properties": { - "open_telemetry_metrics_ingestion": { - "$ref": "#/definitions/configunstableOpenTelemetryMetricsIngestion" + "otel_metrics_ingestion": { + "$ref": "#/definitions/configunstableOtelMetricsIngestion" }, "create_if_missing": { - "description": "If true, the OpenTelemetryMetricsIngestion will be created if it does not already exist. If false, an error will be returned if the OpenTelemetryMetricsIngestion does not already exist.", + "description": "If true, the OtelMetricsIngestion will be created if it does not already exist. If false, an error will be returned if the OtelMetricsIngestion does not already exist.", "type": "boolean" }, "dry_run": { - "description": "If true, the OpenTelemetryMetricsIngestion will not be created nor updated, and no response OpenTelemetryMetricsIngestion will be returned. The response will return an error if the given OpenTelemetryMetricsIngestion is invalid.", + "description": "If true, the OtelMetricsIngestion will not be created nor updated, and no response OtelMetricsIngestion will be returned. The response will return an error if the given OtelMetricsIngestion is invalid.", "type": "boolean" } }, "type": "object" }, - "configunstableUpdateOpenTelemetryMetricsIngestionResponse": { + "configunstableUpdateOtelMetricsIngestionResponse": { "properties": { - "open_telemetry_metrics_ingestion": { - "$ref": "#/definitions/configunstableOpenTelemetryMetricsIngestion" + "otel_metrics_ingestion": { + "$ref": "#/definitions/configunstableOtelMetricsIngestion" } }, "type": "object" @@ -2587,278 +2474,6 @@ ] } }, - "/api/unstable/config/gcp-metrics-integrations": { - "get": { - "operationId": "ListGcpMetricsIntegrations", - "parameters": [ - { - "description": "Page size preference (i.e. how many items are returned in the next\npage). If zero, the server will use a default. Regardless of what size\nis given, clients must never assume how many items will be returned.", - "format": "int64", - "in": "query", - "name": "page.max_size", - "type": "integer" - }, - { - "description": "Opaque page token identifying which page to request. An empty token\nidentifies the first page.", - "in": "query", - "name": "page.token", - "type": "string" - }, - { - "collectionFormat": "multi", - "description": "Filters results by slug, where any GcpMetricsIntegration with a matching slug in the given list (and matches all other filters) is returned.", - "in": "query", - "items": { - "type": "string" - }, - "name": "slugs", - "type": "array" - }, - { - "collectionFormat": "multi", - "description": "Filters results by name, where any GcpMetricsIntegration with a matching name in the given list (and matches all other filters) is returned.", - "in": "query", - "items": { - "type": "string" - }, - "name": "names", - "type": "array" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/configunstableListGcpMetricsIntegrationsResponse" - } - }, - "500": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "default": { - "description": "An undefined error response.", - "schema": { - "$ref": "#/definitions/genericError" - } - } - }, - "tags": [ - "GcpMetricsIntegration" - ] - }, - "post": { - "operationId": "CreateGcpMetricsIntegration", - "parameters": [ - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "$ref": "#/definitions/configunstableCreateGcpMetricsIntegrationRequest" - } - } - ], - "responses": { - "200": { - "description": "A successful response containing the created GcpMetricsIntegration.", - "schema": { - "$ref": "#/definitions/configunstableCreateGcpMetricsIntegrationResponse" - } - }, - "400": { - "description": "Cannot create the GcpMetricsIntegration because the request is invalid.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "409": { - "description": "Cannot create the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "500": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "default": { - "description": "An undefined error response.", - "schema": { - "$ref": "#/definitions/genericError" - } - } - }, - "tags": [ - "GcpMetricsIntegration" - ] - } - }, - "/api/unstable/config/gcp-metrics-integrations/{slug}": { - "delete": { - "operationId": "DeleteGcpMetricsIntegration", - "parameters": [ - { - "in": "path", - "name": "slug", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/configunstableDeleteGcpMetricsIntegrationResponse" - } - }, - "400": { - "description": "Cannot delete the GcpMetricsIntegration because it is in use.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "404": { - "description": "Cannot delete the GcpMetricsIntegration because the slug does not exist.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "500": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "default": { - "description": "An undefined error response.", - "schema": { - "$ref": "#/definitions/genericError" - } - } - }, - "tags": [ - "GcpMetricsIntegration" - ] - }, - "get": { - "operationId": "ReadGcpMetricsIntegration", - "parameters": [ - { - "in": "path", - "name": "slug", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/configunstableReadGcpMetricsIntegrationResponse" - } - }, - "404": { - "description": "Cannot read the GcpMetricsIntegration because the slug does not exist.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "500": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "default": { - "description": "An undefined error response.", - "schema": { - "$ref": "#/definitions/genericError" - } - } - }, - "tags": [ - "GcpMetricsIntegration" - ] - }, - "put": { - "operationId": "UpdateGcpMetricsIntegration", - "parameters": [ - { - "in": "path", - "name": "slug", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "body", - "required": true, - "schema": { - "properties": { - "create_if_missing": { - "description": "If true, the GcpMetricsIntegration will be created if it does not already exist, identified by slug. If false, an error will be returned if the GcpMetricsIntegration does not already exist.", - "type": "boolean" - }, - "dry_run": { - "description": "If true, the GcpMetricsIntegration will not be created nor updated, and no response GcpMetricsIntegration will be returned. The response will return an error if the given GcpMetricsIntegration is invalid.", - "type": "boolean" - }, - "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGcpMetricsIntegration" - } - }, - "type": "object" - } - } - ], - "responses": { - "200": { - "description": "A successful response containing the updated GcpMetricsIntegration.", - "schema": { - "$ref": "#/definitions/configunstableUpdateGcpMetricsIntegrationResponse" - } - }, - "400": { - "description": "Cannot update the GcpMetricsIntegration because the request is invalid.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "404": { - "description": "Cannot update the GcpMetricsIntegration because the slug does not exist.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "409": { - "description": "Cannot update the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "500": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/apiError" - } - }, - "default": { - "description": "An undefined error response.", - "schema": { - "$ref": "#/definitions/genericError" - } - } - }, - "tags": [ - "GcpMetricsIntegration" - ] - } - }, "/api/unstable/config/link-templates": { "get": { "operationId": "ListLinkTemplates", @@ -3523,24 +3138,24 @@ ] } }, - "/api/unstable/config/open-telemetry-metrics-ingestion": { + "/api/unstable/config/otel-metrics-ingestion": { "delete": { - "operationId": "DeleteOpenTelemetryMetricsIngestion", + "operationId": "DeleteOtelMetricsIngestion", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/configunstableDeleteOpenTelemetryMetricsIngestionResponse" + "$ref": "#/definitions/configunstableDeleteOtelMetricsIngestionResponse" } }, "400": { - "description": "Cannot delete the OpenTelemetryMetricsIngestion because it is in use.", + "description": "Cannot delete the OtelMetricsIngestion because it is in use.", "schema": { "$ref": "#/definitions/apiError" } }, "404": { - "description": "Cannot delete the OpenTelemetryMetricsIngestion because the slug does not exist.", + "description": "Cannot delete the OtelMetricsIngestion because the slug does not exist.", "schema": { "$ref": "#/definitions/apiError" } @@ -3559,20 +3174,20 @@ } }, "tags": [ - "OpenTelemetryMetricsIngestion" + "OtelMetricsIngestion" ] }, "get": { - "operationId": "ReadOpenTelemetryMetricsIngestion", + "operationId": "ReadOtelMetricsIngestion", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/configunstableReadOpenTelemetryMetricsIngestionResponse" + "$ref": "#/definitions/configunstableReadOtelMetricsIngestionResponse" } }, "404": { - "description": "Cannot read the OpenTelemetryMetricsIngestion because OpenTelemetryMetricsIngestion has not been created.", + "description": "Cannot read the OtelMetricsIngestion because OtelMetricsIngestion has not been created.", "schema": { "$ref": "#/definitions/apiError" } @@ -3591,36 +3206,36 @@ } }, "tags": [ - "OpenTelemetryMetricsIngestion" + "OtelMetricsIngestion" ] }, "post": { - "operationId": "CreateOpenTelemetryMetricsIngestion", + "operationId": "CreateOtelMetricsIngestion", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/configunstableCreateOpenTelemetryMetricsIngestionRequest" + "$ref": "#/definitions/configunstableCreateOtelMetricsIngestionRequest" } } ], "responses": { "200": { - "description": "A successful response containing the created OpenTelemetryMetricsIngestion.", + "description": "A successful response containing the created OtelMetricsIngestion.", "schema": { - "$ref": "#/definitions/configunstableCreateOpenTelemetryMetricsIngestionResponse" + "$ref": "#/definitions/configunstableCreateOtelMetricsIngestionResponse" } }, "400": { - "description": "Cannot create the OpenTelemetryMetricsIngestion because the request is invalid.", + "description": "Cannot create the OtelMetricsIngestion because the request is invalid.", "schema": { "$ref": "#/definitions/apiError" } }, "409": { - "description": "Cannot create the OpenTelemetryMetricsIngestion because there is a conflict with an existing OpenTelemetryMetricsIngestion.", + "description": "Cannot create the OtelMetricsIngestion because there is a conflict with an existing OtelMetricsIngestion.", "schema": { "$ref": "#/definitions/apiError" } @@ -3639,36 +3254,36 @@ } }, "tags": [ - "OpenTelemetryMetricsIngestion" + "OtelMetricsIngestion" ] }, "put": { - "operationId": "UpdateOpenTelemetryMetricsIngestion", + "operationId": "UpdateOtelMetricsIngestion", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/configunstableUpdateOpenTelemetryMetricsIngestionRequest" + "$ref": "#/definitions/configunstableUpdateOtelMetricsIngestionRequest" } } ], "responses": { "200": { - "description": "A successful response containing the updated OpenTelemetryMetricsIngestion.", + "description": "A successful response containing the updated OtelMetricsIngestion.", "schema": { - "$ref": "#/definitions/configunstableUpdateOpenTelemetryMetricsIngestionResponse" + "$ref": "#/definitions/configunstableUpdateOtelMetricsIngestionResponse" } }, "400": { - "description": "Cannot update the OpenTelemetryMetricsIngestion because the request is invalid.", + "description": "Cannot update the OtelMetricsIngestion because the request is invalid.", "schema": { "$ref": "#/definitions/apiError" } }, "404": { - "description": "Cannot update the OpenTelemetryMetricsIngestion because OpenTelemetryMetricsIngestion has not been created.", + "description": "Cannot update the OtelMetricsIngestion because OtelMetricsIngestion has not been created.", "schema": { "$ref": "#/definitions/apiError" } @@ -3687,7 +3302,7 @@ } }, "tags": [ - "OpenTelemetryMetricsIngestion" + "OtelMetricsIngestion" ] } }, diff --git a/src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_parameters.go b/src/generated/swagger/configv1/client/operations/create_gcp_metrics_integration_parameters.go similarity index 95% rename from src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_parameters.go rename to src/generated/swagger/configv1/client/operations/create_gcp_metrics_integration_parameters.go index 2de9728..810556f 100644 --- a/src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_parameters.go +++ b/src/generated/swagger/configv1/client/operations/create_gcp_metrics_integration_parameters.go @@ -15,7 +15,7 @@ import ( cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configv1/models" ) // NewCreateGcpMetricsIntegrationParams creates a new CreateGcpMetricsIntegrationParams object, @@ -64,7 +64,7 @@ CreateGcpMetricsIntegrationParams contains all the parameters to send to the API type CreateGcpMetricsIntegrationParams struct { // Body. - Body *models.ConfigunstableCreateGcpMetricsIntegrationRequest + Body *models.Configv1CreateGcpMetricsIntegrationRequest timeout time.Duration Context context.Context @@ -120,13 +120,13 @@ func (o *CreateGcpMetricsIntegrationParams) SetHTTPClient(client *http.Client) { } // WithBody adds the body to the create gcp metrics integration params -func (o *CreateGcpMetricsIntegrationParams) WithBody(body *models.ConfigunstableCreateGcpMetricsIntegrationRequest) *CreateGcpMetricsIntegrationParams { +func (o *CreateGcpMetricsIntegrationParams) WithBody(body *models.Configv1CreateGcpMetricsIntegrationRequest) *CreateGcpMetricsIntegrationParams { o.SetBody(body) return o } // SetBody adds the body to the create gcp metrics integration params -func (o *CreateGcpMetricsIntegrationParams) SetBody(body *models.ConfigunstableCreateGcpMetricsIntegrationRequest) { +func (o *CreateGcpMetricsIntegrationParams) SetBody(body *models.Configv1CreateGcpMetricsIntegrationRequest) { o.Body = body } diff --git a/src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_responses.go b/src/generated/swagger/configv1/client/operations/create_gcp_metrics_integration_responses.go similarity index 88% rename from src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_responses.go rename to src/generated/swagger/configv1/client/operations/create_gcp_metrics_integration_responses.go index a12b576..dcf51a9 100644 --- a/src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_responses.go +++ b/src/generated/swagger/configv1/client/operations/create_gcp_metrics_integration_responses.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configv1/models" ) // CreateGcpMetricsIntegrationReader is a Reader for the CreateGcpMetricsIntegration structure. @@ -70,7 +70,7 @@ CreateGcpMetricsIntegrationOK describes a response with status code 200, with de A successful response containing the created GcpMetricsIntegration. */ type CreateGcpMetricsIntegrationOK struct { - Payload *models.ConfigunstableCreateGcpMetricsIntegrationResponse + Payload *models.Configv1CreateGcpMetricsIntegrationResponse } // IsSuccess returns true when this create gcp metrics integration o k response has a 2xx status code @@ -104,20 +104,20 @@ func (o *CreateGcpMetricsIntegrationOK) Code() int { } func (o *CreateGcpMetricsIntegrationOK) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationOK %+v", 200, o.Payload) } func (o *CreateGcpMetricsIntegrationOK) String() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationOK %+v", 200, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationOK %+v", 200, o.Payload) } -func (o *CreateGcpMetricsIntegrationOK) GetPayload() *models.ConfigunstableCreateGcpMetricsIntegrationResponse { +func (o *CreateGcpMetricsIntegrationOK) GetPayload() *models.Configv1CreateGcpMetricsIntegrationResponse { return o.Payload } func (o *CreateGcpMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.ConfigunstableCreateGcpMetricsIntegrationResponse) + o.Payload = new(models.Configv1CreateGcpMetricsIntegrationResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -172,11 +172,11 @@ func (o *CreateGcpMetricsIntegrationBadRequest) Code() int { } func (o *CreateGcpMetricsIntegrationBadRequest) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) } func (o *CreateGcpMetricsIntegrationBadRequest) String() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) } func (o *CreateGcpMetricsIntegrationBadRequest) GetPayload() *models.APIError { @@ -240,11 +240,11 @@ func (o *CreateGcpMetricsIntegrationConflict) Code() int { } func (o *CreateGcpMetricsIntegrationConflict) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationConflict %+v", 409, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationConflict %+v", 409, o.Payload) } func (o *CreateGcpMetricsIntegrationConflict) String() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationConflict %+v", 409, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationConflict %+v", 409, o.Payload) } func (o *CreateGcpMetricsIntegrationConflict) GetPayload() *models.APIError { @@ -308,11 +308,11 @@ func (o *CreateGcpMetricsIntegrationInternalServerError) Code() int { } func (o *CreateGcpMetricsIntegrationInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) } func (o *CreateGcpMetricsIntegrationInternalServerError) String() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] createGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) } func (o *CreateGcpMetricsIntegrationInternalServerError) GetPayload() *models.APIError { @@ -380,11 +380,11 @@ func (o *CreateGcpMetricsIntegrationDefault) Code() int { } func (o *CreateGcpMetricsIntegrationDefault) Error() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] CreateGcpMetricsIntegration default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] CreateGcpMetricsIntegration default %+v", o._statusCode, o.Payload) } func (o *CreateGcpMetricsIntegrationDefault) String() string { - return fmt.Sprintf("[POST /api/unstable/config/gcp-metrics-integrations][%d] CreateGcpMetricsIntegration default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[POST /api/v1/config/gcp-metrics-integrations][%d] CreateGcpMetricsIntegration default %+v", o._statusCode, o.Payload) } func (o *CreateGcpMetricsIntegrationDefault) GetPayload() models.GenericError { diff --git a/src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_parameters.go b/src/generated/swagger/configv1/client/operations/delete_gcp_metrics_integration_parameters.go similarity index 100% rename from src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_parameters.go rename to src/generated/swagger/configv1/client/operations/delete_gcp_metrics_integration_parameters.go diff --git a/src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_responses.go b/src/generated/swagger/configv1/client/operations/delete_gcp_metrics_integration_responses.go similarity index 88% rename from src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_responses.go rename to src/generated/swagger/configv1/client/operations/delete_gcp_metrics_integration_responses.go index 8bbc511..464b965 100644 --- a/src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_responses.go +++ b/src/generated/swagger/configv1/client/operations/delete_gcp_metrics_integration_responses.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configv1/models" ) // DeleteGcpMetricsIntegrationReader is a Reader for the DeleteGcpMetricsIntegration structure. @@ -70,7 +70,7 @@ DeleteGcpMetricsIntegrationOK describes a response with status code 200, with de A successful response. */ type DeleteGcpMetricsIntegrationOK struct { - Payload models.ConfigunstableDeleteGcpMetricsIntegrationResponse + Payload models.Configv1DeleteGcpMetricsIntegrationResponse } // IsSuccess returns true when this delete gcp metrics integration o k response has a 2xx status code @@ -104,14 +104,14 @@ func (o *DeleteGcpMetricsIntegrationOK) Code() int { } func (o *DeleteGcpMetricsIntegrationOK) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationOK %+v", 200, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationOK %+v", 200, o.Payload) } func (o *DeleteGcpMetricsIntegrationOK) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationOK %+v", 200, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationOK %+v", 200, o.Payload) } -func (o *DeleteGcpMetricsIntegrationOK) GetPayload() models.ConfigunstableDeleteGcpMetricsIntegrationResponse { +func (o *DeleteGcpMetricsIntegrationOK) GetPayload() models.Configv1DeleteGcpMetricsIntegrationResponse { return o.Payload } @@ -170,11 +170,11 @@ func (o *DeleteGcpMetricsIntegrationBadRequest) Code() int { } func (o *DeleteGcpMetricsIntegrationBadRequest) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) } func (o *DeleteGcpMetricsIntegrationBadRequest) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) } func (o *DeleteGcpMetricsIntegrationBadRequest) GetPayload() *models.APIError { @@ -238,11 +238,11 @@ func (o *DeleteGcpMetricsIntegrationNotFound) Code() int { } func (o *DeleteGcpMetricsIntegrationNotFound) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationNotFound %+v", 404, o.Payload) } func (o *DeleteGcpMetricsIntegrationNotFound) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationNotFound %+v", 404, o.Payload) } func (o *DeleteGcpMetricsIntegrationNotFound) GetPayload() *models.APIError { @@ -306,11 +306,11 @@ func (o *DeleteGcpMetricsIntegrationInternalServerError) Code() int { } func (o *DeleteGcpMetricsIntegrationInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) } func (o *DeleteGcpMetricsIntegrationInternalServerError) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] deleteGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) } func (o *DeleteGcpMetricsIntegrationInternalServerError) GetPayload() *models.APIError { @@ -378,11 +378,11 @@ func (o *DeleteGcpMetricsIntegrationDefault) Code() int { } func (o *DeleteGcpMetricsIntegrationDefault) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] DeleteGcpMetricsIntegration default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] DeleteGcpMetricsIntegration default %+v", o._statusCode, o.Payload) } func (o *DeleteGcpMetricsIntegrationDefault) String() string { - return fmt.Sprintf("[DELETE /api/unstable/config/gcp-metrics-integrations/{slug}][%d] DeleteGcpMetricsIntegration default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[DELETE /api/v1/config/gcp-metrics-integrations/{slug}][%d] DeleteGcpMetricsIntegration default %+v", o._statusCode, o.Payload) } func (o *DeleteGcpMetricsIntegrationDefault) GetPayload() models.GenericError { diff --git a/src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_parameters.go b/src/generated/swagger/configv1/client/operations/list_gcp_metrics_integrations_parameters.go similarity index 100% rename from src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_parameters.go rename to src/generated/swagger/configv1/client/operations/list_gcp_metrics_integrations_parameters.go diff --git a/src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_responses.go b/src/generated/swagger/configv1/client/operations/list_gcp_metrics_integrations_responses.go similarity index 88% rename from src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_responses.go rename to src/generated/swagger/configv1/client/operations/list_gcp_metrics_integrations_responses.go index e50ef5f..31e0e70 100644 --- a/src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_responses.go +++ b/src/generated/swagger/configv1/client/operations/list_gcp_metrics_integrations_responses.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configv1/models" ) // ListGcpMetricsIntegrationsReader is a Reader for the ListGcpMetricsIntegrations structure. @@ -58,7 +58,7 @@ ListGcpMetricsIntegrationsOK describes a response with status code 200, with def A successful response. */ type ListGcpMetricsIntegrationsOK struct { - Payload *models.ConfigunstableListGcpMetricsIntegrationsResponse + Payload *models.Configv1ListGcpMetricsIntegrationsResponse } // IsSuccess returns true when this list gcp metrics integrations o k response has a 2xx status code @@ -92,20 +92,20 @@ func (o *ListGcpMetricsIntegrationsOK) Code() int { } func (o *ListGcpMetricsIntegrationsOK) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations][%d] listGcpMetricsIntegrationsOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations][%d] listGcpMetricsIntegrationsOK %+v", 200, o.Payload) } func (o *ListGcpMetricsIntegrationsOK) String() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations][%d] listGcpMetricsIntegrationsOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations][%d] listGcpMetricsIntegrationsOK %+v", 200, o.Payload) } -func (o *ListGcpMetricsIntegrationsOK) GetPayload() *models.ConfigunstableListGcpMetricsIntegrationsResponse { +func (o *ListGcpMetricsIntegrationsOK) GetPayload() *models.Configv1ListGcpMetricsIntegrationsResponse { return o.Payload } func (o *ListGcpMetricsIntegrationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.ConfigunstableListGcpMetricsIntegrationsResponse) + o.Payload = new(models.Configv1ListGcpMetricsIntegrationsResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -160,11 +160,11 @@ func (o *ListGcpMetricsIntegrationsInternalServerError) Code() int { } func (o *ListGcpMetricsIntegrationsInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations][%d] listGcpMetricsIntegrationsInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations][%d] listGcpMetricsIntegrationsInternalServerError %+v", 500, o.Payload) } func (o *ListGcpMetricsIntegrationsInternalServerError) String() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations][%d] listGcpMetricsIntegrationsInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations][%d] listGcpMetricsIntegrationsInternalServerError %+v", 500, o.Payload) } func (o *ListGcpMetricsIntegrationsInternalServerError) GetPayload() *models.APIError { @@ -232,11 +232,11 @@ func (o *ListGcpMetricsIntegrationsDefault) Code() int { } func (o *ListGcpMetricsIntegrationsDefault) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations][%d] ListGcpMetricsIntegrations default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations][%d] ListGcpMetricsIntegrations default %+v", o._statusCode, o.Payload) } func (o *ListGcpMetricsIntegrationsDefault) String() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations][%d] ListGcpMetricsIntegrations default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations][%d] ListGcpMetricsIntegrations default %+v", o._statusCode, o.Payload) } func (o *ListGcpMetricsIntegrationsDefault) GetPayload() models.GenericError { diff --git a/src/generated/swagger/configv1/client/operations/operations_client.go b/src/generated/swagger/configv1/client/operations/operations_client.go index 1938c46..29f4c5d 100644 --- a/src/generated/swagger/configv1/client/operations/operations_client.go +++ b/src/generated/swagger/configv1/client/operations/operations_client.go @@ -44,6 +44,8 @@ type ClientService interface { CreateDropRule(params *CreateDropRuleParams, opts ...ClientOption) (*CreateDropRuleOK, error) + CreateGcpMetricsIntegration(params *CreateGcpMetricsIntegrationParams, opts ...ClientOption) (*CreateGcpMetricsIntegrationOK, error) + CreateGrafanaDashboard(params *CreateGrafanaDashboardParams, opts ...ClientOption) (*CreateGrafanaDashboardOK, error) CreateMappingRule(params *CreateMappingRuleParams, opts ...ClientOption) (*CreateMappingRuleOK, error) @@ -88,6 +90,8 @@ type ClientService interface { DeleteDropRule(params *DeleteDropRuleParams, opts ...ClientOption) (*DeleteDropRuleOK, error) + DeleteGcpMetricsIntegration(params *DeleteGcpMetricsIntegrationParams, opts ...ClientOption) (*DeleteGcpMetricsIntegrationOK, error) + DeleteGrafanaDashboard(params *DeleteGrafanaDashboardParams, opts ...ClientOption) (*DeleteGrafanaDashboardOK, error) DeleteMappingRule(params *DeleteMappingRuleParams, opts ...ClientOption) (*DeleteMappingRuleOK, error) @@ -132,6 +136,8 @@ type ClientService interface { ListDropRules(params *ListDropRulesParams, opts ...ClientOption) (*ListDropRulesOK, error) + ListGcpMetricsIntegrations(params *ListGcpMetricsIntegrationsParams, opts ...ClientOption) (*ListGcpMetricsIntegrationsOK, error) + ListGrafanaDashboards(params *ListGrafanaDashboardsParams, opts ...ClientOption) (*ListGrafanaDashboardsOK, error) ListMappingRules(params *ListMappingRulesParams, opts ...ClientOption) (*ListMappingRulesOK, error) @@ -172,6 +178,8 @@ type ClientService interface { ReadDropRule(params *ReadDropRuleParams, opts ...ClientOption) (*ReadDropRuleOK, error) + ReadGcpMetricsIntegration(params *ReadGcpMetricsIntegrationParams, opts ...ClientOption) (*ReadGcpMetricsIntegrationOK, error) + ReadGrafanaDashboard(params *ReadGrafanaDashboardParams, opts ...ClientOption) (*ReadGrafanaDashboardOK, error) ReadMappingRule(params *ReadMappingRuleParams, opts ...ClientOption) (*ReadMappingRuleOK, error) @@ -218,6 +226,8 @@ type ClientService interface { UpdateDropRule(params *UpdateDropRuleParams, opts ...ClientOption) (*UpdateDropRuleOK, error) + UpdateGcpMetricsIntegration(params *UpdateGcpMetricsIntegrationParams, opts ...ClientOption) (*UpdateGcpMetricsIntegrationOK, error) + UpdateGrafanaDashboard(params *UpdateGrafanaDashboardParams, opts ...ClientOption) (*UpdateGrafanaDashboardOK, error) UpdateMappingRule(params *UpdateMappingRuleParams, opts ...ClientOption) (*UpdateMappingRuleOK, error) @@ -543,6 +553,43 @@ func (a *Client) CreateDropRule(params *CreateDropRuleParams, opts ...ClientOpti return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +CreateGcpMetricsIntegration create gcp metrics integration API +*/ +func (a *Client) CreateGcpMetricsIntegration(params *CreateGcpMetricsIntegrationParams, opts ...ClientOption) (*CreateGcpMetricsIntegrationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewCreateGcpMetricsIntegrationParams() + } + op := &runtime.ClientOperation{ + ID: "CreateGcpMetricsIntegration", + Method: "POST", + PathPattern: "/api/v1/config/gcp-metrics-integrations", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &CreateGcpMetricsIntegrationReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*CreateGcpMetricsIntegrationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*CreateGcpMetricsIntegrationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* CreateGrafanaDashboard create grafana dashboard API */ @@ -1360,6 +1407,43 @@ func (a *Client) DeleteDropRule(params *DeleteDropRuleParams, opts ...ClientOpti return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +DeleteGcpMetricsIntegration delete gcp metrics integration API +*/ +func (a *Client) DeleteGcpMetricsIntegration(params *DeleteGcpMetricsIntegrationParams, opts ...ClientOption) (*DeleteGcpMetricsIntegrationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewDeleteGcpMetricsIntegrationParams() + } + op := &runtime.ClientOperation{ + ID: "DeleteGcpMetricsIntegration", + Method: "DELETE", + PathPattern: "/api/v1/config/gcp-metrics-integrations/{slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &DeleteGcpMetricsIntegrationReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*DeleteGcpMetricsIntegrationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*DeleteGcpMetricsIntegrationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* DeleteGrafanaDashboard delete grafana dashboard API */ @@ -2174,6 +2258,43 @@ func (a *Client) ListDropRules(params *ListDropRulesParams, opts ...ClientOption return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ListGcpMetricsIntegrations list gcp metrics integrations API +*/ +func (a *Client) ListGcpMetricsIntegrations(params *ListGcpMetricsIntegrationsParams, opts ...ClientOption) (*ListGcpMetricsIntegrationsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewListGcpMetricsIntegrationsParams() + } + op := &runtime.ClientOperation{ + ID: "ListGcpMetricsIntegrations", + Method: "GET", + PathPattern: "/api/v1/config/gcp-metrics-integrations", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ListGcpMetricsIntegrationsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ListGcpMetricsIntegrationsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ListGcpMetricsIntegrationsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ListGrafanaDashboards list grafana dashboards API */ @@ -2914,6 +3035,43 @@ func (a *Client) ReadDropRule(params *ReadDropRuleParams, opts ...ClientOption) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +ReadGcpMetricsIntegration read gcp metrics integration API +*/ +func (a *Client) ReadGcpMetricsIntegration(params *ReadGcpMetricsIntegrationParams, opts ...ClientOption) (*ReadGcpMetricsIntegrationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewReadGcpMetricsIntegrationParams() + } + op := &runtime.ClientOperation{ + ID: "ReadGcpMetricsIntegration", + Method: "GET", + PathPattern: "/api/v1/config/gcp-metrics-integrations/{slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &ReadGcpMetricsIntegrationReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*ReadGcpMetricsIntegrationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*ReadGcpMetricsIntegrationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* ReadGrafanaDashboard read grafana dashboard API */ @@ -3765,6 +3923,43 @@ func (a *Client) UpdateDropRule(params *UpdateDropRuleParams, opts ...ClientOpti return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +UpdateGcpMetricsIntegration update gcp metrics integration API +*/ +func (a *Client) UpdateGcpMetricsIntegration(params *UpdateGcpMetricsIntegrationParams, opts ...ClientOption) (*UpdateGcpMetricsIntegrationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewUpdateGcpMetricsIntegrationParams() + } + op := &runtime.ClientOperation{ + ID: "UpdateGcpMetricsIntegration", + Method: "PUT", + PathPattern: "/api/v1/config/gcp-metrics-integrations/{slug}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http"}, + Params: params, + Reader: &UpdateGcpMetricsIntegrationReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*UpdateGcpMetricsIntegrationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*UpdateGcpMetricsIntegrationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* UpdateGrafanaDashboard update grafana dashboard API */ diff --git a/src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_parameters.go b/src/generated/swagger/configv1/client/operations/read_gcp_metrics_integration_parameters.go similarity index 100% rename from src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_parameters.go rename to src/generated/swagger/configv1/client/operations/read_gcp_metrics_integration_parameters.go diff --git a/src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_responses.go b/src/generated/swagger/configv1/client/operations/read_gcp_metrics_integration_responses.go similarity index 88% rename from src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_responses.go rename to src/generated/swagger/configv1/client/operations/read_gcp_metrics_integration_responses.go index 113bad4..9fce216 100644 --- a/src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_responses.go +++ b/src/generated/swagger/configv1/client/operations/read_gcp_metrics_integration_responses.go @@ -12,7 +12,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configv1/models" ) // ReadGcpMetricsIntegrationReader is a Reader for the ReadGcpMetricsIntegration structure. @@ -64,7 +64,7 @@ ReadGcpMetricsIntegrationOK describes a response with status code 200, with defa A successful response. */ type ReadGcpMetricsIntegrationOK struct { - Payload *models.ConfigunstableReadGcpMetricsIntegrationResponse + Payload *models.Configv1ReadGcpMetricsIntegrationResponse } // IsSuccess returns true when this read gcp metrics integration o k response has a 2xx status code @@ -98,20 +98,20 @@ func (o *ReadGcpMetricsIntegrationOK) Code() int { } func (o *ReadGcpMetricsIntegrationOK) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationOK %+v", 200, o.Payload) } func (o *ReadGcpMetricsIntegrationOK) String() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationOK %+v", 200, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationOK %+v", 200, o.Payload) } -func (o *ReadGcpMetricsIntegrationOK) GetPayload() *models.ConfigunstableReadGcpMetricsIntegrationResponse { +func (o *ReadGcpMetricsIntegrationOK) GetPayload() *models.Configv1ReadGcpMetricsIntegrationResponse { return o.Payload } func (o *ReadGcpMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.ConfigunstableReadGcpMetricsIntegrationResponse) + o.Payload = new(models.Configv1ReadGcpMetricsIntegrationResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -166,11 +166,11 @@ func (o *ReadGcpMetricsIntegrationNotFound) Code() int { } func (o *ReadGcpMetricsIntegrationNotFound) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationNotFound %+v", 404, o.Payload) } func (o *ReadGcpMetricsIntegrationNotFound) String() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationNotFound %+v", 404, o.Payload) } func (o *ReadGcpMetricsIntegrationNotFound) GetPayload() *models.APIError { @@ -234,11 +234,11 @@ func (o *ReadGcpMetricsIntegrationInternalServerError) Code() int { } func (o *ReadGcpMetricsIntegrationInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) } func (o *ReadGcpMetricsIntegrationInternalServerError) String() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations/{slug}][%d] readGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) } func (o *ReadGcpMetricsIntegrationInternalServerError) GetPayload() *models.APIError { @@ -306,11 +306,11 @@ func (o *ReadGcpMetricsIntegrationDefault) Code() int { } func (o *ReadGcpMetricsIntegrationDefault) Error() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations/{slug}][%d] ReadGcpMetricsIntegration default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations/{slug}][%d] ReadGcpMetricsIntegration default %+v", o._statusCode, o.Payload) } func (o *ReadGcpMetricsIntegrationDefault) String() string { - return fmt.Sprintf("[GET /api/unstable/config/gcp-metrics-integrations/{slug}][%d] ReadGcpMetricsIntegration default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[GET /api/v1/config/gcp-metrics-integrations/{slug}][%d] ReadGcpMetricsIntegration default %+v", o._statusCode, o.Payload) } func (o *ReadGcpMetricsIntegrationDefault) GetPayload() models.GenericError { diff --git a/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_parameters.go b/src/generated/swagger/configv1/client/operations/update_gcp_metrics_integration_parameters.go similarity index 100% rename from src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_parameters.go rename to src/generated/swagger/configv1/client/operations/update_gcp_metrics_integration_parameters.go diff --git a/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_responses.go b/src/generated/swagger/configv1/client/operations/update_gcp_metrics_integration_responses.go similarity index 90% rename from src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_responses.go rename to src/generated/swagger/configv1/client/operations/update_gcp_metrics_integration_responses.go index b777e6c..7a2e475 100644 --- a/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_responses.go +++ b/src/generated/swagger/configv1/client/operations/update_gcp_metrics_integration_responses.go @@ -15,7 +15,7 @@ import ( "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configv1/models" ) // UpdateGcpMetricsIntegrationReader is a Reader for the UpdateGcpMetricsIntegration structure. @@ -79,7 +79,7 @@ UpdateGcpMetricsIntegrationOK describes a response with status code 200, with de A successful response containing the updated GcpMetricsIntegration. */ type UpdateGcpMetricsIntegrationOK struct { - Payload *models.ConfigunstableUpdateGcpMetricsIntegrationResponse + Payload *models.Configv1UpdateGcpMetricsIntegrationResponse } // IsSuccess returns true when this update gcp metrics integration o k response has a 2xx status code @@ -113,20 +113,20 @@ func (o *UpdateGcpMetricsIntegrationOK) Code() int { } func (o *UpdateGcpMetricsIntegrationOK) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationOK %+v", 200, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationOK %+v", 200, o.Payload) } func (o *UpdateGcpMetricsIntegrationOK) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationOK %+v", 200, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationOK %+v", 200, o.Payload) } -func (o *UpdateGcpMetricsIntegrationOK) GetPayload() *models.ConfigunstableUpdateGcpMetricsIntegrationResponse { +func (o *UpdateGcpMetricsIntegrationOK) GetPayload() *models.Configv1UpdateGcpMetricsIntegrationResponse { return o.Payload } func (o *UpdateGcpMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.ConfigunstableUpdateGcpMetricsIntegrationResponse) + o.Payload = new(models.Configv1UpdateGcpMetricsIntegrationResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { @@ -181,11 +181,11 @@ func (o *UpdateGcpMetricsIntegrationBadRequest) Code() int { } func (o *UpdateGcpMetricsIntegrationBadRequest) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) } func (o *UpdateGcpMetricsIntegrationBadRequest) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationBadRequest %+v", 400, o.Payload) } func (o *UpdateGcpMetricsIntegrationBadRequest) GetPayload() *models.APIError { @@ -249,11 +249,11 @@ func (o *UpdateGcpMetricsIntegrationNotFound) Code() int { } func (o *UpdateGcpMetricsIntegrationNotFound) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationNotFound %+v", 404, o.Payload) } func (o *UpdateGcpMetricsIntegrationNotFound) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationNotFound %+v", 404, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationNotFound %+v", 404, o.Payload) } func (o *UpdateGcpMetricsIntegrationNotFound) GetPayload() *models.APIError { @@ -317,11 +317,11 @@ func (o *UpdateGcpMetricsIntegrationConflict) Code() int { } func (o *UpdateGcpMetricsIntegrationConflict) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationConflict %+v", 409, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationConflict %+v", 409, o.Payload) } func (o *UpdateGcpMetricsIntegrationConflict) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationConflict %+v", 409, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationConflict %+v", 409, o.Payload) } func (o *UpdateGcpMetricsIntegrationConflict) GetPayload() *models.APIError { @@ -385,11 +385,11 @@ func (o *UpdateGcpMetricsIntegrationInternalServerError) Code() int { } func (o *UpdateGcpMetricsIntegrationInternalServerError) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) } func (o *UpdateGcpMetricsIntegrationInternalServerError) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] updateGcpMetricsIntegrationInternalServerError %+v", 500, o.Payload) } func (o *UpdateGcpMetricsIntegrationInternalServerError) GetPayload() *models.APIError { @@ -457,11 +457,11 @@ func (o *UpdateGcpMetricsIntegrationDefault) Code() int { } func (o *UpdateGcpMetricsIntegrationDefault) Error() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] UpdateGcpMetricsIntegration default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] UpdateGcpMetricsIntegration default %+v", o._statusCode, o.Payload) } func (o *UpdateGcpMetricsIntegrationDefault) String() string { - return fmt.Sprintf("[PUT /api/unstable/config/gcp-metrics-integrations/{slug}][%d] UpdateGcpMetricsIntegration default %+v", o._statusCode, o.Payload) + return fmt.Sprintf("[PUT /api/v1/config/gcp-metrics-integrations/{slug}][%d] UpdateGcpMetricsIntegration default %+v", o._statusCode, o.Payload) } func (o *UpdateGcpMetricsIntegrationDefault) GetPayload() models.GenericError { @@ -491,7 +491,7 @@ type UpdateGcpMetricsIntegrationBody struct { DryRun bool `json:"dry_run,omitempty"` // gcp metrics integration - GcpMetricsIntegration *models.ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *models.Configv1GcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` } // Validate validates this update gcp metrics integration body diff --git a/src/generated/swagger/configv1/mocks/client_mock.go b/src/generated/swagger/configv1/mocks/client_mock.go index 2c69460..e4dffdc 100644 --- a/src/generated/swagger/configv1/mocks/client_mock.go +++ b/src/generated/swagger/configv1/mocks/client_mock.go @@ -195,6 +195,26 @@ func (mr *MockClientServiceMockRecorder) CreateDropRule(params interface{}, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDropRule", reflect.TypeOf((*MockClientService)(nil).CreateDropRule), varargs...) } +// CreateGcpMetricsIntegration mocks base method. +func (m *MockClientService) CreateGcpMetricsIntegration(params *operations.CreateGcpMetricsIntegrationParams, opts ...operations.ClientOption) (*operations.CreateGcpMetricsIntegrationOK, error) { + m.ctrl.T.Helper() + varargs := []interface{}{params} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "CreateGcpMetricsIntegration", varargs...) + ret0, _ := ret[0].(*operations.CreateGcpMetricsIntegrationOK) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CreateGcpMetricsIntegration indicates an expected call of CreateGcpMetricsIntegration. +func (mr *MockClientServiceMockRecorder) CreateGcpMetricsIntegration(params interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{params}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).CreateGcpMetricsIntegration), varargs...) +} + // CreateGrafanaDashboard mocks base method. func (m *MockClientService) CreateGrafanaDashboard(params *operations.CreateGrafanaDashboardParams, opts ...operations.ClientOption) (*operations.CreateGrafanaDashboardOK, error) { m.ctrl.T.Helper() @@ -635,6 +655,26 @@ func (mr *MockClientServiceMockRecorder) DeleteDropRule(params interface{}, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDropRule", reflect.TypeOf((*MockClientService)(nil).DeleteDropRule), varargs...) } +// DeleteGcpMetricsIntegration mocks base method. +func (m *MockClientService) DeleteGcpMetricsIntegration(params *operations.DeleteGcpMetricsIntegrationParams, opts ...operations.ClientOption) (*operations.DeleteGcpMetricsIntegrationOK, error) { + m.ctrl.T.Helper() + varargs := []interface{}{params} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteGcpMetricsIntegration", varargs...) + ret0, _ := ret[0].(*operations.DeleteGcpMetricsIntegrationOK) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteGcpMetricsIntegration indicates an expected call of DeleteGcpMetricsIntegration. +func (mr *MockClientServiceMockRecorder) DeleteGcpMetricsIntegration(params interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{params}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).DeleteGcpMetricsIntegration), varargs...) +} + // DeleteGrafanaDashboard mocks base method. func (m *MockClientService) DeleteGrafanaDashboard(params *operations.DeleteGrafanaDashboardParams, opts ...operations.ClientOption) (*operations.DeleteGrafanaDashboardOK, error) { m.ctrl.T.Helper() @@ -1075,6 +1115,26 @@ func (mr *MockClientServiceMockRecorder) ListDropRules(params interface{}, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDropRules", reflect.TypeOf((*MockClientService)(nil).ListDropRules), varargs...) } +// ListGcpMetricsIntegrations mocks base method. +func (m *MockClientService) ListGcpMetricsIntegrations(params *operations.ListGcpMetricsIntegrationsParams, opts ...operations.ClientOption) (*operations.ListGcpMetricsIntegrationsOK, error) { + m.ctrl.T.Helper() + varargs := []interface{}{params} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ListGcpMetricsIntegrations", varargs...) + ret0, _ := ret[0].(*operations.ListGcpMetricsIntegrationsOK) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListGcpMetricsIntegrations indicates an expected call of ListGcpMetricsIntegrations. +func (mr *MockClientServiceMockRecorder) ListGcpMetricsIntegrations(params interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{params}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGcpMetricsIntegrations", reflect.TypeOf((*MockClientService)(nil).ListGcpMetricsIntegrations), varargs...) +} + // ListGrafanaDashboards mocks base method. func (m *MockClientService) ListGrafanaDashboards(params *operations.ListGrafanaDashboardsParams, opts ...operations.ClientOption) (*operations.ListGrafanaDashboardsOK, error) { m.ctrl.T.Helper() @@ -1475,6 +1535,26 @@ func (mr *MockClientServiceMockRecorder) ReadDropRule(params interface{}, opts . return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadDropRule", reflect.TypeOf((*MockClientService)(nil).ReadDropRule), varargs...) } +// ReadGcpMetricsIntegration mocks base method. +func (m *MockClientService) ReadGcpMetricsIntegration(params *operations.ReadGcpMetricsIntegrationParams, opts ...operations.ClientOption) (*operations.ReadGcpMetricsIntegrationOK, error) { + m.ctrl.T.Helper() + varargs := []interface{}{params} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ReadGcpMetricsIntegration", varargs...) + ret0, _ := ret[0].(*operations.ReadGcpMetricsIntegrationOK) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadGcpMetricsIntegration indicates an expected call of ReadGcpMetricsIntegration. +func (mr *MockClientServiceMockRecorder) ReadGcpMetricsIntegration(params interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{params}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).ReadGcpMetricsIntegration), varargs...) +} + // ReadGrafanaDashboard mocks base method. func (m *MockClientService) ReadGrafanaDashboard(params *operations.ReadGrafanaDashboardParams, opts ...operations.ClientOption) (*operations.ReadGrafanaDashboardOK, error) { m.ctrl.T.Helper() @@ -1947,6 +2027,26 @@ func (mr *MockClientServiceMockRecorder) UpdateDropRule(params interface{}, opts return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDropRule", reflect.TypeOf((*MockClientService)(nil).UpdateDropRule), varargs...) } +// UpdateGcpMetricsIntegration mocks base method. +func (m *MockClientService) UpdateGcpMetricsIntegration(params *operations.UpdateGcpMetricsIntegrationParams, opts ...operations.ClientOption) (*operations.UpdateGcpMetricsIntegrationOK, error) { + m.ctrl.T.Helper() + varargs := []interface{}{params} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "UpdateGcpMetricsIntegration", varargs...) + ret0, _ := ret[0].(*operations.UpdateGcpMetricsIntegrationOK) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// UpdateGcpMetricsIntegration indicates an expected call of UpdateGcpMetricsIntegration. +func (mr *MockClientServiceMockRecorder) UpdateGcpMetricsIntegration(params interface{}, opts ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{params}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).UpdateGcpMetricsIntegration), varargs...) +} + // UpdateGrafanaDashboard mocks base method. func (m *MockClientService) UpdateGrafanaDashboard(params *operations.UpdateGrafanaDashboardParams, opts ...operations.ClientOption) (*operations.UpdateGrafanaDashboardOK, error) { m.ctrl.T.Helper() diff --git a/src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_request.go b/src/generated/swagger/configv1/models/configv1_create_gcp_metrics_integration_request.go similarity index 62% rename from src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_request.go rename to src/generated/swagger/configv1/models/configv1_create_gcp_metrics_integration_request.go index 9fa8f97..4d85705 100644 --- a/src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_request.go +++ b/src/generated/swagger/configv1/models/configv1_create_gcp_metrics_integration_request.go @@ -13,20 +13,20 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableCreateGcpMetricsIntegrationRequest configunstable create gcp metrics integration request +// Configv1CreateGcpMetricsIntegrationRequest configv1 create gcp metrics integration request // -// swagger:model configunstableCreateGcpMetricsIntegrationRequest -type ConfigunstableCreateGcpMetricsIntegrationRequest struct { +// swagger:model configv1CreateGcpMetricsIntegrationRequest +type Configv1CreateGcpMetricsIntegrationRequest struct { // gcp metrics integration - GcpMetricsIntegration *ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *Configv1GcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` // If true, the GcpMetricsIntegration will not be created, and no response GcpMetricsIntegration will be returned. The response will return an error if the given GcpMetricsIntegration is invalid. DryRun bool `json:"dry_run,omitempty"` } -// Validate validates this configunstable create gcp metrics integration request -func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) Validate(formats strfmt.Registry) error { +// Validate validates this configv1 create gcp metrics integration request +func (m *Configv1CreateGcpMetricsIntegrationRequest) Validate(formats strfmt.Registry) error { var res []error if err := m.validateGcpMetricsIntegration(formats); err != nil { @@ -39,7 +39,7 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) Validate(formats strf return nil } -func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) validateGcpMetricsIntegration(formats strfmt.Registry) error { +func (m *Configv1CreateGcpMetricsIntegrationRequest) validateGcpMetricsIntegration(formats strfmt.Registry) error { if swag.IsZero(m.GcpMetricsIntegration) { // not required return nil } @@ -58,8 +58,8 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) validateGcpMetricsInt return nil } -// ContextValidate validate this configunstable create gcp metrics integration request based on the context it is used -func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this configv1 create gcp metrics integration request based on the context it is used +func (m *Configv1CreateGcpMetricsIntegrationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateGcpMetricsIntegration(ctx, formats); err != nil { @@ -72,7 +72,7 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) ContextValidate(ctx c return nil } -func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1CreateGcpMetricsIntegrationRequest) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { if m.GcpMetricsIntegration != nil { @@ -94,7 +94,7 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) contextValidateGcpMet } // MarshalBinary interface implementation -func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) MarshalBinary() ([]byte, error) { +func (m *Configv1CreateGcpMetricsIntegrationRequest) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -102,8 +102,8 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) MarshalBinary() ([]by } // UnmarshalBinary interface implementation -func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) UnmarshalBinary(b []byte) error { - var res ConfigunstableCreateGcpMetricsIntegrationRequest +func (m *Configv1CreateGcpMetricsIntegrationRequest) UnmarshalBinary(b []byte) error { + var res Configv1CreateGcpMetricsIntegrationRequest if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_read_gcp_metrics_integration_response.go b/src/generated/swagger/configv1/models/configv1_create_gcp_metrics_integration_response.go similarity index 59% rename from src/generated/swagger/configunstable/models/configunstable_read_gcp_metrics_integration_response.go rename to src/generated/swagger/configv1/models/configv1_create_gcp_metrics_integration_response.go index 5d60da0..1161a8c 100644 --- a/src/generated/swagger/configunstable/models/configunstable_read_gcp_metrics_integration_response.go +++ b/src/generated/swagger/configv1/models/configv1_create_gcp_metrics_integration_response.go @@ -13,17 +13,17 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableReadGcpMetricsIntegrationResponse configunstable read gcp metrics integration response +// Configv1CreateGcpMetricsIntegrationResponse configv1 create gcp metrics integration response // -// swagger:model configunstableReadGcpMetricsIntegrationResponse -type ConfigunstableReadGcpMetricsIntegrationResponse struct { +// swagger:model configv1CreateGcpMetricsIntegrationResponse +type Configv1CreateGcpMetricsIntegrationResponse struct { // gcp metrics integration - GcpMetricsIntegration *ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *Configv1GcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` } -// Validate validates this configunstable read gcp metrics integration response -func (m *ConfigunstableReadGcpMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { +// Validate validates this configv1 create gcp metrics integration response +func (m *Configv1CreateGcpMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { var res []error if err := m.validateGcpMetricsIntegration(formats); err != nil { @@ -36,7 +36,7 @@ func (m *ConfigunstableReadGcpMetricsIntegrationResponse) Validate(formats strfm return nil } -func (m *ConfigunstableReadGcpMetricsIntegrationResponse) validateGcpMetricsIntegration(formats strfmt.Registry) error { +func (m *Configv1CreateGcpMetricsIntegrationResponse) validateGcpMetricsIntegration(formats strfmt.Registry) error { if swag.IsZero(m.GcpMetricsIntegration) { // not required return nil } @@ -55,8 +55,8 @@ func (m *ConfigunstableReadGcpMetricsIntegrationResponse) validateGcpMetricsInte return nil } -// ContextValidate validate this configunstable read gcp metrics integration response based on the context it is used -func (m *ConfigunstableReadGcpMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this configv1 create gcp metrics integration response based on the context it is used +func (m *Configv1CreateGcpMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateGcpMetricsIntegration(ctx, formats); err != nil { @@ -69,7 +69,7 @@ func (m *ConfigunstableReadGcpMetricsIntegrationResponse) ContextValidate(ctx co return nil } -func (m *ConfigunstableReadGcpMetricsIntegrationResponse) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1CreateGcpMetricsIntegrationResponse) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { if m.GcpMetricsIntegration != nil { @@ -91,7 +91,7 @@ func (m *ConfigunstableReadGcpMetricsIntegrationResponse) contextValidateGcpMetr } // MarshalBinary interface implementation -func (m *ConfigunstableReadGcpMetricsIntegrationResponse) MarshalBinary() ([]byte, error) { +func (m *Configv1CreateGcpMetricsIntegrationResponse) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -99,8 +99,8 @@ func (m *ConfigunstableReadGcpMetricsIntegrationResponse) MarshalBinary() ([]byt } // UnmarshalBinary interface implementation -func (m *ConfigunstableReadGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { - var res ConfigunstableReadGcpMetricsIntegrationResponse +func (m *Configv1CreateGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { + var res Configv1CreateGcpMetricsIntegrationResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configv1/models/configv1_delete_gcp_metrics_integration_response.go b/src/generated/swagger/configv1/models/configv1_delete_gcp_metrics_integration_response.go new file mode 100644 index 0000000..6966415 --- /dev/null +++ b/src/generated/swagger/configv1/models/configv1_delete_gcp_metrics_integration_response.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// Configv1DeleteGcpMetricsIntegrationResponse configv1 delete gcp metrics integration response +// +// swagger:model configv1DeleteGcpMetricsIntegrationResponse +type Configv1DeleteGcpMetricsIntegrationResponse interface{} diff --git a/src/generated/swagger/configunstable/models/configunstable_gcp_metrics_integration.go b/src/generated/swagger/configv1/models/configv1_gcp_metrics_integration.go similarity index 74% rename from src/generated/swagger/configunstable/models/configunstable_gcp_metrics_integration.go rename to src/generated/swagger/configv1/models/configv1_gcp_metrics_integration.go index 7bf9e8e..7aa744e 100644 --- a/src/generated/swagger/configunstable/models/configunstable_gcp_metrics_integration.go +++ b/src/generated/swagger/configv1/models/configv1_gcp_metrics_integration.go @@ -15,10 +15,10 @@ import ( "github.com/go-openapi/validate" ) -// ConfigunstableGcpMetricsIntegration configunstable gcp metrics integration +// Configv1GcpMetricsIntegration configv1 gcp metrics integration // -// swagger:model configunstableGcpMetricsIntegration -type ConfigunstableGcpMetricsIntegration struct { +// swagger:model configv1GcpMetricsIntegration +type Configv1GcpMetricsIntegration struct { // Unique identifier of the GcpMetricsIntegration. If slug is not provided, one will be generated based of the name field. Cannot be modified after the GcpMetricsIntegration is created. Slug string `json:"slug,omitempty"` @@ -37,14 +37,14 @@ type ConfigunstableGcpMetricsIntegration struct { UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` // service account - ServiceAccount *GcpMetricsIntegrationServiceAccount `json:"service_account,omitempty"` + ServiceAccount *Configv1GcpMetricsIntegrationServiceAccount `json:"service_account,omitempty"` // Metric groups to be ingested for this integration. MetricGroups []*GcpMetricsIntegrationMetricGroup `json:"metric_groups"` } -// Validate validates this configunstable gcp metrics integration -func (m *ConfigunstableGcpMetricsIntegration) Validate(formats strfmt.Registry) error { +// Validate validates this configv1 gcp metrics integration +func (m *Configv1GcpMetricsIntegration) Validate(formats strfmt.Registry) error { var res []error if err := m.validateCreatedAt(formats); err != nil { @@ -69,7 +69,7 @@ func (m *ConfigunstableGcpMetricsIntegration) Validate(formats strfmt.Registry) return nil } -func (m *ConfigunstableGcpMetricsIntegration) validateCreatedAt(formats strfmt.Registry) error { +func (m *Configv1GcpMetricsIntegration) validateCreatedAt(formats strfmt.Registry) error { if swag.IsZero(m.CreatedAt) { // not required return nil } @@ -81,7 +81,7 @@ func (m *ConfigunstableGcpMetricsIntegration) validateCreatedAt(formats strfmt.R return nil } -func (m *ConfigunstableGcpMetricsIntegration) validateUpdatedAt(formats strfmt.Registry) error { +func (m *Configv1GcpMetricsIntegration) validateUpdatedAt(formats strfmt.Registry) error { if swag.IsZero(m.UpdatedAt) { // not required return nil } @@ -93,7 +93,7 @@ func (m *ConfigunstableGcpMetricsIntegration) validateUpdatedAt(formats strfmt.R return nil } -func (m *ConfigunstableGcpMetricsIntegration) validateServiceAccount(formats strfmt.Registry) error { +func (m *Configv1GcpMetricsIntegration) validateServiceAccount(formats strfmt.Registry) error { if swag.IsZero(m.ServiceAccount) { // not required return nil } @@ -112,7 +112,7 @@ func (m *ConfigunstableGcpMetricsIntegration) validateServiceAccount(formats str return nil } -func (m *ConfigunstableGcpMetricsIntegration) validateMetricGroups(formats strfmt.Registry) error { +func (m *Configv1GcpMetricsIntegration) validateMetricGroups(formats strfmt.Registry) error { if swag.IsZero(m.MetricGroups) { // not required return nil } @@ -138,8 +138,8 @@ func (m *ConfigunstableGcpMetricsIntegration) validateMetricGroups(formats strfm return nil } -// ContextValidate validate this configunstable gcp metrics integration based on the context it is used -func (m *ConfigunstableGcpMetricsIntegration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this configv1 gcp metrics integration based on the context it is used +func (m *Configv1GcpMetricsIntegration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateCreatedAt(ctx, formats); err != nil { @@ -164,7 +164,7 @@ func (m *ConfigunstableGcpMetricsIntegration) ContextValidate(ctx context.Contex return nil } -func (m *ConfigunstableGcpMetricsIntegration) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1GcpMetricsIntegration) contextValidateCreatedAt(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "created_at", "body", strfmt.DateTime(m.CreatedAt)); err != nil { return err @@ -173,7 +173,7 @@ func (m *ConfigunstableGcpMetricsIntegration) contextValidateCreatedAt(ctx conte return nil } -func (m *ConfigunstableGcpMetricsIntegration) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1GcpMetricsIntegration) contextValidateUpdatedAt(ctx context.Context, formats strfmt.Registry) error { if err := validate.ReadOnly(ctx, "updated_at", "body", strfmt.DateTime(m.UpdatedAt)); err != nil { return err @@ -182,7 +182,7 @@ func (m *ConfigunstableGcpMetricsIntegration) contextValidateUpdatedAt(ctx conte return nil } -func (m *ConfigunstableGcpMetricsIntegration) contextValidateServiceAccount(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1GcpMetricsIntegration) contextValidateServiceAccount(ctx context.Context, formats strfmt.Registry) error { if m.ServiceAccount != nil { @@ -203,7 +203,7 @@ func (m *ConfigunstableGcpMetricsIntegration) contextValidateServiceAccount(ctx return nil } -func (m *ConfigunstableGcpMetricsIntegration) contextValidateMetricGroups(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1GcpMetricsIntegration) contextValidateMetricGroups(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.MetricGroups); i++ { @@ -229,7 +229,7 @@ func (m *ConfigunstableGcpMetricsIntegration) contextValidateMetricGroups(ctx co } // MarshalBinary interface implementation -func (m *ConfigunstableGcpMetricsIntegration) MarshalBinary() ([]byte, error) { +func (m *Configv1GcpMetricsIntegration) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -237,8 +237,8 @@ func (m *ConfigunstableGcpMetricsIntegration) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *ConfigunstableGcpMetricsIntegration) UnmarshalBinary(b []byte) error { - var res ConfigunstableGcpMetricsIntegration +func (m *Configv1GcpMetricsIntegration) UnmarshalBinary(b []byte) error { + var res Configv1GcpMetricsIntegration if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configv1/models/configv1_gcp_metrics_integration_service_account.go b/src/generated/swagger/configv1/models/configv1_gcp_metrics_integration_service_account.go new file mode 100644 index 0000000..1060ae7 --- /dev/null +++ b/src/generated/swagger/configv1/models/configv1_gcp_metrics_integration_service_account.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// Configv1GcpMetricsIntegrationServiceAccount configv1 gcp metrics integration service account +// +// swagger:model configv1GcpMetricsIntegrationServiceAccount +type Configv1GcpMetricsIntegrationServiceAccount struct { + + // Email address of the service account to impersonate. + ClientEmail string `json:"client_email,omitempty"` +} + +// Validate validates this configv1 gcp metrics integration service account +func (m *Configv1GcpMetricsIntegrationServiceAccount) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this configv1 gcp metrics integration service account based on context it is used +func (m *Configv1GcpMetricsIntegrationServiceAccount) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *Configv1GcpMetricsIntegrationServiceAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *Configv1GcpMetricsIntegrationServiceAccount) UnmarshalBinary(b []byte) error { + var res Configv1GcpMetricsIntegrationServiceAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/src/generated/swagger/configunstable/models/configunstable_list_gcp_metrics_integrations_response.go b/src/generated/swagger/configv1/models/configv1_list_gcp_metrics_integrations_response.go similarity index 67% rename from src/generated/swagger/configunstable/models/configunstable_list_gcp_metrics_integrations_response.go rename to src/generated/swagger/configv1/models/configv1_list_gcp_metrics_integrations_response.go index 8388e70..16bdb4f 100644 --- a/src/generated/swagger/configunstable/models/configunstable_list_gcp_metrics_integrations_response.go +++ b/src/generated/swagger/configv1/models/configv1_list_gcp_metrics_integrations_response.go @@ -14,20 +14,20 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableListGcpMetricsIntegrationsResponse configunstable list gcp metrics integrations response +// Configv1ListGcpMetricsIntegrationsResponse configv1 list gcp metrics integrations response // -// swagger:model configunstableListGcpMetricsIntegrationsResponse -type ConfigunstableListGcpMetricsIntegrationsResponse struct { +// swagger:model configv1ListGcpMetricsIntegrationsResponse +type Configv1ListGcpMetricsIntegrationsResponse struct { // page Page *Configv1PageResult `json:"page,omitempty"` // gcp metrics integrations - GcpMetricsIntegrations []*ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integrations"` + GcpMetricsIntegrations []*Configv1GcpMetricsIntegration `json:"gcp_metrics_integrations"` } -// Validate validates this configunstable list gcp metrics integrations response -func (m *ConfigunstableListGcpMetricsIntegrationsResponse) Validate(formats strfmt.Registry) error { +// Validate validates this configv1 list gcp metrics integrations response +func (m *Configv1ListGcpMetricsIntegrationsResponse) Validate(formats strfmt.Registry) error { var res []error if err := m.validatePage(formats); err != nil { @@ -44,7 +44,7 @@ func (m *ConfigunstableListGcpMetricsIntegrationsResponse) Validate(formats strf return nil } -func (m *ConfigunstableListGcpMetricsIntegrationsResponse) validatePage(formats strfmt.Registry) error { +func (m *Configv1ListGcpMetricsIntegrationsResponse) validatePage(formats strfmt.Registry) error { if swag.IsZero(m.Page) { // not required return nil } @@ -63,7 +63,7 @@ func (m *ConfigunstableListGcpMetricsIntegrationsResponse) validatePage(formats return nil } -func (m *ConfigunstableListGcpMetricsIntegrationsResponse) validateGcpMetricsIntegrations(formats strfmt.Registry) error { +func (m *Configv1ListGcpMetricsIntegrationsResponse) validateGcpMetricsIntegrations(formats strfmt.Registry) error { if swag.IsZero(m.GcpMetricsIntegrations) { // not required return nil } @@ -89,8 +89,8 @@ func (m *ConfigunstableListGcpMetricsIntegrationsResponse) validateGcpMetricsInt return nil } -// ContextValidate validate this configunstable list gcp metrics integrations response based on the context it is used -func (m *ConfigunstableListGcpMetricsIntegrationsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this configv1 list gcp metrics integrations response based on the context it is used +func (m *Configv1ListGcpMetricsIntegrationsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidatePage(ctx, formats); err != nil { @@ -107,7 +107,7 @@ func (m *ConfigunstableListGcpMetricsIntegrationsResponse) ContextValidate(ctx c return nil } -func (m *ConfigunstableListGcpMetricsIntegrationsResponse) contextValidatePage(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1ListGcpMetricsIntegrationsResponse) contextValidatePage(ctx context.Context, formats strfmt.Registry) error { if m.Page != nil { @@ -128,7 +128,7 @@ func (m *ConfigunstableListGcpMetricsIntegrationsResponse) contextValidatePage(c return nil } -func (m *ConfigunstableListGcpMetricsIntegrationsResponse) contextValidateGcpMetricsIntegrations(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1ListGcpMetricsIntegrationsResponse) contextValidateGcpMetricsIntegrations(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.GcpMetricsIntegrations); i++ { @@ -154,7 +154,7 @@ func (m *ConfigunstableListGcpMetricsIntegrationsResponse) contextValidateGcpMet } // MarshalBinary interface implementation -func (m *ConfigunstableListGcpMetricsIntegrationsResponse) MarshalBinary() ([]byte, error) { +func (m *Configv1ListGcpMetricsIntegrationsResponse) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -162,8 +162,8 @@ func (m *ConfigunstableListGcpMetricsIntegrationsResponse) MarshalBinary() ([]by } // UnmarshalBinary interface implementation -func (m *ConfigunstableListGcpMetricsIntegrationsResponse) UnmarshalBinary(b []byte) error { - var res ConfigunstableListGcpMetricsIntegrationsResponse +func (m *Configv1ListGcpMetricsIntegrationsResponse) UnmarshalBinary(b []byte) error { + var res Configv1ListGcpMetricsIntegrationsResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_update_gcp_metrics_integration_response.go b/src/generated/swagger/configv1/models/configv1_read_gcp_metrics_integration_response.go similarity index 59% rename from src/generated/swagger/configunstable/models/configunstable_update_gcp_metrics_integration_response.go rename to src/generated/swagger/configv1/models/configv1_read_gcp_metrics_integration_response.go index ef46d61..86aec3b 100644 --- a/src/generated/swagger/configunstable/models/configunstable_update_gcp_metrics_integration_response.go +++ b/src/generated/swagger/configv1/models/configv1_read_gcp_metrics_integration_response.go @@ -13,17 +13,17 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableUpdateGcpMetricsIntegrationResponse configunstable update gcp metrics integration response +// Configv1ReadGcpMetricsIntegrationResponse configv1 read gcp metrics integration response // -// swagger:model configunstableUpdateGcpMetricsIntegrationResponse -type ConfigunstableUpdateGcpMetricsIntegrationResponse struct { +// swagger:model configv1ReadGcpMetricsIntegrationResponse +type Configv1ReadGcpMetricsIntegrationResponse struct { // gcp metrics integration - GcpMetricsIntegration *ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *Configv1GcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` } -// Validate validates this configunstable update gcp metrics integration response -func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { +// Validate validates this configv1 read gcp metrics integration response +func (m *Configv1ReadGcpMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { var res []error if err := m.validateGcpMetricsIntegration(formats); err != nil { @@ -36,7 +36,7 @@ func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) Validate(formats str return nil } -func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) validateGcpMetricsIntegration(formats strfmt.Registry) error { +func (m *Configv1ReadGcpMetricsIntegrationResponse) validateGcpMetricsIntegration(formats strfmt.Registry) error { if swag.IsZero(m.GcpMetricsIntegration) { // not required return nil } @@ -55,8 +55,8 @@ func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) validateGcpMetricsIn return nil } -// ContextValidate validate this configunstable update gcp metrics integration response based on the context it is used -func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this configv1 read gcp metrics integration response based on the context it is used +func (m *Configv1ReadGcpMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateGcpMetricsIntegration(ctx, formats); err != nil { @@ -69,7 +69,7 @@ func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) ContextValidate(ctx return nil } -func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1ReadGcpMetricsIntegrationResponse) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { if m.GcpMetricsIntegration != nil { @@ -91,7 +91,7 @@ func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) contextValidateGcpMe } // MarshalBinary interface implementation -func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) MarshalBinary() ([]byte, error) { +func (m *Configv1ReadGcpMetricsIntegrationResponse) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -99,8 +99,8 @@ func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) MarshalBinary() ([]b } // UnmarshalBinary interface implementation -func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { - var res ConfigunstableUpdateGcpMetricsIntegrationResponse +func (m *Configv1ReadGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { + var res Configv1ReadGcpMetricsIntegrationResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_response.go b/src/generated/swagger/configv1/models/configv1_update_gcp_metrics_integration_response.go similarity index 59% rename from src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_response.go rename to src/generated/swagger/configv1/models/configv1_update_gcp_metrics_integration_response.go index 0e621ed..36d8106 100644 --- a/src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_response.go +++ b/src/generated/swagger/configv1/models/configv1_update_gcp_metrics_integration_response.go @@ -13,17 +13,17 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableCreateGcpMetricsIntegrationResponse configunstable create gcp metrics integration response +// Configv1UpdateGcpMetricsIntegrationResponse configv1 update gcp metrics integration response // -// swagger:model configunstableCreateGcpMetricsIntegrationResponse -type ConfigunstableCreateGcpMetricsIntegrationResponse struct { +// swagger:model configv1UpdateGcpMetricsIntegrationResponse +type Configv1UpdateGcpMetricsIntegrationResponse struct { // gcp metrics integration - GcpMetricsIntegration *ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *Configv1GcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` } -// Validate validates this configunstable create gcp metrics integration response -func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { +// Validate validates this configv1 update gcp metrics integration response +func (m *Configv1UpdateGcpMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { var res []error if err := m.validateGcpMetricsIntegration(formats); err != nil { @@ -36,7 +36,7 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) Validate(formats str return nil } -func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) validateGcpMetricsIntegration(formats strfmt.Registry) error { +func (m *Configv1UpdateGcpMetricsIntegrationResponse) validateGcpMetricsIntegration(formats strfmt.Registry) error { if swag.IsZero(m.GcpMetricsIntegration) { // not required return nil } @@ -55,8 +55,8 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) validateGcpMetricsIn return nil } -// ContextValidate validate this configunstable create gcp metrics integration response based on the context it is used -func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validate this configv1 update gcp metrics integration response based on the context it is used +func (m *Configv1UpdateGcpMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error if err := m.contextValidateGcpMetricsIntegration(ctx, formats); err != nil { @@ -69,7 +69,7 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) ContextValidate(ctx return nil } -func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { +func (m *Configv1UpdateGcpMetricsIntegrationResponse) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { if m.GcpMetricsIntegration != nil { @@ -91,7 +91,7 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) contextValidateGcpMe } // MarshalBinary interface implementation -func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) MarshalBinary() ([]byte, error) { +func (m *Configv1UpdateGcpMetricsIntegrationResponse) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -99,8 +99,8 @@ func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) MarshalBinary() ([]b } // UnmarshalBinary interface implementation -func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { - var res ConfigunstableCreateGcpMetricsIntegrationResponse +func (m *Configv1UpdateGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { + var res Configv1UpdateGcpMetricsIntegrationResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/gcp_metrics_integration_metric_group.go b/src/generated/swagger/configv1/models/gcp_metrics_integration_metric_group.go similarity index 100% rename from src/generated/swagger/configunstable/models/gcp_metrics_integration_metric_group.go rename to src/generated/swagger/configv1/models/gcp_metrics_integration_metric_group.go diff --git a/src/generated/swagger/configv1/spec.json b/src/generated/swagger/configv1/spec.json index 462bec7..f30ffe8 100644 --- a/src/generated/swagger/configv1/spec.json +++ b/src/generated/swagger/configv1/spec.json @@ -146,6 +146,22 @@ }, "type": "object" }, + "GcpMetricsIntegrationMetricGroup": { + "properties": { + "project_id": { + "description": "Project ID that has access to the metric data.", + "type": "string" + }, + "prefixes": { + "description": "List of Gcp metric prefixes to ingest.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GraphiteLabelPolicyReplace": { "properties": { "name": { @@ -1618,6 +1634,26 @@ }, "type": "object" }, + "configv1CreateGcpMetricsIntegrationRequest": { + "properties": { + "gcp_metrics_integration": { + "$ref": "#/definitions/configv1GcpMetricsIntegration" + }, + "dry_run": { + "description": "If true, the GcpMetricsIntegration will not be created, and no response GcpMetricsIntegration will be returned. The response will return an error if the given GcpMetricsIntegration is invalid.", + "type": "boolean" + } + }, + "type": "object" + }, + "configv1CreateGcpMetricsIntegrationResponse": { + "properties": { + "gcp_metrics_integration": { + "$ref": "#/definitions/configv1GcpMetricsIntegration" + } + }, + "type": "object" + }, "configv1CreateGrafanaDashboardRequest": { "properties": { "grafana_dashboard": { @@ -2013,6 +2049,9 @@ "configv1DeleteDropRuleResponse": { "type": "object" }, + "configv1DeleteGcpMetricsIntegrationResponse": { + "type": "object" + }, "configv1DeleteGrafanaDashboardResponse": { "type": "object" }, @@ -2216,6 +2255,50 @@ ], "type": "string" }, + "configv1GcpMetricsIntegration": { + "properties": { + "slug": { + "description": "Unique identifier of the GcpMetricsIntegration. If slug is not provided, one will be generated based of the name field. Cannot be modified after the GcpMetricsIntegration is created.", + "type": "string" + }, + "name": { + "description": "Required name of the GcpMetricsIntegration. May be modified after the GcpMetricsIntegration is created.", + "type": "string" + }, + "created_at": { + "description": "Timestamp of when the GcpMetricsIntegration was created. Cannot be set by clients.", + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "updated_at": { + "description": "Timestamp of when the GcpMetricsIntegration was last updated. Cannot be set by clients.", + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "service_account": { + "$ref": "#/definitions/configv1GcpMetricsIntegrationServiceAccount" + }, + "metric_groups": { + "description": "Metric groups to be ingested for this integration.", + "items": { + "$ref": "#/definitions/GcpMetricsIntegrationMetricGroup" + }, + "type": "array" + } + }, + "type": "object" + }, + "configv1GcpMetricsIntegrationServiceAccount": { + "properties": { + "client_email": { + "description": "Email address of the service account to impersonate.", + "type": "string" + } + }, + "type": "object" + }, "configv1GrafanaDashboard": { "properties": { "slug": { @@ -2406,6 +2489,20 @@ }, "type": "object" }, + "configv1ListGcpMetricsIntegrationsResponse": { + "properties": { + "page": { + "$ref": "#/definitions/configv1PageResult" + }, + "gcp_metrics_integrations": { + "items": { + "$ref": "#/definitions/configv1GcpMetricsIntegration" + }, + "type": "array" + } + }, + "type": "object" + }, "configv1ListGrafanaDashboardsResponse": { "properties": { "page": { @@ -2965,6 +3062,14 @@ }, "type": "object" }, + "configv1ReadGcpMetricsIntegrationResponse": { + "properties": { + "gcp_metrics_integration": { + "$ref": "#/definitions/configv1GcpMetricsIntegration" + } + }, + "type": "object" + }, "configv1ReadGrafanaDashboardResponse": { "properties": { "grafana_dashboard": { @@ -3651,6 +3756,14 @@ }, "type": "object" }, + "configv1UpdateGcpMetricsIntegrationResponse": { + "properties": { + "gcp_metrics_integration": { + "$ref": "#/definitions/configv1GcpMetricsIntegration" + } + }, + "type": "object" + }, "configv1UpdateGrafanaDashboardResponse": { "properties": { "grafana_dashboard": { @@ -6061,6 +6174,278 @@ ] } }, + "/api/v1/config/gcp-metrics-integrations": { + "get": { + "operationId": "ListGcpMetricsIntegrations", + "parameters": [ + { + "description": "Page size preference (i.e. how many items are returned in the next\npage). If zero, the server will use a default. Regardless of what size\nis given, clients must never assume how many items will be returned.", + "format": "int64", + "in": "query", + "name": "page.max_size", + "type": "integer" + }, + { + "description": "Opaque page token identifying which page to request. An empty token\nidentifies the first page.", + "in": "query", + "name": "page.token", + "type": "string" + }, + { + "collectionFormat": "multi", + "description": "Filters results by slug, where any GcpMetricsIntegration with a matching slug in the given list (and matches all other filters) is returned.", + "in": "query", + "items": { + "type": "string" + }, + "name": "slugs", + "type": "array" + }, + { + "collectionFormat": "multi", + "description": "Filters results by name, where any GcpMetricsIntegration with a matching name in the given list (and matches all other filters) is returned.", + "in": "query", + "items": { + "type": "string" + }, + "name": "names", + "type": "array" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/configv1ListGcpMetricsIntegrationsResponse" + } + }, + "500": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "default": { + "description": "An undefined error response.", + "schema": { + "$ref": "#/definitions/genericError" + } + } + }, + "tags": [ + "GcpMetricsIntegration" + ] + }, + "post": { + "operationId": "CreateGcpMetricsIntegration", + "parameters": [ + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/configv1CreateGcpMetricsIntegrationRequest" + } + } + ], + "responses": { + "200": { + "description": "A successful response containing the created GcpMetricsIntegration.", + "schema": { + "$ref": "#/definitions/configv1CreateGcpMetricsIntegrationResponse" + } + }, + "400": { + "description": "Cannot create the GcpMetricsIntegration because the request is invalid.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "409": { + "description": "Cannot create the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "500": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "default": { + "description": "An undefined error response.", + "schema": { + "$ref": "#/definitions/genericError" + } + } + }, + "tags": [ + "GcpMetricsIntegration" + ] + } + }, + "/api/v1/config/gcp-metrics-integrations/{slug}": { + "delete": { + "operationId": "DeleteGcpMetricsIntegration", + "parameters": [ + { + "in": "path", + "name": "slug", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/configv1DeleteGcpMetricsIntegrationResponse" + } + }, + "400": { + "description": "Cannot delete the GcpMetricsIntegration because it is in use.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "404": { + "description": "Cannot delete the GcpMetricsIntegration because the slug does not exist.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "500": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "default": { + "description": "An undefined error response.", + "schema": { + "$ref": "#/definitions/genericError" + } + } + }, + "tags": [ + "GcpMetricsIntegration" + ] + }, + "get": { + "operationId": "ReadGcpMetricsIntegration", + "parameters": [ + { + "in": "path", + "name": "slug", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/configv1ReadGcpMetricsIntegrationResponse" + } + }, + "404": { + "description": "Cannot read the GcpMetricsIntegration because the slug does not exist.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "500": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "default": { + "description": "An undefined error response.", + "schema": { + "$ref": "#/definitions/genericError" + } + } + }, + "tags": [ + "GcpMetricsIntegration" + ] + }, + "put": { + "operationId": "UpdateGcpMetricsIntegration", + "parameters": [ + { + "in": "path", + "name": "slug", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "properties": { + "create_if_missing": { + "description": "If true, the GcpMetricsIntegration will be created if it does not already exist, identified by slug. If false, an error will be returned if the GcpMetricsIntegration does not already exist.", + "type": "boolean" + }, + "dry_run": { + "description": "If true, the GcpMetricsIntegration will not be created nor updated, and no response GcpMetricsIntegration will be returned. The response will return an error if the given GcpMetricsIntegration is invalid.", + "type": "boolean" + }, + "gcp_metrics_integration": { + "$ref": "#/definitions/configv1GcpMetricsIntegration" + } + }, + "type": "object" + } + } + ], + "responses": { + "200": { + "description": "A successful response containing the updated GcpMetricsIntegration.", + "schema": { + "$ref": "#/definitions/configv1UpdateGcpMetricsIntegrationResponse" + } + }, + "400": { + "description": "Cannot update the GcpMetricsIntegration because the request is invalid.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "404": { + "description": "Cannot update the GcpMetricsIntegration because the slug does not exist.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "409": { + "description": "Cannot update the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "500": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/apiError" + } + }, + "default": { + "description": "An undefined error response.", + "schema": { + "$ref": "#/definitions/genericError" + } + } + }, + "tags": [ + "GcpMetricsIntegration" + ] + } + }, "/api/v1/config/grafana-dashboards": { "get": { "operationId": "ListGrafanaDashboards",