diff --git a/CHANGELOG.md b/CHANGELOG.md index f90ffa8..f9a3d16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Unreleased +### Added +* New config: gcp-metrics-integrations + ## v1.4.0 ### Added diff --git a/Makefile b/Makefile index 5b6944d..9e6ad53 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 +UNSTABLE_ENTITIES := link-templates,saved-trace-searches,dashboards,trace-tail-sampling-rules,services,gcp-metrics-integrations .PHONY: clean-build clean-build: diff --git a/src/generated/cli/configunstable/cli.gen.go b/src/generated/cli/configunstable/cli.gen.go index 1c8ebae..c03663c 100644 --- a/src/generated/cli/configunstable/cli.gen.go +++ b/src/generated/cli/configunstable/cli.gen.go @@ -13,6 +13,7 @@ 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()) @@ -37,6 +38,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.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/configunstable/gcp_metrics_integrations.gen.go b/src/generated/cli/configunstable/gcp_metrics_integrations.gen.go new file mode 100644 index 0000000..e4411a4 --- /dev/null +++ b/src/generated/cli/configunstable/gcp_metrics_integrations.gen.go @@ -0,0 +1,539 @@ +// Code generated by chronogen; DO NOT EDIT +package configunstable + +import ( + "context" + "fmt" + + "github.com/chronosphereio/chronoctl-core/src/cmd/cli" + "github.com/chronosphereio/chronoctl-core/src/cmd/pkg/client" + "github.com/chronosphereio/chronoctl-core/src/cmd/pkg/clienterror" + "github.com/chronosphereio/chronoctl-core/src/cmd/pkg/dry" + "github.com/chronosphereio/chronoctl-core/src/cmd/pkg/file" + "github.com/chronosphereio/chronoctl-core/src/cmd/pkg/groups" + "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" + "github.com/chronosphereio/chronoctl-core/src/types" + "github.com/spf13/cobra" + flag "github.com/spf13/pflag" +) + +func init() { types.MustRegisterObject(GcpMetricsIntegrationTypeMeta, &GcpMetricsIntegration{}) } + +var _ types.Object = &GcpMetricsIntegration{} + +var GcpMetricsIntegrationTypeMeta = types.TypeMeta{ + APIVersion: "unstable/config", + Kind: "GcpMetricsIntegration", +} + +type GcpMetricsIntegration struct { + types.TypeMeta `json:",inline"` + Spec *models.ConfigunstableGcpMetricsIntegration `json:"spec"` +} + +func NewGcpMetricsIntegration(spec *models.ConfigunstableGcpMetricsIntegration) *GcpMetricsIntegration { + return &GcpMetricsIntegration{ + TypeMeta: GcpMetricsIntegrationTypeMeta, + Spec: spec, + } +} + +func (e *GcpMetricsIntegration) Description() string { + return types.TypeDescription(e, "name", e.Spec.Name, "slug", e.Spec.Slug) +} + +func (e *GcpMetricsIntegration) Identifier() string { + return e.Spec.Slug +} + +func CreateGcpMetricsIntegration( + ctx context.Context, + client config_unstable.ClientService, + entity *GcpMetricsIntegration, + dryRun bool, +) (*GcpMetricsIntegration, error) { + res, err := client.CreateGcpMetricsIntegration(&config_unstable.CreateGcpMetricsIntegrationParams{ + Context: ctx, + Body: &models.ConfigunstableCreateGcpMetricsIntegrationRequest{ + DryRun: dryRun, + GcpMetricsIntegration: entity.Spec, + }, + }) + if err != nil { + return nil, clienterror.Wrap(err) + } + return NewGcpMetricsIntegration(res.Payload.GcpMetricsIntegration), nil +} + +func newGcpMetricsIntegrationCreateCmd() *cobra.Command { + var ( + permissiveParsing bool + dryRunFlags = dry.NewFlags() + clientFlags = client.NewClientFlags() + outputFlags = output.NewFlags(output.WithoutOutputDirectory(), output.WithoutCreateFilePerObject()) + fileFlags = file.NewFlags(true /* required */) + ) + + var ( + use string + short string + ) + use = "create -f " + short = "Creates a single GcpMetricsIntegration." + + cmd := &cobra.Command{ + Use: use, + GroupID: groups.Commands.ID, + Short: short, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, cancel := context.WithTimeout(cmd.Context(), clientFlags.Timeout()) + defer cancel() + if err := outputFlags.Validate(); err != nil { + return err + } + defer outputFlags.Close(cmd.OutOrStdout()) + stderr := output.NewStderrPrinter(cmd) + + client, err := clientFlags.ConfigUnstableClient() + if err != nil { + return err + } + + var gcpMetricsIntegration *GcpMetricsIntegration + file, err := fileFlags.File() + if err != nil { + return err + } + defer file.Close() //nolint:errcheck + gcpMetricsIntegration, err = types.MustDecodeSingleObject[*GcpMetricsIntegration](file, permissiveParsing) + if err != nil { + return err + } + + if dryRunFlags.DryRun { + stderr.Println("--dry-run is set") + } + fullGcpMetricsIntegration, err := CreateGcpMetricsIntegration(ctx, client, gcpMetricsIntegration, dryRunFlags.DryRun) + if err != nil { + return err + } + + if dryRunFlags.DryRun { + stderr.Println("GcpMetricsIntegration is valid and can be created") + return nil + } + stderr.Printf("GcpMetricsIntegration with slug %q created successfully\n", fullGcpMetricsIntegration.Spec.Slug) + + if err := outputFlags.WriteObject(fullGcpMetricsIntegration, cmd.OutOrStdout()); err != nil { + return err + } + return nil + }, + } + dryRunFlags.AddFlags(cmd) + clientFlags.AddFlags(cmd) + outputFlags.AddFlags(cmd) + fileFlags.AddFlags(cmd) + cmd.Flags().BoolVar(&permissiveParsing, "no-strict", false, "If set, manifests with unknown fields are not rejected. Defaults to false.") + + return cmd +} + +func GetGcpMetricsIntegration( + ctx context.Context, + client config_unstable.ClientService, + slug string, +) (*GcpMetricsIntegration, error) { + res, err := client.ReadGcpMetricsIntegration(&config_unstable.ReadGcpMetricsIntegrationParams{ + Context: ctx, + Slug: slug, + }) + if err != nil { + return nil, clienterror.Wrap(err) + } + return NewGcpMetricsIntegration(res.GetPayload().GcpMetricsIntegration), nil +} + +func newGcpMetricsIntegrationReadCmd() *cobra.Command { + clientFlags := client.NewClientFlags() + outputFlags := output.NewFlags(output.WithoutOutputDirectory(), output.WithoutCreateFilePerObject()) + var ( + short string + use string + args cobra.PositionalArgs + ) + short = "Reads a single GcpMetricsIntegration by slug" + use = "read " + args = cobra.ExactArgs(1) + + cmd := &cobra.Command{ + Use: use, + GroupID: groups.Commands.ID, + Short: short, + Args: args, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, cancel := context.WithTimeout(cmd.Context(), clientFlags.Timeout()) + defer cancel() + if err := outputFlags.Validate(); err != nil { + return err + } + defer outputFlags.Close(cmd.OutOrStdout()) + + client, err := clientFlags.ConfigUnstableClient() + if err != nil { + return err + } + entity, err := GetGcpMetricsIntegration(ctx, client, args[0]) + if err != nil { + return err + } + if err := outputFlags.WriteObject(entity, cmd.OutOrStdout()); err != nil { + return err + } + return nil + }, + } + + clientFlags.AddFlags(cmd) + outputFlags.AddFlags(cmd) + + return cmd +} + +func UpdateGcpMetricsIntegration( + ctx context.Context, + client config_unstable.ClientService, + entity *GcpMetricsIntegration, + opts UpdateOptions, +) (*GcpMetricsIntegration, error) { + res, err := client.UpdateGcpMetricsIntegration(&config_unstable.UpdateGcpMetricsIntegrationParams{ + Context: ctx, + Slug: entity.Spec.Slug, + Body: config_unstable.UpdateGcpMetricsIntegrationBody{ + CreateIfMissing: opts.CreateIfMissing, + DryRun: opts.DryRun, + GcpMetricsIntegration: entity.Spec, + }, + }) + if err != nil { + return nil, clienterror.Wrap(err) + } + + return NewGcpMetricsIntegration(res.Payload.GcpMetricsIntegration), nil +} + +func newGcpMetricsIntegrationUpdateCmd() *cobra.Command { + var ( + permissiveParsing bool + createIfMissing bool + dryRunFlags = dry.NewFlags() + clientFlags = client.NewClientFlags() + outputFlags = output.NewFlags(output.WithoutOutputDirectory(), output.WithoutCreateFilePerObject()) + fileFlags = file.NewFlags(true /* required */) + ) + + cmd := &cobra.Command{ + Use: "update -f ", + GroupID: groups.Commands.ID, + Short: "Updates an existing GcpMetricsIntegration.", + RunE: func(cmd *cobra.Command, args []string) error { + ctx, cancel := context.WithTimeout(cmd.Context(), clientFlags.Timeout()) + defer cancel() + if err := outputFlags.Validate(); err != nil { + return err + } + defer outputFlags.Close(cmd.OutOrStdout()) + stderr := output.NewStderrPrinter(cmd) + + client, err := clientFlags.ConfigUnstableClient() + if err != nil { + return err + } + + file, err := fileFlags.File() + if err != nil { + return err + } + defer file.Close() //nolint:errcheck + + gcpMetricsIntegration, err := types.MustDecodeSingleObject[*GcpMetricsIntegration](file, permissiveParsing) + if err != nil { + return err + } + + updateOpts := UpdateOptions{ + DryRun: dryRunFlags.DryRun, + CreateIfMissing: createIfMissing, + } + + if dryRunFlags.DryRun { + stderr.Println("--dry-run is set, update not persisted") + } + + fullGcpMetricsIntegration, err := UpdateGcpMetricsIntegration(ctx, client, gcpMetricsIntegration, updateOpts) + if err != nil { + return err + } + + if dryRunFlags.DryRun { + stderr.Println("GcpMetricsIntegration is valid and can be updated") + return nil + } + stderr.Printf("GcpMetricsIntegration with slug %q applied successfully\n", fullGcpMetricsIntegration.Spec.Slug) + + if err := outputFlags.WriteObject(fullGcpMetricsIntegration, cmd.OutOrStdout()); err != nil { + return err + } + return nil + }, + } + dryRunFlags.AddFlags(cmd) + clientFlags.AddFlags(cmd) + outputFlags.AddFlags(cmd) + fileFlags.AddFlags(cmd) + cmd.Flags().BoolVar(&permissiveParsing, "no-strict", false, "If set, manifests with unknown fields are allowed. Defaults to false.") + cmd.Flags().BoolVar(&createIfMissing, "create-if-missing", false, "If set, creates the GcpMetricsIntegration if it does not already exist. Defaults to false.") + + return cmd +} + +func DeleteGcpMetricsIntegration( + ctx context.Context, + client config_unstable.ClientService, + slug string, +) error { + _, err := client.DeleteGcpMetricsIntegration(&config_unstable.DeleteGcpMetricsIntegrationParams{ + Context: ctx, + Slug: slug, + }) + if err != nil { + return clienterror.Wrap(err) + } + return nil +} + +func newGcpMetricsIntegrationDeleteCmd() *cobra.Command { + clientFlags := client.NewClientFlags() + outputFlags := output.NewFlags(output.WithoutOutputDirectory(), output.WithoutCreateFilePerObject()) + + cmd := &cobra.Command{ + Use: "delete ", + GroupID: groups.Commands.ID, + Short: "Deletes a single GcpMetricsIntegration by slug", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + ctx, cancel := context.WithTimeout(cmd.Context(), clientFlags.Timeout()) + defer cancel() + if err := outputFlags.Validate(); err != nil { + return err + } + defer outputFlags.Close(cmd.OutOrStdout()) + + client, err := clientFlags.ConfigUnstableClient() + if err != nil { + return err + } + + res, err := client.DeleteGcpMetricsIntegration(&config_unstable.DeleteGcpMetricsIntegrationParams{ + Context: ctx, + Slug: args[0], + }) + if err != nil { + return clienterror.Wrap(err) + } + _ = res + fmt.Fprintf(cmd.OutOrStdout(), "deleted GcpMetricsIntegration with slug %q\n", args[0]) + + return nil + }, + } + clientFlags.AddFlags(cmd) + outputFlags.AddFlags(cmd) + return cmd +} + +type GcpMetricsIntegrationListOpts struct { + // Limit represents that maximum number of items we wish to return. + Limit int + // PageToken is the pagination token we want to start our request at. + PageToken string + // PageMaxSize is the maximum page size to use when making List calls. + PageMaxSize int + Names []string + Slugs []string +} + +func (r *GcpMetricsIntegrationListOpts) registerFlags(flags *flag.FlagSet) { + var emptyNames []string + flags.StringSliceVar(&r.Names, "names", emptyNames, "Filters results by name, where any GcpMetricsIntegration with a matching name in the given list (and matches all other filters) is returned.") + var emptySlugs []string + flags.StringSliceVar(&r.Slugs, "slugs", emptySlugs, "Filters results by slug, where any GcpMetricsIntegration with a matching slug in the given list (and matches all other filters) is returned.") + flags.IntVar(&r.Limit, "limit", 0, "maximum number of items to return") + flags.IntVar(&r.PageMaxSize, "page-max-size", 0, "maximum page size") + flags.StringVar(&r.PageToken, "page-token", "", "begins listing items at the start of the pagination token") +} + +func ListGcpMetricsIntegrations( + ctx context.Context, + client config_unstable.ClientService, + streamer output.Streamer[*GcpMetricsIntegration], + opts GcpMetricsIntegrationListOpts, +) (pagination.Token, error) { + var ( + gotItems = 0 + nextToken = opts.PageToken + pageMaxSize = opts.PageMaxSize + ) + + // Use the limit if it's set, and smaller than a set page size. + if opts.Limit > 0 && (opts.Limit < pageMaxSize || pageMaxSize == 0) { + pageMaxSize = opts.Limit + } + + for { + res, err := client.ListGcpMetricsIntegrations(&config_unstable.ListGcpMetricsIntegrationsParams{ + Context: ctx, + PageToken: &nextToken, + PageMaxSize: ptr.Int64(int64(pageMaxSize)), + Names: opts.Names, + Slugs: opts.Slugs, + }) + if err != nil { + return pagination.Token(""), clienterror.Wrap(err) + } + + for _, v := range res.Payload.GcpMetricsIntegrations { + if err := streamer(NewGcpMetricsIntegration(v)); err != nil { + return pagination.Token(""), err + } + gotItems++ + } + + nextToken = res.Payload.Page.NextToken + if nextToken == "" { + return pagination.Token(""), nil + } + + if opts.Limit > 0 && gotItems >= opts.Limit { + return pagination.Token(nextToken), nil + } + + pageMaxSize = pagination.CalculatePageSize(pagination.Calculation{ + GotItems: gotItems, + MaxItems: opts.Limit, + MaxPageSize: len(res.Payload.GcpMetricsIntegrations), + }) + } +} + +func newGcpMetricsIntegrationListCmd() *cobra.Command { + var listOptions GcpMetricsIntegrationListOpts + clientFlags := client.NewClientFlags() + outputFlags := output.NewFlags() + + cmd := &cobra.Command{ + Use: "list", + Short: "Lists all GcpMetricsIntegrations and applies optional filters", + GroupID: groups.Commands.ID, + RunE: func(cmd *cobra.Command, args []string) error { + ctx, cancel := context.WithTimeout(cmd.Context(), clientFlags.Timeout()) + defer cancel() + if err := outputFlags.Validate(); err != nil { + return err + } + + writer, err := outputFlags.NewWriterManager(cmd.OutOrStdout()) + if err != nil { + return err + } + defer writer.Close() + + client, err := clientFlags.ConfigUnstableClient() + if err != nil { + return err + } + + streamer := output.NewWriteObjectStreamer[*GcpMetricsIntegration](writer) + nextToken, err := ListGcpMetricsIntegrations(ctx, client, streamer, listOptions) + if err != nil { + return err + } + + if nextToken != "" { + nextPage := pagination.Result{ + Kind: pagination.ResultKind, + Message: "There are additional gcpMetricsIntegrations. To view more, use the next page token or run the full command.", + NextPageToken: nextToken, + FullCommand: fmt.Sprintf("%s --page-token %q", + cli.BuildCommandString(cmd, []string{"page-token"}), + nextToken), + } + if err := outputFlags.WriteObject(nextPage, cmd.OutOrStdout()); err != nil { + return err + } + } + + return nil + }, + } + + listOptions.registerFlags(cmd.Flags()) + clientFlags.AddFlags(cmd) + outputFlags.AddFlags(cmd) + + return cmd +} + +const GcpMetricsIntegrationScaffoldYAML = `api_version: unstable/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. + slug: + # Required name of the GcpMetricsIntegration. May be modified after the GcpMetricsIntegration is created. + name: + # Metric groups to be ingested for this integration. + metric_groups: + - # Project ID that has access to the metric data. + project_id: + # List of Gcp metric prefixes to ingest. + prefixes: + - + service_account: + # Email address of the service account to impersonate. + client_email: +` + +func newGcpMetricsIntegrationScaffoldCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "scaffold", + GroupID: groups.Commands.ID, + Short: "Scaffolds a complete object with placeholder values", + Run: func(cmd *cobra.Command, args []string) { + fmt.Fprint(cmd.OutOrStdout(), GcpMetricsIntegrationScaffoldYAML) + }, + } + return cmd +} + +func NewGcpMetricsIntegrationCmd() *cobra.Command { + root := &cobra.Command{ + Use: "gcp-metrics-integrations", + GroupID: groups.Config.ID, + Short: "All commands for GcpMetricsIntegrations", + } + + root.AddGroup(groups.Commands) + root.AddCommand( + newGcpMetricsIntegrationCreateCmd(), + newGcpMetricsIntegrationReadCmd(), + newGcpMetricsIntegrationUpdateCmd(), + newGcpMetricsIntegrationDeleteCmd(), + newGcpMetricsIntegrationListCmd(), + newGcpMetricsIntegrationScaffoldCmd(), + ) + return root +} diff --git a/src/generated/swagger/configunstable/client/operations/create_g_c_p_metrics_integration_parameters.go b/src/generated/swagger/configunstable/client/operations/create_g_c_p_metrics_integration_parameters.go deleted file mode 100644 index e456303..0000000 --- a/src/generated/swagger/configunstable/client/operations/create_g_c_p_metrics_integration_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" -) - -// NewCreateGCPMetricsIntegrationParams creates a new CreateGCPMetricsIntegrationParams 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 NewCreateGCPMetricsIntegrationParams() *CreateGCPMetricsIntegrationParams { - return &CreateGCPMetricsIntegrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewCreateGCPMetricsIntegrationParamsWithTimeout creates a new CreateGCPMetricsIntegrationParams object -// with the ability to set a timeout on a request. -func NewCreateGCPMetricsIntegrationParamsWithTimeout(timeout time.Duration) *CreateGCPMetricsIntegrationParams { - return &CreateGCPMetricsIntegrationParams{ - timeout: timeout, - } -} - -// NewCreateGCPMetricsIntegrationParamsWithContext creates a new CreateGCPMetricsIntegrationParams object -// with the ability to set a context for a request. -func NewCreateGCPMetricsIntegrationParamsWithContext(ctx context.Context) *CreateGCPMetricsIntegrationParams { - return &CreateGCPMetricsIntegrationParams{ - Context: ctx, - } -} - -// NewCreateGCPMetricsIntegrationParamsWithHTTPClient creates a new CreateGCPMetricsIntegrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewCreateGCPMetricsIntegrationParamsWithHTTPClient(client *http.Client) *CreateGCPMetricsIntegrationParams { - return &CreateGCPMetricsIntegrationParams{ - HTTPClient: client, - } -} - -/* -CreateGCPMetricsIntegrationParams contains all the parameters to send to the API endpoint - - for the create g c p metrics integration operation. - - Typically these are written to a http.Request. -*/ -type CreateGCPMetricsIntegrationParams struct { - - // Body. - Body *models.ConfigunstableCreateGCPMetricsIntegrationRequest - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the create g c p metrics integration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateGCPMetricsIntegrationParams) WithDefaults() *CreateGCPMetricsIntegrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the create g c p metrics integration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *CreateGCPMetricsIntegrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the create g c p metrics integration params -func (o *CreateGCPMetricsIntegrationParams) WithTimeout(timeout time.Duration) *CreateGCPMetricsIntegrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the create g c p metrics integration params -func (o *CreateGCPMetricsIntegrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the create g c p metrics integration params -func (o *CreateGCPMetricsIntegrationParams) WithContext(ctx context.Context) *CreateGCPMetricsIntegrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the create g c p metrics integration params -func (o *CreateGCPMetricsIntegrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the create g c p metrics integration params -func (o *CreateGCPMetricsIntegrationParams) WithHTTPClient(client *http.Client) *CreateGCPMetricsIntegrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the create g c p metrics integration params -func (o *CreateGCPMetricsIntegrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the create g c p metrics integration params -func (o *CreateGCPMetricsIntegrationParams) WithBody(body *models.ConfigunstableCreateGCPMetricsIntegrationRequest) *CreateGCPMetricsIntegrationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the create g c p metrics integration params -func (o *CreateGCPMetricsIntegrationParams) SetBody(body *models.ConfigunstableCreateGCPMetricsIntegrationRequest) { - o.Body = body -} - -// WriteToRequest writes these params to a swagger request -func (o *CreateGCPMetricsIntegrationParams) 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_g_c_p_metrics_integration_responses.go b/src/generated/swagger/configunstable/client/operations/create_g_c_p_metrics_integration_responses.go deleted file mode 100644 index b12cff1..0000000 --- a/src/generated/swagger/configunstable/client/operations/create_g_c_p_metrics_integration_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" -) - -// CreateGCPMetricsIntegrationReader is a Reader for the CreateGCPMetricsIntegration structure. -type CreateGCPMetricsIntegrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *CreateGCPMetricsIntegrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewCreateGCPMetricsIntegrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewCreateGCPMetricsIntegrationBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 409: - result := NewCreateGCPMetricsIntegrationConflict() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewCreateGCPMetricsIntegrationInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewCreateGCPMetricsIntegrationDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewCreateGCPMetricsIntegrationOK creates a CreateGCPMetricsIntegrationOK with default headers values -func NewCreateGCPMetricsIntegrationOK() *CreateGCPMetricsIntegrationOK { - return &CreateGCPMetricsIntegrationOK{} -} - -/* -CreateGCPMetricsIntegrationOK describes a response with status code 200, with default header values. - -A successful response containing the created GCPMetricsIntegration. -*/ -type CreateGCPMetricsIntegrationOK struct { - Payload *models.ConfigunstableCreateGCPMetricsIntegrationResponse -} - -// IsSuccess returns true when this create g c p metrics integration o k response has a 2xx status code -func (o *CreateGCPMetricsIntegrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this create g c p metrics integration o k response has a 3xx status code -func (o *CreateGCPMetricsIntegrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create g c p metrics integration o k response has a 4xx status code -func (o *CreateGCPMetricsIntegrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this create g c p metrics integration o k response has a 5xx status code -func (o *CreateGCPMetricsIntegrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this create g c p metrics integration o k response a status code equal to that given -func (o *CreateGCPMetricsIntegrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the create g c p metrics integration o k response -func (o *CreateGCPMetricsIntegrationOK) Code() int { - return 200 -} - -func (o *CreateGCPMetricsIntegrationOK) Error() string { - return fmt.Sprintf("[POST /api/unstable/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) -} - -func (o *CreateGCPMetricsIntegrationOK) GetPayload() *models.ConfigunstableCreateGCPMetricsIntegrationResponse { - return o.Payload -} - -func (o *CreateGCPMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ConfigunstableCreateGCPMetricsIntegrationResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewCreateGCPMetricsIntegrationBadRequest creates a CreateGCPMetricsIntegrationBadRequest with default headers values -func NewCreateGCPMetricsIntegrationBadRequest() *CreateGCPMetricsIntegrationBadRequest { - return &CreateGCPMetricsIntegrationBadRequest{} -} - -/* -CreateGCPMetricsIntegrationBadRequest describes a response with status code 400, with default header values. - -Cannot create the GCPMetricsIntegration because the request is invalid. -*/ -type CreateGCPMetricsIntegrationBadRequest struct { - Payload *models.APIError -} - -// IsSuccess returns true when this create g c p metrics integration bad request response has a 2xx status code -func (o *CreateGCPMetricsIntegrationBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create g c p metrics integration bad request response has a 3xx status code -func (o *CreateGCPMetricsIntegrationBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create g c p metrics integration bad request response has a 4xx status code -func (o *CreateGCPMetricsIntegrationBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this create g c p metrics integration bad request response has a 5xx status code -func (o *CreateGCPMetricsIntegrationBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this create g c p metrics integration bad request response a status code equal to that given -func (o *CreateGCPMetricsIntegrationBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the create g c p metrics integration bad request response -func (o *CreateGCPMetricsIntegrationBadRequest) Code() int { - return 400 -} - -func (o *CreateGCPMetricsIntegrationBadRequest) Error() string { - return fmt.Sprintf("[POST /api/unstable/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) -} - -func (o *CreateGCPMetricsIntegrationBadRequest) GetPayload() *models.APIError { - return o.Payload -} - -func (o *CreateGCPMetricsIntegrationBadRequest) 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 -} - -// NewCreateGCPMetricsIntegrationConflict creates a CreateGCPMetricsIntegrationConflict with default headers values -func NewCreateGCPMetricsIntegrationConflict() *CreateGCPMetricsIntegrationConflict { - return &CreateGCPMetricsIntegrationConflict{} -} - -/* -CreateGCPMetricsIntegrationConflict describes a response with status code 409, with default header values. - -Cannot create the GCPMetricsIntegration because there is a conflict with an existing GCPMetricsIntegration. -*/ -type CreateGCPMetricsIntegrationConflict struct { - Payload *models.APIError -} - -// IsSuccess returns true when this create g c p metrics integration conflict response has a 2xx status code -func (o *CreateGCPMetricsIntegrationConflict) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create g c p metrics integration conflict response has a 3xx status code -func (o *CreateGCPMetricsIntegrationConflict) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create g c p metrics integration conflict response has a 4xx status code -func (o *CreateGCPMetricsIntegrationConflict) IsClientError() bool { - return true -} - -// IsServerError returns true when this create g c p metrics integration conflict response has a 5xx status code -func (o *CreateGCPMetricsIntegrationConflict) IsServerError() bool { - return false -} - -// IsCode returns true when this create g c p metrics integration conflict response a status code equal to that given -func (o *CreateGCPMetricsIntegrationConflict) IsCode(code int) bool { - return code == 409 -} - -// Code gets the status code for the create g c p metrics integration conflict response -func (o *CreateGCPMetricsIntegrationConflict) Code() int { - return 409 -} - -func (o *CreateGCPMetricsIntegrationConflict) Error() string { - return fmt.Sprintf("[POST /api/unstable/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) -} - -func (o *CreateGCPMetricsIntegrationConflict) GetPayload() *models.APIError { - return o.Payload -} - -func (o *CreateGCPMetricsIntegrationConflict) 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 -} - -// NewCreateGCPMetricsIntegrationInternalServerError creates a CreateGCPMetricsIntegrationInternalServerError with default headers values -func NewCreateGCPMetricsIntegrationInternalServerError() *CreateGCPMetricsIntegrationInternalServerError { - return &CreateGCPMetricsIntegrationInternalServerError{} -} - -/* -CreateGCPMetricsIntegrationInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type CreateGCPMetricsIntegrationInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this create g c p metrics integration internal server error response has a 2xx status code -func (o *CreateGCPMetricsIntegrationInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this create g c p metrics integration internal server error response has a 3xx status code -func (o *CreateGCPMetricsIntegrationInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this create g c p metrics integration internal server error response has a 4xx status code -func (o *CreateGCPMetricsIntegrationInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this create g c p metrics integration internal server error response has a 5xx status code -func (o *CreateGCPMetricsIntegrationInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this create g c p metrics integration internal server error response a status code equal to that given -func (o *CreateGCPMetricsIntegrationInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the create g c p metrics integration internal server error response -func (o *CreateGCPMetricsIntegrationInternalServerError) Code() int { - return 500 -} - -func (o *CreateGCPMetricsIntegrationInternalServerError) Error() string { - return fmt.Sprintf("[POST /api/unstable/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) -} - -func (o *CreateGCPMetricsIntegrationInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *CreateGCPMetricsIntegrationInternalServerError) 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 -} - -// NewCreateGCPMetricsIntegrationDefault creates a CreateGCPMetricsIntegrationDefault with default headers values -func NewCreateGCPMetricsIntegrationDefault(code int) *CreateGCPMetricsIntegrationDefault { - return &CreateGCPMetricsIntegrationDefault{ - _statusCode: code, - } -} - -/* -CreateGCPMetricsIntegrationDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type CreateGCPMetricsIntegrationDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this create g c p metrics integration default response has a 2xx status code -func (o *CreateGCPMetricsIntegrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this create g c p metrics integration default response has a 3xx status code -func (o *CreateGCPMetricsIntegrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this create g c p metrics integration default response has a 4xx status code -func (o *CreateGCPMetricsIntegrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this create g c p metrics integration default response has a 5xx status code -func (o *CreateGCPMetricsIntegrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this create g c p metrics integration default response a status code equal to that given -func (o *CreateGCPMetricsIntegrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the create g c p metrics integration default response -func (o *CreateGCPMetricsIntegrationDefault) Code() int { - return o._statusCode -} - -func (o *CreateGCPMetricsIntegrationDefault) Error() string { - return fmt.Sprintf("[POST /api/unstable/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) -} - -func (o *CreateGCPMetricsIntegrationDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *CreateGCPMetricsIntegrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.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_gcp_metrics_integration_parameters.go b/src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_parameters.go new file mode 100644 index 0000000..2de9728 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_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" +) + +// NewCreateGcpMetricsIntegrationParams creates a new CreateGcpMetricsIntegrationParams 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 NewCreateGcpMetricsIntegrationParams() *CreateGcpMetricsIntegrationParams { + return &CreateGcpMetricsIntegrationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewCreateGcpMetricsIntegrationParamsWithTimeout creates a new CreateGcpMetricsIntegrationParams object +// with the ability to set a timeout on a request. +func NewCreateGcpMetricsIntegrationParamsWithTimeout(timeout time.Duration) *CreateGcpMetricsIntegrationParams { + return &CreateGcpMetricsIntegrationParams{ + timeout: timeout, + } +} + +// NewCreateGcpMetricsIntegrationParamsWithContext creates a new CreateGcpMetricsIntegrationParams object +// with the ability to set a context for a request. +func NewCreateGcpMetricsIntegrationParamsWithContext(ctx context.Context) *CreateGcpMetricsIntegrationParams { + return &CreateGcpMetricsIntegrationParams{ + Context: ctx, + } +} + +// NewCreateGcpMetricsIntegrationParamsWithHTTPClient creates a new CreateGcpMetricsIntegrationParams object +// with the ability to set a custom HTTPClient for a request. +func NewCreateGcpMetricsIntegrationParamsWithHTTPClient(client *http.Client) *CreateGcpMetricsIntegrationParams { + return &CreateGcpMetricsIntegrationParams{ + HTTPClient: client, + } +} + +/* +CreateGcpMetricsIntegrationParams contains all the parameters to send to the API endpoint + + for the create gcp metrics integration operation. + + Typically these are written to a http.Request. +*/ +type CreateGcpMetricsIntegrationParams struct { + + // Body. + Body *models.ConfigunstableCreateGcpMetricsIntegrationRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the create gcp metrics integration params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateGcpMetricsIntegrationParams) WithDefaults() *CreateGcpMetricsIntegrationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the create gcp metrics integration params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *CreateGcpMetricsIntegrationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the create gcp metrics integration params +func (o *CreateGcpMetricsIntegrationParams) WithTimeout(timeout time.Duration) *CreateGcpMetricsIntegrationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the create gcp metrics integration params +func (o *CreateGcpMetricsIntegrationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the create gcp metrics integration params +func (o *CreateGcpMetricsIntegrationParams) WithContext(ctx context.Context) *CreateGcpMetricsIntegrationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the create gcp metrics integration params +func (o *CreateGcpMetricsIntegrationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the create gcp metrics integration params +func (o *CreateGcpMetricsIntegrationParams) WithHTTPClient(client *http.Client) *CreateGcpMetricsIntegrationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the create gcp metrics integration params +func (o *CreateGcpMetricsIntegrationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the create gcp metrics integration params +func (o *CreateGcpMetricsIntegrationParams) WithBody(body *models.ConfigunstableCreateGcpMetricsIntegrationRequest) *CreateGcpMetricsIntegrationParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the create gcp metrics integration params +func (o *CreateGcpMetricsIntegrationParams) SetBody(body *models.ConfigunstableCreateGcpMetricsIntegrationRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *CreateGcpMetricsIntegrationParams) 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_gcp_metrics_integration_responses.go b/src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_responses.go new file mode 100644 index 0000000..a12b576 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/create_gcp_metrics_integration_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" +) + +// CreateGcpMetricsIntegrationReader is a Reader for the CreateGcpMetricsIntegration structure. +type CreateGcpMetricsIntegrationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *CreateGcpMetricsIntegrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewCreateGcpMetricsIntegrationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewCreateGcpMetricsIntegrationBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewCreateGcpMetricsIntegrationConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewCreateGcpMetricsIntegrationInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewCreateGcpMetricsIntegrationDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewCreateGcpMetricsIntegrationOK creates a CreateGcpMetricsIntegrationOK with default headers values +func NewCreateGcpMetricsIntegrationOK() *CreateGcpMetricsIntegrationOK { + return &CreateGcpMetricsIntegrationOK{} +} + +/* +CreateGcpMetricsIntegrationOK describes a response with status code 200, with default header values. + +A successful response containing the created GcpMetricsIntegration. +*/ +type CreateGcpMetricsIntegrationOK struct { + Payload *models.ConfigunstableCreateGcpMetricsIntegrationResponse +} + +// IsSuccess returns true when this create gcp metrics integration o k response has a 2xx status code +func (o *CreateGcpMetricsIntegrationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this create gcp metrics integration o k response has a 3xx status code +func (o *CreateGcpMetricsIntegrationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create gcp metrics integration o k response has a 4xx status code +func (o *CreateGcpMetricsIntegrationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this create gcp metrics integration o k response has a 5xx status code +func (o *CreateGcpMetricsIntegrationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this create gcp metrics integration o k response a status code equal to that given +func (o *CreateGcpMetricsIntegrationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the create gcp metrics integration o k response +func (o *CreateGcpMetricsIntegrationOK) Code() int { + return 200 +} + +func (o *CreateGcpMetricsIntegrationOK) Error() string { + return fmt.Sprintf("[POST /api/unstable/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) +} + +func (o *CreateGcpMetricsIntegrationOK) GetPayload() *models.ConfigunstableCreateGcpMetricsIntegrationResponse { + return o.Payload +} + +func (o *CreateGcpMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigunstableCreateGcpMetricsIntegrationResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewCreateGcpMetricsIntegrationBadRequest creates a CreateGcpMetricsIntegrationBadRequest with default headers values +func NewCreateGcpMetricsIntegrationBadRequest() *CreateGcpMetricsIntegrationBadRequest { + return &CreateGcpMetricsIntegrationBadRequest{} +} + +/* +CreateGcpMetricsIntegrationBadRequest describes a response with status code 400, with default header values. + +Cannot create the GcpMetricsIntegration because the request is invalid. +*/ +type CreateGcpMetricsIntegrationBadRequest struct { + Payload *models.APIError +} + +// IsSuccess returns true when this create gcp metrics integration bad request response has a 2xx status code +func (o *CreateGcpMetricsIntegrationBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create gcp metrics integration bad request response has a 3xx status code +func (o *CreateGcpMetricsIntegrationBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create gcp metrics integration bad request response has a 4xx status code +func (o *CreateGcpMetricsIntegrationBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this create gcp metrics integration bad request response has a 5xx status code +func (o *CreateGcpMetricsIntegrationBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this create gcp metrics integration bad request response a status code equal to that given +func (o *CreateGcpMetricsIntegrationBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the create gcp metrics integration bad request response +func (o *CreateGcpMetricsIntegrationBadRequest) Code() int { + return 400 +} + +func (o *CreateGcpMetricsIntegrationBadRequest) Error() string { + return fmt.Sprintf("[POST /api/unstable/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) +} + +func (o *CreateGcpMetricsIntegrationBadRequest) GetPayload() *models.APIError { + return o.Payload +} + +func (o *CreateGcpMetricsIntegrationBadRequest) 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 +} + +// NewCreateGcpMetricsIntegrationConflict creates a CreateGcpMetricsIntegrationConflict with default headers values +func NewCreateGcpMetricsIntegrationConflict() *CreateGcpMetricsIntegrationConflict { + return &CreateGcpMetricsIntegrationConflict{} +} + +/* +CreateGcpMetricsIntegrationConflict describes a response with status code 409, with default header values. + +Cannot create the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration. +*/ +type CreateGcpMetricsIntegrationConflict struct { + Payload *models.APIError +} + +// IsSuccess returns true when this create gcp metrics integration conflict response has a 2xx status code +func (o *CreateGcpMetricsIntegrationConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create gcp metrics integration conflict response has a 3xx status code +func (o *CreateGcpMetricsIntegrationConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create gcp metrics integration conflict response has a 4xx status code +func (o *CreateGcpMetricsIntegrationConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this create gcp metrics integration conflict response has a 5xx status code +func (o *CreateGcpMetricsIntegrationConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this create gcp metrics integration conflict response a status code equal to that given +func (o *CreateGcpMetricsIntegrationConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the create gcp metrics integration conflict response +func (o *CreateGcpMetricsIntegrationConflict) Code() int { + return 409 +} + +func (o *CreateGcpMetricsIntegrationConflict) Error() string { + return fmt.Sprintf("[POST /api/unstable/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) +} + +func (o *CreateGcpMetricsIntegrationConflict) GetPayload() *models.APIError { + return o.Payload +} + +func (o *CreateGcpMetricsIntegrationConflict) 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 +} + +// NewCreateGcpMetricsIntegrationInternalServerError creates a CreateGcpMetricsIntegrationInternalServerError with default headers values +func NewCreateGcpMetricsIntegrationInternalServerError() *CreateGcpMetricsIntegrationInternalServerError { + return &CreateGcpMetricsIntegrationInternalServerError{} +} + +/* +CreateGcpMetricsIntegrationInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type CreateGcpMetricsIntegrationInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this create gcp metrics integration internal server error response has a 2xx status code +func (o *CreateGcpMetricsIntegrationInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this create gcp metrics integration internal server error response has a 3xx status code +func (o *CreateGcpMetricsIntegrationInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this create gcp metrics integration internal server error response has a 4xx status code +func (o *CreateGcpMetricsIntegrationInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this create gcp metrics integration internal server error response has a 5xx status code +func (o *CreateGcpMetricsIntegrationInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this create gcp metrics integration internal server error response a status code equal to that given +func (o *CreateGcpMetricsIntegrationInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the create gcp metrics integration internal server error response +func (o *CreateGcpMetricsIntegrationInternalServerError) Code() int { + return 500 +} + +func (o *CreateGcpMetricsIntegrationInternalServerError) Error() string { + return fmt.Sprintf("[POST /api/unstable/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) +} + +func (o *CreateGcpMetricsIntegrationInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *CreateGcpMetricsIntegrationInternalServerError) 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 +} + +// NewCreateGcpMetricsIntegrationDefault creates a CreateGcpMetricsIntegrationDefault with default headers values +func NewCreateGcpMetricsIntegrationDefault(code int) *CreateGcpMetricsIntegrationDefault { + return &CreateGcpMetricsIntegrationDefault{ + _statusCode: code, + } +} + +/* +CreateGcpMetricsIntegrationDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type CreateGcpMetricsIntegrationDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this create gcp metrics integration default response has a 2xx status code +func (o *CreateGcpMetricsIntegrationDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this create gcp metrics integration default response has a 3xx status code +func (o *CreateGcpMetricsIntegrationDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this create gcp metrics integration default response has a 4xx status code +func (o *CreateGcpMetricsIntegrationDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this create gcp metrics integration default response has a 5xx status code +func (o *CreateGcpMetricsIntegrationDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this create gcp metrics integration default response a status code equal to that given +func (o *CreateGcpMetricsIntegrationDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the create gcp metrics integration default response +func (o *CreateGcpMetricsIntegrationDefault) Code() int { + return o._statusCode +} + +func (o *CreateGcpMetricsIntegrationDefault) Error() string { + return fmt.Sprintf("[POST /api/unstable/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) +} + +func (o *CreateGcpMetricsIntegrationDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *CreateGcpMetricsIntegrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.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_g_c_p_metrics_integration_parameters.go b/src/generated/swagger/configunstable/client/operations/delete_g_c_p_metrics_integration_parameters.go deleted file mode 100644 index 530f68c..0000000 --- a/src/generated/swagger/configunstable/client/operations/delete_g_c_p_metrics_integration_parameters.go +++ /dev/null @@ -1,148 +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" -) - -// NewDeleteGCPMetricsIntegrationParams creates a new DeleteGCPMetricsIntegrationParams 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 NewDeleteGCPMetricsIntegrationParams() *DeleteGCPMetricsIntegrationParams { - return &DeleteGCPMetricsIntegrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteGCPMetricsIntegrationParamsWithTimeout creates a new DeleteGCPMetricsIntegrationParams object -// with the ability to set a timeout on a request. -func NewDeleteGCPMetricsIntegrationParamsWithTimeout(timeout time.Duration) *DeleteGCPMetricsIntegrationParams { - return &DeleteGCPMetricsIntegrationParams{ - timeout: timeout, - } -} - -// NewDeleteGCPMetricsIntegrationParamsWithContext creates a new DeleteGCPMetricsIntegrationParams object -// with the ability to set a context for a request. -func NewDeleteGCPMetricsIntegrationParamsWithContext(ctx context.Context) *DeleteGCPMetricsIntegrationParams { - return &DeleteGCPMetricsIntegrationParams{ - Context: ctx, - } -} - -// NewDeleteGCPMetricsIntegrationParamsWithHTTPClient creates a new DeleteGCPMetricsIntegrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewDeleteGCPMetricsIntegrationParamsWithHTTPClient(client *http.Client) *DeleteGCPMetricsIntegrationParams { - return &DeleteGCPMetricsIntegrationParams{ - HTTPClient: client, - } -} - -/* -DeleteGCPMetricsIntegrationParams contains all the parameters to send to the API endpoint - - for the delete g c p metrics integration operation. - - Typically these are written to a http.Request. -*/ -type DeleteGCPMetricsIntegrationParams struct { - - // Slug. - Slug string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the delete g c p metrics integration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteGCPMetricsIntegrationParams) WithDefaults() *DeleteGCPMetricsIntegrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the delete g c p metrics integration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *DeleteGCPMetricsIntegrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the delete g c p metrics integration params -func (o *DeleteGCPMetricsIntegrationParams) WithTimeout(timeout time.Duration) *DeleteGCPMetricsIntegrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete g c p metrics integration params -func (o *DeleteGCPMetricsIntegrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete g c p metrics integration params -func (o *DeleteGCPMetricsIntegrationParams) WithContext(ctx context.Context) *DeleteGCPMetricsIntegrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete g c p metrics integration params -func (o *DeleteGCPMetricsIntegrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete g c p metrics integration params -func (o *DeleteGCPMetricsIntegrationParams) WithHTTPClient(client *http.Client) *DeleteGCPMetricsIntegrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete g c p metrics integration params -func (o *DeleteGCPMetricsIntegrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSlug adds the slug to the delete g c p metrics integration params -func (o *DeleteGCPMetricsIntegrationParams) WithSlug(slug string) *DeleteGCPMetricsIntegrationParams { - o.SetSlug(slug) - return o -} - -// SetSlug adds the slug to the delete g c p metrics integration params -func (o *DeleteGCPMetricsIntegrationParams) SetSlug(slug string) { - o.Slug = slug -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteGCPMetricsIntegrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param slug - if err := r.SetPathParam("slug", o.Slug); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/delete_g_c_p_metrics_integration_responses.go b/src/generated/swagger/configunstable/client/operations/delete_g_c_p_metrics_integration_responses.go deleted file mode 100644 index 559a5c8..0000000 --- a/src/generated/swagger/configunstable/client/operations/delete_g_c_p_metrics_integration_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" -) - -// DeleteGCPMetricsIntegrationReader is a Reader for the DeleteGCPMetricsIntegration structure. -type DeleteGCPMetricsIntegrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteGCPMetricsIntegrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteGCPMetricsIntegrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewDeleteGCPMetricsIntegrationBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewDeleteGCPMetricsIntegrationNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewDeleteGCPMetricsIntegrationInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewDeleteGCPMetricsIntegrationDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewDeleteGCPMetricsIntegrationOK creates a DeleteGCPMetricsIntegrationOK with default headers values -func NewDeleteGCPMetricsIntegrationOK() *DeleteGCPMetricsIntegrationOK { - return &DeleteGCPMetricsIntegrationOK{} -} - -/* -DeleteGCPMetricsIntegrationOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type DeleteGCPMetricsIntegrationOK struct { - Payload models.ConfigunstableDeleteGCPMetricsIntegrationResponse -} - -// IsSuccess returns true when this delete g c p metrics integration o k response has a 2xx status code -func (o *DeleteGCPMetricsIntegrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this delete g c p metrics integration o k response has a 3xx status code -func (o *DeleteGCPMetricsIntegrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete g c p metrics integration o k response has a 4xx status code -func (o *DeleteGCPMetricsIntegrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete g c p metrics integration o k response has a 5xx status code -func (o *DeleteGCPMetricsIntegrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this delete g c p metrics integration o k response a status code equal to that given -func (o *DeleteGCPMetricsIntegrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the delete g c p metrics integration o k response -func (o *DeleteGCPMetricsIntegrationOK) Code() int { - return 200 -} - -func (o *DeleteGCPMetricsIntegrationOK) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/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) -} - -func (o *DeleteGCPMetricsIntegrationOK) GetPayload() models.ConfigunstableDeleteGCPMetricsIntegrationResponse { - return o.Payload -} - -func (o *DeleteGCPMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewDeleteGCPMetricsIntegrationBadRequest creates a DeleteGCPMetricsIntegrationBadRequest with default headers values -func NewDeleteGCPMetricsIntegrationBadRequest() *DeleteGCPMetricsIntegrationBadRequest { - return &DeleteGCPMetricsIntegrationBadRequest{} -} - -/* -DeleteGCPMetricsIntegrationBadRequest describes a response with status code 400, with default header values. - -Cannot delete the GCPMetricsIntegration because it is in use. -*/ -type DeleteGCPMetricsIntegrationBadRequest struct { - Payload *models.APIError -} - -// IsSuccess returns true when this delete g c p metrics integration bad request response has a 2xx status code -func (o *DeleteGCPMetricsIntegrationBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete g c p metrics integration bad request response has a 3xx status code -func (o *DeleteGCPMetricsIntegrationBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete g c p metrics integration bad request response has a 4xx status code -func (o *DeleteGCPMetricsIntegrationBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete g c p metrics integration bad request response has a 5xx status code -func (o *DeleteGCPMetricsIntegrationBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this delete g c p metrics integration bad request response a status code equal to that given -func (o *DeleteGCPMetricsIntegrationBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the delete g c p metrics integration bad request response -func (o *DeleteGCPMetricsIntegrationBadRequest) Code() int { - return 400 -} - -func (o *DeleteGCPMetricsIntegrationBadRequest) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/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) -} - -func (o *DeleteGCPMetricsIntegrationBadRequest) GetPayload() *models.APIError { - return o.Payload -} - -func (o *DeleteGCPMetricsIntegrationBadRequest) 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 -} - -// NewDeleteGCPMetricsIntegrationNotFound creates a DeleteGCPMetricsIntegrationNotFound with default headers values -func NewDeleteGCPMetricsIntegrationNotFound() *DeleteGCPMetricsIntegrationNotFound { - return &DeleteGCPMetricsIntegrationNotFound{} -} - -/* -DeleteGCPMetricsIntegrationNotFound describes a response with status code 404, with default header values. - -Cannot delete the GCPMetricsIntegration because the slug does not exist. -*/ -type DeleteGCPMetricsIntegrationNotFound struct { - Payload *models.APIError -} - -// IsSuccess returns true when this delete g c p metrics integration not found response has a 2xx status code -func (o *DeleteGCPMetricsIntegrationNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete g c p metrics integration not found response has a 3xx status code -func (o *DeleteGCPMetricsIntegrationNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete g c p metrics integration not found response has a 4xx status code -func (o *DeleteGCPMetricsIntegrationNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this delete g c p metrics integration not found response has a 5xx status code -func (o *DeleteGCPMetricsIntegrationNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this delete g c p metrics integration not found response a status code equal to that given -func (o *DeleteGCPMetricsIntegrationNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the delete g c p metrics integration not found response -func (o *DeleteGCPMetricsIntegrationNotFound) Code() int { - return 404 -} - -func (o *DeleteGCPMetricsIntegrationNotFound) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/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) -} - -func (o *DeleteGCPMetricsIntegrationNotFound) GetPayload() *models.APIError { - return o.Payload -} - -func (o *DeleteGCPMetricsIntegrationNotFound) 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 -} - -// NewDeleteGCPMetricsIntegrationInternalServerError creates a DeleteGCPMetricsIntegrationInternalServerError with default headers values -func NewDeleteGCPMetricsIntegrationInternalServerError() *DeleteGCPMetricsIntegrationInternalServerError { - return &DeleteGCPMetricsIntegrationInternalServerError{} -} - -/* -DeleteGCPMetricsIntegrationInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type DeleteGCPMetricsIntegrationInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this delete g c p metrics integration internal server error response has a 2xx status code -func (o *DeleteGCPMetricsIntegrationInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this delete g c p metrics integration internal server error response has a 3xx status code -func (o *DeleteGCPMetricsIntegrationInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this delete g c p metrics integration internal server error response has a 4xx status code -func (o *DeleteGCPMetricsIntegrationInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this delete g c p metrics integration internal server error response has a 5xx status code -func (o *DeleteGCPMetricsIntegrationInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this delete g c p metrics integration internal server error response a status code equal to that given -func (o *DeleteGCPMetricsIntegrationInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the delete g c p metrics integration internal server error response -func (o *DeleteGCPMetricsIntegrationInternalServerError) Code() int { - return 500 -} - -func (o *DeleteGCPMetricsIntegrationInternalServerError) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/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) -} - -func (o *DeleteGCPMetricsIntegrationInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *DeleteGCPMetricsIntegrationInternalServerError) 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 -} - -// NewDeleteGCPMetricsIntegrationDefault creates a DeleteGCPMetricsIntegrationDefault with default headers values -func NewDeleteGCPMetricsIntegrationDefault(code int) *DeleteGCPMetricsIntegrationDefault { - return &DeleteGCPMetricsIntegrationDefault{ - _statusCode: code, - } -} - -/* -DeleteGCPMetricsIntegrationDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type DeleteGCPMetricsIntegrationDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this delete g c p metrics integration default response has a 2xx status code -func (o *DeleteGCPMetricsIntegrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this delete g c p metrics integration default response has a 3xx status code -func (o *DeleteGCPMetricsIntegrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this delete g c p metrics integration default response has a 4xx status code -func (o *DeleteGCPMetricsIntegrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this delete g c p metrics integration default response has a 5xx status code -func (o *DeleteGCPMetricsIntegrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this delete g c p metrics integration default response a status code equal to that given -func (o *DeleteGCPMetricsIntegrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the delete g c p metrics integration default response -func (o *DeleteGCPMetricsIntegrationDefault) Code() int { - return o._statusCode -} - -func (o *DeleteGCPMetricsIntegrationDefault) Error() string { - return fmt.Sprintf("[DELETE /api/unstable/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) -} - -func (o *DeleteGCPMetricsIntegrationDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *DeleteGCPMetricsIntegrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.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_gcp_metrics_integration_parameters.go b/src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_parameters.go new file mode 100644 index 0000000..2da0bbc --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewDeleteGcpMetricsIntegrationParams creates a new DeleteGcpMetricsIntegrationParams 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 NewDeleteGcpMetricsIntegrationParams() *DeleteGcpMetricsIntegrationParams { + return &DeleteGcpMetricsIntegrationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewDeleteGcpMetricsIntegrationParamsWithTimeout creates a new DeleteGcpMetricsIntegrationParams object +// with the ability to set a timeout on a request. +func NewDeleteGcpMetricsIntegrationParamsWithTimeout(timeout time.Duration) *DeleteGcpMetricsIntegrationParams { + return &DeleteGcpMetricsIntegrationParams{ + timeout: timeout, + } +} + +// NewDeleteGcpMetricsIntegrationParamsWithContext creates a new DeleteGcpMetricsIntegrationParams object +// with the ability to set a context for a request. +func NewDeleteGcpMetricsIntegrationParamsWithContext(ctx context.Context) *DeleteGcpMetricsIntegrationParams { + return &DeleteGcpMetricsIntegrationParams{ + Context: ctx, + } +} + +// NewDeleteGcpMetricsIntegrationParamsWithHTTPClient creates a new DeleteGcpMetricsIntegrationParams object +// with the ability to set a custom HTTPClient for a request. +func NewDeleteGcpMetricsIntegrationParamsWithHTTPClient(client *http.Client) *DeleteGcpMetricsIntegrationParams { + return &DeleteGcpMetricsIntegrationParams{ + HTTPClient: client, + } +} + +/* +DeleteGcpMetricsIntegrationParams contains all the parameters to send to the API endpoint + + for the delete gcp metrics integration operation. + + Typically these are written to a http.Request. +*/ +type DeleteGcpMetricsIntegrationParams struct { + + // Slug. + Slug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the delete gcp metrics integration params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteGcpMetricsIntegrationParams) WithDefaults() *DeleteGcpMetricsIntegrationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the delete gcp metrics integration params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *DeleteGcpMetricsIntegrationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the delete gcp metrics integration params +func (o *DeleteGcpMetricsIntegrationParams) WithTimeout(timeout time.Duration) *DeleteGcpMetricsIntegrationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the delete gcp metrics integration params +func (o *DeleteGcpMetricsIntegrationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the delete gcp metrics integration params +func (o *DeleteGcpMetricsIntegrationParams) WithContext(ctx context.Context) *DeleteGcpMetricsIntegrationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the delete gcp metrics integration params +func (o *DeleteGcpMetricsIntegrationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the delete gcp metrics integration params +func (o *DeleteGcpMetricsIntegrationParams) WithHTTPClient(client *http.Client) *DeleteGcpMetricsIntegrationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the delete gcp metrics integration params +func (o *DeleteGcpMetricsIntegrationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSlug adds the slug to the delete gcp metrics integration params +func (o *DeleteGcpMetricsIntegrationParams) WithSlug(slug string) *DeleteGcpMetricsIntegrationParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the delete gcp metrics integration params +func (o *DeleteGcpMetricsIntegrationParams) SetSlug(slug string) { + o.Slug = slug +} + +// WriteToRequest writes these params to a swagger request +func (o *DeleteGcpMetricsIntegrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param slug + if err := r.SetPathParam("slug", o.Slug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_responses.go b/src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_responses.go new file mode 100644 index 0000000..8bbc511 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/delete_gcp_metrics_integration_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" +) + +// DeleteGcpMetricsIntegrationReader is a Reader for the DeleteGcpMetricsIntegration structure. +type DeleteGcpMetricsIntegrationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *DeleteGcpMetricsIntegrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewDeleteGcpMetricsIntegrationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewDeleteGcpMetricsIntegrationBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewDeleteGcpMetricsIntegrationNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewDeleteGcpMetricsIntegrationInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewDeleteGcpMetricsIntegrationDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewDeleteGcpMetricsIntegrationOK creates a DeleteGcpMetricsIntegrationOK with default headers values +func NewDeleteGcpMetricsIntegrationOK() *DeleteGcpMetricsIntegrationOK { + return &DeleteGcpMetricsIntegrationOK{} +} + +/* +DeleteGcpMetricsIntegrationOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type DeleteGcpMetricsIntegrationOK struct { + Payload models.ConfigunstableDeleteGcpMetricsIntegrationResponse +} + +// IsSuccess returns true when this delete gcp metrics integration o k response has a 2xx status code +func (o *DeleteGcpMetricsIntegrationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this delete gcp metrics integration o k response has a 3xx status code +func (o *DeleteGcpMetricsIntegrationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete gcp metrics integration o k response has a 4xx status code +func (o *DeleteGcpMetricsIntegrationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete gcp metrics integration o k response has a 5xx status code +func (o *DeleteGcpMetricsIntegrationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this delete gcp metrics integration o k response a status code equal to that given +func (o *DeleteGcpMetricsIntegrationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the delete gcp metrics integration o k response +func (o *DeleteGcpMetricsIntegrationOK) Code() int { + return 200 +} + +func (o *DeleteGcpMetricsIntegrationOK) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/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) +} + +func (o *DeleteGcpMetricsIntegrationOK) GetPayload() models.ConfigunstableDeleteGcpMetricsIntegrationResponse { + return o.Payload +} + +func (o *DeleteGcpMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewDeleteGcpMetricsIntegrationBadRequest creates a DeleteGcpMetricsIntegrationBadRequest with default headers values +func NewDeleteGcpMetricsIntegrationBadRequest() *DeleteGcpMetricsIntegrationBadRequest { + return &DeleteGcpMetricsIntegrationBadRequest{} +} + +/* +DeleteGcpMetricsIntegrationBadRequest describes a response with status code 400, with default header values. + +Cannot delete the GcpMetricsIntegration because it is in use. +*/ +type DeleteGcpMetricsIntegrationBadRequest struct { + Payload *models.APIError +} + +// IsSuccess returns true when this delete gcp metrics integration bad request response has a 2xx status code +func (o *DeleteGcpMetricsIntegrationBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete gcp metrics integration bad request response has a 3xx status code +func (o *DeleteGcpMetricsIntegrationBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete gcp metrics integration bad request response has a 4xx status code +func (o *DeleteGcpMetricsIntegrationBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete gcp metrics integration bad request response has a 5xx status code +func (o *DeleteGcpMetricsIntegrationBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this delete gcp metrics integration bad request response a status code equal to that given +func (o *DeleteGcpMetricsIntegrationBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the delete gcp metrics integration bad request response +func (o *DeleteGcpMetricsIntegrationBadRequest) Code() int { + return 400 +} + +func (o *DeleteGcpMetricsIntegrationBadRequest) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/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) +} + +func (o *DeleteGcpMetricsIntegrationBadRequest) GetPayload() *models.APIError { + return o.Payload +} + +func (o *DeleteGcpMetricsIntegrationBadRequest) 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 +} + +// NewDeleteGcpMetricsIntegrationNotFound creates a DeleteGcpMetricsIntegrationNotFound with default headers values +func NewDeleteGcpMetricsIntegrationNotFound() *DeleteGcpMetricsIntegrationNotFound { + return &DeleteGcpMetricsIntegrationNotFound{} +} + +/* +DeleteGcpMetricsIntegrationNotFound describes a response with status code 404, with default header values. + +Cannot delete the GcpMetricsIntegration because the slug does not exist. +*/ +type DeleteGcpMetricsIntegrationNotFound struct { + Payload *models.APIError +} + +// IsSuccess returns true when this delete gcp metrics integration not found response has a 2xx status code +func (o *DeleteGcpMetricsIntegrationNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete gcp metrics integration not found response has a 3xx status code +func (o *DeleteGcpMetricsIntegrationNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete gcp metrics integration not found response has a 4xx status code +func (o *DeleteGcpMetricsIntegrationNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this delete gcp metrics integration not found response has a 5xx status code +func (o *DeleteGcpMetricsIntegrationNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this delete gcp metrics integration not found response a status code equal to that given +func (o *DeleteGcpMetricsIntegrationNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the delete gcp metrics integration not found response +func (o *DeleteGcpMetricsIntegrationNotFound) Code() int { + return 404 +} + +func (o *DeleteGcpMetricsIntegrationNotFound) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/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) +} + +func (o *DeleteGcpMetricsIntegrationNotFound) GetPayload() *models.APIError { + return o.Payload +} + +func (o *DeleteGcpMetricsIntegrationNotFound) 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 +} + +// NewDeleteGcpMetricsIntegrationInternalServerError creates a DeleteGcpMetricsIntegrationInternalServerError with default headers values +func NewDeleteGcpMetricsIntegrationInternalServerError() *DeleteGcpMetricsIntegrationInternalServerError { + return &DeleteGcpMetricsIntegrationInternalServerError{} +} + +/* +DeleteGcpMetricsIntegrationInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type DeleteGcpMetricsIntegrationInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this delete gcp metrics integration internal server error response has a 2xx status code +func (o *DeleteGcpMetricsIntegrationInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this delete gcp metrics integration internal server error response has a 3xx status code +func (o *DeleteGcpMetricsIntegrationInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this delete gcp metrics integration internal server error response has a 4xx status code +func (o *DeleteGcpMetricsIntegrationInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this delete gcp metrics integration internal server error response has a 5xx status code +func (o *DeleteGcpMetricsIntegrationInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this delete gcp metrics integration internal server error response a status code equal to that given +func (o *DeleteGcpMetricsIntegrationInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the delete gcp metrics integration internal server error response +func (o *DeleteGcpMetricsIntegrationInternalServerError) Code() int { + return 500 +} + +func (o *DeleteGcpMetricsIntegrationInternalServerError) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/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) +} + +func (o *DeleteGcpMetricsIntegrationInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *DeleteGcpMetricsIntegrationInternalServerError) 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 +} + +// NewDeleteGcpMetricsIntegrationDefault creates a DeleteGcpMetricsIntegrationDefault with default headers values +func NewDeleteGcpMetricsIntegrationDefault(code int) *DeleteGcpMetricsIntegrationDefault { + return &DeleteGcpMetricsIntegrationDefault{ + _statusCode: code, + } +} + +/* +DeleteGcpMetricsIntegrationDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type DeleteGcpMetricsIntegrationDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this delete gcp metrics integration default response has a 2xx status code +func (o *DeleteGcpMetricsIntegrationDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this delete gcp metrics integration default response has a 3xx status code +func (o *DeleteGcpMetricsIntegrationDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this delete gcp metrics integration default response has a 4xx status code +func (o *DeleteGcpMetricsIntegrationDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this delete gcp metrics integration default response has a 5xx status code +func (o *DeleteGcpMetricsIntegrationDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this delete gcp metrics integration default response a status code equal to that given +func (o *DeleteGcpMetricsIntegrationDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the delete gcp metrics integration default response +func (o *DeleteGcpMetricsIntegrationDefault) Code() int { + return o._statusCode +} + +func (o *DeleteGcpMetricsIntegrationDefault) Error() string { + return fmt.Sprintf("[DELETE /api/unstable/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) +} + +func (o *DeleteGcpMetricsIntegrationDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *DeleteGcpMetricsIntegrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.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/list_g_c_p_metrics_integrations_responses.go b/src/generated/swagger/configunstable/client/operations/list_g_c_p_metrics_integrations_responses.go deleted file mode 100644 index e25ac74..0000000 --- a/src/generated/swagger/configunstable/client/operations/list_g_c_p_metrics_integrations_responses.go +++ /dev/null @@ -1,254 +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" -) - -// ListGCPMetricsIntegrationsReader is a Reader for the ListGCPMetricsIntegrations structure. -type ListGCPMetricsIntegrationsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ListGCPMetricsIntegrationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewListGCPMetricsIntegrationsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 500: - result := NewListGCPMetricsIntegrationsInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewListGCPMetricsIntegrationsDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewListGCPMetricsIntegrationsOK creates a ListGCPMetricsIntegrationsOK with default headers values -func NewListGCPMetricsIntegrationsOK() *ListGCPMetricsIntegrationsOK { - return &ListGCPMetricsIntegrationsOK{} -} - -/* -ListGCPMetricsIntegrationsOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ListGCPMetricsIntegrationsOK struct { - Payload *models.ConfigunstableListGCPMetricsIntegrationsResponse -} - -// IsSuccess returns true when this list g c p metrics integrations o k response has a 2xx status code -func (o *ListGCPMetricsIntegrationsOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this list g c p metrics integrations o k response has a 3xx status code -func (o *ListGCPMetricsIntegrationsOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list g c p metrics integrations o k response has a 4xx status code -func (o *ListGCPMetricsIntegrationsOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this list g c p metrics integrations o k response has a 5xx status code -func (o *ListGCPMetricsIntegrationsOK) IsServerError() bool { - return false -} - -// IsCode returns true when this list g c p metrics integrations o k response a status code equal to that given -func (o *ListGCPMetricsIntegrationsOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the list g c p metrics integrations o k response -func (o *ListGCPMetricsIntegrationsOK) Code() int { - return 200 -} - -func (o *ListGCPMetricsIntegrationsOK) Error() string { - return fmt.Sprintf("[GET /api/unstable/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) -} - -func (o *ListGCPMetricsIntegrationsOK) GetPayload() *models.ConfigunstableListGCPMetricsIntegrationsResponse { - return o.Payload -} - -func (o *ListGCPMetricsIntegrationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ConfigunstableListGCPMetricsIntegrationsResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewListGCPMetricsIntegrationsInternalServerError creates a ListGCPMetricsIntegrationsInternalServerError with default headers values -func NewListGCPMetricsIntegrationsInternalServerError() *ListGCPMetricsIntegrationsInternalServerError { - return &ListGCPMetricsIntegrationsInternalServerError{} -} - -/* -ListGCPMetricsIntegrationsInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type ListGCPMetricsIntegrationsInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this list g c p metrics integrations internal server error response has a 2xx status code -func (o *ListGCPMetricsIntegrationsInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this list g c p metrics integrations internal server error response has a 3xx status code -func (o *ListGCPMetricsIntegrationsInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this list g c p metrics integrations internal server error response has a 4xx status code -func (o *ListGCPMetricsIntegrationsInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this list g c p metrics integrations internal server error response has a 5xx status code -func (o *ListGCPMetricsIntegrationsInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this list g c p metrics integrations internal server error response a status code equal to that given -func (o *ListGCPMetricsIntegrationsInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the list g c p metrics integrations internal server error response -func (o *ListGCPMetricsIntegrationsInternalServerError) Code() int { - return 500 -} - -func (o *ListGCPMetricsIntegrationsInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/unstable/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) -} - -func (o *ListGCPMetricsIntegrationsInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *ListGCPMetricsIntegrationsInternalServerError) 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 -} - -// NewListGCPMetricsIntegrationsDefault creates a ListGCPMetricsIntegrationsDefault with default headers values -func NewListGCPMetricsIntegrationsDefault(code int) *ListGCPMetricsIntegrationsDefault { - return &ListGCPMetricsIntegrationsDefault{ - _statusCode: code, - } -} - -/* -ListGCPMetricsIntegrationsDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type ListGCPMetricsIntegrationsDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this list g c p metrics integrations default response has a 2xx status code -func (o *ListGCPMetricsIntegrationsDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this list g c p metrics integrations default response has a 3xx status code -func (o *ListGCPMetricsIntegrationsDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this list g c p metrics integrations default response has a 4xx status code -func (o *ListGCPMetricsIntegrationsDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this list g c p metrics integrations default response has a 5xx status code -func (o *ListGCPMetricsIntegrationsDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this list g c p metrics integrations default response a status code equal to that given -func (o *ListGCPMetricsIntegrationsDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the list g c p metrics integrations default response -func (o *ListGCPMetricsIntegrationsDefault) Code() int { - return o._statusCode -} - -func (o *ListGCPMetricsIntegrationsDefault) Error() string { - return fmt.Sprintf("[GET /api/unstable/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) -} - -func (o *ListGCPMetricsIntegrationsDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *ListGCPMetricsIntegrationsDefault) readResponse(response runtime.ClientResponse, consumer runtime.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/list_g_c_p_metrics_integrations_parameters.go b/src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_parameters.go similarity index 51% rename from src/generated/swagger/configunstable/client/operations/list_g_c_p_metrics_integrations_parameters.go rename to src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_parameters.go index 0ab221f..f693b69 100644 --- a/src/generated/swagger/configunstable/client/operations/list_g_c_p_metrics_integrations_parameters.go +++ b/src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_parameters.go @@ -17,54 +17,54 @@ import ( "github.com/go-openapi/swag" ) -// NewListGCPMetricsIntegrationsParams creates a new ListGCPMetricsIntegrationsParams object, +// NewListGcpMetricsIntegrationsParams creates a new ListGcpMetricsIntegrationsParams 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 NewListGCPMetricsIntegrationsParams() *ListGCPMetricsIntegrationsParams { - return &ListGCPMetricsIntegrationsParams{ +func NewListGcpMetricsIntegrationsParams() *ListGcpMetricsIntegrationsParams { + return &ListGcpMetricsIntegrationsParams{ timeout: cr.DefaultTimeout, } } -// NewListGCPMetricsIntegrationsParamsWithTimeout creates a new ListGCPMetricsIntegrationsParams object +// NewListGcpMetricsIntegrationsParamsWithTimeout creates a new ListGcpMetricsIntegrationsParams object // with the ability to set a timeout on a request. -func NewListGCPMetricsIntegrationsParamsWithTimeout(timeout time.Duration) *ListGCPMetricsIntegrationsParams { - return &ListGCPMetricsIntegrationsParams{ +func NewListGcpMetricsIntegrationsParamsWithTimeout(timeout time.Duration) *ListGcpMetricsIntegrationsParams { + return &ListGcpMetricsIntegrationsParams{ timeout: timeout, } } -// NewListGCPMetricsIntegrationsParamsWithContext creates a new ListGCPMetricsIntegrationsParams object +// NewListGcpMetricsIntegrationsParamsWithContext creates a new ListGcpMetricsIntegrationsParams object // with the ability to set a context for a request. -func NewListGCPMetricsIntegrationsParamsWithContext(ctx context.Context) *ListGCPMetricsIntegrationsParams { - return &ListGCPMetricsIntegrationsParams{ +func NewListGcpMetricsIntegrationsParamsWithContext(ctx context.Context) *ListGcpMetricsIntegrationsParams { + return &ListGcpMetricsIntegrationsParams{ Context: ctx, } } -// NewListGCPMetricsIntegrationsParamsWithHTTPClient creates a new ListGCPMetricsIntegrationsParams object +// NewListGcpMetricsIntegrationsParamsWithHTTPClient creates a new ListGcpMetricsIntegrationsParams object // with the ability to set a custom HTTPClient for a request. -func NewListGCPMetricsIntegrationsParamsWithHTTPClient(client *http.Client) *ListGCPMetricsIntegrationsParams { - return &ListGCPMetricsIntegrationsParams{ +func NewListGcpMetricsIntegrationsParamsWithHTTPClient(client *http.Client) *ListGcpMetricsIntegrationsParams { + return &ListGcpMetricsIntegrationsParams{ HTTPClient: client, } } /* -ListGCPMetricsIntegrationsParams contains all the parameters to send to the API endpoint +ListGcpMetricsIntegrationsParams contains all the parameters to send to the API endpoint - for the list g c p metrics integrations operation. + for the list gcp metrics integrations operation. Typically these are written to a http.Request. */ -type ListGCPMetricsIntegrationsParams struct { +type ListGcpMetricsIntegrationsParams struct { /* Names. - Filters results by name, where any GCPMetricsIntegration with a matching name in the given list (and matches all other filters) is returned. + Filters results by name, where any GcpMetricsIntegration with a matching name in the given list (and matches all other filters) is returned. */ Names []string @@ -87,7 +87,7 @@ type ListGCPMetricsIntegrationsParams struct { /* Slugs. - Filters results by slug, where any GCPMetricsIntegration with a matching slug in the given list (and matches all other filters) is returned. + Filters results by slug, where any GcpMetricsIntegration with a matching slug in the given list (and matches all other filters) is returned. */ Slugs []string @@ -96,100 +96,100 @@ type ListGCPMetricsIntegrationsParams struct { HTTPClient *http.Client } -// WithDefaults hydrates default values in the list g c p metrics integrations params (not the query body). +// WithDefaults hydrates default values in the list gcp metrics integrations params (not the query body). // // All values with no default are reset to their zero value. -func (o *ListGCPMetricsIntegrationsParams) WithDefaults() *ListGCPMetricsIntegrationsParams { +func (o *ListGcpMetricsIntegrationsParams) WithDefaults() *ListGcpMetricsIntegrationsParams { o.SetDefaults() return o } -// SetDefaults hydrates default values in the list g c p metrics integrations params (not the query body). +// SetDefaults hydrates default values in the list gcp metrics integrations params (not the query body). // // All values with no default are reset to their zero value. -func (o *ListGCPMetricsIntegrationsParams) SetDefaults() { +func (o *ListGcpMetricsIntegrationsParams) SetDefaults() { // no default values defined for this parameter } -// WithTimeout adds the timeout to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) WithTimeout(timeout time.Duration) *ListGCPMetricsIntegrationsParams { +// WithTimeout adds the timeout to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) WithTimeout(timeout time.Duration) *ListGcpMetricsIntegrationsParams { o.SetTimeout(timeout) return o } -// SetTimeout adds the timeout to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) SetTimeout(timeout time.Duration) { +// SetTimeout adds the timeout to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } -// WithContext adds the context to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) WithContext(ctx context.Context) *ListGCPMetricsIntegrationsParams { +// WithContext adds the context to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) WithContext(ctx context.Context) *ListGcpMetricsIntegrationsParams { o.SetContext(ctx) return o } -// SetContext adds the context to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) SetContext(ctx context.Context) { +// SetContext adds the context to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) SetContext(ctx context.Context) { o.Context = ctx } -// WithHTTPClient adds the HTTPClient to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) WithHTTPClient(client *http.Client) *ListGCPMetricsIntegrationsParams { +// WithHTTPClient adds the HTTPClient to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) WithHTTPClient(client *http.Client) *ListGcpMetricsIntegrationsParams { o.SetHTTPClient(client) return o } -// SetHTTPClient adds the HTTPClient to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) SetHTTPClient(client *http.Client) { +// SetHTTPClient adds the HTTPClient to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } -// WithNames adds the names to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) WithNames(names []string) *ListGCPMetricsIntegrationsParams { +// WithNames adds the names to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) WithNames(names []string) *ListGcpMetricsIntegrationsParams { o.SetNames(names) return o } -// SetNames adds the names to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) SetNames(names []string) { +// SetNames adds the names to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) SetNames(names []string) { o.Names = names } -// WithPageMaxSize adds the pageMaxSize to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) WithPageMaxSize(pageMaxSize *int64) *ListGCPMetricsIntegrationsParams { +// WithPageMaxSize adds the pageMaxSize to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) WithPageMaxSize(pageMaxSize *int64) *ListGcpMetricsIntegrationsParams { o.SetPageMaxSize(pageMaxSize) return o } -// SetPageMaxSize adds the pageMaxSize to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) SetPageMaxSize(pageMaxSize *int64) { +// SetPageMaxSize adds the pageMaxSize to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) SetPageMaxSize(pageMaxSize *int64) { o.PageMaxSize = pageMaxSize } -// WithPageToken adds the pageToken to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) WithPageToken(pageToken *string) *ListGCPMetricsIntegrationsParams { +// WithPageToken adds the pageToken to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) WithPageToken(pageToken *string) *ListGcpMetricsIntegrationsParams { o.SetPageToken(pageToken) return o } -// SetPageToken adds the pageToken to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) SetPageToken(pageToken *string) { +// SetPageToken adds the pageToken to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) SetPageToken(pageToken *string) { o.PageToken = pageToken } -// WithSlugs adds the slugs to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) WithSlugs(slugs []string) *ListGCPMetricsIntegrationsParams { +// WithSlugs adds the slugs to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) WithSlugs(slugs []string) *ListGcpMetricsIntegrationsParams { o.SetSlugs(slugs) return o } -// SetSlugs adds the slugs to the list g c p metrics integrations params -func (o *ListGCPMetricsIntegrationsParams) SetSlugs(slugs []string) { +// SetSlugs adds the slugs to the list gcp metrics integrations params +func (o *ListGcpMetricsIntegrationsParams) SetSlugs(slugs []string) { o.Slugs = slugs } // WriteToRequest writes these params to a swagger request -func (o *ListGCPMetricsIntegrationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { +func (o *ListGcpMetricsIntegrationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err @@ -258,8 +258,8 @@ func (o *ListGCPMetricsIntegrationsParams) WriteToRequest(r runtime.ClientReques return nil } -// bindParamListGCPMetricsIntegrations binds the parameter names -func (o *ListGCPMetricsIntegrationsParams) bindParamNames(formats strfmt.Registry) []string { +// bindParamListGcpMetricsIntegrations binds the parameter names +func (o *ListGcpMetricsIntegrationsParams) bindParamNames(formats strfmt.Registry) []string { namesIR := o.Names var namesIC []string @@ -275,8 +275,8 @@ func (o *ListGCPMetricsIntegrationsParams) bindParamNames(formats strfmt.Registr return namesIS } -// bindParamListGCPMetricsIntegrations binds the parameter slugs -func (o *ListGCPMetricsIntegrationsParams) bindParamSlugs(formats strfmt.Registry) []string { +// bindParamListGcpMetricsIntegrations binds the parameter slugs +func (o *ListGcpMetricsIntegrationsParams) bindParamSlugs(formats strfmt.Registry) []string { slugsIR := o.Slugs var slugsIC []string diff --git a/src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_responses.go b/src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_responses.go new file mode 100644 index 0000000..e50ef5f --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/list_gcp_metrics_integrations_responses.go @@ -0,0 +1,254 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This 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" +) + +// ListGcpMetricsIntegrationsReader is a Reader for the ListGcpMetricsIntegrations structure. +type ListGcpMetricsIntegrationsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ListGcpMetricsIntegrationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewListGcpMetricsIntegrationsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 500: + result := NewListGcpMetricsIntegrationsInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewListGcpMetricsIntegrationsDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewListGcpMetricsIntegrationsOK creates a ListGcpMetricsIntegrationsOK with default headers values +func NewListGcpMetricsIntegrationsOK() *ListGcpMetricsIntegrationsOK { + return &ListGcpMetricsIntegrationsOK{} +} + +/* +ListGcpMetricsIntegrationsOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ListGcpMetricsIntegrationsOK struct { + Payload *models.ConfigunstableListGcpMetricsIntegrationsResponse +} + +// IsSuccess returns true when this list gcp metrics integrations o k response has a 2xx status code +func (o *ListGcpMetricsIntegrationsOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this list gcp metrics integrations o k response has a 3xx status code +func (o *ListGcpMetricsIntegrationsOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list gcp metrics integrations o k response has a 4xx status code +func (o *ListGcpMetricsIntegrationsOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this list gcp metrics integrations o k response has a 5xx status code +func (o *ListGcpMetricsIntegrationsOK) IsServerError() bool { + return false +} + +// IsCode returns true when this list gcp metrics integrations o k response a status code equal to that given +func (o *ListGcpMetricsIntegrationsOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the list gcp metrics integrations o k response +func (o *ListGcpMetricsIntegrationsOK) Code() int { + return 200 +} + +func (o *ListGcpMetricsIntegrationsOK) Error() string { + return fmt.Sprintf("[GET /api/unstable/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) +} + +func (o *ListGcpMetricsIntegrationsOK) GetPayload() *models.ConfigunstableListGcpMetricsIntegrationsResponse { + return o.Payload +} + +func (o *ListGcpMetricsIntegrationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigunstableListGcpMetricsIntegrationsResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewListGcpMetricsIntegrationsInternalServerError creates a ListGcpMetricsIntegrationsInternalServerError with default headers values +func NewListGcpMetricsIntegrationsInternalServerError() *ListGcpMetricsIntegrationsInternalServerError { + return &ListGcpMetricsIntegrationsInternalServerError{} +} + +/* +ListGcpMetricsIntegrationsInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type ListGcpMetricsIntegrationsInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this list gcp metrics integrations internal server error response has a 2xx status code +func (o *ListGcpMetricsIntegrationsInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this list gcp metrics integrations internal server error response has a 3xx status code +func (o *ListGcpMetricsIntegrationsInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this list gcp metrics integrations internal server error response has a 4xx status code +func (o *ListGcpMetricsIntegrationsInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this list gcp metrics integrations internal server error response has a 5xx status code +func (o *ListGcpMetricsIntegrationsInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this list gcp metrics integrations internal server error response a status code equal to that given +func (o *ListGcpMetricsIntegrationsInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the list gcp metrics integrations internal server error response +func (o *ListGcpMetricsIntegrationsInternalServerError) Code() int { + return 500 +} + +func (o *ListGcpMetricsIntegrationsInternalServerError) Error() string { + return fmt.Sprintf("[GET /api/unstable/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) +} + +func (o *ListGcpMetricsIntegrationsInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *ListGcpMetricsIntegrationsInternalServerError) 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 +} + +// NewListGcpMetricsIntegrationsDefault creates a ListGcpMetricsIntegrationsDefault with default headers values +func NewListGcpMetricsIntegrationsDefault(code int) *ListGcpMetricsIntegrationsDefault { + return &ListGcpMetricsIntegrationsDefault{ + _statusCode: code, + } +} + +/* +ListGcpMetricsIntegrationsDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type ListGcpMetricsIntegrationsDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this list gcp metrics integrations default response has a 2xx status code +func (o *ListGcpMetricsIntegrationsDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this list gcp metrics integrations default response has a 3xx status code +func (o *ListGcpMetricsIntegrationsDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this list gcp metrics integrations default response has a 4xx status code +func (o *ListGcpMetricsIntegrationsDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this list gcp metrics integrations default response has a 5xx status code +func (o *ListGcpMetricsIntegrationsDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this list gcp metrics integrations default response a status code equal to that given +func (o *ListGcpMetricsIntegrationsDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the list gcp metrics integrations default response +func (o *ListGcpMetricsIntegrationsDefault) Code() int { + return o._statusCode +} + +func (o *ListGcpMetricsIntegrationsDefault) Error() string { + return fmt.Sprintf("[GET /api/unstable/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) +} + +func (o *ListGcpMetricsIntegrationsDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *ListGcpMetricsIntegrationsDefault) readResponse(response runtime.ClientResponse, consumer runtime.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 d986b81..b55af88 100644 --- a/src/generated/swagger/configunstable/client/operations/operations_client.go +++ b/src/generated/swagger/configunstable/client/operations/operations_client.go @@ -32,7 +32,7 @@ type ClientService interface { CreateDataset(params *CreateDatasetParams, opts ...ClientOption) (*CreateDatasetOK, error) - CreateGCPMetricsIntegration(params *CreateGCPMetricsIntegrationParams, opts ...ClientOption) (*CreateGCPMetricsIntegrationOK, error) + CreateGcpMetricsIntegration(params *CreateGcpMetricsIntegrationParams, opts ...ClientOption) (*CreateGcpMetricsIntegrationOK, error) CreateLinkTemplate(params *CreateLinkTemplateParams, opts ...ClientOption) (*CreateLinkTemplateOK, error) @@ -50,7 +50,7 @@ type ClientService interface { DeleteDataset(params *DeleteDatasetParams, opts ...ClientOption) (*DeleteDatasetOK, error) - DeleteGCPMetricsIntegration(params *DeleteGCPMetricsIntegrationParams, opts ...ClientOption) (*DeleteGCPMetricsIntegrationOK, error) + DeleteGcpMetricsIntegration(params *DeleteGcpMetricsIntegrationParams, opts ...ClientOption) (*DeleteGcpMetricsIntegrationOK, error) DeleteLinkTemplate(params *DeleteLinkTemplateParams, opts ...ClientOption) (*DeleteLinkTemplateOK, error) @@ -68,7 +68,7 @@ type ClientService interface { ListDatasets(params *ListDatasetsParams, opts ...ClientOption) (*ListDatasetsOK, error) - ListGCPMetricsIntegrations(params *ListGCPMetricsIntegrationsParams, opts ...ClientOption) (*ListGCPMetricsIntegrationsOK, error) + ListGcpMetricsIntegrations(params *ListGcpMetricsIntegrationsParams, opts ...ClientOption) (*ListGcpMetricsIntegrationsOK, error) ListLinkTemplates(params *ListLinkTemplatesParams, opts ...ClientOption) (*ListLinkTemplatesOK, error) @@ -84,7 +84,7 @@ type ClientService interface { ReadDataset(params *ReadDatasetParams, opts ...ClientOption) (*ReadDatasetOK, error) - ReadGCPMetricsIntegration(params *ReadGCPMetricsIntegrationParams, opts ...ClientOption) (*ReadGCPMetricsIntegrationOK, error) + ReadGcpMetricsIntegration(params *ReadGcpMetricsIntegrationParams, opts ...ClientOption) (*ReadGcpMetricsIntegrationOK, error) ReadLinkTemplate(params *ReadLinkTemplateParams, opts ...ClientOption) (*ReadLinkTemplateOK, error) @@ -104,7 +104,7 @@ type ClientService interface { UpdateDataset(params *UpdateDatasetParams, opts ...ClientOption) (*UpdateDatasetOK, error) - UpdateGCPMetricsIntegration(params *UpdateGCPMetricsIntegrationParams, opts ...ClientOption) (*UpdateGCPMetricsIntegrationOK, error) + UpdateGcpMetricsIntegration(params *UpdateGcpMetricsIntegrationParams, opts ...ClientOption) (*UpdateGcpMetricsIntegrationOK, error) UpdateLinkTemplate(params *UpdateLinkTemplateParams, opts ...ClientOption) (*UpdateLinkTemplateOK, error) @@ -196,22 +196,22 @@ func (a *Client) CreateDataset(params *CreateDatasetParams, opts ...ClientOption } /* -CreateGCPMetricsIntegration create g c p metrics integration API +CreateGcpMetricsIntegration create gcp metrics integration API */ -func (a *Client) CreateGCPMetricsIntegration(params *CreateGCPMetricsIntegrationParams, opts ...ClientOption) (*CreateGCPMetricsIntegrationOK, error) { +func (a *Client) CreateGcpMetricsIntegration(params *CreateGcpMetricsIntegrationParams, opts ...ClientOption) (*CreateGcpMetricsIntegrationOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewCreateGCPMetricsIntegrationParams() + params = NewCreateGcpMetricsIntegrationParams() } op := &runtime.ClientOperation{ - ID: "CreateGCPMetricsIntegration", + 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}, + Reader: &CreateGcpMetricsIntegrationReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -223,12 +223,12 @@ func (a *Client) CreateGCPMetricsIntegration(params *CreateGCPMetricsIntegration if err != nil { return nil, err } - success, ok := result.(*CreateGCPMetricsIntegrationOK) + success, ok := result.(*CreateGcpMetricsIntegrationOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*CreateGCPMetricsIntegrationDefault) + unexpectedSuccess := result.(*CreateGcpMetricsIntegrationDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -532,22 +532,22 @@ func (a *Client) DeleteDataset(params *DeleteDatasetParams, opts ...ClientOption } /* -DeleteGCPMetricsIntegration delete g c p metrics integration API +DeleteGcpMetricsIntegration delete gcp metrics integration API */ -func (a *Client) DeleteGCPMetricsIntegration(params *DeleteGCPMetricsIntegrationParams, opts ...ClientOption) (*DeleteGCPMetricsIntegrationOK, error) { +func (a *Client) DeleteGcpMetricsIntegration(params *DeleteGcpMetricsIntegrationParams, opts ...ClientOption) (*DeleteGcpMetricsIntegrationOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewDeleteGCPMetricsIntegrationParams() + params = NewDeleteGcpMetricsIntegrationParams() } op := &runtime.ClientOperation{ - ID: "DeleteGCPMetricsIntegration", + 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}, + Reader: &DeleteGcpMetricsIntegrationReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -559,12 +559,12 @@ func (a *Client) DeleteGCPMetricsIntegration(params *DeleteGCPMetricsIntegration if err != nil { return nil, err } - success, ok := result.(*DeleteGCPMetricsIntegrationOK) + success, ok := result.(*DeleteGcpMetricsIntegrationOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*DeleteGCPMetricsIntegrationDefault) + unexpectedSuccess := result.(*DeleteGcpMetricsIntegrationDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -865,22 +865,22 @@ func (a *Client) ListDatasets(params *ListDatasetsParams, opts ...ClientOption) } /* -ListGCPMetricsIntegrations list g c p metrics integrations API +ListGcpMetricsIntegrations list gcp metrics integrations API */ -func (a *Client) ListGCPMetricsIntegrations(params *ListGCPMetricsIntegrationsParams, opts ...ClientOption) (*ListGCPMetricsIntegrationsOK, error) { +func (a *Client) ListGcpMetricsIntegrations(params *ListGcpMetricsIntegrationsParams, opts ...ClientOption) (*ListGcpMetricsIntegrationsOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewListGCPMetricsIntegrationsParams() + params = NewListGcpMetricsIntegrationsParams() } op := &runtime.ClientOperation{ - ID: "ListGCPMetricsIntegrations", + 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}, + Reader: &ListGcpMetricsIntegrationsReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -892,12 +892,12 @@ func (a *Client) ListGCPMetricsIntegrations(params *ListGCPMetricsIntegrationsPa if err != nil { return nil, err } - success, ok := result.(*ListGCPMetricsIntegrationsOK) + success, ok := result.(*ListGcpMetricsIntegrationsOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ListGCPMetricsIntegrationsDefault) + unexpectedSuccess := result.(*ListGcpMetricsIntegrationsDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -1161,22 +1161,22 @@ func (a *Client) ReadDataset(params *ReadDatasetParams, opts ...ClientOption) (* } /* -ReadGCPMetricsIntegration read g c p metrics integration API +ReadGcpMetricsIntegration read gcp metrics integration API */ -func (a *Client) ReadGCPMetricsIntegration(params *ReadGCPMetricsIntegrationParams, opts ...ClientOption) (*ReadGCPMetricsIntegrationOK, error) { +func (a *Client) ReadGcpMetricsIntegration(params *ReadGcpMetricsIntegrationParams, opts ...ClientOption) (*ReadGcpMetricsIntegrationOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewReadGCPMetricsIntegrationParams() + params = NewReadGcpMetricsIntegrationParams() } op := &runtime.ClientOperation{ - ID: "ReadGCPMetricsIntegration", + 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}, + Reader: &ReadGcpMetricsIntegrationReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -1188,12 +1188,12 @@ func (a *Client) ReadGCPMetricsIntegration(params *ReadGCPMetricsIntegrationPara if err != nil { return nil, err } - success, ok := result.(*ReadGCPMetricsIntegrationOK) + success, ok := result.(*ReadGcpMetricsIntegrationOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*ReadGCPMetricsIntegrationDefault) + unexpectedSuccess := result.(*ReadGcpMetricsIntegrationDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } @@ -1534,22 +1534,22 @@ func (a *Client) UpdateDataset(params *UpdateDatasetParams, opts ...ClientOption } /* -UpdateGCPMetricsIntegration update g c p metrics integration API +UpdateGcpMetricsIntegration update gcp metrics integration API */ -func (a *Client) UpdateGCPMetricsIntegration(params *UpdateGCPMetricsIntegrationParams, opts ...ClientOption) (*UpdateGCPMetricsIntegrationOK, error) { +func (a *Client) UpdateGcpMetricsIntegration(params *UpdateGcpMetricsIntegrationParams, opts ...ClientOption) (*UpdateGcpMetricsIntegrationOK, error) { // TODO: Validate the params before sending if params == nil { - params = NewUpdateGCPMetricsIntegrationParams() + params = NewUpdateGcpMetricsIntegrationParams() } op := &runtime.ClientOperation{ - ID: "UpdateGCPMetricsIntegration", + 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}, + Reader: &UpdateGcpMetricsIntegrationReader{formats: a.formats}, Context: params.Context, Client: params.HTTPClient, } @@ -1561,12 +1561,12 @@ func (a *Client) UpdateGCPMetricsIntegration(params *UpdateGCPMetricsIntegration if err != nil { return nil, err } - success, ok := result.(*UpdateGCPMetricsIntegrationOK) + success, ok := result.(*UpdateGcpMetricsIntegrationOK) if ok { return success, nil } // unexpected success response - unexpectedSuccess := result.(*UpdateGCPMetricsIntegrationDefault) + unexpectedSuccess := result.(*UpdateGcpMetricsIntegrationDefault) 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_g_c_p_metrics_integration_parameters.go b/src/generated/swagger/configunstable/client/operations/read_g_c_p_metrics_integration_parameters.go deleted file mode 100644 index 0b5e0b4..0000000 --- a/src/generated/swagger/configunstable/client/operations/read_g_c_p_metrics_integration_parameters.go +++ /dev/null @@ -1,148 +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" -) - -// NewReadGCPMetricsIntegrationParams creates a new ReadGCPMetricsIntegrationParams 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 NewReadGCPMetricsIntegrationParams() *ReadGCPMetricsIntegrationParams { - return &ReadGCPMetricsIntegrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewReadGCPMetricsIntegrationParamsWithTimeout creates a new ReadGCPMetricsIntegrationParams object -// with the ability to set a timeout on a request. -func NewReadGCPMetricsIntegrationParamsWithTimeout(timeout time.Duration) *ReadGCPMetricsIntegrationParams { - return &ReadGCPMetricsIntegrationParams{ - timeout: timeout, - } -} - -// NewReadGCPMetricsIntegrationParamsWithContext creates a new ReadGCPMetricsIntegrationParams object -// with the ability to set a context for a request. -func NewReadGCPMetricsIntegrationParamsWithContext(ctx context.Context) *ReadGCPMetricsIntegrationParams { - return &ReadGCPMetricsIntegrationParams{ - Context: ctx, - } -} - -// NewReadGCPMetricsIntegrationParamsWithHTTPClient creates a new ReadGCPMetricsIntegrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewReadGCPMetricsIntegrationParamsWithHTTPClient(client *http.Client) *ReadGCPMetricsIntegrationParams { - return &ReadGCPMetricsIntegrationParams{ - HTTPClient: client, - } -} - -/* -ReadGCPMetricsIntegrationParams contains all the parameters to send to the API endpoint - - for the read g c p metrics integration operation. - - Typically these are written to a http.Request. -*/ -type ReadGCPMetricsIntegrationParams struct { - - // Slug. - Slug string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the read g c p metrics integration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadGCPMetricsIntegrationParams) WithDefaults() *ReadGCPMetricsIntegrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the read g c p metrics integration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *ReadGCPMetricsIntegrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the read g c p metrics integration params -func (o *ReadGCPMetricsIntegrationParams) WithTimeout(timeout time.Duration) *ReadGCPMetricsIntegrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the read g c p metrics integration params -func (o *ReadGCPMetricsIntegrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the read g c p metrics integration params -func (o *ReadGCPMetricsIntegrationParams) WithContext(ctx context.Context) *ReadGCPMetricsIntegrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the read g c p metrics integration params -func (o *ReadGCPMetricsIntegrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the read g c p metrics integration params -func (o *ReadGCPMetricsIntegrationParams) WithHTTPClient(client *http.Client) *ReadGCPMetricsIntegrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the read g c p metrics integration params -func (o *ReadGCPMetricsIntegrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithSlug adds the slug to the read g c p metrics integration params -func (o *ReadGCPMetricsIntegrationParams) WithSlug(slug string) *ReadGCPMetricsIntegrationParams { - o.SetSlug(slug) - return o -} - -// SetSlug adds the slug to the read g c p metrics integration params -func (o *ReadGCPMetricsIntegrationParams) SetSlug(slug string) { - o.Slug = slug -} - -// WriteToRequest writes these params to a swagger request -func (o *ReadGCPMetricsIntegrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param slug - if err := r.SetPathParam("slug", o.Slug); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/read_g_c_p_metrics_integration_responses.go b/src/generated/swagger/configunstable/client/operations/read_g_c_p_metrics_integration_responses.go deleted file mode 100644 index 23dca29..0000000 --- a/src/generated/swagger/configunstable/client/operations/read_g_c_p_metrics_integration_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" -) - -// ReadGCPMetricsIntegrationReader is a Reader for the ReadGCPMetricsIntegration structure. -type ReadGCPMetricsIntegrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *ReadGCPMetricsIntegrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewReadGCPMetricsIntegrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 404: - result := NewReadGCPMetricsIntegrationNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewReadGCPMetricsIntegrationInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewReadGCPMetricsIntegrationDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewReadGCPMetricsIntegrationOK creates a ReadGCPMetricsIntegrationOK with default headers values -func NewReadGCPMetricsIntegrationOK() *ReadGCPMetricsIntegrationOK { - return &ReadGCPMetricsIntegrationOK{} -} - -/* -ReadGCPMetricsIntegrationOK describes a response with status code 200, with default header values. - -A successful response. -*/ -type ReadGCPMetricsIntegrationOK struct { - Payload *models.ConfigunstableReadGCPMetricsIntegrationResponse -} - -// IsSuccess returns true when this read g c p metrics integration o k response has a 2xx status code -func (o *ReadGCPMetricsIntegrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this read g c p metrics integration o k response has a 3xx status code -func (o *ReadGCPMetricsIntegrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read g c p metrics integration o k response has a 4xx status code -func (o *ReadGCPMetricsIntegrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this read g c p metrics integration o k response has a 5xx status code -func (o *ReadGCPMetricsIntegrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this read g c p metrics integration o k response a status code equal to that given -func (o *ReadGCPMetricsIntegrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the read g c p metrics integration o k response -func (o *ReadGCPMetricsIntegrationOK) Code() int { - return 200 -} - -func (o *ReadGCPMetricsIntegrationOK) Error() string { - return fmt.Sprintf("[GET /api/unstable/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) -} - -func (o *ReadGCPMetricsIntegrationOK) GetPayload() *models.ConfigunstableReadGCPMetricsIntegrationResponse { - return o.Payload -} - -func (o *ReadGCPMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ConfigunstableReadGCPMetricsIntegrationResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewReadGCPMetricsIntegrationNotFound creates a ReadGCPMetricsIntegrationNotFound with default headers values -func NewReadGCPMetricsIntegrationNotFound() *ReadGCPMetricsIntegrationNotFound { - return &ReadGCPMetricsIntegrationNotFound{} -} - -/* -ReadGCPMetricsIntegrationNotFound describes a response with status code 404, with default header values. - -Cannot read the GCPMetricsIntegration because the slug does not exist. -*/ -type ReadGCPMetricsIntegrationNotFound struct { - Payload *models.APIError -} - -// IsSuccess returns true when this read g c p metrics integration not found response has a 2xx status code -func (o *ReadGCPMetricsIntegrationNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this read g c p metrics integration not found response has a 3xx status code -func (o *ReadGCPMetricsIntegrationNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read g c p metrics integration not found response has a 4xx status code -func (o *ReadGCPMetricsIntegrationNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this read g c p metrics integration not found response has a 5xx status code -func (o *ReadGCPMetricsIntegrationNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this read g c p metrics integration not found response a status code equal to that given -func (o *ReadGCPMetricsIntegrationNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the read g c p metrics integration not found response -func (o *ReadGCPMetricsIntegrationNotFound) Code() int { - return 404 -} - -func (o *ReadGCPMetricsIntegrationNotFound) Error() string { - return fmt.Sprintf("[GET /api/unstable/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) -} - -func (o *ReadGCPMetricsIntegrationNotFound) GetPayload() *models.APIError { - return o.Payload -} - -func (o *ReadGCPMetricsIntegrationNotFound) 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 -} - -// NewReadGCPMetricsIntegrationInternalServerError creates a ReadGCPMetricsIntegrationInternalServerError with default headers values -func NewReadGCPMetricsIntegrationInternalServerError() *ReadGCPMetricsIntegrationInternalServerError { - return &ReadGCPMetricsIntegrationInternalServerError{} -} - -/* -ReadGCPMetricsIntegrationInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type ReadGCPMetricsIntegrationInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this read g c p metrics integration internal server error response has a 2xx status code -func (o *ReadGCPMetricsIntegrationInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this read g c p metrics integration internal server error response has a 3xx status code -func (o *ReadGCPMetricsIntegrationInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this read g c p metrics integration internal server error response has a 4xx status code -func (o *ReadGCPMetricsIntegrationInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this read g c p metrics integration internal server error response has a 5xx status code -func (o *ReadGCPMetricsIntegrationInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this read g c p metrics integration internal server error response a status code equal to that given -func (o *ReadGCPMetricsIntegrationInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the read g c p metrics integration internal server error response -func (o *ReadGCPMetricsIntegrationInternalServerError) Code() int { - return 500 -} - -func (o *ReadGCPMetricsIntegrationInternalServerError) Error() string { - return fmt.Sprintf("[GET /api/unstable/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) -} - -func (o *ReadGCPMetricsIntegrationInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *ReadGCPMetricsIntegrationInternalServerError) 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 -} - -// NewReadGCPMetricsIntegrationDefault creates a ReadGCPMetricsIntegrationDefault with default headers values -func NewReadGCPMetricsIntegrationDefault(code int) *ReadGCPMetricsIntegrationDefault { - return &ReadGCPMetricsIntegrationDefault{ - _statusCode: code, - } -} - -/* -ReadGCPMetricsIntegrationDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type ReadGCPMetricsIntegrationDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this read g c p metrics integration default response has a 2xx status code -func (o *ReadGCPMetricsIntegrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this read g c p metrics integration default response has a 3xx status code -func (o *ReadGCPMetricsIntegrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this read g c p metrics integration default response has a 4xx status code -func (o *ReadGCPMetricsIntegrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this read g c p metrics integration default response has a 5xx status code -func (o *ReadGCPMetricsIntegrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this read g c p metrics integration default response a status code equal to that given -func (o *ReadGCPMetricsIntegrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the read g c p metrics integration default response -func (o *ReadGCPMetricsIntegrationDefault) Code() int { - return o._statusCode -} - -func (o *ReadGCPMetricsIntegrationDefault) Error() string { - return fmt.Sprintf("[GET /api/unstable/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) -} - -func (o *ReadGCPMetricsIntegrationDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *ReadGCPMetricsIntegrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.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_gcp_metrics_integration_parameters.go b/src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_parameters.go new file mode 100644 index 0000000..fa3f49f --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_parameters.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewReadGcpMetricsIntegrationParams creates a new ReadGcpMetricsIntegrationParams 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 NewReadGcpMetricsIntegrationParams() *ReadGcpMetricsIntegrationParams { + return &ReadGcpMetricsIntegrationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewReadGcpMetricsIntegrationParamsWithTimeout creates a new ReadGcpMetricsIntegrationParams object +// with the ability to set a timeout on a request. +func NewReadGcpMetricsIntegrationParamsWithTimeout(timeout time.Duration) *ReadGcpMetricsIntegrationParams { + return &ReadGcpMetricsIntegrationParams{ + timeout: timeout, + } +} + +// NewReadGcpMetricsIntegrationParamsWithContext creates a new ReadGcpMetricsIntegrationParams object +// with the ability to set a context for a request. +func NewReadGcpMetricsIntegrationParamsWithContext(ctx context.Context) *ReadGcpMetricsIntegrationParams { + return &ReadGcpMetricsIntegrationParams{ + Context: ctx, + } +} + +// NewReadGcpMetricsIntegrationParamsWithHTTPClient creates a new ReadGcpMetricsIntegrationParams object +// with the ability to set a custom HTTPClient for a request. +func NewReadGcpMetricsIntegrationParamsWithHTTPClient(client *http.Client) *ReadGcpMetricsIntegrationParams { + return &ReadGcpMetricsIntegrationParams{ + HTTPClient: client, + } +} + +/* +ReadGcpMetricsIntegrationParams contains all the parameters to send to the API endpoint + + for the read gcp metrics integration operation. + + Typically these are written to a http.Request. +*/ +type ReadGcpMetricsIntegrationParams struct { + + // Slug. + Slug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the read gcp metrics integration params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ReadGcpMetricsIntegrationParams) WithDefaults() *ReadGcpMetricsIntegrationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the read gcp metrics integration params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *ReadGcpMetricsIntegrationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the read gcp metrics integration params +func (o *ReadGcpMetricsIntegrationParams) WithTimeout(timeout time.Duration) *ReadGcpMetricsIntegrationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the read gcp metrics integration params +func (o *ReadGcpMetricsIntegrationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the read gcp metrics integration params +func (o *ReadGcpMetricsIntegrationParams) WithContext(ctx context.Context) *ReadGcpMetricsIntegrationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the read gcp metrics integration params +func (o *ReadGcpMetricsIntegrationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the read gcp metrics integration params +func (o *ReadGcpMetricsIntegrationParams) WithHTTPClient(client *http.Client) *ReadGcpMetricsIntegrationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the read gcp metrics integration params +func (o *ReadGcpMetricsIntegrationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSlug adds the slug to the read gcp metrics integration params +func (o *ReadGcpMetricsIntegrationParams) WithSlug(slug string) *ReadGcpMetricsIntegrationParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the read gcp metrics integration params +func (o *ReadGcpMetricsIntegrationParams) SetSlug(slug string) { + o.Slug = slug +} + +// WriteToRequest writes these params to a swagger request +func (o *ReadGcpMetricsIntegrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param slug + if err := r.SetPathParam("slug", o.Slug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_responses.go b/src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_responses.go new file mode 100644 index 0000000..113bad4 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/read_gcp_metrics_integration_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" +) + +// ReadGcpMetricsIntegrationReader is a Reader for the ReadGcpMetricsIntegration structure. +type ReadGcpMetricsIntegrationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *ReadGcpMetricsIntegrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewReadGcpMetricsIntegrationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 404: + result := NewReadGcpMetricsIntegrationNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewReadGcpMetricsIntegrationInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewReadGcpMetricsIntegrationDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewReadGcpMetricsIntegrationOK creates a ReadGcpMetricsIntegrationOK with default headers values +func NewReadGcpMetricsIntegrationOK() *ReadGcpMetricsIntegrationOK { + return &ReadGcpMetricsIntegrationOK{} +} + +/* +ReadGcpMetricsIntegrationOK describes a response with status code 200, with default header values. + +A successful response. +*/ +type ReadGcpMetricsIntegrationOK struct { + Payload *models.ConfigunstableReadGcpMetricsIntegrationResponse +} + +// IsSuccess returns true when this read gcp metrics integration o k response has a 2xx status code +func (o *ReadGcpMetricsIntegrationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this read gcp metrics integration o k response has a 3xx status code +func (o *ReadGcpMetricsIntegrationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this read gcp metrics integration o k response has a 4xx status code +func (o *ReadGcpMetricsIntegrationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this read gcp metrics integration o k response has a 5xx status code +func (o *ReadGcpMetricsIntegrationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this read gcp metrics integration o k response a status code equal to that given +func (o *ReadGcpMetricsIntegrationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the read gcp metrics integration o k response +func (o *ReadGcpMetricsIntegrationOK) Code() int { + return 200 +} + +func (o *ReadGcpMetricsIntegrationOK) Error() string { + return fmt.Sprintf("[GET /api/unstable/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) +} + +func (o *ReadGcpMetricsIntegrationOK) GetPayload() *models.ConfigunstableReadGcpMetricsIntegrationResponse { + return o.Payload +} + +func (o *ReadGcpMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigunstableReadGcpMetricsIntegrationResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewReadGcpMetricsIntegrationNotFound creates a ReadGcpMetricsIntegrationNotFound with default headers values +func NewReadGcpMetricsIntegrationNotFound() *ReadGcpMetricsIntegrationNotFound { + return &ReadGcpMetricsIntegrationNotFound{} +} + +/* +ReadGcpMetricsIntegrationNotFound describes a response with status code 404, with default header values. + +Cannot read the GcpMetricsIntegration because the slug does not exist. +*/ +type ReadGcpMetricsIntegrationNotFound struct { + Payload *models.APIError +} + +// IsSuccess returns true when this read gcp metrics integration not found response has a 2xx status code +func (o *ReadGcpMetricsIntegrationNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this read gcp metrics integration not found response has a 3xx status code +func (o *ReadGcpMetricsIntegrationNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this read gcp metrics integration not found response has a 4xx status code +func (o *ReadGcpMetricsIntegrationNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this read gcp metrics integration not found response has a 5xx status code +func (o *ReadGcpMetricsIntegrationNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this read gcp metrics integration not found response a status code equal to that given +func (o *ReadGcpMetricsIntegrationNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the read gcp metrics integration not found response +func (o *ReadGcpMetricsIntegrationNotFound) Code() int { + return 404 +} + +func (o *ReadGcpMetricsIntegrationNotFound) Error() string { + return fmt.Sprintf("[GET /api/unstable/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) +} + +func (o *ReadGcpMetricsIntegrationNotFound) GetPayload() *models.APIError { + return o.Payload +} + +func (o *ReadGcpMetricsIntegrationNotFound) 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 +} + +// NewReadGcpMetricsIntegrationInternalServerError creates a ReadGcpMetricsIntegrationInternalServerError with default headers values +func NewReadGcpMetricsIntegrationInternalServerError() *ReadGcpMetricsIntegrationInternalServerError { + return &ReadGcpMetricsIntegrationInternalServerError{} +} + +/* +ReadGcpMetricsIntegrationInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type ReadGcpMetricsIntegrationInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this read gcp metrics integration internal server error response has a 2xx status code +func (o *ReadGcpMetricsIntegrationInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this read gcp metrics integration internal server error response has a 3xx status code +func (o *ReadGcpMetricsIntegrationInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this read gcp metrics integration internal server error response has a 4xx status code +func (o *ReadGcpMetricsIntegrationInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this read gcp metrics integration internal server error response has a 5xx status code +func (o *ReadGcpMetricsIntegrationInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this read gcp metrics integration internal server error response a status code equal to that given +func (o *ReadGcpMetricsIntegrationInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the read gcp metrics integration internal server error response +func (o *ReadGcpMetricsIntegrationInternalServerError) Code() int { + return 500 +} + +func (o *ReadGcpMetricsIntegrationInternalServerError) Error() string { + return fmt.Sprintf("[GET /api/unstable/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) +} + +func (o *ReadGcpMetricsIntegrationInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *ReadGcpMetricsIntegrationInternalServerError) 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 +} + +// NewReadGcpMetricsIntegrationDefault creates a ReadGcpMetricsIntegrationDefault with default headers values +func NewReadGcpMetricsIntegrationDefault(code int) *ReadGcpMetricsIntegrationDefault { + return &ReadGcpMetricsIntegrationDefault{ + _statusCode: code, + } +} + +/* +ReadGcpMetricsIntegrationDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type ReadGcpMetricsIntegrationDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this read gcp metrics integration default response has a 2xx status code +func (o *ReadGcpMetricsIntegrationDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this read gcp metrics integration default response has a 3xx status code +func (o *ReadGcpMetricsIntegrationDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this read gcp metrics integration default response has a 4xx status code +func (o *ReadGcpMetricsIntegrationDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this read gcp metrics integration default response has a 5xx status code +func (o *ReadGcpMetricsIntegrationDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this read gcp metrics integration default response a status code equal to that given +func (o *ReadGcpMetricsIntegrationDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the read gcp metrics integration default response +func (o *ReadGcpMetricsIntegrationDefault) Code() int { + return o._statusCode +} + +func (o *ReadGcpMetricsIntegrationDefault) Error() string { + return fmt.Sprintf("[GET /api/unstable/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) +} + +func (o *ReadGcpMetricsIntegrationDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *ReadGcpMetricsIntegrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.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_g_c_p_metrics_integration_parameters.go b/src/generated/swagger/configunstable/client/operations/update_g_c_p_metrics_integration_parameters.go deleted file mode 100644 index eb28064..0000000 --- a/src/generated/swagger/configunstable/client/operations/update_g_c_p_metrics_integration_parameters.go +++ /dev/null @@ -1,165 +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" -) - -// NewUpdateGCPMetricsIntegrationParams creates a new UpdateGCPMetricsIntegrationParams 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 NewUpdateGCPMetricsIntegrationParams() *UpdateGCPMetricsIntegrationParams { - return &UpdateGCPMetricsIntegrationParams{ - timeout: cr.DefaultTimeout, - } -} - -// NewUpdateGCPMetricsIntegrationParamsWithTimeout creates a new UpdateGCPMetricsIntegrationParams object -// with the ability to set a timeout on a request. -func NewUpdateGCPMetricsIntegrationParamsWithTimeout(timeout time.Duration) *UpdateGCPMetricsIntegrationParams { - return &UpdateGCPMetricsIntegrationParams{ - timeout: timeout, - } -} - -// NewUpdateGCPMetricsIntegrationParamsWithContext creates a new UpdateGCPMetricsIntegrationParams object -// with the ability to set a context for a request. -func NewUpdateGCPMetricsIntegrationParamsWithContext(ctx context.Context) *UpdateGCPMetricsIntegrationParams { - return &UpdateGCPMetricsIntegrationParams{ - Context: ctx, - } -} - -// NewUpdateGCPMetricsIntegrationParamsWithHTTPClient creates a new UpdateGCPMetricsIntegrationParams object -// with the ability to set a custom HTTPClient for a request. -func NewUpdateGCPMetricsIntegrationParamsWithHTTPClient(client *http.Client) *UpdateGCPMetricsIntegrationParams { - return &UpdateGCPMetricsIntegrationParams{ - HTTPClient: client, - } -} - -/* -UpdateGCPMetricsIntegrationParams contains all the parameters to send to the API endpoint - - for the update g c p metrics integration operation. - - Typically these are written to a http.Request. -*/ -type UpdateGCPMetricsIntegrationParams struct { - - // Body. - Body UpdateGCPMetricsIntegrationBody - - // Slug. - Slug string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithDefaults hydrates default values in the update g c p metrics integration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateGCPMetricsIntegrationParams) WithDefaults() *UpdateGCPMetricsIntegrationParams { - o.SetDefaults() - return o -} - -// SetDefaults hydrates default values in the update g c p metrics integration params (not the query body). -// -// All values with no default are reset to their zero value. -func (o *UpdateGCPMetricsIntegrationParams) SetDefaults() { - // no default values defined for this parameter -} - -// WithTimeout adds the timeout to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) WithTimeout(timeout time.Duration) *UpdateGCPMetricsIntegrationParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) WithContext(ctx context.Context) *UpdateGCPMetricsIntegrationParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) WithHTTPClient(client *http.Client) *UpdateGCPMetricsIntegrationParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithBody adds the body to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) WithBody(body UpdateGCPMetricsIntegrationBody) *UpdateGCPMetricsIntegrationParams { - o.SetBody(body) - return o -} - -// SetBody adds the body to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) SetBody(body UpdateGCPMetricsIntegrationBody) { - o.Body = body -} - -// WithSlug adds the slug to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) WithSlug(slug string) *UpdateGCPMetricsIntegrationParams { - o.SetSlug(slug) - return o -} - -// SetSlug adds the slug to the update g c p metrics integration params -func (o *UpdateGCPMetricsIntegrationParams) SetSlug(slug string) { - o.Slug = slug -} - -// WriteToRequest writes these params to a swagger request -func (o *UpdateGCPMetricsIntegrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - if err := r.SetBodyParam(o.Body); err != nil { - return err - } - - // path param slug - if err := r.SetPathParam("slug", o.Slug); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/update_g_c_p_metrics_integration_responses.go b/src/generated/swagger/configunstable/client/operations/update_g_c_p_metrics_integration_responses.go deleted file mode 100644 index 9806c23..0000000 --- a/src/generated/swagger/configunstable/client/operations/update_g_c_p_metrics_integration_responses.go +++ /dev/null @@ -1,581 +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" - "fmt" - "io" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" -) - -// UpdateGCPMetricsIntegrationReader is a Reader for the UpdateGCPMetricsIntegration structure. -type UpdateGCPMetricsIntegrationReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *UpdateGCPMetricsIntegrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewUpdateGCPMetricsIntegrationOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - case 400: - result := NewUpdateGCPMetricsIntegrationBadRequest() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 404: - result := NewUpdateGCPMetricsIntegrationNotFound() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 409: - result := NewUpdateGCPMetricsIntegrationConflict() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - case 500: - result := NewUpdateGCPMetricsIntegrationInternalServerError() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return nil, result - default: - result := NewUpdateGCPMetricsIntegrationDefault(response.Code()) - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - if response.Code()/100 == 2 { - return result, nil - } - return nil, result - } -} - -// NewUpdateGCPMetricsIntegrationOK creates a UpdateGCPMetricsIntegrationOK with default headers values -func NewUpdateGCPMetricsIntegrationOK() *UpdateGCPMetricsIntegrationOK { - return &UpdateGCPMetricsIntegrationOK{} -} - -/* -UpdateGCPMetricsIntegrationOK describes a response with status code 200, with default header values. - -A successful response containing the updated GCPMetricsIntegration. -*/ -type UpdateGCPMetricsIntegrationOK struct { - Payload *models.ConfigunstableUpdateGCPMetricsIntegrationResponse -} - -// IsSuccess returns true when this update g c p metrics integration o k response has a 2xx status code -func (o *UpdateGCPMetricsIntegrationOK) IsSuccess() bool { - return true -} - -// IsRedirect returns true when this update g c p metrics integration o k response has a 3xx status code -func (o *UpdateGCPMetricsIntegrationOK) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update g c p metrics integration o k response has a 4xx status code -func (o *UpdateGCPMetricsIntegrationOK) IsClientError() bool { - return false -} - -// IsServerError returns true when this update g c p metrics integration o k response has a 5xx status code -func (o *UpdateGCPMetricsIntegrationOK) IsServerError() bool { - return false -} - -// IsCode returns true when this update g c p metrics integration o k response a status code equal to that given -func (o *UpdateGCPMetricsIntegrationOK) IsCode(code int) bool { - return code == 200 -} - -// Code gets the status code for the update g c p metrics integration o k response -func (o *UpdateGCPMetricsIntegrationOK) Code() int { - return 200 -} - -func (o *UpdateGCPMetricsIntegrationOK) Error() string { - return fmt.Sprintf("[PUT /api/unstable/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) -} - -func (o *UpdateGCPMetricsIntegrationOK) GetPayload() *models.ConfigunstableUpdateGCPMetricsIntegrationResponse { - return o.Payload -} - -func (o *UpdateGCPMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ConfigunstableUpdateGCPMetricsIntegrationResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewUpdateGCPMetricsIntegrationBadRequest creates a UpdateGCPMetricsIntegrationBadRequest with default headers values -func NewUpdateGCPMetricsIntegrationBadRequest() *UpdateGCPMetricsIntegrationBadRequest { - return &UpdateGCPMetricsIntegrationBadRequest{} -} - -/* -UpdateGCPMetricsIntegrationBadRequest describes a response with status code 400, with default header values. - -Cannot update the GCPMetricsIntegration because the request is invalid. -*/ -type UpdateGCPMetricsIntegrationBadRequest struct { - Payload *models.APIError -} - -// IsSuccess returns true when this update g c p metrics integration bad request response has a 2xx status code -func (o *UpdateGCPMetricsIntegrationBadRequest) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update g c p metrics integration bad request response has a 3xx status code -func (o *UpdateGCPMetricsIntegrationBadRequest) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update g c p metrics integration bad request response has a 4xx status code -func (o *UpdateGCPMetricsIntegrationBadRequest) IsClientError() bool { - return true -} - -// IsServerError returns true when this update g c p metrics integration bad request response has a 5xx status code -func (o *UpdateGCPMetricsIntegrationBadRequest) IsServerError() bool { - return false -} - -// IsCode returns true when this update g c p metrics integration bad request response a status code equal to that given -func (o *UpdateGCPMetricsIntegrationBadRequest) IsCode(code int) bool { - return code == 400 -} - -// Code gets the status code for the update g c p metrics integration bad request response -func (o *UpdateGCPMetricsIntegrationBadRequest) Code() int { - return 400 -} - -func (o *UpdateGCPMetricsIntegrationBadRequest) Error() string { - return fmt.Sprintf("[PUT /api/unstable/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) -} - -func (o *UpdateGCPMetricsIntegrationBadRequest) GetPayload() *models.APIError { - return o.Payload -} - -func (o *UpdateGCPMetricsIntegrationBadRequest) 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 -} - -// NewUpdateGCPMetricsIntegrationNotFound creates a UpdateGCPMetricsIntegrationNotFound with default headers values -func NewUpdateGCPMetricsIntegrationNotFound() *UpdateGCPMetricsIntegrationNotFound { - return &UpdateGCPMetricsIntegrationNotFound{} -} - -/* -UpdateGCPMetricsIntegrationNotFound describes a response with status code 404, with default header values. - -Cannot update the GCPMetricsIntegration because the slug does not exist. -*/ -type UpdateGCPMetricsIntegrationNotFound struct { - Payload *models.APIError -} - -// IsSuccess returns true when this update g c p metrics integration not found response has a 2xx status code -func (o *UpdateGCPMetricsIntegrationNotFound) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update g c p metrics integration not found response has a 3xx status code -func (o *UpdateGCPMetricsIntegrationNotFound) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update g c p metrics integration not found response has a 4xx status code -func (o *UpdateGCPMetricsIntegrationNotFound) IsClientError() bool { - return true -} - -// IsServerError returns true when this update g c p metrics integration not found response has a 5xx status code -func (o *UpdateGCPMetricsIntegrationNotFound) IsServerError() bool { - return false -} - -// IsCode returns true when this update g c p metrics integration not found response a status code equal to that given -func (o *UpdateGCPMetricsIntegrationNotFound) IsCode(code int) bool { - return code == 404 -} - -// Code gets the status code for the update g c p metrics integration not found response -func (o *UpdateGCPMetricsIntegrationNotFound) Code() int { - return 404 -} - -func (o *UpdateGCPMetricsIntegrationNotFound) Error() string { - return fmt.Sprintf("[PUT /api/unstable/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) -} - -func (o *UpdateGCPMetricsIntegrationNotFound) GetPayload() *models.APIError { - return o.Payload -} - -func (o *UpdateGCPMetricsIntegrationNotFound) 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 -} - -// NewUpdateGCPMetricsIntegrationConflict creates a UpdateGCPMetricsIntegrationConflict with default headers values -func NewUpdateGCPMetricsIntegrationConflict() *UpdateGCPMetricsIntegrationConflict { - return &UpdateGCPMetricsIntegrationConflict{} -} - -/* -UpdateGCPMetricsIntegrationConflict describes a response with status code 409, with default header values. - -Cannot update the GCPMetricsIntegration because there is a conflict with an existing GCPMetricsIntegration. -*/ -type UpdateGCPMetricsIntegrationConflict struct { - Payload *models.APIError -} - -// IsSuccess returns true when this update g c p metrics integration conflict response has a 2xx status code -func (o *UpdateGCPMetricsIntegrationConflict) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update g c p metrics integration conflict response has a 3xx status code -func (o *UpdateGCPMetricsIntegrationConflict) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update g c p metrics integration conflict response has a 4xx status code -func (o *UpdateGCPMetricsIntegrationConflict) IsClientError() bool { - return true -} - -// IsServerError returns true when this update g c p metrics integration conflict response has a 5xx status code -func (o *UpdateGCPMetricsIntegrationConflict) IsServerError() bool { - return false -} - -// IsCode returns true when this update g c p metrics integration conflict response a status code equal to that given -func (o *UpdateGCPMetricsIntegrationConflict) IsCode(code int) bool { - return code == 409 -} - -// Code gets the status code for the update g c p metrics integration conflict response -func (o *UpdateGCPMetricsIntegrationConflict) Code() int { - return 409 -} - -func (o *UpdateGCPMetricsIntegrationConflict) Error() string { - return fmt.Sprintf("[PUT /api/unstable/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) -} - -func (o *UpdateGCPMetricsIntegrationConflict) GetPayload() *models.APIError { - return o.Payload -} - -func (o *UpdateGCPMetricsIntegrationConflict) 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 -} - -// NewUpdateGCPMetricsIntegrationInternalServerError creates a UpdateGCPMetricsIntegrationInternalServerError with default headers values -func NewUpdateGCPMetricsIntegrationInternalServerError() *UpdateGCPMetricsIntegrationInternalServerError { - return &UpdateGCPMetricsIntegrationInternalServerError{} -} - -/* -UpdateGCPMetricsIntegrationInternalServerError describes a response with status code 500, with default header values. - -An unexpected error response. -*/ -type UpdateGCPMetricsIntegrationInternalServerError struct { - Payload *models.APIError -} - -// IsSuccess returns true when this update g c p metrics integration internal server error response has a 2xx status code -func (o *UpdateGCPMetricsIntegrationInternalServerError) IsSuccess() bool { - return false -} - -// IsRedirect returns true when this update g c p metrics integration internal server error response has a 3xx status code -func (o *UpdateGCPMetricsIntegrationInternalServerError) IsRedirect() bool { - return false -} - -// IsClientError returns true when this update g c p metrics integration internal server error response has a 4xx status code -func (o *UpdateGCPMetricsIntegrationInternalServerError) IsClientError() bool { - return false -} - -// IsServerError returns true when this update g c p metrics integration internal server error response has a 5xx status code -func (o *UpdateGCPMetricsIntegrationInternalServerError) IsServerError() bool { - return true -} - -// IsCode returns true when this update g c p metrics integration internal server error response a status code equal to that given -func (o *UpdateGCPMetricsIntegrationInternalServerError) IsCode(code int) bool { - return code == 500 -} - -// Code gets the status code for the update g c p metrics integration internal server error response -func (o *UpdateGCPMetricsIntegrationInternalServerError) Code() int { - return 500 -} - -func (o *UpdateGCPMetricsIntegrationInternalServerError) Error() string { - return fmt.Sprintf("[PUT /api/unstable/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) -} - -func (o *UpdateGCPMetricsIntegrationInternalServerError) GetPayload() *models.APIError { - return o.Payload -} - -func (o *UpdateGCPMetricsIntegrationInternalServerError) 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 -} - -// NewUpdateGCPMetricsIntegrationDefault creates a UpdateGCPMetricsIntegrationDefault with default headers values -func NewUpdateGCPMetricsIntegrationDefault(code int) *UpdateGCPMetricsIntegrationDefault { - return &UpdateGCPMetricsIntegrationDefault{ - _statusCode: code, - } -} - -/* -UpdateGCPMetricsIntegrationDefault describes a response with status code -1, with default header values. - -An undefined error response. -*/ -type UpdateGCPMetricsIntegrationDefault struct { - _statusCode int - - Payload models.GenericError -} - -// IsSuccess returns true when this update g c p metrics integration default response has a 2xx status code -func (o *UpdateGCPMetricsIntegrationDefault) IsSuccess() bool { - return o._statusCode/100 == 2 -} - -// IsRedirect returns true when this update g c p metrics integration default response has a 3xx status code -func (o *UpdateGCPMetricsIntegrationDefault) IsRedirect() bool { - return o._statusCode/100 == 3 -} - -// IsClientError returns true when this update g c p metrics integration default response has a 4xx status code -func (o *UpdateGCPMetricsIntegrationDefault) IsClientError() bool { - return o._statusCode/100 == 4 -} - -// IsServerError returns true when this update g c p metrics integration default response has a 5xx status code -func (o *UpdateGCPMetricsIntegrationDefault) IsServerError() bool { - return o._statusCode/100 == 5 -} - -// IsCode returns true when this update g c p metrics integration default response a status code equal to that given -func (o *UpdateGCPMetricsIntegrationDefault) IsCode(code int) bool { - return o._statusCode == code -} - -// Code gets the status code for the update g c p metrics integration default response -func (o *UpdateGCPMetricsIntegrationDefault) Code() int { - return o._statusCode -} - -func (o *UpdateGCPMetricsIntegrationDefault) Error() string { - return fmt.Sprintf("[PUT /api/unstable/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) -} - -func (o *UpdateGCPMetricsIntegrationDefault) GetPayload() models.GenericError { - return o.Payload -} - -func (o *UpdateGCPMetricsIntegrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response payload - if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -/* -UpdateGCPMetricsIntegrationBody update g c p metrics integration body -swagger:model UpdateGCPMetricsIntegrationBody -*/ -type UpdateGCPMetricsIntegrationBody struct { - - // 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. - CreateIfMissing bool `json:"create_if_missing,omitempty"` - - // 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. - DryRun bool `json:"dry_run,omitempty"` - - // gcp metrics integration - GcpMetricsIntegration *models.ConfigunstableGCPMetricsIntegration `json:"gcp_metrics_integration,omitempty"` -} - -// Validate validates this update g c p metrics integration body -func (o *UpdateGCPMetricsIntegrationBody) Validate(formats strfmt.Registry) error { - var res []error - - if err := o.validateGcpMetricsIntegration(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdateGCPMetricsIntegrationBody) validateGcpMetricsIntegration(formats strfmt.Registry) error { - if swag.IsZero(o.GcpMetricsIntegration) { // not required - return nil - } - - if o.GcpMetricsIntegration != nil { - if err := o.GcpMetricsIntegration.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "gcp_metrics_integration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "gcp_metrics_integration") - } - return err - } - } - - return nil -} - -// ContextValidate validate this update g c p metrics integration body based on the context it is used -func (o *UpdateGCPMetricsIntegrationBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { - var res []error - - if err := o.contextValidateGcpMetricsIntegration(ctx, formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (o *UpdateGCPMetricsIntegrationBody) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { - - if o.GcpMetricsIntegration != nil { - - if swag.IsZero(o.GcpMetricsIntegration) { // not required - return nil - } - - if err := o.GcpMetricsIntegration.ContextValidate(ctx, formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("body" + "." + "gcp_metrics_integration") - } else if ce, ok := err.(*errors.CompositeError); ok { - return ce.ValidateName("body" + "." + "gcp_metrics_integration") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (o *UpdateGCPMetricsIntegrationBody) MarshalBinary() ([]byte, error) { - if o == nil { - return nil, nil - } - return swag.WriteJSON(o) -} - -// UnmarshalBinary interface implementation -func (o *UpdateGCPMetricsIntegrationBody) UnmarshalBinary(b []byte) error { - var res UpdateGCPMetricsIntegrationBody - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *o = res - return nil -} diff --git a/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_parameters.go b/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_parameters.go new file mode 100644 index 0000000..24979f0 --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewUpdateGcpMetricsIntegrationParams creates a new UpdateGcpMetricsIntegrationParams 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 NewUpdateGcpMetricsIntegrationParams() *UpdateGcpMetricsIntegrationParams { + return &UpdateGcpMetricsIntegrationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewUpdateGcpMetricsIntegrationParamsWithTimeout creates a new UpdateGcpMetricsIntegrationParams object +// with the ability to set a timeout on a request. +func NewUpdateGcpMetricsIntegrationParamsWithTimeout(timeout time.Duration) *UpdateGcpMetricsIntegrationParams { + return &UpdateGcpMetricsIntegrationParams{ + timeout: timeout, + } +} + +// NewUpdateGcpMetricsIntegrationParamsWithContext creates a new UpdateGcpMetricsIntegrationParams object +// with the ability to set a context for a request. +func NewUpdateGcpMetricsIntegrationParamsWithContext(ctx context.Context) *UpdateGcpMetricsIntegrationParams { + return &UpdateGcpMetricsIntegrationParams{ + Context: ctx, + } +} + +// NewUpdateGcpMetricsIntegrationParamsWithHTTPClient creates a new UpdateGcpMetricsIntegrationParams object +// with the ability to set a custom HTTPClient for a request. +func NewUpdateGcpMetricsIntegrationParamsWithHTTPClient(client *http.Client) *UpdateGcpMetricsIntegrationParams { + return &UpdateGcpMetricsIntegrationParams{ + HTTPClient: client, + } +} + +/* +UpdateGcpMetricsIntegrationParams contains all the parameters to send to the API endpoint + + for the update gcp metrics integration operation. + + Typically these are written to a http.Request. +*/ +type UpdateGcpMetricsIntegrationParams struct { + + // Body. + Body UpdateGcpMetricsIntegrationBody + + // Slug. + Slug string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the update gcp metrics integration params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateGcpMetricsIntegrationParams) WithDefaults() *UpdateGcpMetricsIntegrationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the update gcp metrics integration params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *UpdateGcpMetricsIntegrationParams) SetDefaults() { + // no default values defined for this parameter +} + +// WithTimeout adds the timeout to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) WithTimeout(timeout time.Duration) *UpdateGcpMetricsIntegrationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) WithContext(ctx context.Context) *UpdateGcpMetricsIntegrationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) WithHTTPClient(client *http.Client) *UpdateGcpMetricsIntegrationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) WithBody(body UpdateGcpMetricsIntegrationBody) *UpdateGcpMetricsIntegrationParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) SetBody(body UpdateGcpMetricsIntegrationBody) { + o.Body = body +} + +// WithSlug adds the slug to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) WithSlug(slug string) *UpdateGcpMetricsIntegrationParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the update gcp metrics integration params +func (o *UpdateGcpMetricsIntegrationParams) SetSlug(slug string) { + o.Slug = slug +} + +// WriteToRequest writes these params to a swagger request +func (o *UpdateGcpMetricsIntegrationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param slug + if err := r.SetPathParam("slug", o.Slug); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_responses.go b/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_responses.go new file mode 100644 index 0000000..b777e6c --- /dev/null +++ b/src/generated/swagger/configunstable/client/operations/update_gcp_metrics_integration_responses.go @@ -0,0 +1,581 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package operations + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "fmt" + "io" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/chronosphereio/chronoctl-core/src/generated/swagger/configunstable/models" +) + +// UpdateGcpMetricsIntegrationReader is a Reader for the UpdateGcpMetricsIntegration structure. +type UpdateGcpMetricsIntegrationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *UpdateGcpMetricsIntegrationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewUpdateGcpMetricsIntegrationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 400: + result := NewUpdateGcpMetricsIntegrationBadRequest() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 404: + result := NewUpdateGcpMetricsIntegrationNotFound() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 409: + result := NewUpdateGcpMetricsIntegrationConflict() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + case 500: + result := NewUpdateGcpMetricsIntegrationInternalServerError() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + result := NewUpdateGcpMetricsIntegrationDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewUpdateGcpMetricsIntegrationOK creates a UpdateGcpMetricsIntegrationOK with default headers values +func NewUpdateGcpMetricsIntegrationOK() *UpdateGcpMetricsIntegrationOK { + return &UpdateGcpMetricsIntegrationOK{} +} + +/* +UpdateGcpMetricsIntegrationOK describes a response with status code 200, with default header values. + +A successful response containing the updated GcpMetricsIntegration. +*/ +type UpdateGcpMetricsIntegrationOK struct { + Payload *models.ConfigunstableUpdateGcpMetricsIntegrationResponse +} + +// IsSuccess returns true when this update gcp metrics integration o k response has a 2xx status code +func (o *UpdateGcpMetricsIntegrationOK) IsSuccess() bool { + return true +} + +// IsRedirect returns true when this update gcp metrics integration o k response has a 3xx status code +func (o *UpdateGcpMetricsIntegrationOK) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update gcp metrics integration o k response has a 4xx status code +func (o *UpdateGcpMetricsIntegrationOK) IsClientError() bool { + return false +} + +// IsServerError returns true when this update gcp metrics integration o k response has a 5xx status code +func (o *UpdateGcpMetricsIntegrationOK) IsServerError() bool { + return false +} + +// IsCode returns true when this update gcp metrics integration o k response a status code equal to that given +func (o *UpdateGcpMetricsIntegrationOK) IsCode(code int) bool { + return code == 200 +} + +// Code gets the status code for the update gcp metrics integration o k response +func (o *UpdateGcpMetricsIntegrationOK) Code() int { + return 200 +} + +func (o *UpdateGcpMetricsIntegrationOK) Error() string { + return fmt.Sprintf("[PUT /api/unstable/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) +} + +func (o *UpdateGcpMetricsIntegrationOK) GetPayload() *models.ConfigunstableUpdateGcpMetricsIntegrationResponse { + return o.Payload +} + +func (o *UpdateGcpMetricsIntegrationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.ConfigunstableUpdateGcpMetricsIntegrationResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewUpdateGcpMetricsIntegrationBadRequest creates a UpdateGcpMetricsIntegrationBadRequest with default headers values +func NewUpdateGcpMetricsIntegrationBadRequest() *UpdateGcpMetricsIntegrationBadRequest { + return &UpdateGcpMetricsIntegrationBadRequest{} +} + +/* +UpdateGcpMetricsIntegrationBadRequest describes a response with status code 400, with default header values. + +Cannot update the GcpMetricsIntegration because the request is invalid. +*/ +type UpdateGcpMetricsIntegrationBadRequest struct { + Payload *models.APIError +} + +// IsSuccess returns true when this update gcp metrics integration bad request response has a 2xx status code +func (o *UpdateGcpMetricsIntegrationBadRequest) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update gcp metrics integration bad request response has a 3xx status code +func (o *UpdateGcpMetricsIntegrationBadRequest) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update gcp metrics integration bad request response has a 4xx status code +func (o *UpdateGcpMetricsIntegrationBadRequest) IsClientError() bool { + return true +} + +// IsServerError returns true when this update gcp metrics integration bad request response has a 5xx status code +func (o *UpdateGcpMetricsIntegrationBadRequest) IsServerError() bool { + return false +} + +// IsCode returns true when this update gcp metrics integration bad request response a status code equal to that given +func (o *UpdateGcpMetricsIntegrationBadRequest) IsCode(code int) bool { + return code == 400 +} + +// Code gets the status code for the update gcp metrics integration bad request response +func (o *UpdateGcpMetricsIntegrationBadRequest) Code() int { + return 400 +} + +func (o *UpdateGcpMetricsIntegrationBadRequest) Error() string { + return fmt.Sprintf("[PUT /api/unstable/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) +} + +func (o *UpdateGcpMetricsIntegrationBadRequest) GetPayload() *models.APIError { + return o.Payload +} + +func (o *UpdateGcpMetricsIntegrationBadRequest) 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 +} + +// NewUpdateGcpMetricsIntegrationNotFound creates a UpdateGcpMetricsIntegrationNotFound with default headers values +func NewUpdateGcpMetricsIntegrationNotFound() *UpdateGcpMetricsIntegrationNotFound { + return &UpdateGcpMetricsIntegrationNotFound{} +} + +/* +UpdateGcpMetricsIntegrationNotFound describes a response with status code 404, with default header values. + +Cannot update the GcpMetricsIntegration because the slug does not exist. +*/ +type UpdateGcpMetricsIntegrationNotFound struct { + Payload *models.APIError +} + +// IsSuccess returns true when this update gcp metrics integration not found response has a 2xx status code +func (o *UpdateGcpMetricsIntegrationNotFound) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update gcp metrics integration not found response has a 3xx status code +func (o *UpdateGcpMetricsIntegrationNotFound) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update gcp metrics integration not found response has a 4xx status code +func (o *UpdateGcpMetricsIntegrationNotFound) IsClientError() bool { + return true +} + +// IsServerError returns true when this update gcp metrics integration not found response has a 5xx status code +func (o *UpdateGcpMetricsIntegrationNotFound) IsServerError() bool { + return false +} + +// IsCode returns true when this update gcp metrics integration not found response a status code equal to that given +func (o *UpdateGcpMetricsIntegrationNotFound) IsCode(code int) bool { + return code == 404 +} + +// Code gets the status code for the update gcp metrics integration not found response +func (o *UpdateGcpMetricsIntegrationNotFound) Code() int { + return 404 +} + +func (o *UpdateGcpMetricsIntegrationNotFound) Error() string { + return fmt.Sprintf("[PUT /api/unstable/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) +} + +func (o *UpdateGcpMetricsIntegrationNotFound) GetPayload() *models.APIError { + return o.Payload +} + +func (o *UpdateGcpMetricsIntegrationNotFound) 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 +} + +// NewUpdateGcpMetricsIntegrationConflict creates a UpdateGcpMetricsIntegrationConflict with default headers values +func NewUpdateGcpMetricsIntegrationConflict() *UpdateGcpMetricsIntegrationConflict { + return &UpdateGcpMetricsIntegrationConflict{} +} + +/* +UpdateGcpMetricsIntegrationConflict describes a response with status code 409, with default header values. + +Cannot update the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration. +*/ +type UpdateGcpMetricsIntegrationConflict struct { + Payload *models.APIError +} + +// IsSuccess returns true when this update gcp metrics integration conflict response has a 2xx status code +func (o *UpdateGcpMetricsIntegrationConflict) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update gcp metrics integration conflict response has a 3xx status code +func (o *UpdateGcpMetricsIntegrationConflict) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update gcp metrics integration conflict response has a 4xx status code +func (o *UpdateGcpMetricsIntegrationConflict) IsClientError() bool { + return true +} + +// IsServerError returns true when this update gcp metrics integration conflict response has a 5xx status code +func (o *UpdateGcpMetricsIntegrationConflict) IsServerError() bool { + return false +} + +// IsCode returns true when this update gcp metrics integration conflict response a status code equal to that given +func (o *UpdateGcpMetricsIntegrationConflict) IsCode(code int) bool { + return code == 409 +} + +// Code gets the status code for the update gcp metrics integration conflict response +func (o *UpdateGcpMetricsIntegrationConflict) Code() int { + return 409 +} + +func (o *UpdateGcpMetricsIntegrationConflict) Error() string { + return fmt.Sprintf("[PUT /api/unstable/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) +} + +func (o *UpdateGcpMetricsIntegrationConflict) GetPayload() *models.APIError { + return o.Payload +} + +func (o *UpdateGcpMetricsIntegrationConflict) 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 +} + +// NewUpdateGcpMetricsIntegrationInternalServerError creates a UpdateGcpMetricsIntegrationInternalServerError with default headers values +func NewUpdateGcpMetricsIntegrationInternalServerError() *UpdateGcpMetricsIntegrationInternalServerError { + return &UpdateGcpMetricsIntegrationInternalServerError{} +} + +/* +UpdateGcpMetricsIntegrationInternalServerError describes a response with status code 500, with default header values. + +An unexpected error response. +*/ +type UpdateGcpMetricsIntegrationInternalServerError struct { + Payload *models.APIError +} + +// IsSuccess returns true when this update gcp metrics integration internal server error response has a 2xx status code +func (o *UpdateGcpMetricsIntegrationInternalServerError) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this update gcp metrics integration internal server error response has a 3xx status code +func (o *UpdateGcpMetricsIntegrationInternalServerError) IsRedirect() bool { + return false +} + +// IsClientError returns true when this update gcp metrics integration internal server error response has a 4xx status code +func (o *UpdateGcpMetricsIntegrationInternalServerError) IsClientError() bool { + return false +} + +// IsServerError returns true when this update gcp metrics integration internal server error response has a 5xx status code +func (o *UpdateGcpMetricsIntegrationInternalServerError) IsServerError() bool { + return true +} + +// IsCode returns true when this update gcp metrics integration internal server error response a status code equal to that given +func (o *UpdateGcpMetricsIntegrationInternalServerError) IsCode(code int) bool { + return code == 500 +} + +// Code gets the status code for the update gcp metrics integration internal server error response +func (o *UpdateGcpMetricsIntegrationInternalServerError) Code() int { + return 500 +} + +func (o *UpdateGcpMetricsIntegrationInternalServerError) Error() string { + return fmt.Sprintf("[PUT /api/unstable/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) +} + +func (o *UpdateGcpMetricsIntegrationInternalServerError) GetPayload() *models.APIError { + return o.Payload +} + +func (o *UpdateGcpMetricsIntegrationInternalServerError) 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 +} + +// NewUpdateGcpMetricsIntegrationDefault creates a UpdateGcpMetricsIntegrationDefault with default headers values +func NewUpdateGcpMetricsIntegrationDefault(code int) *UpdateGcpMetricsIntegrationDefault { + return &UpdateGcpMetricsIntegrationDefault{ + _statusCode: code, + } +} + +/* +UpdateGcpMetricsIntegrationDefault describes a response with status code -1, with default header values. + +An undefined error response. +*/ +type UpdateGcpMetricsIntegrationDefault struct { + _statusCode int + + Payload models.GenericError +} + +// IsSuccess returns true when this update gcp metrics integration default response has a 2xx status code +func (o *UpdateGcpMetricsIntegrationDefault) IsSuccess() bool { + return o._statusCode/100 == 2 +} + +// IsRedirect returns true when this update gcp metrics integration default response has a 3xx status code +func (o *UpdateGcpMetricsIntegrationDefault) IsRedirect() bool { + return o._statusCode/100 == 3 +} + +// IsClientError returns true when this update gcp metrics integration default response has a 4xx status code +func (o *UpdateGcpMetricsIntegrationDefault) IsClientError() bool { + return o._statusCode/100 == 4 +} + +// IsServerError returns true when this update gcp metrics integration default response has a 5xx status code +func (o *UpdateGcpMetricsIntegrationDefault) IsServerError() bool { + return o._statusCode/100 == 5 +} + +// IsCode returns true when this update gcp metrics integration default response a status code equal to that given +func (o *UpdateGcpMetricsIntegrationDefault) IsCode(code int) bool { + return o._statusCode == code +} + +// Code gets the status code for the update gcp metrics integration default response +func (o *UpdateGcpMetricsIntegrationDefault) Code() int { + return o._statusCode +} + +func (o *UpdateGcpMetricsIntegrationDefault) Error() string { + return fmt.Sprintf("[PUT /api/unstable/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) +} + +func (o *UpdateGcpMetricsIntegrationDefault) GetPayload() models.GenericError { + return o.Payload +} + +func (o *UpdateGcpMetricsIntegrationDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/* +UpdateGcpMetricsIntegrationBody update gcp metrics integration body +swagger:model UpdateGcpMetricsIntegrationBody +*/ +type UpdateGcpMetricsIntegrationBody struct { + + // 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. + CreateIfMissing bool `json:"create_if_missing,omitempty"` + + // 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. + DryRun bool `json:"dry_run,omitempty"` + + // gcp metrics integration + GcpMetricsIntegration *models.ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` +} + +// Validate validates this update gcp metrics integration body +func (o *UpdateGcpMetricsIntegrationBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateGcpMetricsIntegration(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *UpdateGcpMetricsIntegrationBody) validateGcpMetricsIntegration(formats strfmt.Registry) error { + if swag.IsZero(o.GcpMetricsIntegration) { // not required + return nil + } + + if o.GcpMetricsIntegration != nil { + if err := o.GcpMetricsIntegration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "gcp_metrics_integration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "gcp_metrics_integration") + } + return err + } + } + + return nil +} + +// ContextValidate validate this update gcp metrics integration body based on the context it is used +func (o *UpdateGcpMetricsIntegrationBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := o.contextValidateGcpMetricsIntegration(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *UpdateGcpMetricsIntegrationBody) contextValidateGcpMetricsIntegration(ctx context.Context, formats strfmt.Registry) error { + + if o.GcpMetricsIntegration != nil { + + if swag.IsZero(o.GcpMetricsIntegration) { // not required + return nil + } + + if err := o.GcpMetricsIntegration.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "gcp_metrics_integration") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("body" + "." + "gcp_metrics_integration") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *UpdateGcpMetricsIntegrationBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *UpdateGcpMetricsIntegrationBody) UnmarshalBinary(b []byte) error { + var res UpdateGcpMetricsIntegrationBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/src/generated/swagger/configunstable/mocks/client_mock.go b/src/generated/swagger/configunstable/mocks/client_mock.go index d88aa29..e49c0c1 100644 --- a/src/generated/swagger/configunstable/mocks/client_mock.go +++ b/src/generated/swagger/configunstable/mocks/client_mock.go @@ -75,24 +75,24 @@ 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) { +// 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) + 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 { +// 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...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).CreateGcpMetricsIntegration), varargs...) } // CreateLinkTemplate mocks base method. @@ -255,24 +255,24 @@ 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) { +// 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) + 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 { +// 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...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).DeleteGcpMetricsIntegration), varargs...) } // DeleteLinkTemplate mocks base method. @@ -435,24 +435,24 @@ 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) { +// 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) + 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 { +// 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...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListGcpMetricsIntegrations", reflect.TypeOf((*MockClientService)(nil).ListGcpMetricsIntegrations), varargs...) } // ListLinkTemplates mocks base method. @@ -595,24 +595,24 @@ 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) { +// 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) + 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 { +// 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...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).ReadGcpMetricsIntegration), varargs...) } // ReadLinkTemplate mocks base method. @@ -807,24 +807,24 @@ 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) { +// 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) + 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 { +// 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...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateGcpMetricsIntegration", reflect.TypeOf((*MockClientService)(nil).UpdateGcpMetricsIntegration), varargs...) } // UpdateLinkTemplate mocks base method. diff --git a/src/generated/swagger/configunstable/models/configunstable_create_g_c_p_metrics_integration_request.go b/src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_request.go similarity index 66% rename from src/generated/swagger/configunstable/models/configunstable_create_g_c_p_metrics_integration_request.go rename to src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_request.go index 1b157f6..9fa8f97 100644 --- a/src/generated/swagger/configunstable/models/configunstable_create_g_c_p_metrics_integration_request.go +++ b/src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_request.go @@ -13,20 +13,20 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableCreateGCPMetricsIntegrationRequest configunstable create g c p metrics integration request +// ConfigunstableCreateGcpMetricsIntegrationRequest configunstable create gcp metrics integration request // -// swagger:model configunstableCreateGCPMetricsIntegrationRequest -type ConfigunstableCreateGCPMetricsIntegrationRequest struct { +// swagger:model configunstableCreateGcpMetricsIntegrationRequest +type ConfigunstableCreateGcpMetricsIntegrationRequest struct { // gcp metrics integration - GcpMetricsIntegration *ConfigunstableGCPMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *ConfigunstableGcpMetricsIntegration `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. + // 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 g c p metrics integration request -func (m *ConfigunstableCreateGCPMetricsIntegrationRequest) Validate(formats strfmt.Registry) error { +// Validate validates this configunstable create gcp metrics integration request +func (m *ConfigunstableCreateGcpMetricsIntegrationRequest) 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 *ConfigunstableCreateGcpMetricsIntegrationRequest) 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 g c p metrics integration request based on the context it is used -func (m *ConfigunstableCreateGCPMetricsIntegrationRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// 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 { 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 *ConfigunstableCreateGcpMetricsIntegrationRequest) 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 *ConfigunstableCreateGcpMetricsIntegrationRequest) 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 *ConfigunstableCreateGcpMetricsIntegrationRequest) UnmarshalBinary(b []byte) error { + var res ConfigunstableCreateGcpMetricsIntegrationRequest if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_create_g_c_p_metrics_integration_response.go b/src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_response.go similarity index 70% rename from src/generated/swagger/configunstable/models/configunstable_create_g_c_p_metrics_integration_response.go rename to src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_response.go index 94e0503..0e621ed 100644 --- a/src/generated/swagger/configunstable/models/configunstable_create_g_c_p_metrics_integration_response.go +++ b/src/generated/swagger/configunstable/models/configunstable_create_gcp_metrics_integration_response.go @@ -13,17 +13,17 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableCreateGCPMetricsIntegrationResponse configunstable create g c p metrics integration response +// ConfigunstableCreateGcpMetricsIntegrationResponse configunstable create gcp metrics integration response // -// swagger:model configunstableCreateGCPMetricsIntegrationResponse -type ConfigunstableCreateGCPMetricsIntegrationResponse struct { +// swagger:model configunstableCreateGcpMetricsIntegrationResponse +type ConfigunstableCreateGcpMetricsIntegrationResponse struct { // gcp metrics integration - GcpMetricsIntegration *ConfigunstableGCPMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` } -// Validate validates this configunstable create g c p metrics integration response -func (m *ConfigunstableCreateGCPMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { +// Validate validates this configunstable create gcp metrics integration response +func (m *ConfigunstableCreateGcpMetricsIntegrationResponse) 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 *ConfigunstableCreateGcpMetricsIntegrationResponse) 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 g c p metrics integration response based on the context it is used -func (m *ConfigunstableCreateGCPMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// 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 { 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 *ConfigunstableCreateGcpMetricsIntegrationResponse) 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 *ConfigunstableCreateGcpMetricsIntegrationResponse) 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 *ConfigunstableCreateGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { + var res ConfigunstableCreateGcpMetricsIntegrationResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_delete_g_c_p_metrics_integration_response.go b/src/generated/swagger/configunstable/models/configunstable_delete_g_c_p_metrics_integration_response.go deleted file mode 100644 index a729e7e..0000000 --- a/src/generated/swagger/configunstable/models/configunstable_delete_g_c_p_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 g c p metrics integration response -// -// swagger:model configunstableDeleteGCPMetricsIntegrationResponse -type ConfigunstableDeleteGCPMetricsIntegrationResponse interface{} 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 new file mode 100644 index 0000000..cfb1605 --- /dev/null +++ b/src/generated/swagger/configunstable/models/configunstable_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 + +// ConfigunstableDeleteGcpMetricsIntegrationResponse configunstable delete gcp metrics integration response +// +// swagger:model configunstableDeleteGcpMetricsIntegrationResponse +type ConfigunstableDeleteGcpMetricsIntegrationResponse interface{} diff --git a/src/generated/swagger/configunstable/models/configunstable_g_c_p_metrics_integration.go b/src/generated/swagger/configunstable/models/configunstable_gcp_metrics_integration.go similarity index 75% rename from src/generated/swagger/configunstable/models/configunstable_g_c_p_metrics_integration.go rename to src/generated/swagger/configunstable/models/configunstable_gcp_metrics_integration.go index fc3afcc..7bf9e8e 100644 --- a/src/generated/swagger/configunstable/models/configunstable_g_c_p_metrics_integration.go +++ b/src/generated/swagger/configunstable/models/configunstable_gcp_metrics_integration.go @@ -15,36 +15,36 @@ import ( "github.com/go-openapi/validate" ) -// ConfigunstableGCPMetricsIntegration configunstable g c p metrics integration +// ConfigunstableGcpMetricsIntegration configunstable gcp metrics integration // -// swagger:model configunstableGCPMetricsIntegration -type ConfigunstableGCPMetricsIntegration struct { +// swagger:model configunstableGcpMetricsIntegration +type ConfigunstableGcpMetricsIntegration 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. + // 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"` - // Required name of the GCPMetricsIntegration. May be modified after the GCPMetricsIntegration is created. + // Required name of the GcpMetricsIntegration. May be modified after the GcpMetricsIntegration is created. Name string `json:"name,omitempty"` - // Timestamp of when the GCPMetricsIntegration was created. Cannot be set by clients. + // Timestamp of when the GcpMetricsIntegration was created. Cannot be set by clients. // Read Only: true // Format: date-time CreatedAt strfmt.DateTime `json:"created_at,omitempty"` - // Timestamp of when the GCPMetricsIntegration was last updated. Cannot be set by clients. + // Timestamp of when the GcpMetricsIntegration was last updated. Cannot be set by clients. // Read Only: true // Format: date-time UpdatedAt strfmt.DateTime `json:"updated_at,omitempty"` // service account - ServiceAccount *GCPMetricsIntegrationServiceAccount `json:"service_account,omitempty"` + ServiceAccount *GcpMetricsIntegrationServiceAccount `json:"service_account,omitempty"` // Metric groups to be ingested for this integration. - MetricGroups []*GCPMetricsIntegrationMetricGroup `json:"metric_groups"` + MetricGroups []*GcpMetricsIntegrationMetricGroup `json:"metric_groups"` } -// Validate validates this configunstable g c p metrics integration -func (m *ConfigunstableGCPMetricsIntegration) Validate(formats strfmt.Registry) error { +// Validate validates this configunstable gcp metrics integration +func (m *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) 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 g c p metrics integration based on the context it is used -func (m *ConfigunstableGCPMetricsIntegration) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// 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 { 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 *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) 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 *ConfigunstableGcpMetricsIntegration) UnmarshalBinary(b []byte) error { + var res ConfigunstableGcpMetricsIntegration if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_list_g_c_p_metrics_integrations_response.go b/src/generated/swagger/configunstable/models/configunstable_list_gcp_metrics_integrations_response.go similarity index 77% rename from src/generated/swagger/configunstable/models/configunstable_list_g_c_p_metrics_integrations_response.go rename to src/generated/swagger/configunstable/models/configunstable_list_gcp_metrics_integrations_response.go index 6db1a4b..8388e70 100644 --- a/src/generated/swagger/configunstable/models/configunstable_list_g_c_p_metrics_integrations_response.go +++ b/src/generated/swagger/configunstable/models/configunstable_list_gcp_metrics_integrations_response.go @@ -14,20 +14,20 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableListGCPMetricsIntegrationsResponse configunstable list g c p metrics integrations response +// ConfigunstableListGcpMetricsIntegrationsResponse configunstable list gcp metrics integrations response // -// swagger:model configunstableListGCPMetricsIntegrationsResponse -type ConfigunstableListGCPMetricsIntegrationsResponse struct { +// swagger:model configunstableListGcpMetricsIntegrationsResponse +type ConfigunstableListGcpMetricsIntegrationsResponse struct { // page Page *Configv1PageResult `json:"page,omitempty"` // gcp metrics integrations - GcpMetricsIntegrations []*ConfigunstableGCPMetricsIntegration `json:"gcp_metrics_integrations"` + GcpMetricsIntegrations []*ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integrations"` } -// Validate validates this configunstable list g c p metrics integrations response -func (m *ConfigunstableListGCPMetricsIntegrationsResponse) Validate(formats strfmt.Registry) error { +// Validate validates this configunstable list gcp metrics integrations response +func (m *ConfigunstableListGcpMetricsIntegrationsResponse) 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 *ConfigunstableListGcpMetricsIntegrationsResponse) 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 *ConfigunstableListGcpMetricsIntegrationsResponse) 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 g c p metrics integrations response based on the context it is used -func (m *ConfigunstableListGCPMetricsIntegrationsResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// 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 { 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 *ConfigunstableListGcpMetricsIntegrationsResponse) 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 *ConfigunstableListGcpMetricsIntegrationsResponse) 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 *ConfigunstableListGcpMetricsIntegrationsResponse) 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 *ConfigunstableListGcpMetricsIntegrationsResponse) UnmarshalBinary(b []byte) error { + var res ConfigunstableListGcpMetricsIntegrationsResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_read_g_c_p_metrics_integration_response.go b/src/generated/swagger/configunstable/models/configunstable_read_gcp_metrics_integration_response.go similarity index 70% rename from src/generated/swagger/configunstable/models/configunstable_read_g_c_p_metrics_integration_response.go rename to src/generated/swagger/configunstable/models/configunstable_read_gcp_metrics_integration_response.go index e4df209..5d60da0 100644 --- a/src/generated/swagger/configunstable/models/configunstable_read_g_c_p_metrics_integration_response.go +++ b/src/generated/swagger/configunstable/models/configunstable_read_gcp_metrics_integration_response.go @@ -13,17 +13,17 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableReadGCPMetricsIntegrationResponse configunstable read g c p metrics integration response +// ConfigunstableReadGcpMetricsIntegrationResponse configunstable read gcp metrics integration response // -// swagger:model configunstableReadGCPMetricsIntegrationResponse -type ConfigunstableReadGCPMetricsIntegrationResponse struct { +// swagger:model configunstableReadGcpMetricsIntegrationResponse +type ConfigunstableReadGcpMetricsIntegrationResponse struct { // gcp metrics integration - GcpMetricsIntegration *ConfigunstableGCPMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` } -// Validate validates this configunstable read g c p metrics integration response -func (m *ConfigunstableReadGCPMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { +// Validate validates this configunstable read gcp metrics integration response +func (m *ConfigunstableReadGcpMetricsIntegrationResponse) 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 *ConfigunstableReadGcpMetricsIntegrationResponse) 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 g c p metrics integration response based on the context it is used -func (m *ConfigunstableReadGCPMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// 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 { 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 *ConfigunstableReadGcpMetricsIntegrationResponse) 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 *ConfigunstableReadGcpMetricsIntegrationResponse) 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 *ConfigunstableReadGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { + var res ConfigunstableReadGcpMetricsIntegrationResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/configunstable_update_g_c_p_metrics_integration_response.go b/src/generated/swagger/configunstable/models/configunstable_update_gcp_metrics_integration_response.go similarity index 70% rename from src/generated/swagger/configunstable/models/configunstable_update_g_c_p_metrics_integration_response.go rename to src/generated/swagger/configunstable/models/configunstable_update_gcp_metrics_integration_response.go index 9be66ce..ef46d61 100644 --- a/src/generated/swagger/configunstable/models/configunstable_update_g_c_p_metrics_integration_response.go +++ b/src/generated/swagger/configunstable/models/configunstable_update_gcp_metrics_integration_response.go @@ -13,17 +13,17 @@ import ( "github.com/go-openapi/swag" ) -// ConfigunstableUpdateGCPMetricsIntegrationResponse configunstable update g c p metrics integration response +// ConfigunstableUpdateGcpMetricsIntegrationResponse configunstable update gcp metrics integration response // -// swagger:model configunstableUpdateGCPMetricsIntegrationResponse -type ConfigunstableUpdateGCPMetricsIntegrationResponse struct { +// swagger:model configunstableUpdateGcpMetricsIntegrationResponse +type ConfigunstableUpdateGcpMetricsIntegrationResponse struct { // gcp metrics integration - GcpMetricsIntegration *ConfigunstableGCPMetricsIntegration `json:"gcp_metrics_integration,omitempty"` + GcpMetricsIntegration *ConfigunstableGcpMetricsIntegration `json:"gcp_metrics_integration,omitempty"` } -// Validate validates this configunstable update g c p metrics integration response -func (m *ConfigunstableUpdateGCPMetricsIntegrationResponse) Validate(formats strfmt.Registry) error { +// Validate validates this configunstable update gcp metrics integration response +func (m *ConfigunstableUpdateGcpMetricsIntegrationResponse) 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 *ConfigunstableUpdateGcpMetricsIntegrationResponse) 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 g c p metrics integration response based on the context it is used -func (m *ConfigunstableUpdateGCPMetricsIntegrationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// 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 { 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 *ConfigunstableUpdateGcpMetricsIntegrationResponse) 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 *ConfigunstableUpdateGcpMetricsIntegrationResponse) 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 *ConfigunstableUpdateGcpMetricsIntegrationResponse) UnmarshalBinary(b []byte) error { + var res ConfigunstableUpdateGcpMetricsIntegrationResponse if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/g_c_p_metrics_integration_metric_group.go b/src/generated/swagger/configunstable/models/gcp_metrics_integration_metric_group.go similarity index 53% rename from src/generated/swagger/configunstable/models/g_c_p_metrics_integration_metric_group.go rename to src/generated/swagger/configunstable/models/gcp_metrics_integration_metric_group.go index 5e04167..b40d365 100644 --- a/src/generated/swagger/configunstable/models/g_c_p_metrics_integration_metric_group.go +++ b/src/generated/swagger/configunstable/models/gcp_metrics_integration_metric_group.go @@ -12,30 +12,30 @@ import ( "github.com/go-openapi/swag" ) -// GCPMetricsIntegrationMetricGroup g c p metrics integration metric group +// GcpMetricsIntegrationMetricGroup gcp metrics integration metric group // -// swagger:model GCPMetricsIntegrationMetricGroup -type GCPMetricsIntegrationMetricGroup struct { +// swagger:model GcpMetricsIntegrationMetricGroup +type GcpMetricsIntegrationMetricGroup struct { // Project ID that has access to the metric data. ProjectID string `json:"project_id,omitempty"` - // List of GCP metric prefixes to ingest. + // List of Gcp metric prefixes to ingest. Prefixes []string `json:"prefixes"` } -// Validate validates this g c p metrics integration metric group -func (m *GCPMetricsIntegrationMetricGroup) Validate(formats strfmt.Registry) error { +// Validate validates this gcp metrics integration metric group +func (m *GcpMetricsIntegrationMetricGroup) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this g c p metrics integration metric group based on context it is used -func (m *GCPMetricsIntegrationMetricGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// ContextValidate validates this gcp metrics integration metric group based on context it is used +func (m *GcpMetricsIntegrationMetricGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil } // MarshalBinary interface implementation -func (m *GCPMetricsIntegrationMetricGroup) MarshalBinary() ([]byte, error) { +func (m *GcpMetricsIntegrationMetricGroup) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -43,8 +43,8 @@ func (m *GCPMetricsIntegrationMetricGroup) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *GCPMetricsIntegrationMetricGroup) UnmarshalBinary(b []byte) error { - var res GCPMetricsIntegrationMetricGroup +func (m *GcpMetricsIntegrationMetricGroup) UnmarshalBinary(b []byte) error { + var res GcpMetricsIntegrationMetricGroup if err := swag.ReadJSON(b, &res); err != nil { return err } diff --git a/src/generated/swagger/configunstable/models/g_c_p_metrics_integration_service_account.go b/src/generated/swagger/configunstable/models/gcp_metrics_integration_service_account.go similarity index 54% rename from src/generated/swagger/configunstable/models/g_c_p_metrics_integration_service_account.go rename to src/generated/swagger/configunstable/models/gcp_metrics_integration_service_account.go index 1962be3..be28a9d 100644 --- a/src/generated/swagger/configunstable/models/g_c_p_metrics_integration_service_account.go +++ b/src/generated/swagger/configunstable/models/gcp_metrics_integration_service_account.go @@ -12,27 +12,27 @@ import ( "github.com/go-openapi/swag" ) -// GCPMetricsIntegrationServiceAccount g c p metrics integration service account +// GcpMetricsIntegrationServiceAccount gcp metrics integration service account // -// swagger:model GCPMetricsIntegrationServiceAccount -type GCPMetricsIntegrationServiceAccount struct { +// swagger:model GcpMetricsIntegrationServiceAccount +type GcpMetricsIntegrationServiceAccount struct { // Email address of the service account to impersonate. ClientEmail string `json:"client_email,omitempty"` } -// Validate validates this g c p metrics integration service account -func (m *GCPMetricsIntegrationServiceAccount) Validate(formats strfmt.Registry) error { +// Validate validates this gcp metrics integration service account +func (m *GcpMetricsIntegrationServiceAccount) Validate(formats strfmt.Registry) error { return nil } -// ContextValidate validates this g c p metrics integration service account based on context it is used -func (m *GCPMetricsIntegrationServiceAccount) ContextValidate(ctx context.Context, formats strfmt.Registry) error { +// 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) { +func (m *GcpMetricsIntegrationServiceAccount) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } @@ -40,8 +40,8 @@ func (m *GCPMetricsIntegrationServiceAccount) MarshalBinary() ([]byte, error) { } // UnmarshalBinary interface implementation -func (m *GCPMetricsIntegrationServiceAccount) UnmarshalBinary(b []byte) error { - var res GCPMetricsIntegrationServiceAccount +func (m *GcpMetricsIntegrationServiceAccount) UnmarshalBinary(b []byte) error { + var res GcpMetricsIntegrationServiceAccount 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 7397129..046ae0e 100644 --- a/src/generated/swagger/configunstable/spec.json +++ b/src/generated/swagger/configunstable/spec.json @@ -59,14 +59,14 @@ ], "type": "string" }, - "GCPMetricsIntegrationMetricGroup": { + "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.", + "description": "List of Gcp metric prefixes to ingest.", "items": { "type": "string" }, @@ -75,7 +75,7 @@ }, "type": "object" }, - "GCPMetricsIntegrationServiceAccount": { + "GcpMetricsIntegrationServiceAccount": { "properties": { "client_email": { "description": "Email address of the service account to impersonate.", @@ -528,22 +528,22 @@ }, "type": "object" }, - "configunstableCreateGCPMetricsIntegrationRequest": { + "configunstableCreateGcpMetricsIntegrationRequest": { "properties": { "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGCPMetricsIntegration" + "$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.", + "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": { + "configunstableCreateGcpMetricsIntegrationResponse": { "properties": { "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGCPMetricsIntegration" + "$ref": "#/definitions/configunstableGcpMetricsIntegration" } }, "type": "object" @@ -745,7 +745,7 @@ "configunstableDeleteDatasetResponse": { "type": "object" }, - "configunstableDeleteGCPMetricsIntegrationResponse": { + "configunstableDeleteGcpMetricsIntegrationResponse": { "type": "object" }, "configunstableDeleteLinkTemplateResponse": { @@ -766,35 +766,35 @@ "configunstableDeleteTraceTailSamplingRulesResponse": { "type": "object" }, - "configunstableGCPMetricsIntegration": { + "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.", + "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.", + "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.", + "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.", + "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" + "$ref": "#/definitions/GcpMetricsIntegrationServiceAccount" }, "metric_groups": { "description": "Metric groups to be ingested for this integration.", "items": { - "$ref": "#/definitions/GCPMetricsIntegrationMetricGroup" + "$ref": "#/definitions/GcpMetricsIntegrationMetricGroup" }, "type": "array" } @@ -862,14 +862,14 @@ }, "type": "object" }, - "configunstableListGCPMetricsIntegrationsResponse": { + "configunstableListGcpMetricsIntegrationsResponse": { "properties": { "page": { "$ref": "#/definitions/configv1PageResult" }, "gcp_metrics_integrations": { "items": { - "$ref": "#/definitions/configunstableGCPMetricsIntegration" + "$ref": "#/definitions/configunstableGcpMetricsIntegration" }, "type": "array" } @@ -1002,10 +1002,10 @@ }, "type": "object" }, - "configunstableReadGCPMetricsIntegrationResponse": { + "configunstableReadGcpMetricsIntegrationResponse": { "properties": { "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGCPMetricsIntegration" + "$ref": "#/definitions/configunstableGcpMetricsIntegration" } }, "type": "object" @@ -1282,10 +1282,10 @@ }, "type": "object" }, - "configunstableUpdateGCPMetricsIntegrationResponse": { + "configunstableUpdateGcpMetricsIntegrationResponse": { "properties": { "gcp_metrics_integration": { - "$ref": "#/definitions/configunstableGCPMetricsIntegration" + "$ref": "#/definitions/configunstableGcpMetricsIntegration" } }, "type": "object" @@ -1979,7 +1979,7 @@ }, "/api/unstable/config/gcp-metrics-integrations": { "get": { - "operationId": "ListGCPMetricsIntegrations", + "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.", @@ -1996,7 +1996,7 @@ }, { "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.", + "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" @@ -2006,7 +2006,7 @@ }, { "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.", + "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" @@ -2019,7 +2019,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/configunstableListGCPMetricsIntegrationsResponse" + "$ref": "#/definitions/configunstableListGcpMetricsIntegrationsResponse" } }, "500": { @@ -2036,36 +2036,36 @@ } }, "tags": [ - "GCPMetricsIntegration" + "GcpMetricsIntegration" ] }, "post": { - "operationId": "CreateGCPMetricsIntegration", + "operationId": "CreateGcpMetricsIntegration", "parameters": [ { "in": "body", "name": "body", "required": true, "schema": { - "$ref": "#/definitions/configunstableCreateGCPMetricsIntegrationRequest" + "$ref": "#/definitions/configunstableCreateGcpMetricsIntegrationRequest" } } ], "responses": { "200": { - "description": "A successful response containing the created GCPMetricsIntegration.", + "description": "A successful response containing the created GcpMetricsIntegration.", "schema": { - "$ref": "#/definitions/configunstableCreateGCPMetricsIntegrationResponse" + "$ref": "#/definitions/configunstableCreateGcpMetricsIntegrationResponse" } }, "400": { - "description": "Cannot create the GCPMetricsIntegration because the request is invalid.", + "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.", + "description": "Cannot create the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration.", "schema": { "$ref": "#/definitions/apiError" } @@ -2084,13 +2084,13 @@ } }, "tags": [ - "GCPMetricsIntegration" + "GcpMetricsIntegration" ] } }, "/api/unstable/config/gcp-metrics-integrations/{slug}": { "delete": { - "operationId": "DeleteGCPMetricsIntegration", + "operationId": "DeleteGcpMetricsIntegration", "parameters": [ { "in": "path", @@ -2103,17 +2103,17 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/configunstableDeleteGCPMetricsIntegrationResponse" + "$ref": "#/definitions/configunstableDeleteGcpMetricsIntegrationResponse" } }, "400": { - "description": "Cannot delete the GCPMetricsIntegration because it is in use.", + "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.", + "description": "Cannot delete the GcpMetricsIntegration because the slug does not exist.", "schema": { "$ref": "#/definitions/apiError" } @@ -2132,11 +2132,11 @@ } }, "tags": [ - "GCPMetricsIntegration" + "GcpMetricsIntegration" ] }, "get": { - "operationId": "ReadGCPMetricsIntegration", + "operationId": "ReadGcpMetricsIntegration", "parameters": [ { "in": "path", @@ -2149,11 +2149,11 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/configunstableReadGCPMetricsIntegrationResponse" + "$ref": "#/definitions/configunstableReadGcpMetricsIntegrationResponse" } }, "404": { - "description": "Cannot read the GCPMetricsIntegration because the slug does not exist.", + "description": "Cannot read the GcpMetricsIntegration because the slug does not exist.", "schema": { "$ref": "#/definitions/apiError" } @@ -2172,11 +2172,11 @@ } }, "tags": [ - "GCPMetricsIntegration" + "GcpMetricsIntegration" ] }, "put": { - "operationId": "UpdateGCPMetricsIntegration", + "operationId": "UpdateGcpMetricsIntegration", "parameters": [ { "in": "path", @@ -2191,15 +2191,15 @@ "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.", + "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.", + "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" + "$ref": "#/definitions/configunstableGcpMetricsIntegration" } }, "type": "object" @@ -2208,25 +2208,25 @@ ], "responses": { "200": { - "description": "A successful response containing the updated GCPMetricsIntegration.", + "description": "A successful response containing the updated GcpMetricsIntegration.", "schema": { - "$ref": "#/definitions/configunstableUpdateGCPMetricsIntegrationResponse" + "$ref": "#/definitions/configunstableUpdateGcpMetricsIntegrationResponse" } }, "400": { - "description": "Cannot update the GCPMetricsIntegration because the request is invalid.", + "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.", + "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.", + "description": "Cannot update the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration.", "schema": { "$ref": "#/definitions/apiError" } @@ -2245,7 +2245,7 @@ } }, "tags": [ - "GCPMetricsIntegration" + "GcpMetricsIntegration" ] } },