diff --git a/pkg/mermaidclient/client.go b/pkg/mermaidclient/client.go deleted file mode 100644 index 26e9a6cced4..00000000000 --- a/pkg/mermaidclient/client.go +++ /dev/null @@ -1,459 +0,0 @@ -// Copyright (C) 2017 ScyllaDB - -package mermaidclient - -import ( - "context" - "crypto/tls" - "net/http" - "net/url" - "os" - "strconv" - "sync" - "time" - - api "github.com/go-openapi/runtime/client" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/pkg/errors" - "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/client/operations" - "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" - "github.com/scylladb/scylla-operator/pkg/util/uuid" -) - -var disableOpenAPIDebugOnce sync.Once - -//go:generate ./internalgen.sh - -// Client provides means to interact with Mermaid. -type Client struct { - operations *operations.Client -} - -// DefaultTLSConfig specifies default TLS configuration used when creating a new -// client. -var DefaultTLSConfig = func() *tls.Config { - return &tls.Config{ - InsecureSkipVerify: true, - } -} - -func NewClient(rawURL string, transport http.RoundTripper) (Client, error) { - u, err := url.Parse(rawURL) - if err != nil { - return Client{}, err - } - - disableOpenAPIDebugOnce.Do(func() { - middleware.Debug = false - }) - - if transport == nil { - transport = &http.Transport{ - TLSClientConfig: DefaultTLSConfig(), - } - } - - httpClient := &http.Client{ - Transport: transport, - } - - r := api.NewWithClient(u.Host, u.Path, []string{u.Scheme}, httpClient) - // debug can be turned on by SWAGGER_DEBUG or DEBUG env variable - // we change that to SCTOOL_DUMP_HTTP - r.Debug, _ = strconv.ParseBool(os.Getenv("SCTOOL_DUMP_HTTP")) - - return Client{operations: operations.New(r, strfmt.Default)}, nil -} - -// CreateCluster creates a new cluster. -func (c Client) CreateCluster(ctx context.Context, cluster *Cluster) (string, error) { - resp, err := c.operations.PostClusters(&operations.PostClustersParams{ - Context: ctx, - Cluster: cluster, - }) - if err != nil { - return "", err - } - - clusterID, err := uuidFromLocation(resp.Location) - if err != nil { - return "", errors.Wrap(err, "cannot parse response") - } - - return clusterID.String(), nil -} - -// GetCluster returns a cluster for a given ID. -func (c Client) GetCluster(ctx context.Context, clusterID string) (*Cluster, error) { - resp, err := c.operations.GetClusterClusterID(&operations.GetClusterClusterIDParams{ - Context: ctx, - ClusterID: clusterID, - }) - if err != nil { - return nil, err - } - - return resp.Payload, nil -} - -// UpdateCluster updates cluster. -func (c Client) UpdateCluster(ctx context.Context, cluster *Cluster) error { - _, err := c.operations.PutClusterClusterID(&operations.PutClusterClusterIDParams{ // nolint: errcheck - Context: ctx, - ClusterID: cluster.ID, - Cluster: cluster, - }) - return err -} - -// DeleteCluster removes cluster. -func (c Client) DeleteCluster(ctx context.Context, clusterID string) error { - _, err := c.operations.DeleteClusterClusterID(&operations.DeleteClusterClusterIDParams{ // nolint: errcheck - Context: ctx, - ClusterID: clusterID, - }) - return err -} - -// DeleteClusterSecrets removes cluster secrets. -func (c Client) DeleteClusterSecrets(ctx context.Context, clusterID string, cqlCreds, sslUserCert bool) error { - ok := false - p := &operations.DeleteClusterClusterIDParams{ - Context: ctx, - ClusterID: clusterID, - } - if cqlCreds { - p.CqlCreds = &cqlCreds - ok = true - } - if sslUserCert { - p.SslUserCert = &sslUserCert - ok = true - } - - if !ok { - return nil - } - - _, err := c.operations.DeleteClusterClusterID(p) // nolint: errcheck - return err -} - -// ListClusters returns clusters. -func (c Client) ListClusters(ctx context.Context) (ClusterSlice, error) { - resp, err := c.operations.GetClusters(&operations.GetClustersParams{ - Context: ctx, - }) - if err != nil { - return nil, err - } - - return resp.Payload, nil -} - -// ClusterStatus returns health check progress. -func (c Client) ClusterStatus(ctx context.Context, clusterID string) (ClusterStatus, error) { - resp, err := c.operations.GetClusterClusterIDStatus(&operations.GetClusterClusterIDStatusParams{ - Context: ctx, - ClusterID: clusterID, - }) - if err != nil { - return nil, err - } - - return ClusterStatus(resp.Payload), nil -} - -// GetRepairTarget fetches information about repair target. -func (c *Client) GetRepairTarget(ctx context.Context, clusterID string, t *Task) (*RepairTarget, error) { - resp, err := c.operations.GetClusterClusterIDTasksRepairTarget(&operations.GetClusterClusterIDTasksRepairTargetParams{ - Context: ctx, - ClusterID: clusterID, - TaskFields: makeTaskUpdate(t), - }) - if err != nil { - return nil, err - } - - return &RepairTarget{RepairTarget: *resp.Payload}, nil -} - -// GetBackupTarget fetches information about repair target. -func (c *Client) GetBackupTarget(ctx context.Context, clusterID string, t *Task) (*BackupTarget, error) { - resp, err := c.operations.GetClusterClusterIDTasksBackupTarget(&operations.GetClusterClusterIDTasksBackupTargetParams{ - Context: ctx, - ClusterID: clusterID, - TaskFields: makeTaskUpdate(t), - }) - if err != nil { - return nil, err - } - - return &BackupTarget{BackupTarget: *resp.Payload}, nil -} - -// CreateTask creates a new task. -func (c *Client) CreateTask(ctx context.Context, clusterID string, t *Task) (uuid.UUID, error) { - params := &operations.PostClusterClusterIDTasksParams{ - Context: ctx, - ClusterID: clusterID, - TaskFields: makeTaskUpdate(t), - } - resp, err := c.operations.PostClusterClusterIDTasks(params) - if err != nil { - return uuid.Nil, err - } - - taskID, err := uuidFromLocation(resp.Location) - if err != nil { - return uuid.Nil, errors.Wrap(err, "cannot parse response") - } - - return taskID, nil -} - -// GetTask returns a task of a given type and ID. -func (c *Client) GetTask(ctx context.Context, clusterID, taskType string, taskID uuid.UUID) (*Task, error) { - resp, err := c.operations.GetClusterClusterIDTaskTaskTypeTaskID(&operations.GetClusterClusterIDTaskTaskTypeTaskIDParams{ - Context: ctx, - ClusterID: clusterID, - TaskType: taskType, - TaskID: taskID.String(), - }) - if err != nil { - return nil, err - } - - return resp.Payload, nil -} - -// GetTaskHistory returns a run history of task of a given type and task ID. -func (c *Client) GetTaskHistory(ctx context.Context, clusterID, taskType string, taskID uuid.UUID, limit int64) (TaskRunSlice, error) { - params := &operations.GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams{ - Context: ctx, - ClusterID: clusterID, - TaskType: taskType, - TaskID: taskID.String(), - } - - params.Limit = &limit - - resp, err := c.operations.GetClusterClusterIDTaskTaskTypeTaskIDHistory(params) - if err != nil { - return nil, err - } - - return resp.Payload, nil -} - -// StartTask starts executing a task. -func (c *Client) StartTask(ctx context.Context, clusterID, taskType string, taskID uuid.UUID, cont bool) error { - _, err := c.operations.PutClusterClusterIDTaskTaskTypeTaskIDStart(&operations.PutClusterClusterIDTaskTaskTypeTaskIDStartParams{ // nolint: errcheck - Context: ctx, - ClusterID: clusterID, - TaskType: taskType, - TaskID: taskID.String(), - Continue: cont, - }) - - return err -} - -// StopTask stops executing a task. -func (c *Client) StopTask(ctx context.Context, clusterID, taskType string, taskID uuid.UUID, disable bool) error { - _, err := c.operations.PutClusterClusterIDTaskTaskTypeTaskIDStop(&operations.PutClusterClusterIDTaskTaskTypeTaskIDStopParams{ // nolint: errcheck - Context: ctx, - ClusterID: clusterID, - TaskType: taskType, - TaskID: taskID.String(), - Disable: &disable, - }) - - return err -} - -// DeleteTask stops executing a task. -func (c *Client) DeleteTask(ctx context.Context, clusterID, taskType string, taskID uuid.UUID) error { - _, err := c.operations.DeleteClusterClusterIDTaskTaskTypeTaskID(&operations.DeleteClusterClusterIDTaskTaskTypeTaskIDParams{ // nolint: errcheck - Context: ctx, - ClusterID: clusterID, - TaskType: taskType, - TaskID: taskID.String(), - }) - - return err -} - -// UpdateTask updates an existing task unit. -func (c *Client) UpdateTask(ctx context.Context, clusterID string, t *Task) error { - _, err := c.operations.PutClusterClusterIDTaskTaskTypeTaskID(&operations.PutClusterClusterIDTaskTaskTypeTaskIDParams{ // nolint: errcheck - Context: ctx, - ClusterID: clusterID, - TaskType: t.Type, - TaskID: t.ID, - TaskFields: &models.TaskUpdate{ - Enabled: t.Enabled, - Name: t.Name, - Schedule: t.Schedule, - Tags: t.Tags, - Properties: t.Properties, - }, - }) - return err -} - -// ListTasks returns uled tasks within a clusterID, optionaly filtered by task type tp. -func (c *Client) ListTasks(ctx context.Context, clusterID, taskType string, all bool, status string) (ExtendedTasks, error) { - resp, err := c.operations.GetClusterClusterIDTasks(&operations.GetClusterClusterIDTasksParams{ - Context: ctx, - ClusterID: clusterID, - Type: &taskType, - All: &all, - Status: &status, - }) - if err != nil { - return ExtendedTasks{}, err - } - - et := ExtendedTasks{ - All: all, - } - et.ExtendedTaskSlice = resp.Payload - return et, nil -} - -// RepairProgress returns repair progress. -func (c Client) RepairProgress(ctx context.Context, clusterID, taskID, runID string) (RepairProgress, error) { - resp, err := c.operations.GetClusterClusterIDTaskRepairTaskIDRunID(&operations.GetClusterClusterIDTaskRepairTaskIDRunIDParams{ - Context: ctx, - ClusterID: clusterID, - TaskID: taskID, - RunID: runID, - }) - if err != nil { - return RepairProgress{}, err - } - - return RepairProgress{ - TaskRunRepairProgress: resp.Payload, - }, nil -} - -// BackupProgress returns backup progress. -func (c Client) BackupProgress(ctx context.Context, clusterID, taskID, runID string) (BackupProgress, error) { - tr := &models.TaskRunBackupProgress{ - Progress: &models.BackupProgress{ - Stage: "INIT", - }, - Run: &models.TaskRun{ - Status: "NEW", - }, - } - - resp, err := c.operations.GetClusterClusterIDTaskBackupTaskIDRunID(&operations.GetClusterClusterIDTaskBackupTaskIDRunIDParams{ - Context: ctx, - ClusterID: clusterID, - TaskID: taskID, - RunID: runID, - }) - if err != nil { - return tr, err - } - - if resp.Payload.Progress == nil { - resp.Payload.Progress = tr.Progress - } - if resp.Payload.Run == nil { - resp.Payload.Run = tr.Run - } - - return resp.Payload, nil -} - -// ListBackups returns listing of available backups. -func (c Client) ListBackups(ctx context.Context, clusterID string, - locations []string, allClusters bool, keyspace []string, minDate, maxDate strfmt.DateTime) (BackupListItems, error) { - p := &operations.GetClusterClusterIDBackupsParams{ - Context: ctx, - ClusterID: clusterID, - Locations: locations, - Keyspace: keyspace, - } - if !allClusters { - p.QueryClusterID = &clusterID - } - if !time.Time(minDate).IsZero() { - p.MinDate = &minDate - } - if !time.Time(maxDate).IsZero() { - p.MaxDate = &maxDate - } - - resp, err := c.operations.GetClusterClusterIDBackups(p) - if err != nil { - return BackupListItems{}, err - } - - return resp.Payload, nil -} - -// ListBackupFiles returns a listing of available backup files. -func (c Client) ListBackupFiles(ctx context.Context, clusterID string, - locations []string, allClusters bool, keyspace []string, snapshotTag string) ([]*models.BackupFilesInfo, error) { - p := &operations.GetClusterClusterIDBackupsFilesParams{ - Context: ctx, - ClusterID: clusterID, - Locations: locations, - Keyspace: keyspace, - SnapshotTag: snapshotTag, - } - if !allClusters { - p.QueryClusterID = &clusterID - } - - resp, err := c.operations.GetClusterClusterIDBackupsFiles(p) - if err != nil { - return nil, err - } - - return resp.Payload, nil -} - -// DeleteSnapshot deletes backup snapshot with all data associated with it. -func (c Client) DeleteSnapshot(ctx context.Context, clusterID string, - locations []string, snapshotTag string) error { - p := &operations.DeleteClusterClusterIDBackupsParams{ - Context: ctx, - ClusterID: clusterID, - Locations: locations, - SnapshotTag: snapshotTag, - } - - _, err := c.operations.DeleteClusterClusterIDBackups(p) // nolint: errcheck - return err -} - -// Version returns server version. -func (c Client) Version(ctx context.Context) (*models.Version, error) { - resp, err := c.operations.GetVersion(&operations.GetVersionParams{ - Context: ctx, - }) - if err != nil { - return &models.Version{}, err - } - - return resp.Payload, nil -} - -// SetRepairIntensity updates ongoing repair intensity. -func (c Client) SetRepairIntensity(ctx context.Context, clusterID string, intensity float64) error { - p := &operations.PostClusterClusterIDRepairsIntensityParams{ - Context: ctx, - ClusterID: clusterID, - Intensity: intensity, - } - - _, err := c.operations.PostClusterClusterIDRepairsIntensity(p) // nolint: errcheck - return err -} diff --git a/pkg/mermaidclient/internal/client/mermaid_client.go b/pkg/mermaidclient/internal/client/mermaid_client.go deleted file mode 100644 index be40244f0ec..00000000000 --- a/pkg/mermaidclient/internal/client/mermaid_client.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package client - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - httptransport "github.com/go-openapi/runtime/client" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/client/operations" -) - -// Default mermaid HTTP client. -var Default = NewHTTPClient(nil) - -const ( - // DefaultHost is the default Host - // found in Meta (info) section of spec file - DefaultHost string = "localhost" - // DefaultBasePath is the default BasePath - // found in Meta (info) section of spec file - DefaultBasePath string = "/api/v1" -) - -// DefaultSchemes are the default schemes found in Meta (info) section of spec file -var DefaultSchemes = []string{"http"} - -// NewHTTPClient creates a new mermaid HTTP client. -func NewHTTPClient(formats strfmt.Registry) *Mermaid { - return NewHTTPClientWithConfig(formats, nil) -} - -// NewHTTPClientWithConfig creates a new mermaid HTTP client, -// using a customizable transport config. -func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Mermaid { - // ensure nullable parameters have default - if cfg == nil { - cfg = DefaultTransportConfig() - } - - // create transport and client - transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) - return New(transport, formats) -} - -// New creates a new mermaid client -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Mermaid { - // ensure nullable parameters have default - if formats == nil { - formats = strfmt.Default - } - - cli := new(Mermaid) - cli.Transport = transport - - cli.Operations = operations.New(transport, formats) - - return cli -} - -// DefaultTransportConfig creates a TransportConfig with the -// default settings taken from the meta section of the spec file. -func DefaultTransportConfig() *TransportConfig { - return &TransportConfig{ - Host: DefaultHost, - BasePath: DefaultBasePath, - Schemes: DefaultSchemes, - } -} - -// TransportConfig contains the transport related info, -// found in the meta section of the spec file. -type TransportConfig struct { - Host string - BasePath string - Schemes []string -} - -// WithHost overrides the default host, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithHost(host string) *TransportConfig { - cfg.Host = host - return cfg -} - -// WithBasePath overrides the default basePath, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { - cfg.BasePath = basePath - return cfg -} - -// WithSchemes overrides the default schemes, -// provided by the meta section of the spec file. -func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { - cfg.Schemes = schemes - return cfg -} - -// Mermaid is a client for mermaid -type Mermaid struct { - Operations *operations.Client - - Transport runtime.ClientTransport -} - -// SetTransport changes the transport on the client and all its subresources -func (c *Mermaid) SetTransport(transport runtime.ClientTransport) { - c.Transport = transport - - c.Operations.SetTransport(transport) - -} diff --git a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_backups_parameters.go b/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_backups_parameters.go deleted file mode 100644 index 6e696a5cc1a..00000000000 --- a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_backups_parameters.go +++ /dev/null @@ -1,178 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDeleteClusterClusterIDBackupsParams creates a new DeleteClusterClusterIDBackupsParams object -// with the default values initialized. -func NewDeleteClusterClusterIDBackupsParams() *DeleteClusterClusterIDBackupsParams { - var () - return &DeleteClusterClusterIDBackupsParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteClusterClusterIDBackupsParamsWithTimeout creates a new DeleteClusterClusterIDBackupsParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDeleteClusterClusterIDBackupsParamsWithTimeout(timeout time.Duration) *DeleteClusterClusterIDBackupsParams { - var () - return &DeleteClusterClusterIDBackupsParams{ - - timeout: timeout, - } -} - -// NewDeleteClusterClusterIDBackupsParamsWithContext creates a new DeleteClusterClusterIDBackupsParams object -// with the default values initialized, and the ability to set a context for a request -func NewDeleteClusterClusterIDBackupsParamsWithContext(ctx context.Context) *DeleteClusterClusterIDBackupsParams { - var () - return &DeleteClusterClusterIDBackupsParams{ - - Context: ctx, - } -} - -// NewDeleteClusterClusterIDBackupsParamsWithHTTPClient creates a new DeleteClusterClusterIDBackupsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDeleteClusterClusterIDBackupsParamsWithHTTPClient(client *http.Client) *DeleteClusterClusterIDBackupsParams { - var () - return &DeleteClusterClusterIDBackupsParams{ - HTTPClient: client, - } -} - -/* -DeleteClusterClusterIDBackupsParams contains all the parameters to send to the API endpoint -for the delete cluster cluster ID backups operation typically these are written to a http.Request -*/ -type DeleteClusterClusterIDBackupsParams struct { - - /*ClusterID*/ - ClusterID string - /*Locations*/ - Locations []string - /*SnapshotTag*/ - SnapshotTag string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) WithTimeout(timeout time.Duration) *DeleteClusterClusterIDBackupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) WithContext(ctx context.Context) *DeleteClusterClusterIDBackupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) WithHTTPClient(client *http.Client) *DeleteClusterClusterIDBackupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) WithClusterID(clusterID string) *DeleteClusterClusterIDBackupsParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithLocations adds the locations to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) WithLocations(locations []string) *DeleteClusterClusterIDBackupsParams { - o.SetLocations(locations) - return o -} - -// SetLocations adds the locations to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) SetLocations(locations []string) { - o.Locations = locations -} - -// WithSnapshotTag adds the snapshotTag to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) WithSnapshotTag(snapshotTag string) *DeleteClusterClusterIDBackupsParams { - o.SetSnapshotTag(snapshotTag) - return o -} - -// SetSnapshotTag adds the snapshotTag to the delete cluster cluster ID backups params -func (o *DeleteClusterClusterIDBackupsParams) SetSnapshotTag(snapshotTag string) { - o.SnapshotTag = snapshotTag -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteClusterClusterIDBackupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - valuesLocations := o.Locations - - joinedLocations := swag.JoinByFormat(valuesLocations, "") - // query array param locations - if err := r.SetQueryParam("locations", joinedLocations...); err != nil { - return err - } - - // query param snapshot_tag - qrSnapshotTag := o.SnapshotTag - qSnapshotTag := qrSnapshotTag - if qSnapshotTag != "" { - if err := r.SetQueryParam("snapshot_tag", qSnapshotTag); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_backups_responses.go b/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_backups_responses.go deleted file mode 100644 index 43ff173b411..00000000000 --- a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_backups_responses.go +++ /dev/null @@ -1,108 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// DeleteClusterClusterIDBackupsReader is a Reader for the DeleteClusterClusterIDBackups structure. -type DeleteClusterClusterIDBackupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteClusterClusterIDBackupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteClusterClusterIDBackupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteClusterClusterIDBackupsDefault(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 - } -} - -// NewDeleteClusterClusterIDBackupsOK creates a DeleteClusterClusterIDBackupsOK with default headers values -func NewDeleteClusterClusterIDBackupsOK() *DeleteClusterClusterIDBackupsOK { - return &DeleteClusterClusterIDBackupsOK{} -} - -/* -DeleteClusterClusterIDBackupsOK handles this case with default header values. - -OK -*/ -type DeleteClusterClusterIDBackupsOK struct { -} - -func (o *DeleteClusterClusterIDBackupsOK) Error() string { - return fmt.Sprintf("[DELETE /cluster/{cluster_id}/backups][%d] deleteClusterClusterIdBackupsOK ", 200) -} - -func (o *DeleteClusterClusterIDBackupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteClusterClusterIDBackupsDefault creates a DeleteClusterClusterIDBackupsDefault with default headers values -func NewDeleteClusterClusterIDBackupsDefault(code int) *DeleteClusterClusterIDBackupsDefault { - return &DeleteClusterClusterIDBackupsDefault{ - _statusCode: code, - } -} - -/* -DeleteClusterClusterIDBackupsDefault handles this case with default header values. - -Unexpected error -*/ -type DeleteClusterClusterIDBackupsDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the delete cluster cluster ID backups default response -func (o *DeleteClusterClusterIDBackupsDefault) Code() int { - return o._statusCode -} - -func (o *DeleteClusterClusterIDBackupsDefault) Error() string { - return fmt.Sprintf("[DELETE /cluster/{cluster_id}/backups][%d] DeleteClusterClusterIDBackups default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteClusterClusterIDBackupsDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *DeleteClusterClusterIDBackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_parameters.go b/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_parameters.go deleted file mode 100644 index 5ddcb837f0e..00000000000 --- a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_parameters.go +++ /dev/null @@ -1,193 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDeleteClusterClusterIDParams creates a new DeleteClusterClusterIDParams object -// with the default values initialized. -func NewDeleteClusterClusterIDParams() *DeleteClusterClusterIDParams { - var () - return &DeleteClusterClusterIDParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteClusterClusterIDParamsWithTimeout creates a new DeleteClusterClusterIDParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDeleteClusterClusterIDParamsWithTimeout(timeout time.Duration) *DeleteClusterClusterIDParams { - var () - return &DeleteClusterClusterIDParams{ - - timeout: timeout, - } -} - -// NewDeleteClusterClusterIDParamsWithContext creates a new DeleteClusterClusterIDParams object -// with the default values initialized, and the ability to set a context for a request -func NewDeleteClusterClusterIDParamsWithContext(ctx context.Context) *DeleteClusterClusterIDParams { - var () - return &DeleteClusterClusterIDParams{ - - Context: ctx, - } -} - -// NewDeleteClusterClusterIDParamsWithHTTPClient creates a new DeleteClusterClusterIDParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDeleteClusterClusterIDParamsWithHTTPClient(client *http.Client) *DeleteClusterClusterIDParams { - var () - return &DeleteClusterClusterIDParams{ - HTTPClient: client, - } -} - -/* -DeleteClusterClusterIDParams contains all the parameters to send to the API endpoint -for the delete cluster cluster ID operation typically these are written to a http.Request -*/ -type DeleteClusterClusterIDParams struct { - - /*ClusterID*/ - ClusterID string - /*CqlCreds*/ - CqlCreds *bool - /*SslUserCert*/ - SslUserCert *bool - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) WithTimeout(timeout time.Duration) *DeleteClusterClusterIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) WithContext(ctx context.Context) *DeleteClusterClusterIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) WithHTTPClient(client *http.Client) *DeleteClusterClusterIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) WithClusterID(clusterID string) *DeleteClusterClusterIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithCqlCreds adds the cqlCreds to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) WithCqlCreds(cqlCreds *bool) *DeleteClusterClusterIDParams { - o.SetCqlCreds(cqlCreds) - return o -} - -// SetCqlCreds adds the cqlCreds to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) SetCqlCreds(cqlCreds *bool) { - o.CqlCreds = cqlCreds -} - -// WithSslUserCert adds the sslUserCert to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) WithSslUserCert(sslUserCert *bool) *DeleteClusterClusterIDParams { - o.SetSslUserCert(sslUserCert) - return o -} - -// SetSslUserCert adds the sslUserCert to the delete cluster cluster ID params -func (o *DeleteClusterClusterIDParams) SetSslUserCert(sslUserCert *bool) { - o.SslUserCert = sslUserCert -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteClusterClusterIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if o.CqlCreds != nil { - - // query param cql_creds - var qrCqlCreds bool - if o.CqlCreds != nil { - qrCqlCreds = *o.CqlCreds - } - qCqlCreds := swag.FormatBool(qrCqlCreds) - if qCqlCreds != "" { - if err := r.SetQueryParam("cql_creds", qCqlCreds); err != nil { - return err - } - } - - } - - if o.SslUserCert != nil { - - // query param ssl_user_cert - var qrSslUserCert bool - if o.SslUserCert != nil { - qrSslUserCert = *o.SslUserCert - } - qSslUserCert := swag.FormatBool(qrSslUserCert) - if qSslUserCert != "" { - if err := r.SetQueryParam("ssl_user_cert", qSslUserCert); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_responses.go b/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_responses.go deleted file mode 100644 index 1703dbae606..00000000000 --- a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_responses.go +++ /dev/null @@ -1,108 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// DeleteClusterClusterIDReader is a Reader for the DeleteClusterClusterID structure. -type DeleteClusterClusterIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteClusterClusterIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteClusterClusterIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteClusterClusterIDDefault(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 - } -} - -// NewDeleteClusterClusterIDOK creates a DeleteClusterClusterIDOK with default headers values -func NewDeleteClusterClusterIDOK() *DeleteClusterClusterIDOK { - return &DeleteClusterClusterIDOK{} -} - -/* -DeleteClusterClusterIDOK handles this case with default header values. - -Cluster deleted -*/ -type DeleteClusterClusterIDOK struct { -} - -func (o *DeleteClusterClusterIDOK) Error() string { - return fmt.Sprintf("[DELETE /cluster/{cluster_id}][%d] deleteClusterClusterIdOK ", 200) -} - -func (o *DeleteClusterClusterIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteClusterClusterIDDefault creates a DeleteClusterClusterIDDefault with default headers values -func NewDeleteClusterClusterIDDefault(code int) *DeleteClusterClusterIDDefault { - return &DeleteClusterClusterIDDefault{ - _statusCode: code, - } -} - -/* -DeleteClusterClusterIDDefault handles this case with default header values. - -Unexpected error -*/ -type DeleteClusterClusterIDDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the delete cluster cluster ID default response -func (o *DeleteClusterClusterIDDefault) Code() int { - return o._statusCode -} - -func (o *DeleteClusterClusterIDDefault) Error() string { - return fmt.Sprintf("[DELETE /cluster/{cluster_id}][%d] DeleteClusterClusterID default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteClusterClusterIDDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *DeleteClusterClusterIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_task_task_type_task_id_parameters.go b/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_task_task_type_task_id_parameters.go deleted file mode 100644 index dc693641715..00000000000 --- a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_task_task_type_task_id_parameters.go +++ /dev/null @@ -1,170 +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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewDeleteClusterClusterIDTaskTaskTypeTaskIDParams creates a new DeleteClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized. -func NewDeleteClusterClusterIDTaskTaskTypeTaskIDParams() *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &DeleteClusterClusterIDTaskTaskTypeTaskIDParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewDeleteClusterClusterIDTaskTaskTypeTaskIDParamsWithTimeout creates a new DeleteClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewDeleteClusterClusterIDTaskTaskTypeTaskIDParamsWithTimeout(timeout time.Duration) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &DeleteClusterClusterIDTaskTaskTypeTaskIDParams{ - - timeout: timeout, - } -} - -// NewDeleteClusterClusterIDTaskTaskTypeTaskIDParamsWithContext creates a new DeleteClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a context for a request -func NewDeleteClusterClusterIDTaskTaskTypeTaskIDParamsWithContext(ctx context.Context) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &DeleteClusterClusterIDTaskTaskTypeTaskIDParams{ - - Context: ctx, - } -} - -// NewDeleteClusterClusterIDTaskTaskTypeTaskIDParamsWithHTTPClient creates a new DeleteClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewDeleteClusterClusterIDTaskTaskTypeTaskIDParamsWithHTTPClient(client *http.Client) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &DeleteClusterClusterIDTaskTaskTypeTaskIDParams{ - HTTPClient: client, - } -} - -/* -DeleteClusterClusterIDTaskTaskTypeTaskIDParams contains all the parameters to send to the API endpoint -for the delete cluster cluster ID task task type task ID operation typically these are written to a http.Request -*/ -type DeleteClusterClusterIDTaskTaskTypeTaskIDParams struct { - - /*ClusterID*/ - ClusterID string - /*TaskID*/ - TaskID string - /*TaskType*/ - TaskType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) WithTimeout(timeout time.Duration) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) WithContext(ctx context.Context) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) WithHTTPClient(client *http.Client) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) WithClusterID(clusterID string) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithTaskID adds the taskID to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) WithTaskID(taskID string) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) SetTaskID(taskID string) { - o.TaskID = taskID -} - -// WithTaskType adds the taskType to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) WithTaskType(taskType string) *DeleteClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTaskType(taskType) - return o -} - -// SetTaskType adds the taskType to the delete cluster cluster ID task task type task ID params -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) SetTaskType(taskType string) { - o.TaskType = taskType -} - -// WriteToRequest writes these params to a swagger request -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - // path param task_id - if err := r.SetPathParam("task_id", o.TaskID); err != nil { - return err - } - - // path param task_type - if err := r.SetPathParam("task_type", o.TaskType); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_task_task_type_task_id_responses.go b/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_task_task_type_task_id_responses.go deleted file mode 100644 index 669e67927f8..00000000000 --- a/pkg/mermaidclient/internal/client/operations/delete_cluster_cluster_id_task_task_type_task_id_responses.go +++ /dev/null @@ -1,108 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// DeleteClusterClusterIDTaskTaskTypeTaskIDReader is a Reader for the DeleteClusterClusterIDTaskTaskTypeTaskID structure. -type DeleteClusterClusterIDTaskTaskTypeTaskIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewDeleteClusterClusterIDTaskTaskTypeTaskIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewDeleteClusterClusterIDTaskTaskTypeTaskIDDefault(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 - } -} - -// NewDeleteClusterClusterIDTaskTaskTypeTaskIDOK creates a DeleteClusterClusterIDTaskTaskTypeTaskIDOK with default headers values -func NewDeleteClusterClusterIDTaskTaskTypeTaskIDOK() *DeleteClusterClusterIDTaskTaskTypeTaskIDOK { - return &DeleteClusterClusterIDTaskTaskTypeTaskIDOK{} -} - -/* -DeleteClusterClusterIDTaskTaskTypeTaskIDOK handles this case with default header values. - -Task deleted -*/ -type DeleteClusterClusterIDTaskTaskTypeTaskIDOK struct { -} - -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDOK) Error() string { - return fmt.Sprintf("[DELETE /cluster/{cluster_id}/task/{task_type}/{task_id}][%d] deleteClusterClusterIdTaskTaskTypeTaskIdOK ", 200) -} - -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewDeleteClusterClusterIDTaskTaskTypeTaskIDDefault creates a DeleteClusterClusterIDTaskTaskTypeTaskIDDefault with default headers values -func NewDeleteClusterClusterIDTaskTaskTypeTaskIDDefault(code int) *DeleteClusterClusterIDTaskTaskTypeTaskIDDefault { - return &DeleteClusterClusterIDTaskTaskTypeTaskIDDefault{ - _statusCode: code, - } -} - -/* -DeleteClusterClusterIDTaskTaskTypeTaskIDDefault handles this case with default header values. - -Unexpected error -*/ -type DeleteClusterClusterIDTaskTaskTypeTaskIDDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the delete cluster cluster ID task task type task ID default response -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDDefault) Code() int { - return o._statusCode -} - -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDDefault) Error() string { - return fmt.Sprintf("[DELETE /cluster/{cluster_id}/task/{task_type}/{task_id}][%d] DeleteClusterClusterIDTaskTaskTypeTaskID default %+v", o._statusCode, o.Payload) -} - -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *DeleteClusterClusterIDTaskTaskTypeTaskIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_files_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_files_parameters.go deleted file mode 100644 index 83226a2c417..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_files_parameters.go +++ /dev/null @@ -1,228 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDBackupsFilesParams creates a new GetClusterClusterIDBackupsFilesParams object -// with the default values initialized. -func NewGetClusterClusterIDBackupsFilesParams() *GetClusterClusterIDBackupsFilesParams { - var () - return &GetClusterClusterIDBackupsFilesParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDBackupsFilesParamsWithTimeout creates a new GetClusterClusterIDBackupsFilesParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDBackupsFilesParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDBackupsFilesParams { - var () - return &GetClusterClusterIDBackupsFilesParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDBackupsFilesParamsWithContext creates a new GetClusterClusterIDBackupsFilesParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDBackupsFilesParamsWithContext(ctx context.Context) *GetClusterClusterIDBackupsFilesParams { - var () - return &GetClusterClusterIDBackupsFilesParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDBackupsFilesParamsWithHTTPClient creates a new GetClusterClusterIDBackupsFilesParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDBackupsFilesParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDBackupsFilesParams { - var () - return &GetClusterClusterIDBackupsFilesParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDBackupsFilesParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID backups files operation typically these are written to a http.Request -*/ -type GetClusterClusterIDBackupsFilesParams struct { - - /*ClusterID*/ - QueryClusterID *string - /*ClusterID*/ - ClusterID string - /*Keyspace*/ - Keyspace []string - /*Locations*/ - Locations []string - /*SnapshotTag*/ - SnapshotTag string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDBackupsFilesParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) WithContext(ctx context.Context) *GetClusterClusterIDBackupsFilesParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDBackupsFilesParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithQueryClusterID adds the clusterID to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) WithQueryClusterID(clusterID *string) *GetClusterClusterIDBackupsFilesParams { - o.SetQueryClusterID(clusterID) - return o -} - -// SetQueryClusterID adds the clusterId to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) SetQueryClusterID(clusterID *string) { - o.QueryClusterID = clusterID -} - -// WithClusterID adds the clusterID to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) WithClusterID(clusterID string) *GetClusterClusterIDBackupsFilesParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithKeyspace adds the keyspace to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) WithKeyspace(keyspace []string) *GetClusterClusterIDBackupsFilesParams { - o.SetKeyspace(keyspace) - return o -} - -// SetKeyspace adds the keyspace to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) SetKeyspace(keyspace []string) { - o.Keyspace = keyspace -} - -// WithLocations adds the locations to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) WithLocations(locations []string) *GetClusterClusterIDBackupsFilesParams { - o.SetLocations(locations) - return o -} - -// SetLocations adds the locations to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) SetLocations(locations []string) { - o.Locations = locations -} - -// WithSnapshotTag adds the snapshotTag to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) WithSnapshotTag(snapshotTag string) *GetClusterClusterIDBackupsFilesParams { - o.SetSnapshotTag(snapshotTag) - return o -} - -// SetSnapshotTag adds the snapshotTag to the get cluster cluster ID backups files params -func (o *GetClusterClusterIDBackupsFilesParams) SetSnapshotTag(snapshotTag string) { - o.SnapshotTag = snapshotTag -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDBackupsFilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.QueryClusterID != nil { - - // query param cluster_id - var qrClusterID string - if o.QueryClusterID != nil { - qrClusterID = *o.QueryClusterID - } - qClusterID := qrClusterID - if qClusterID != "" { - if err := r.SetQueryParam("cluster_id", qClusterID); err != nil { - return err - } - } - - } - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - valuesKeyspace := o.Keyspace - - joinedKeyspace := swag.JoinByFormat(valuesKeyspace, "") - // query array param keyspace - if err := r.SetQueryParam("keyspace", joinedKeyspace...); err != nil { - return err - } - - valuesLocations := o.Locations - - joinedLocations := swag.JoinByFormat(valuesLocations, "") - // query array param locations - if err := r.SetQueryParam("locations", joinedLocations...); err != nil { - return err - } - - // query param snapshot_tag - qrSnapshotTag := o.SnapshotTag - qSnapshotTag := qrSnapshotTag - if qSnapshotTag != "" { - if err := r.SetQueryParam("snapshot_tag", qSnapshotTag); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_files_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_files_responses.go deleted file mode 100644 index 2f9ce9183e2..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_files_responses.go +++ /dev/null @@ -1,118 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDBackupsFilesReader is a Reader for the GetClusterClusterIDBackupsFiles structure. -type GetClusterClusterIDBackupsFilesReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDBackupsFilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDBackupsFilesOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDBackupsFilesDefault(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 - } -} - -// NewGetClusterClusterIDBackupsFilesOK creates a GetClusterClusterIDBackupsFilesOK with default headers values -func NewGetClusterClusterIDBackupsFilesOK() *GetClusterClusterIDBackupsFilesOK { - return &GetClusterClusterIDBackupsFilesOK{} -} - -/* -GetClusterClusterIDBackupsFilesOK handles this case with default header values. - -Backup list -*/ -type GetClusterClusterIDBackupsFilesOK struct { - Payload []*models.BackupFilesInfo -} - -func (o *GetClusterClusterIDBackupsFilesOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/backups/files][%d] getClusterClusterIdBackupsFilesOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDBackupsFilesOK) GetPayload() []*models.BackupFilesInfo { - return o.Payload -} - -func (o *GetClusterClusterIDBackupsFilesOK) 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 -} - -// NewGetClusterClusterIDBackupsFilesDefault creates a GetClusterClusterIDBackupsFilesDefault with default headers values -func NewGetClusterClusterIDBackupsFilesDefault(code int) *GetClusterClusterIDBackupsFilesDefault { - return &GetClusterClusterIDBackupsFilesDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDBackupsFilesDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDBackupsFilesDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID backups files default response -func (o *GetClusterClusterIDBackupsFilesDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDBackupsFilesDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/backups/files][%d] GetClusterClusterIDBackupsFiles default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDBackupsFilesDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDBackupsFilesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_parameters.go deleted file mode 100644 index 4811d39c92e..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_parameters.go +++ /dev/null @@ -1,264 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDBackupsParams creates a new GetClusterClusterIDBackupsParams object -// with the default values initialized. -func NewGetClusterClusterIDBackupsParams() *GetClusterClusterIDBackupsParams { - var () - return &GetClusterClusterIDBackupsParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDBackupsParamsWithTimeout creates a new GetClusterClusterIDBackupsParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDBackupsParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDBackupsParams { - var () - return &GetClusterClusterIDBackupsParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDBackupsParamsWithContext creates a new GetClusterClusterIDBackupsParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDBackupsParamsWithContext(ctx context.Context) *GetClusterClusterIDBackupsParams { - var () - return &GetClusterClusterIDBackupsParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDBackupsParamsWithHTTPClient creates a new GetClusterClusterIDBackupsParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDBackupsParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDBackupsParams { - var () - return &GetClusterClusterIDBackupsParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDBackupsParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID backups operation typically these are written to a http.Request -*/ -type GetClusterClusterIDBackupsParams struct { - - /*ClusterID*/ - QueryClusterID *string - /*ClusterID*/ - ClusterID string - /*Keyspace*/ - Keyspace []string - /*Locations*/ - Locations []string - /*MaxDate*/ - MaxDate *strfmt.DateTime - /*MinDate*/ - MinDate *strfmt.DateTime - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDBackupsParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithContext(ctx context.Context) *GetClusterClusterIDBackupsParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDBackupsParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithQueryClusterID adds the clusterID to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithQueryClusterID(clusterID *string) *GetClusterClusterIDBackupsParams { - o.SetQueryClusterID(clusterID) - return o -} - -// SetQueryClusterID adds the clusterId to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetQueryClusterID(clusterID *string) { - o.QueryClusterID = clusterID -} - -// WithClusterID adds the clusterID to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithClusterID(clusterID string) *GetClusterClusterIDBackupsParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithKeyspace adds the keyspace to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithKeyspace(keyspace []string) *GetClusterClusterIDBackupsParams { - o.SetKeyspace(keyspace) - return o -} - -// SetKeyspace adds the keyspace to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetKeyspace(keyspace []string) { - o.Keyspace = keyspace -} - -// WithLocations adds the locations to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithLocations(locations []string) *GetClusterClusterIDBackupsParams { - o.SetLocations(locations) - return o -} - -// SetLocations adds the locations to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetLocations(locations []string) { - o.Locations = locations -} - -// WithMaxDate adds the maxDate to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithMaxDate(maxDate *strfmt.DateTime) *GetClusterClusterIDBackupsParams { - o.SetMaxDate(maxDate) - return o -} - -// SetMaxDate adds the maxDate to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetMaxDate(maxDate *strfmt.DateTime) { - o.MaxDate = maxDate -} - -// WithMinDate adds the minDate to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) WithMinDate(minDate *strfmt.DateTime) *GetClusterClusterIDBackupsParams { - o.SetMinDate(minDate) - return o -} - -// SetMinDate adds the minDate to the get cluster cluster ID backups params -func (o *GetClusterClusterIDBackupsParams) SetMinDate(minDate *strfmt.DateTime) { - o.MinDate = minDate -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDBackupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.QueryClusterID != nil { - - // query param cluster_id - var qrClusterID string - if o.QueryClusterID != nil { - qrClusterID = *o.QueryClusterID - } - qClusterID := qrClusterID - if qClusterID != "" { - if err := r.SetQueryParam("cluster_id", qClusterID); err != nil { - return err - } - } - - } - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - valuesKeyspace := o.Keyspace - - joinedKeyspace := swag.JoinByFormat(valuesKeyspace, "") - // query array param keyspace - if err := r.SetQueryParam("keyspace", joinedKeyspace...); err != nil { - return err - } - - valuesLocations := o.Locations - - joinedLocations := swag.JoinByFormat(valuesLocations, "") - // query array param locations - if err := r.SetQueryParam("locations", joinedLocations...); err != nil { - return err - } - - if o.MaxDate != nil { - - // query param max_date - var qrMaxDate strfmt.DateTime - if o.MaxDate != nil { - qrMaxDate = *o.MaxDate - } - qMaxDate := qrMaxDate.String() - if qMaxDate != "" { - if err := r.SetQueryParam("max_date", qMaxDate); err != nil { - return err - } - } - - } - - if o.MinDate != nil { - - // query param min_date - var qrMinDate strfmt.DateTime - if o.MinDate != nil { - qrMinDate = *o.MinDate - } - qMinDate := qrMinDate.String() - if qMinDate != "" { - if err := r.SetQueryParam("min_date", qMinDate); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_responses.go deleted file mode 100644 index 4d96eeb8f77..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_backups_responses.go +++ /dev/null @@ -1,118 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDBackupsReader is a Reader for the GetClusterClusterIDBackups structure. -type GetClusterClusterIDBackupsReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDBackupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDBackupsOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDBackupsDefault(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 - } -} - -// NewGetClusterClusterIDBackupsOK creates a GetClusterClusterIDBackupsOK with default headers values -func NewGetClusterClusterIDBackupsOK() *GetClusterClusterIDBackupsOK { - return &GetClusterClusterIDBackupsOK{} -} - -/* -GetClusterClusterIDBackupsOK handles this case with default header values. - -Backup list -*/ -type GetClusterClusterIDBackupsOK struct { - Payload []*models.BackupListItem -} - -func (o *GetClusterClusterIDBackupsOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/backups][%d] getClusterClusterIdBackupsOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDBackupsOK) GetPayload() []*models.BackupListItem { - return o.Payload -} - -func (o *GetClusterClusterIDBackupsOK) 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 -} - -// NewGetClusterClusterIDBackupsDefault creates a GetClusterClusterIDBackupsDefault with default headers values -func NewGetClusterClusterIDBackupsDefault(code int) *GetClusterClusterIDBackupsDefault { - return &GetClusterClusterIDBackupsDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDBackupsDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDBackupsDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID backups default response -func (o *GetClusterClusterIDBackupsDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDBackupsDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/backups][%d] GetClusterClusterIDBackups default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDBackupsDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDBackupsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_parameters.go deleted file mode 100644 index 385afcf4d58..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_parameters.go +++ /dev/null @@ -1,134 +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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDParams creates a new GetClusterClusterIDParams object -// with the default values initialized. -func NewGetClusterClusterIDParams() *GetClusterClusterIDParams { - var () - return &GetClusterClusterIDParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDParamsWithTimeout creates a new GetClusterClusterIDParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDParams { - var () - return &GetClusterClusterIDParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDParamsWithContext creates a new GetClusterClusterIDParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDParamsWithContext(ctx context.Context) *GetClusterClusterIDParams { - var () - return &GetClusterClusterIDParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDParamsWithHTTPClient creates a new GetClusterClusterIDParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDParams { - var () - return &GetClusterClusterIDParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID operation typically these are written to a http.Request -*/ -type GetClusterClusterIDParams struct { - - /*ClusterID*/ - ClusterID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID params -func (o *GetClusterClusterIDParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID params -func (o *GetClusterClusterIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID params -func (o *GetClusterClusterIDParams) WithContext(ctx context.Context) *GetClusterClusterIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID params -func (o *GetClusterClusterIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID params -func (o *GetClusterClusterIDParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID params -func (o *GetClusterClusterIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get cluster cluster ID params -func (o *GetClusterClusterIDParams) WithClusterID(clusterID string) *GetClusterClusterIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID params -func (o *GetClusterClusterIDParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_responses.go deleted file mode 100644 index 0c54f3e65a2..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDReader is a Reader for the GetClusterClusterID structure. -type GetClusterClusterIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDDefault(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 - } -} - -// NewGetClusterClusterIDOK creates a GetClusterClusterIDOK with default headers values -func NewGetClusterClusterIDOK() *GetClusterClusterIDOK { - return &GetClusterClusterIDOK{} -} - -/* -GetClusterClusterIDOK handles this case with default header values. - -Cluster info -*/ -type GetClusterClusterIDOK struct { - Payload *models.Cluster -} - -func (o *GetClusterClusterIDOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}][%d] getClusterClusterIdOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDOK) GetPayload() *models.Cluster { - return o.Payload -} - -func (o *GetClusterClusterIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Cluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterClusterIDDefault creates a GetClusterClusterIDDefault with default headers values -func NewGetClusterClusterIDDefault(code int) *GetClusterClusterIDDefault { - return &GetClusterClusterIDDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID default response -func (o *GetClusterClusterIDDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}][%d] GetClusterClusterID default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_status_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_status_parameters.go deleted file mode 100644 index 1ce16185959..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_status_parameters.go +++ /dev/null @@ -1,134 +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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDStatusParams creates a new GetClusterClusterIDStatusParams object -// with the default values initialized. -func NewGetClusterClusterIDStatusParams() *GetClusterClusterIDStatusParams { - var () - return &GetClusterClusterIDStatusParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDStatusParamsWithTimeout creates a new GetClusterClusterIDStatusParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDStatusParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDStatusParams { - var () - return &GetClusterClusterIDStatusParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDStatusParamsWithContext creates a new GetClusterClusterIDStatusParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDStatusParamsWithContext(ctx context.Context) *GetClusterClusterIDStatusParams { - var () - return &GetClusterClusterIDStatusParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDStatusParamsWithHTTPClient creates a new GetClusterClusterIDStatusParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDStatusParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDStatusParams { - var () - return &GetClusterClusterIDStatusParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDStatusParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID status operation typically these are written to a http.Request -*/ -type GetClusterClusterIDStatusParams struct { - - /*ClusterID*/ - ClusterID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID status params -func (o *GetClusterClusterIDStatusParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDStatusParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID status params -func (o *GetClusterClusterIDStatusParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID status params -func (o *GetClusterClusterIDStatusParams) WithContext(ctx context.Context) *GetClusterClusterIDStatusParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID status params -func (o *GetClusterClusterIDStatusParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID status params -func (o *GetClusterClusterIDStatusParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDStatusParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID status params -func (o *GetClusterClusterIDStatusParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get cluster cluster ID status params -func (o *GetClusterClusterIDStatusParams) WithClusterID(clusterID string) *GetClusterClusterIDStatusParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID status params -func (o *GetClusterClusterIDStatusParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_status_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_status_responses.go deleted file mode 100644 index 821cfc71700..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_status_responses.go +++ /dev/null @@ -1,118 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDStatusReader is a Reader for the GetClusterClusterIDStatus structure. -type GetClusterClusterIDStatusReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDStatusOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDStatusDefault(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 - } -} - -// NewGetClusterClusterIDStatusOK creates a GetClusterClusterIDStatusOK with default headers values -func NewGetClusterClusterIDStatusOK() *GetClusterClusterIDStatusOK { - return &GetClusterClusterIDStatusOK{} -} - -/* -GetClusterClusterIDStatusOK handles this case with default header values. - -Cluster hosts and their statuses -*/ -type GetClusterClusterIDStatusOK struct { - Payload models.ClusterStatus -} - -func (o *GetClusterClusterIDStatusOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/status][%d] getClusterClusterIdStatusOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDStatusOK) GetPayload() models.ClusterStatus { - return o.Payload -} - -func (o *GetClusterClusterIDStatusOK) 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 -} - -// NewGetClusterClusterIDStatusDefault creates a GetClusterClusterIDStatusDefault with default headers values -func NewGetClusterClusterIDStatusDefault(code int) *GetClusterClusterIDStatusDefault { - return &GetClusterClusterIDStatusDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDStatusDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDStatusDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID status default response -func (o *GetClusterClusterIDStatusDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDStatusDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/status][%d] GetClusterClusterIDStatus default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDStatusDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDStatusDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_backup_task_id_run_id_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_backup_task_id_run_id_parameters.go deleted file mode 100644 index d53ea7ec0b5..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_backup_task_id_run_id_parameters.go +++ /dev/null @@ -1,170 +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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDTaskBackupTaskIDRunIDParams creates a new GetClusterClusterIDTaskBackupTaskIDRunIDParams object -// with the default values initialized. -func NewGetClusterClusterIDTaskBackupTaskIDRunIDParams() *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - var () - return &GetClusterClusterIDTaskBackupTaskIDRunIDParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDTaskBackupTaskIDRunIDParamsWithTimeout creates a new GetClusterClusterIDTaskBackupTaskIDRunIDParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDTaskBackupTaskIDRunIDParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - var () - return &GetClusterClusterIDTaskBackupTaskIDRunIDParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDTaskBackupTaskIDRunIDParamsWithContext creates a new GetClusterClusterIDTaskBackupTaskIDRunIDParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDTaskBackupTaskIDRunIDParamsWithContext(ctx context.Context) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - var () - return &GetClusterClusterIDTaskBackupTaskIDRunIDParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDTaskBackupTaskIDRunIDParamsWithHTTPClient creates a new GetClusterClusterIDTaskBackupTaskIDRunIDParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDTaskBackupTaskIDRunIDParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - var () - return &GetClusterClusterIDTaskBackupTaskIDRunIDParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDTaskBackupTaskIDRunIDParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID task backup task ID run ID operation typically these are written to a http.Request -*/ -type GetClusterClusterIDTaskBackupTaskIDRunIDParams struct { - - /*ClusterID*/ - ClusterID string - /*RunID*/ - RunID string - /*TaskID*/ - TaskID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) WithContext(ctx context.Context) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) WithClusterID(clusterID string) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithRunID adds the runID to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) WithRunID(runID string) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) SetRunID(runID string) { - o.RunID = runID -} - -// WithTaskID adds the taskID to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) WithTaskID(taskID string) *GetClusterClusterIDTaskBackupTaskIDRunIDParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the get cluster cluster ID task backup task ID run ID params -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) SetTaskID(taskID string) { - o.TaskID = taskID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - // path param run_id - if err := r.SetPathParam("run_id", o.RunID); err != nil { - return err - } - - // path param task_id - if err := r.SetPathParam("task_id", o.TaskID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_backup_task_id_run_id_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_backup_task_id_run_id_responses.go deleted file mode 100644 index bcaf8778428..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_backup_task_id_run_id_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDTaskBackupTaskIDRunIDReader is a Reader for the GetClusterClusterIDTaskBackupTaskIDRunID structure. -type GetClusterClusterIDTaskBackupTaskIDRunIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDTaskBackupTaskIDRunIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDTaskBackupTaskIDRunIDDefault(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 - } -} - -// NewGetClusterClusterIDTaskBackupTaskIDRunIDOK creates a GetClusterClusterIDTaskBackupTaskIDRunIDOK with default headers values -func NewGetClusterClusterIDTaskBackupTaskIDRunIDOK() *GetClusterClusterIDTaskBackupTaskIDRunIDOK { - return &GetClusterClusterIDTaskBackupTaskIDRunIDOK{} -} - -/* -GetClusterClusterIDTaskBackupTaskIDRunIDOK handles this case with default header values. - -Backup progress -*/ -type GetClusterClusterIDTaskBackupTaskIDRunIDOK struct { - Payload *models.TaskRunBackupProgress -} - -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/task/backup/{task_id}/{run_id}][%d] getClusterClusterIdTaskBackupTaskIdRunIdOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDOK) GetPayload() *models.TaskRunBackupProgress { - return o.Payload -} - -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TaskRunBackupProgress) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterClusterIDTaskBackupTaskIDRunIDDefault creates a GetClusterClusterIDTaskBackupTaskIDRunIDDefault with default headers values -func NewGetClusterClusterIDTaskBackupTaskIDRunIDDefault(code int) *GetClusterClusterIDTaskBackupTaskIDRunIDDefault { - return &GetClusterClusterIDTaskBackupTaskIDRunIDDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDTaskBackupTaskIDRunIDDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDTaskBackupTaskIDRunIDDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID task backup task ID run ID default response -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/task/backup/{task_id}/{run_id}][%d] GetClusterClusterIDTaskBackupTaskIDRunID default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDTaskBackupTaskIDRunIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_repair_task_id_run_id_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_repair_task_id_run_id_parameters.go deleted file mode 100644 index 238afea9ceb..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_repair_task_id_run_id_parameters.go +++ /dev/null @@ -1,170 +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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDTaskRepairTaskIDRunIDParams creates a new GetClusterClusterIDTaskRepairTaskIDRunIDParams object -// with the default values initialized. -func NewGetClusterClusterIDTaskRepairTaskIDRunIDParams() *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - var () - return &GetClusterClusterIDTaskRepairTaskIDRunIDParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDTaskRepairTaskIDRunIDParamsWithTimeout creates a new GetClusterClusterIDTaskRepairTaskIDRunIDParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDTaskRepairTaskIDRunIDParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - var () - return &GetClusterClusterIDTaskRepairTaskIDRunIDParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDTaskRepairTaskIDRunIDParamsWithContext creates a new GetClusterClusterIDTaskRepairTaskIDRunIDParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDTaskRepairTaskIDRunIDParamsWithContext(ctx context.Context) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - var () - return &GetClusterClusterIDTaskRepairTaskIDRunIDParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDTaskRepairTaskIDRunIDParamsWithHTTPClient creates a new GetClusterClusterIDTaskRepairTaskIDRunIDParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDTaskRepairTaskIDRunIDParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - var () - return &GetClusterClusterIDTaskRepairTaskIDRunIDParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDTaskRepairTaskIDRunIDParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID task repair task ID run ID operation typically these are written to a http.Request -*/ -type GetClusterClusterIDTaskRepairTaskIDRunIDParams struct { - - /*ClusterID*/ - ClusterID string - /*RunID*/ - RunID string - /*TaskID*/ - TaskID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) WithContext(ctx context.Context) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) WithClusterID(clusterID string) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithRunID adds the runID to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) WithRunID(runID string) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - o.SetRunID(runID) - return o -} - -// SetRunID adds the runId to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) SetRunID(runID string) { - o.RunID = runID -} - -// WithTaskID adds the taskID to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) WithTaskID(taskID string) *GetClusterClusterIDTaskRepairTaskIDRunIDParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the get cluster cluster ID task repair task ID run ID params -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) SetTaskID(taskID string) { - o.TaskID = taskID -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - // path param run_id - if err := r.SetPathParam("run_id", o.RunID); err != nil { - return err - } - - // path param task_id - if err := r.SetPathParam("task_id", o.TaskID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_repair_task_id_run_id_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_repair_task_id_run_id_responses.go deleted file mode 100644 index d1effedf27d..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_repair_task_id_run_id_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDTaskRepairTaskIDRunIDReader is a Reader for the GetClusterClusterIDTaskRepairTaskIDRunID structure. -type GetClusterClusterIDTaskRepairTaskIDRunIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDTaskRepairTaskIDRunIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDTaskRepairTaskIDRunIDDefault(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 - } -} - -// NewGetClusterClusterIDTaskRepairTaskIDRunIDOK creates a GetClusterClusterIDTaskRepairTaskIDRunIDOK with default headers values -func NewGetClusterClusterIDTaskRepairTaskIDRunIDOK() *GetClusterClusterIDTaskRepairTaskIDRunIDOK { - return &GetClusterClusterIDTaskRepairTaskIDRunIDOK{} -} - -/* -GetClusterClusterIDTaskRepairTaskIDRunIDOK handles this case with default header values. - -Repair progress -*/ -type GetClusterClusterIDTaskRepairTaskIDRunIDOK struct { - Payload *models.TaskRunRepairProgress -} - -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/task/repair/{task_id}/{run_id}][%d] getClusterClusterIdTaskRepairTaskIdRunIdOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDOK) GetPayload() *models.TaskRunRepairProgress { - return o.Payload -} - -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.TaskRunRepairProgress) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterClusterIDTaskRepairTaskIDRunIDDefault creates a GetClusterClusterIDTaskRepairTaskIDRunIDDefault with default headers values -func NewGetClusterClusterIDTaskRepairTaskIDRunIDDefault(code int) *GetClusterClusterIDTaskRepairTaskIDRunIDDefault { - return &GetClusterClusterIDTaskRepairTaskIDRunIDDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDTaskRepairTaskIDRunIDDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDTaskRepairTaskIDRunIDDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID task repair task ID run ID default response -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/task/repair/{task_id}/{run_id}][%d] GetClusterClusterIDTaskRepairTaskIDRunID default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDTaskRepairTaskIDRunIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_history_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_history_parameters.go deleted file mode 100644 index 4042ebc0328..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_history_parameters.go +++ /dev/null @@ -1,200 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParams creates a new GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams object -// with the default values initialized. -func NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParams() *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - var () - return &GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParamsWithTimeout creates a new GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - var () - return &GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParamsWithContext creates a new GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParamsWithContext(ctx context.Context) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - var () - return &GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParamsWithHTTPClient creates a new GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - var () - return &GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID task task type task ID history operation typically these are written to a http.Request -*/ -type GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams struct { - - /*ClusterID*/ - ClusterID string - /*Limit*/ - Limit *int64 - /*TaskID*/ - TaskID string - /*TaskType*/ - TaskType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) WithContext(ctx context.Context) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) WithClusterID(clusterID string) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithLimit adds the limit to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) WithLimit(limit *int64) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - o.SetLimit(limit) - return o -} - -// SetLimit adds the limit to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) SetLimit(limit *int64) { - o.Limit = limit -} - -// WithTaskID adds the taskID to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) WithTaskID(taskID string) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) SetTaskID(taskID string) { - o.TaskID = taskID -} - -// WithTaskType adds the taskType to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) WithTaskType(taskType string) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams { - o.SetTaskType(taskType) - return o -} - -// SetTaskType adds the taskType to the get cluster cluster ID task task type task ID history params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) SetTaskType(taskType string) { - o.TaskType = taskType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if o.Limit != nil { - - // query param limit - var qrLimit int64 - if o.Limit != nil { - qrLimit = *o.Limit - } - qLimit := swag.FormatInt64(qrLimit) - if qLimit != "" { - if err := r.SetQueryParam("limit", qLimit); err != nil { - return err - } - } - - } - - // path param task_id - if err := r.SetPathParam("task_id", o.TaskID); err != nil { - return err - } - - // path param task_type - if err := r.SetPathParam("task_type", o.TaskType); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_history_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_history_responses.go deleted file mode 100644 index d9054024d43..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_history_responses.go +++ /dev/null @@ -1,118 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDTaskTaskTypeTaskIDHistoryReader is a Reader for the GetClusterClusterIDTaskTaskTypeTaskIDHistory structure. -type GetClusterClusterIDTaskTaskTypeTaskIDHistoryReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault(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 - } -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryOK creates a GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK with default headers values -func NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryOK() *GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK { - return &GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK{} -} - -/* -GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK handles this case with default header values. - -List of task runs -*/ -type GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK struct { - Payload []*models.TaskRun -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/task/{task_type}/{task_id}/history][%d] getClusterClusterIdTaskTaskTypeTaskIdHistoryOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK) GetPayload() []*models.TaskRun { - return o.Payload -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK) 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 -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault creates a GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault with default headers values -func NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault(code int) *GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault { - return &GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID task task type task ID history default response -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/task/{task_type}/{task_id}/history][%d] GetClusterClusterIDTaskTaskTypeTaskIDHistory default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_parameters.go deleted file mode 100644 index 9a469f374ec..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_parameters.go +++ /dev/null @@ -1,170 +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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDTaskTaskTypeTaskIDParams creates a new GetClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized. -func NewGetClusterClusterIDTaskTaskTypeTaskIDParams() *GetClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &GetClusterClusterIDTaskTaskTypeTaskIDParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDParamsWithTimeout creates a new GetClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDTaskTaskTypeTaskIDParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &GetClusterClusterIDTaskTaskTypeTaskIDParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDParamsWithContext creates a new GetClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDTaskTaskTypeTaskIDParamsWithContext(ctx context.Context) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &GetClusterClusterIDTaskTaskTypeTaskIDParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDParamsWithHTTPClient creates a new GetClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDTaskTaskTypeTaskIDParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &GetClusterClusterIDTaskTaskTypeTaskIDParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDTaskTaskTypeTaskIDParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID task task type task ID operation typically these are written to a http.Request -*/ -type GetClusterClusterIDTaskTaskTypeTaskIDParams struct { - - /*ClusterID*/ - ClusterID string - /*TaskID*/ - TaskID string - /*TaskType*/ - TaskType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) WithContext(ctx context.Context) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) WithClusterID(clusterID string) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithTaskID adds the taskID to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) WithTaskID(taskID string) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) SetTaskID(taskID string) { - o.TaskID = taskID -} - -// WithTaskType adds the taskType to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) WithTaskType(taskType string) *GetClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTaskType(taskType) - return o -} - -// SetTaskType adds the taskType to the get cluster cluster ID task task type task ID params -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) SetTaskType(taskType string) { - o.TaskType = taskType -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDTaskTaskTypeTaskIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - // path param task_id - if err := r.SetPathParam("task_id", o.TaskID); err != nil { - return err - } - - // path param task_type - if err := r.SetPathParam("task_type", o.TaskType); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_responses.go deleted file mode 100644 index f37db16585a..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_task_task_type_task_id_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDTaskTaskTypeTaskIDReader is a Reader for the GetClusterClusterIDTaskTaskTypeTaskID structure. -type GetClusterClusterIDTaskTaskTypeTaskIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDTaskTaskTypeTaskIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDTaskTaskTypeTaskIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDTaskTaskTypeTaskIDDefault(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 - } -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDOK creates a GetClusterClusterIDTaskTaskTypeTaskIDOK with default headers values -func NewGetClusterClusterIDTaskTaskTypeTaskIDOK() *GetClusterClusterIDTaskTaskTypeTaskIDOK { - return &GetClusterClusterIDTaskTaskTypeTaskIDOK{} -} - -/* -GetClusterClusterIDTaskTaskTypeTaskIDOK handles this case with default header values. - -Task info -*/ -type GetClusterClusterIDTaskTaskTypeTaskIDOK struct { - Payload *models.Task -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/task/{task_type}/{task_id}][%d] getClusterClusterIdTaskTaskTypeTaskIdOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDOK) GetPayload() *models.Task { - return o.Payload -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Task) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterClusterIDTaskTaskTypeTaskIDDefault creates a GetClusterClusterIDTaskTaskTypeTaskIDDefault with default headers values -func NewGetClusterClusterIDTaskTaskTypeTaskIDDefault(code int) *GetClusterClusterIDTaskTaskTypeTaskIDDefault { - return &GetClusterClusterIDTaskTaskTypeTaskIDDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDTaskTaskTypeTaskIDDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDTaskTaskTypeTaskIDDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID task task type task ID default response -func (o *GetClusterClusterIDTaskTaskTypeTaskIDDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/task/{task_type}/{task_id}][%d] GetClusterClusterIDTaskTaskTypeTaskID default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDTaskTaskTypeTaskIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_backup_target_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_backup_target_parameters.go deleted file mode 100644 index e590dd01004..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_backup_target_parameters.go +++ /dev/null @@ -1,155 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// NewGetClusterClusterIDTasksBackupTargetParams creates a new GetClusterClusterIDTasksBackupTargetParams object -// with the default values initialized. -func NewGetClusterClusterIDTasksBackupTargetParams() *GetClusterClusterIDTasksBackupTargetParams { - var () - return &GetClusterClusterIDTasksBackupTargetParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDTasksBackupTargetParamsWithTimeout creates a new GetClusterClusterIDTasksBackupTargetParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDTasksBackupTargetParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDTasksBackupTargetParams { - var () - return &GetClusterClusterIDTasksBackupTargetParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDTasksBackupTargetParamsWithContext creates a new GetClusterClusterIDTasksBackupTargetParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDTasksBackupTargetParamsWithContext(ctx context.Context) *GetClusterClusterIDTasksBackupTargetParams { - var () - return &GetClusterClusterIDTasksBackupTargetParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDTasksBackupTargetParamsWithHTTPClient creates a new GetClusterClusterIDTasksBackupTargetParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDTasksBackupTargetParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDTasksBackupTargetParams { - var () - return &GetClusterClusterIDTasksBackupTargetParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDTasksBackupTargetParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID tasks backup target operation typically these are written to a http.Request -*/ -type GetClusterClusterIDTasksBackupTargetParams struct { - - /*ClusterID*/ - ClusterID string - /*TaskFields*/ - TaskFields *models.TaskUpdate - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDTasksBackupTargetParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) WithContext(ctx context.Context) *GetClusterClusterIDTasksBackupTargetParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDTasksBackupTargetParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) WithClusterID(clusterID string) *GetClusterClusterIDTasksBackupTargetParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithTaskFields adds the taskFields to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) WithTaskFields(taskFields *models.TaskUpdate) *GetClusterClusterIDTasksBackupTargetParams { - o.SetTaskFields(taskFields) - return o -} - -// SetTaskFields adds the taskFields to the get cluster cluster ID tasks backup target params -func (o *GetClusterClusterIDTasksBackupTargetParams) SetTaskFields(taskFields *models.TaskUpdate) { - o.TaskFields = taskFields -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDTasksBackupTargetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if o.TaskFields != nil { - if err := r.SetBodyParam(o.TaskFields); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_backup_target_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_backup_target_responses.go deleted file mode 100644 index a1bf92e038c..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_backup_target_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDTasksBackupTargetReader is a Reader for the GetClusterClusterIDTasksBackupTarget structure. -type GetClusterClusterIDTasksBackupTargetReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDTasksBackupTargetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDTasksBackupTargetOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDTasksBackupTargetDefault(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 - } -} - -// NewGetClusterClusterIDTasksBackupTargetOK creates a GetClusterClusterIDTasksBackupTargetOK with default headers values -func NewGetClusterClusterIDTasksBackupTargetOK() *GetClusterClusterIDTasksBackupTargetOK { - return &GetClusterClusterIDTasksBackupTargetOK{} -} - -/* -GetClusterClusterIDTasksBackupTargetOK handles this case with default header values. - -Backup target -*/ -type GetClusterClusterIDTasksBackupTargetOK struct { - Payload *models.BackupTarget -} - -func (o *GetClusterClusterIDTasksBackupTargetOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/tasks/backup/target][%d] getClusterClusterIdTasksBackupTargetOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDTasksBackupTargetOK) GetPayload() *models.BackupTarget { - return o.Payload -} - -func (o *GetClusterClusterIDTasksBackupTargetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.BackupTarget) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterClusterIDTasksBackupTargetDefault creates a GetClusterClusterIDTasksBackupTargetDefault with default headers values -func NewGetClusterClusterIDTasksBackupTargetDefault(code int) *GetClusterClusterIDTasksBackupTargetDefault { - return &GetClusterClusterIDTasksBackupTargetDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDTasksBackupTargetDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDTasksBackupTargetDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID tasks backup target default response -func (o *GetClusterClusterIDTasksBackupTargetDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDTasksBackupTargetDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/tasks/backup/target][%d] GetClusterClusterIDTasksBackupTarget default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDTasksBackupTargetDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDTasksBackupTargetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_parameters.go deleted file mode 100644 index 44a3e0d8545..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_parameters.go +++ /dev/null @@ -1,222 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClusterClusterIDTasksParams creates a new GetClusterClusterIDTasksParams object -// with the default values initialized. -func NewGetClusterClusterIDTasksParams() *GetClusterClusterIDTasksParams { - var () - return &GetClusterClusterIDTasksParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDTasksParamsWithTimeout creates a new GetClusterClusterIDTasksParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDTasksParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDTasksParams { - var () - return &GetClusterClusterIDTasksParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDTasksParamsWithContext creates a new GetClusterClusterIDTasksParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDTasksParamsWithContext(ctx context.Context) *GetClusterClusterIDTasksParams { - var () - return &GetClusterClusterIDTasksParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDTasksParamsWithHTTPClient creates a new GetClusterClusterIDTasksParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDTasksParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDTasksParams { - var () - return &GetClusterClusterIDTasksParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDTasksParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID tasks operation typically these are written to a http.Request -*/ -type GetClusterClusterIDTasksParams struct { - - /*All*/ - All *bool - /*ClusterID*/ - ClusterID string - /*Status*/ - Status *string - /*Type*/ - Type *string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDTasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) WithContext(ctx context.Context) *GetClusterClusterIDTasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDTasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithAll adds the all to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) WithAll(all *bool) *GetClusterClusterIDTasksParams { - o.SetAll(all) - return o -} - -// SetAll adds the all to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) SetAll(all *bool) { - o.All = all -} - -// WithClusterID adds the clusterID to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) WithClusterID(clusterID string) *GetClusterClusterIDTasksParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithStatus adds the status to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) WithStatus(status *string) *GetClusterClusterIDTasksParams { - o.SetStatus(status) - return o -} - -// SetStatus adds the status to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) SetStatus(status *string) { - o.Status = status -} - -// WithType adds the typeVar to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) WithType(typeVar *string) *GetClusterClusterIDTasksParams { - o.SetType(typeVar) - return o -} - -// SetType adds the type to the get cluster cluster ID tasks params -func (o *GetClusterClusterIDTasksParams) SetType(typeVar *string) { - o.Type = typeVar -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.All != nil { - - // query param all - var qrAll bool - if o.All != nil { - qrAll = *o.All - } - qAll := swag.FormatBool(qrAll) - if qAll != "" { - if err := r.SetQueryParam("all", qAll); err != nil { - return err - } - } - - } - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if o.Status != nil { - - // query param status - var qrStatus string - if o.Status != nil { - qrStatus = *o.Status - } - qStatus := qrStatus - if qStatus != "" { - if err := r.SetQueryParam("status", qStatus); err != nil { - return err - } - } - - } - - if o.Type != nil { - - // query param type - var qrType string - if o.Type != nil { - qrType = *o.Type - } - qType := qrType - if qType != "" { - if err := r.SetQueryParam("type", qType); err != nil { - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_repair_target_parameters.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_repair_target_parameters.go deleted file mode 100644 index 7efe6d6abdd..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_repair_target_parameters.go +++ /dev/null @@ -1,155 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// NewGetClusterClusterIDTasksRepairTargetParams creates a new GetClusterClusterIDTasksRepairTargetParams object -// with the default values initialized. -func NewGetClusterClusterIDTasksRepairTargetParams() *GetClusterClusterIDTasksRepairTargetParams { - var () - return &GetClusterClusterIDTasksRepairTargetParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClusterClusterIDTasksRepairTargetParamsWithTimeout creates a new GetClusterClusterIDTasksRepairTargetParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClusterClusterIDTasksRepairTargetParamsWithTimeout(timeout time.Duration) *GetClusterClusterIDTasksRepairTargetParams { - var () - return &GetClusterClusterIDTasksRepairTargetParams{ - - timeout: timeout, - } -} - -// NewGetClusterClusterIDTasksRepairTargetParamsWithContext creates a new GetClusterClusterIDTasksRepairTargetParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClusterClusterIDTasksRepairTargetParamsWithContext(ctx context.Context) *GetClusterClusterIDTasksRepairTargetParams { - var () - return &GetClusterClusterIDTasksRepairTargetParams{ - - Context: ctx, - } -} - -// NewGetClusterClusterIDTasksRepairTargetParamsWithHTTPClient creates a new GetClusterClusterIDTasksRepairTargetParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClusterClusterIDTasksRepairTargetParamsWithHTTPClient(client *http.Client) *GetClusterClusterIDTasksRepairTargetParams { - var () - return &GetClusterClusterIDTasksRepairTargetParams{ - HTTPClient: client, - } -} - -/* -GetClusterClusterIDTasksRepairTargetParams contains all the parameters to send to the API endpoint -for the get cluster cluster ID tasks repair target operation typically these are written to a http.Request -*/ -type GetClusterClusterIDTasksRepairTargetParams struct { - - /*ClusterID*/ - ClusterID string - /*TaskFields*/ - TaskFields *models.TaskUpdate - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) WithTimeout(timeout time.Duration) *GetClusterClusterIDTasksRepairTargetParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) WithContext(ctx context.Context) *GetClusterClusterIDTasksRepairTargetParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) WithHTTPClient(client *http.Client) *GetClusterClusterIDTasksRepairTargetParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) WithClusterID(clusterID string) *GetClusterClusterIDTasksRepairTargetParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithTaskFields adds the taskFields to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) WithTaskFields(taskFields *models.TaskUpdate) *GetClusterClusterIDTasksRepairTargetParams { - o.SetTaskFields(taskFields) - return o -} - -// SetTaskFields adds the taskFields to the get cluster cluster ID tasks repair target params -func (o *GetClusterClusterIDTasksRepairTargetParams) SetTaskFields(taskFields *models.TaskUpdate) { - o.TaskFields = taskFields -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClusterClusterIDTasksRepairTargetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if o.TaskFields != nil { - if err := r.SetBodyParam(o.TaskFields); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_repair_target_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_repair_target_responses.go deleted file mode 100644 index 5408357fb5f..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_repair_target_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDTasksRepairTargetReader is a Reader for the GetClusterClusterIDTasksRepairTarget structure. -type GetClusterClusterIDTasksRepairTargetReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDTasksRepairTargetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDTasksRepairTargetOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDTasksRepairTargetDefault(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 - } -} - -// NewGetClusterClusterIDTasksRepairTargetOK creates a GetClusterClusterIDTasksRepairTargetOK with default headers values -func NewGetClusterClusterIDTasksRepairTargetOK() *GetClusterClusterIDTasksRepairTargetOK { - return &GetClusterClusterIDTasksRepairTargetOK{} -} - -/* -GetClusterClusterIDTasksRepairTargetOK handles this case with default header values. - -Repair target -*/ -type GetClusterClusterIDTasksRepairTargetOK struct { - Payload *models.RepairTarget -} - -func (o *GetClusterClusterIDTasksRepairTargetOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/tasks/repair/target][%d] getClusterClusterIdTasksRepairTargetOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDTasksRepairTargetOK) GetPayload() *models.RepairTarget { - return o.Payload -} - -func (o *GetClusterClusterIDTasksRepairTargetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.RepairTarget) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetClusterClusterIDTasksRepairTargetDefault creates a GetClusterClusterIDTasksRepairTargetDefault with default headers values -func NewGetClusterClusterIDTasksRepairTargetDefault(code int) *GetClusterClusterIDTasksRepairTargetDefault { - return &GetClusterClusterIDTasksRepairTargetDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDTasksRepairTargetDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDTasksRepairTargetDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID tasks repair target default response -func (o *GetClusterClusterIDTasksRepairTargetDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDTasksRepairTargetDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/tasks/repair/target][%d] GetClusterClusterIDTasksRepairTarget default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDTasksRepairTargetDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDTasksRepairTargetDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_responses.go b/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_responses.go deleted file mode 100644 index d75adcfd02f..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_cluster_cluster_id_tasks_responses.go +++ /dev/null @@ -1,118 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClusterClusterIDTasksReader is a Reader for the GetClusterClusterIDTasks structure. -type GetClusterClusterIDTasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClusterClusterIDTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClusterClusterIDTasksOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClusterClusterIDTasksDefault(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 - } -} - -// NewGetClusterClusterIDTasksOK creates a GetClusterClusterIDTasksOK with default headers values -func NewGetClusterClusterIDTasksOK() *GetClusterClusterIDTasksOK { - return &GetClusterClusterIDTasksOK{} -} - -/* -GetClusterClusterIDTasksOK handles this case with default header values. - -List of tasks -*/ -type GetClusterClusterIDTasksOK struct { - Payload []*models.ExtendedTask -} - -func (o *GetClusterClusterIDTasksOK) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/tasks][%d] getClusterClusterIdTasksOK %+v", 200, o.Payload) -} - -func (o *GetClusterClusterIDTasksOK) GetPayload() []*models.ExtendedTask { - return o.Payload -} - -func (o *GetClusterClusterIDTasksOK) 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 -} - -// NewGetClusterClusterIDTasksDefault creates a GetClusterClusterIDTasksDefault with default headers values -func NewGetClusterClusterIDTasksDefault(code int) *GetClusterClusterIDTasksDefault { - return &GetClusterClusterIDTasksDefault{ - _statusCode: code, - } -} - -/* -GetClusterClusterIDTasksDefault handles this case with default header values. - -Unexpected error -*/ -type GetClusterClusterIDTasksDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get cluster cluster ID tasks default response -func (o *GetClusterClusterIDTasksDefault) Code() int { - return o._statusCode -} - -func (o *GetClusterClusterIDTasksDefault) Error() string { - return fmt.Sprintf("[GET /cluster/{cluster_id}/tasks][%d] GetClusterClusterIDTasks default %+v", o._statusCode, o.Payload) -} - -func (o *GetClusterClusterIDTasksDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClusterClusterIDTasksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_clusters_parameters.go b/pkg/mermaidclient/internal/client/operations/get_clusters_parameters.go deleted file mode 100644 index 0e1adaf3768..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_clusters_parameters.go +++ /dev/null @@ -1,114 +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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetClustersParams creates a new GetClustersParams object -// with the default values initialized. -func NewGetClustersParams() *GetClustersParams { - - return &GetClustersParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetClustersParamsWithTimeout creates a new GetClustersParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetClustersParamsWithTimeout(timeout time.Duration) *GetClustersParams { - - return &GetClustersParams{ - - timeout: timeout, - } -} - -// NewGetClustersParamsWithContext creates a new GetClustersParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetClustersParamsWithContext(ctx context.Context) *GetClustersParams { - - return &GetClustersParams{ - - Context: ctx, - } -} - -// NewGetClustersParamsWithHTTPClient creates a new GetClustersParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetClustersParamsWithHTTPClient(client *http.Client) *GetClustersParams { - - return &GetClustersParams{ - HTTPClient: client, - } -} - -/* -GetClustersParams contains all the parameters to send to the API endpoint -for the get clusters operation typically these are written to a http.Request -*/ -type GetClustersParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get clusters params -func (o *GetClustersParams) WithTimeout(timeout time.Duration) *GetClustersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get clusters params -func (o *GetClustersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get clusters params -func (o *GetClustersParams) WithContext(ctx context.Context) *GetClustersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get clusters params -func (o *GetClustersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get clusters params -func (o *GetClustersParams) WithHTTPClient(client *http.Client) *GetClustersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get clusters params -func (o *GetClustersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_clusters_responses.go b/pkg/mermaidclient/internal/client/operations/get_clusters_responses.go deleted file mode 100644 index bbfa31ea071..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_clusters_responses.go +++ /dev/null @@ -1,118 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetClustersReader is a Reader for the GetClusters structure. -type GetClustersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetClustersOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetClustersDefault(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 - } -} - -// NewGetClustersOK creates a GetClustersOK with default headers values -func NewGetClustersOK() *GetClustersOK { - return &GetClustersOK{} -} - -/* -GetClustersOK handles this case with default header values. - -List of all clusters -*/ -type GetClustersOK struct { - Payload []*models.Cluster -} - -func (o *GetClustersOK) Error() string { - return fmt.Sprintf("[GET /clusters][%d] getClustersOK %+v", 200, o.Payload) -} - -func (o *GetClustersOK) GetPayload() []*models.Cluster { - return o.Payload -} - -func (o *GetClustersOK) 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 -} - -// NewGetClustersDefault creates a GetClustersDefault with default headers values -func NewGetClustersDefault(code int) *GetClustersDefault { - return &GetClustersDefault{ - _statusCode: code, - } -} - -/* -GetClustersDefault handles this case with default header values. - -Unexpected error -*/ -type GetClustersDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get clusters default response -func (o *GetClustersDefault) Code() int { - return o._statusCode -} - -func (o *GetClustersDefault) Error() string { - return fmt.Sprintf("[GET /clusters][%d] GetClusters default %+v", o._statusCode, o.Payload) -} - -func (o *GetClustersDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetClustersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_version_parameters.go b/pkg/mermaidclient/internal/client/operations/get_version_parameters.go deleted file mode 100644 index 2d5323f25c3..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_version_parameters.go +++ /dev/null @@ -1,114 +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" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewGetVersionParams creates a new GetVersionParams object -// with the default values initialized. -func NewGetVersionParams() *GetVersionParams { - - return &GetVersionParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewGetVersionParamsWithTimeout creates a new GetVersionParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewGetVersionParamsWithTimeout(timeout time.Duration) *GetVersionParams { - - return &GetVersionParams{ - - timeout: timeout, - } -} - -// NewGetVersionParamsWithContext creates a new GetVersionParams object -// with the default values initialized, and the ability to set a context for a request -func NewGetVersionParamsWithContext(ctx context.Context) *GetVersionParams { - - return &GetVersionParams{ - - Context: ctx, - } -} - -// NewGetVersionParamsWithHTTPClient creates a new GetVersionParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewGetVersionParamsWithHTTPClient(client *http.Client) *GetVersionParams { - - return &GetVersionParams{ - HTTPClient: client, - } -} - -/* -GetVersionParams contains all the parameters to send to the API endpoint -for the get version operation typically these are written to a http.Request -*/ -type GetVersionParams struct { - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the get version params -func (o *GetVersionParams) WithTimeout(timeout time.Duration) *GetVersionParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the get version params -func (o *GetVersionParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the get version params -func (o *GetVersionParams) WithContext(ctx context.Context) *GetVersionParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the get version params -func (o *GetVersionParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the get version params -func (o *GetVersionParams) WithHTTPClient(client *http.Client) *GetVersionParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the get version params -func (o *GetVersionParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WriteToRequest writes these params to a swagger request -func (o *GetVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/get_version_responses.go b/pkg/mermaidclient/internal/client/operations/get_version_responses.go deleted file mode 100644 index 8d9b2f06fc4..00000000000 --- a/pkg/mermaidclient/internal/client/operations/get_version_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// GetVersionReader is a Reader for the GetVersion structure. -type GetVersionReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *GetVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewGetVersionOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewGetVersionDefault(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 - } -} - -// NewGetVersionOK creates a GetVersionOK with default headers values -func NewGetVersionOK() *GetVersionOK { - return &GetVersionOK{} -} - -/* -GetVersionOK handles this case with default header values. - -Server version -*/ -type GetVersionOK struct { - Payload *models.Version -} - -func (o *GetVersionOK) Error() string { - return fmt.Sprintf("[GET /version][%d] getVersionOK %+v", 200, o.Payload) -} - -func (o *GetVersionOK) GetPayload() *models.Version { - return o.Payload -} - -func (o *GetVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Version) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewGetVersionDefault creates a GetVersionDefault with default headers values -func NewGetVersionDefault(code int) *GetVersionDefault { - return &GetVersionDefault{ - _statusCode: code, - } -} - -/* -GetVersionDefault handles this case with default header values. - -Unexpected error -*/ -type GetVersionDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the get version default response -func (o *GetVersionDefault) Code() int { - return o._statusCode -} - -func (o *GetVersionDefault) Error() string { - return fmt.Sprintf("[GET /version][%d] GetVersion default %+v", o._statusCode, o.Payload) -} - -func (o *GetVersionDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *GetVersionDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/operations_client.go b/pkg/mermaidclient/internal/client/operations/operations_client.go deleted file mode 100644 index 309df0dfae8..00000000000 --- a/pkg/mermaidclient/internal/client/operations/operations_client.go +++ /dev/null @@ -1,789 +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 ( - "github.com/go-openapi/runtime" - - strfmt "github.com/go-openapi/strfmt" -) - -// New creates a new operations API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client { - return &Client{transport: transport, formats: formats} -} - -/* -Client for operations API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -/* -DeleteClusterClusterID delete cluster cluster ID API -*/ -func (a *Client) DeleteClusterClusterID(params *DeleteClusterClusterIDParams) (*DeleteClusterClusterIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteClusterClusterIDParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DeleteClusterClusterID", - Method: "DELETE", - PathPattern: "/cluster/{cluster_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteClusterClusterIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteClusterClusterIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteClusterClusterIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteClusterClusterIDBackups delete cluster cluster ID backups API -*/ -func (a *Client) DeleteClusterClusterIDBackups(params *DeleteClusterClusterIDBackupsParams) (*DeleteClusterClusterIDBackupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteClusterClusterIDBackupsParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DeleteClusterClusterIDBackups", - Method: "DELETE", - PathPattern: "/cluster/{cluster_id}/backups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteClusterClusterIDBackupsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteClusterClusterIDBackupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteClusterClusterIDBackupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -DeleteClusterClusterIDTaskTaskTypeTaskID delete cluster cluster ID task task type task ID API -*/ -func (a *Client) DeleteClusterClusterIDTaskTaskTypeTaskID(params *DeleteClusterClusterIDTaskTaskTypeTaskIDParams) (*DeleteClusterClusterIDTaskTaskTypeTaskIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewDeleteClusterClusterIDTaskTaskTypeTaskIDParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "DeleteClusterClusterIDTaskTaskTypeTaskID", - Method: "DELETE", - PathPattern: "/cluster/{cluster_id}/task/{task_type}/{task_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &DeleteClusterClusterIDTaskTaskTypeTaskIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*DeleteClusterClusterIDTaskTaskTypeTaskIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*DeleteClusterClusterIDTaskTaskTypeTaskIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterID get cluster cluster ID API -*/ -func (a *Client) GetClusterClusterID(params *GetClusterClusterIDParams) (*GetClusterClusterIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterID", - Method: "GET", - PathPattern: "/cluster/{cluster_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDBackups get cluster cluster ID backups API -*/ -func (a *Client) GetClusterClusterIDBackups(params *GetClusterClusterIDBackupsParams) (*GetClusterClusterIDBackupsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDBackupsParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDBackups", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/backups", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDBackupsReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDBackupsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDBackupsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDBackupsFiles get cluster cluster ID backups files API -*/ -func (a *Client) GetClusterClusterIDBackupsFiles(params *GetClusterClusterIDBackupsFilesParams) (*GetClusterClusterIDBackupsFilesOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDBackupsFilesParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDBackupsFiles", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/backups/files", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDBackupsFilesReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDBackupsFilesOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDBackupsFilesDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDStatus get cluster cluster ID status API -*/ -func (a *Client) GetClusterClusterIDStatus(params *GetClusterClusterIDStatusParams) (*GetClusterClusterIDStatusOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDStatusParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDStatus", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/status", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDStatusReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDStatusOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDStatusDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDTaskBackupTaskIDRunID get cluster cluster ID task backup task ID run ID API -*/ -func (a *Client) GetClusterClusterIDTaskBackupTaskIDRunID(params *GetClusterClusterIDTaskBackupTaskIDRunIDParams) (*GetClusterClusterIDTaskBackupTaskIDRunIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDTaskBackupTaskIDRunIDParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDTaskBackupTaskIDRunID", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/task/backup/{task_id}/{run_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDTaskBackupTaskIDRunIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDTaskBackupTaskIDRunIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDTaskBackupTaskIDRunIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDTaskRepairTaskIDRunID get cluster cluster ID task repair task ID run ID API -*/ -func (a *Client) GetClusterClusterIDTaskRepairTaskIDRunID(params *GetClusterClusterIDTaskRepairTaskIDRunIDParams) (*GetClusterClusterIDTaskRepairTaskIDRunIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDTaskRepairTaskIDRunIDParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDTaskRepairTaskIDRunID", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/task/repair/{task_id}/{run_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDTaskRepairTaskIDRunIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDTaskRepairTaskIDRunIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDTaskRepairTaskIDRunIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDTaskTaskTypeTaskID get cluster cluster ID task task type task ID API -*/ -func (a *Client) GetClusterClusterIDTaskTaskTypeTaskID(params *GetClusterClusterIDTaskTaskTypeTaskIDParams) (*GetClusterClusterIDTaskTaskTypeTaskIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDTaskTaskTypeTaskIDParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDTaskTaskTypeTaskID", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/task/{task_type}/{task_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDTaskTaskTypeTaskIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDTaskTaskTypeTaskIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDTaskTaskTypeTaskIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDTaskTaskTypeTaskIDHistory get cluster cluster ID task task type task ID history API -*/ -func (a *Client) GetClusterClusterIDTaskTaskTypeTaskIDHistory(params *GetClusterClusterIDTaskTaskTypeTaskIDHistoryParams) (*GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDTaskTaskTypeTaskIDHistoryParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDTaskTaskTypeTaskIDHistory", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/task/{task_type}/{task_id}/history", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDTaskTaskTypeTaskIDHistoryReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDTaskTaskTypeTaskIDHistoryOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDTaskTaskTypeTaskIDHistoryDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDTasks get cluster cluster ID tasks API -*/ -func (a *Client) GetClusterClusterIDTasks(params *GetClusterClusterIDTasksParams) (*GetClusterClusterIDTasksOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDTasksParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDTasks", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/tasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDTasksReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDTasksOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDTasksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDTasksBackupTarget get cluster cluster ID tasks backup target API -*/ -func (a *Client) GetClusterClusterIDTasksBackupTarget(params *GetClusterClusterIDTasksBackupTargetParams) (*GetClusterClusterIDTasksBackupTargetOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDTasksBackupTargetParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDTasksBackupTarget", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/tasks/backup/target", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDTasksBackupTargetReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDTasksBackupTargetOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDTasksBackupTargetDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusterClusterIDTasksRepairTarget get cluster cluster ID tasks repair target API -*/ -func (a *Client) GetClusterClusterIDTasksRepairTarget(params *GetClusterClusterIDTasksRepairTargetParams) (*GetClusterClusterIDTasksRepairTargetOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClusterClusterIDTasksRepairTargetParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusterClusterIDTasksRepairTarget", - Method: "GET", - PathPattern: "/cluster/{cluster_id}/tasks/repair/target", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClusterClusterIDTasksRepairTargetReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClusterClusterIDTasksRepairTargetOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClusterClusterIDTasksRepairTargetDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetClusters get clusters API -*/ -func (a *Client) GetClusters(params *GetClustersParams) (*GetClustersOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetClustersParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetClusters", - Method: "GET", - PathPattern: "/clusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetClustersReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetClustersOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetClustersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -GetVersion get version API -*/ -func (a *Client) GetVersion(params *GetVersionParams) (*GetVersionOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewGetVersionParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "GetVersion", - Method: "GET", - PathPattern: "/version", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &GetVersionReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*GetVersionOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*GetVersionDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PostClusterClusterIDRepairsIntensity post cluster cluster ID repairs intensity API -*/ -func (a *Client) PostClusterClusterIDRepairsIntensity(params *PostClusterClusterIDRepairsIntensityParams) (*PostClusterClusterIDRepairsIntensityOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPostClusterClusterIDRepairsIntensityParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "PostClusterClusterIDRepairsIntensity", - Method: "POST", - PathPattern: "/cluster/{cluster_id}/repairs/intensity", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PostClusterClusterIDRepairsIntensityReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*PostClusterClusterIDRepairsIntensityOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PostClusterClusterIDRepairsIntensityDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PostClusterClusterIDTasks post cluster cluster ID tasks API -*/ -func (a *Client) PostClusterClusterIDTasks(params *PostClusterClusterIDTasksParams) (*PostClusterClusterIDTasksCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPostClusterClusterIDTasksParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "PostClusterClusterIDTasks", - Method: "POST", - PathPattern: "/cluster/{cluster_id}/tasks", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PostClusterClusterIDTasksReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*PostClusterClusterIDTasksCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PostClusterClusterIDTasksDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PostClusters post clusters API -*/ -func (a *Client) PostClusters(params *PostClustersParams) (*PostClustersCreated, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPostClustersParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "PostClusters", - Method: "POST", - PathPattern: "/clusters", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PostClustersReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*PostClustersCreated) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PostClustersDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PutClusterClusterID put cluster cluster ID API -*/ -func (a *Client) PutClusterClusterID(params *PutClusterClusterIDParams) (*PutClusterClusterIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutClusterClusterIDParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "PutClusterClusterID", - Method: "PUT", - PathPattern: "/cluster/{cluster_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutClusterClusterIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*PutClusterClusterIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PutClusterClusterIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PutClusterClusterIDTaskTaskTypeTaskID put cluster cluster ID task task type task ID API -*/ -func (a *Client) PutClusterClusterIDTaskTaskTypeTaskID(params *PutClusterClusterIDTaskTaskTypeTaskIDParams) (*PutClusterClusterIDTaskTaskTypeTaskIDOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutClusterClusterIDTaskTaskTypeTaskIDParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "PutClusterClusterIDTaskTaskTypeTaskID", - Method: "PUT", - PathPattern: "/cluster/{cluster_id}/task/{task_type}/{task_id}", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutClusterClusterIDTaskTaskTypeTaskIDReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*PutClusterClusterIDTaskTaskTypeTaskIDOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PutClusterClusterIDTaskTaskTypeTaskIDDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDStart put cluster cluster ID task task type task ID start API -*/ -func (a *Client) PutClusterClusterIDTaskTaskTypeTaskIDStart(params *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) (*PutClusterClusterIDTaskTaskTypeTaskIDStartOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutClusterClusterIDTaskTaskTypeTaskIDStartParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "PutClusterClusterIDTaskTaskTypeTaskIDStart", - Method: "PUT", - PathPattern: "/cluster/{cluster_id}/task/{task_type}/{task_id}/start", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutClusterClusterIDTaskTaskTypeTaskIDStartReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*PutClusterClusterIDTaskTaskTypeTaskIDStartOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PutClusterClusterIDTaskTaskTypeTaskIDStartDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDStop put cluster cluster ID task task type task ID stop API -*/ -func (a *Client) PutClusterClusterIDTaskTaskTypeTaskIDStop(params *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) (*PutClusterClusterIDTaskTaskTypeTaskIDStopOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewPutClusterClusterIDTaskTaskTypeTaskIDStopParams() - } - - result, err := a.transport.Submit(&runtime.ClientOperation{ - ID: "PutClusterClusterIDTaskTaskTypeTaskIDStop", - Method: "PUT", - PathPattern: "/cluster/{cluster_id}/task/{task_type}/{task_id}/stop", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http"}, - Params: params, - Reader: &PutClusterClusterIDTaskTaskTypeTaskIDStopReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - }) - if err != nil { - return nil, err - } - success, ok := result.(*PutClusterClusterIDTaskTaskTypeTaskIDStopOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*PutClusterClusterIDTaskTaskTypeTaskIDStopDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_repairs_intensity_parameters.go b/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_repairs_intensity_parameters.go deleted file mode 100644 index a7c4d134d9f..00000000000 --- a/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_repairs_intensity_parameters.go +++ /dev/null @@ -1,157 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewPostClusterClusterIDRepairsIntensityParams creates a new PostClusterClusterIDRepairsIntensityParams object -// with the default values initialized. -func NewPostClusterClusterIDRepairsIntensityParams() *PostClusterClusterIDRepairsIntensityParams { - var () - return &PostClusterClusterIDRepairsIntensityParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewPostClusterClusterIDRepairsIntensityParamsWithTimeout creates a new PostClusterClusterIDRepairsIntensityParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewPostClusterClusterIDRepairsIntensityParamsWithTimeout(timeout time.Duration) *PostClusterClusterIDRepairsIntensityParams { - var () - return &PostClusterClusterIDRepairsIntensityParams{ - - timeout: timeout, - } -} - -// NewPostClusterClusterIDRepairsIntensityParamsWithContext creates a new PostClusterClusterIDRepairsIntensityParams object -// with the default values initialized, and the ability to set a context for a request -func NewPostClusterClusterIDRepairsIntensityParamsWithContext(ctx context.Context) *PostClusterClusterIDRepairsIntensityParams { - var () - return &PostClusterClusterIDRepairsIntensityParams{ - - Context: ctx, - } -} - -// NewPostClusterClusterIDRepairsIntensityParamsWithHTTPClient creates a new PostClusterClusterIDRepairsIntensityParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewPostClusterClusterIDRepairsIntensityParamsWithHTTPClient(client *http.Client) *PostClusterClusterIDRepairsIntensityParams { - var () - return &PostClusterClusterIDRepairsIntensityParams{ - HTTPClient: client, - } -} - -/* -PostClusterClusterIDRepairsIntensityParams contains all the parameters to send to the API endpoint -for the post cluster cluster ID repairs intensity operation typically these are written to a http.Request -*/ -type PostClusterClusterIDRepairsIntensityParams struct { - - /*ClusterID*/ - ClusterID string - /*Intensity*/ - Intensity float64 - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) WithTimeout(timeout time.Duration) *PostClusterClusterIDRepairsIntensityParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) WithContext(ctx context.Context) *PostClusterClusterIDRepairsIntensityParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) WithHTTPClient(client *http.Client) *PostClusterClusterIDRepairsIntensityParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) WithClusterID(clusterID string) *PostClusterClusterIDRepairsIntensityParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithIntensity adds the intensity to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) WithIntensity(intensity float64) *PostClusterClusterIDRepairsIntensityParams { - o.SetIntensity(intensity) - return o -} - -// SetIntensity adds the intensity to the post cluster cluster ID repairs intensity params -func (o *PostClusterClusterIDRepairsIntensityParams) SetIntensity(intensity float64) { - o.Intensity = intensity -} - -// WriteToRequest writes these params to a swagger request -func (o *PostClusterClusterIDRepairsIntensityParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - // query param intensity - qrIntensity := o.Intensity - qIntensity := swag.FormatFloat64(qrIntensity) - if qIntensity != "" { - if err := r.SetQueryParam("intensity", qIntensity); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_repairs_intensity_responses.go b/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_repairs_intensity_responses.go deleted file mode 100644 index 8336ab381e8..00000000000 --- a/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_repairs_intensity_responses.go +++ /dev/null @@ -1,108 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// PostClusterClusterIDRepairsIntensityReader is a Reader for the PostClusterClusterIDRepairsIntensity structure. -type PostClusterClusterIDRepairsIntensityReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PostClusterClusterIDRepairsIntensityReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPostClusterClusterIDRepairsIntensityOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPostClusterClusterIDRepairsIntensityDefault(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 - } -} - -// NewPostClusterClusterIDRepairsIntensityOK creates a PostClusterClusterIDRepairsIntensityOK with default headers values -func NewPostClusterClusterIDRepairsIntensityOK() *PostClusterClusterIDRepairsIntensityOK { - return &PostClusterClusterIDRepairsIntensityOK{} -} - -/* -PostClusterClusterIDRepairsIntensityOK handles this case with default header values. - -OK -*/ -type PostClusterClusterIDRepairsIntensityOK struct { -} - -func (o *PostClusterClusterIDRepairsIntensityOK) Error() string { - return fmt.Sprintf("[POST /cluster/{cluster_id}/repairs/intensity][%d] postClusterClusterIdRepairsIntensityOK ", 200) -} - -func (o *PostClusterClusterIDRepairsIntensityOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPostClusterClusterIDRepairsIntensityDefault creates a PostClusterClusterIDRepairsIntensityDefault with default headers values -func NewPostClusterClusterIDRepairsIntensityDefault(code int) *PostClusterClusterIDRepairsIntensityDefault { - return &PostClusterClusterIDRepairsIntensityDefault{ - _statusCode: code, - } -} - -/* -PostClusterClusterIDRepairsIntensityDefault handles this case with default header values. - -Unexpected error -*/ -type PostClusterClusterIDRepairsIntensityDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the post cluster cluster ID repairs intensity default response -func (o *PostClusterClusterIDRepairsIntensityDefault) Code() int { - return o._statusCode -} - -func (o *PostClusterClusterIDRepairsIntensityDefault) Error() string { - return fmt.Sprintf("[POST /cluster/{cluster_id}/repairs/intensity][%d] PostClusterClusterIDRepairsIntensity default %+v", o._statusCode, o.Payload) -} - -func (o *PostClusterClusterIDRepairsIntensityDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *PostClusterClusterIDRepairsIntensityDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_tasks_parameters.go b/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_tasks_parameters.go deleted file mode 100644 index 46bae15f237..00000000000 --- a/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_tasks_parameters.go +++ /dev/null @@ -1,155 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// NewPostClusterClusterIDTasksParams creates a new PostClusterClusterIDTasksParams object -// with the default values initialized. -func NewPostClusterClusterIDTasksParams() *PostClusterClusterIDTasksParams { - var () - return &PostClusterClusterIDTasksParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewPostClusterClusterIDTasksParamsWithTimeout creates a new PostClusterClusterIDTasksParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewPostClusterClusterIDTasksParamsWithTimeout(timeout time.Duration) *PostClusterClusterIDTasksParams { - var () - return &PostClusterClusterIDTasksParams{ - - timeout: timeout, - } -} - -// NewPostClusterClusterIDTasksParamsWithContext creates a new PostClusterClusterIDTasksParams object -// with the default values initialized, and the ability to set a context for a request -func NewPostClusterClusterIDTasksParamsWithContext(ctx context.Context) *PostClusterClusterIDTasksParams { - var () - return &PostClusterClusterIDTasksParams{ - - Context: ctx, - } -} - -// NewPostClusterClusterIDTasksParamsWithHTTPClient creates a new PostClusterClusterIDTasksParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewPostClusterClusterIDTasksParamsWithHTTPClient(client *http.Client) *PostClusterClusterIDTasksParams { - var () - return &PostClusterClusterIDTasksParams{ - HTTPClient: client, - } -} - -/* -PostClusterClusterIDTasksParams contains all the parameters to send to the API endpoint -for the post cluster cluster ID tasks operation typically these are written to a http.Request -*/ -type PostClusterClusterIDTasksParams struct { - - /*ClusterID*/ - ClusterID string - /*TaskFields*/ - TaskFields *models.TaskUpdate - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) WithTimeout(timeout time.Duration) *PostClusterClusterIDTasksParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) WithContext(ctx context.Context) *PostClusterClusterIDTasksParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) WithHTTPClient(client *http.Client) *PostClusterClusterIDTasksParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) WithClusterID(clusterID string) *PostClusterClusterIDTasksParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithTaskFields adds the taskFields to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) WithTaskFields(taskFields *models.TaskUpdate) *PostClusterClusterIDTasksParams { - o.SetTaskFields(taskFields) - return o -} - -// SetTaskFields adds the taskFields to the post cluster cluster ID tasks params -func (o *PostClusterClusterIDTasksParams) SetTaskFields(taskFields *models.TaskUpdate) { - o.TaskFields = taskFields -} - -// WriteToRequest writes these params to a swagger request -func (o *PostClusterClusterIDTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if o.TaskFields != nil { - if err := r.SetBodyParam(o.TaskFields); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_tasks_responses.go b/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_tasks_responses.go deleted file mode 100644 index ab319ebeaf8..00000000000 --- a/pkg/mermaidclient/internal/client/operations/post_cluster_cluster_id_tasks_responses.go +++ /dev/null @@ -1,112 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// PostClusterClusterIDTasksReader is a Reader for the PostClusterClusterIDTasks structure. -type PostClusterClusterIDTasksReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PostClusterClusterIDTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewPostClusterClusterIDTasksCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPostClusterClusterIDTasksDefault(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 - } -} - -// NewPostClusterClusterIDTasksCreated creates a PostClusterClusterIDTasksCreated with default headers values -func NewPostClusterClusterIDTasksCreated() *PostClusterClusterIDTasksCreated { - return &PostClusterClusterIDTasksCreated{} -} - -/* -PostClusterClusterIDTasksCreated handles this case with default header values. - -Task added -*/ -type PostClusterClusterIDTasksCreated struct { - Location string -} - -func (o *PostClusterClusterIDTasksCreated) Error() string { - return fmt.Sprintf("[POST /cluster/{cluster_id}/tasks][%d] postClusterClusterIdTasksCreated ", 201) -} - -func (o *PostClusterClusterIDTasksCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response header Location - o.Location = response.GetHeader("Location") - - return nil -} - -// NewPostClusterClusterIDTasksDefault creates a PostClusterClusterIDTasksDefault with default headers values -func NewPostClusterClusterIDTasksDefault(code int) *PostClusterClusterIDTasksDefault { - return &PostClusterClusterIDTasksDefault{ - _statusCode: code, - } -} - -/* -PostClusterClusterIDTasksDefault handles this case with default header values. - -Unexpected error -*/ -type PostClusterClusterIDTasksDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the post cluster cluster ID tasks default response -func (o *PostClusterClusterIDTasksDefault) Code() int { - return o._statusCode -} - -func (o *PostClusterClusterIDTasksDefault) Error() string { - return fmt.Sprintf("[POST /cluster/{cluster_id}/tasks][%d] PostClusterClusterIDTasks default %+v", o._statusCode, o.Payload) -} - -func (o *PostClusterClusterIDTasksDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *PostClusterClusterIDTasksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/post_clusters_parameters.go b/pkg/mermaidclient/internal/client/operations/post_clusters_parameters.go deleted file mode 100644 index b8dfe57165d..00000000000 --- a/pkg/mermaidclient/internal/client/operations/post_clusters_parameters.go +++ /dev/null @@ -1,137 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// NewPostClustersParams creates a new PostClustersParams object -// with the default values initialized. -func NewPostClustersParams() *PostClustersParams { - var () - return &PostClustersParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewPostClustersParamsWithTimeout creates a new PostClustersParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewPostClustersParamsWithTimeout(timeout time.Duration) *PostClustersParams { - var () - return &PostClustersParams{ - - timeout: timeout, - } -} - -// NewPostClustersParamsWithContext creates a new PostClustersParams object -// with the default values initialized, and the ability to set a context for a request -func NewPostClustersParamsWithContext(ctx context.Context) *PostClustersParams { - var () - return &PostClustersParams{ - - Context: ctx, - } -} - -// NewPostClustersParamsWithHTTPClient creates a new PostClustersParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewPostClustersParamsWithHTTPClient(client *http.Client) *PostClustersParams { - var () - return &PostClustersParams{ - HTTPClient: client, - } -} - -/* -PostClustersParams contains all the parameters to send to the API endpoint -for the post clusters operation typically these are written to a http.Request -*/ -type PostClustersParams struct { - - /*Cluster*/ - Cluster *models.Cluster - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the post clusters params -func (o *PostClustersParams) WithTimeout(timeout time.Duration) *PostClustersParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the post clusters params -func (o *PostClustersParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the post clusters params -func (o *PostClustersParams) WithContext(ctx context.Context) *PostClustersParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the post clusters params -func (o *PostClustersParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the post clusters params -func (o *PostClustersParams) WithHTTPClient(client *http.Client) *PostClustersParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the post clusters params -func (o *PostClustersParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCluster adds the cluster to the post clusters params -func (o *PostClustersParams) WithCluster(cluster *models.Cluster) *PostClustersParams { - o.SetCluster(cluster) - return o -} - -// SetCluster adds the cluster to the post clusters params -func (o *PostClustersParams) SetCluster(cluster *models.Cluster) { - o.Cluster = cluster -} - -// WriteToRequest writes these params to a swagger request -func (o *PostClustersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cluster != nil { - if err := r.SetBodyParam(o.Cluster); err != nil { - return err - } - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/post_clusters_responses.go b/pkg/mermaidclient/internal/client/operations/post_clusters_responses.go deleted file mode 100644 index 1947415cae5..00000000000 --- a/pkg/mermaidclient/internal/client/operations/post_clusters_responses.go +++ /dev/null @@ -1,112 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// PostClustersReader is a Reader for the PostClusters structure. -type PostClustersReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PostClustersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 201: - result := NewPostClustersCreated() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPostClustersDefault(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 - } -} - -// NewPostClustersCreated creates a PostClustersCreated with default headers values -func NewPostClustersCreated() *PostClustersCreated { - return &PostClustersCreated{} -} - -/* -PostClustersCreated handles this case with default header values. - -Cluster added -*/ -type PostClustersCreated struct { - Location string -} - -func (o *PostClustersCreated) Error() string { - return fmt.Sprintf("[POST /clusters][%d] postClustersCreated ", 201) -} - -func (o *PostClustersCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - // response header Location - o.Location = response.GetHeader("Location") - - return nil -} - -// NewPostClustersDefault creates a PostClustersDefault with default headers values -func NewPostClustersDefault(code int) *PostClustersDefault { - return &PostClustersDefault{ - _statusCode: code, - } -} - -/* -PostClustersDefault handles this case with default header values. - -Unexpected error -*/ -type PostClustersDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the post clusters default response -func (o *PostClustersDefault) Code() int { - return o._statusCode -} - -func (o *PostClustersDefault) Error() string { - return fmt.Sprintf("[POST /clusters][%d] PostClusters default %+v", o._statusCode, o.Payload) -} - -func (o *PostClustersDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *PostClustersDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_parameters.go b/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_parameters.go deleted file mode 100644 index 5a9b9020d16..00000000000 --- a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_parameters.go +++ /dev/null @@ -1,155 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// NewPutClusterClusterIDParams creates a new PutClusterClusterIDParams object -// with the default values initialized. -func NewPutClusterClusterIDParams() *PutClusterClusterIDParams { - var () - return &PutClusterClusterIDParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewPutClusterClusterIDParamsWithTimeout creates a new PutClusterClusterIDParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewPutClusterClusterIDParamsWithTimeout(timeout time.Duration) *PutClusterClusterIDParams { - var () - return &PutClusterClusterIDParams{ - - timeout: timeout, - } -} - -// NewPutClusterClusterIDParamsWithContext creates a new PutClusterClusterIDParams object -// with the default values initialized, and the ability to set a context for a request -func NewPutClusterClusterIDParamsWithContext(ctx context.Context) *PutClusterClusterIDParams { - var () - return &PutClusterClusterIDParams{ - - Context: ctx, - } -} - -// NewPutClusterClusterIDParamsWithHTTPClient creates a new PutClusterClusterIDParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewPutClusterClusterIDParamsWithHTTPClient(client *http.Client) *PutClusterClusterIDParams { - var () - return &PutClusterClusterIDParams{ - HTTPClient: client, - } -} - -/* -PutClusterClusterIDParams contains all the parameters to send to the API endpoint -for the put cluster cluster ID operation typically these are written to a http.Request -*/ -type PutClusterClusterIDParams struct { - - /*Cluster*/ - Cluster *models.Cluster - /*ClusterID*/ - ClusterID string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) WithTimeout(timeout time.Duration) *PutClusterClusterIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) WithContext(ctx context.Context) *PutClusterClusterIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) WithHTTPClient(client *http.Client) *PutClusterClusterIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithCluster adds the cluster to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) WithCluster(cluster *models.Cluster) *PutClusterClusterIDParams { - o.SetCluster(cluster) - return o -} - -// SetCluster adds the cluster to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) SetCluster(cluster *models.Cluster) { - o.Cluster = cluster -} - -// WithClusterID adds the clusterID to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) WithClusterID(clusterID string) *PutClusterClusterIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the put cluster cluster ID params -func (o *PutClusterClusterIDParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WriteToRequest writes these params to a swagger request -func (o *PutClusterClusterIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - if o.Cluster != nil { - if err := r.SetBodyParam(o.Cluster); err != nil { - return err - } - } - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_responses.go b/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_responses.go deleted file mode 100644 index 7e8d9c71838..00000000000 --- a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// PutClusterClusterIDReader is a Reader for the PutClusterClusterID structure. -type PutClusterClusterIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutClusterClusterIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutClusterClusterIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPutClusterClusterIDDefault(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 - } -} - -// NewPutClusterClusterIDOK creates a PutClusterClusterIDOK with default headers values -func NewPutClusterClusterIDOK() *PutClusterClusterIDOK { - return &PutClusterClusterIDOK{} -} - -/* -PutClusterClusterIDOK handles this case with default header values. - -Updated cluster info -*/ -type PutClusterClusterIDOK struct { - Payload *models.Cluster -} - -func (o *PutClusterClusterIDOK) Error() string { - return fmt.Sprintf("[PUT /cluster/{cluster_id}][%d] putClusterClusterIdOK %+v", 200, o.Payload) -} - -func (o *PutClusterClusterIDOK) GetPayload() *models.Cluster { - return o.Payload -} - -func (o *PutClusterClusterIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Cluster) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutClusterClusterIDDefault creates a PutClusterClusterIDDefault with default headers values -func NewPutClusterClusterIDDefault(code int) *PutClusterClusterIDDefault { - return &PutClusterClusterIDDefault{ - _statusCode: code, - } -} - -/* -PutClusterClusterIDDefault handles this case with default header values. - -Unexpected error -*/ -type PutClusterClusterIDDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the put cluster cluster ID default response -func (o *PutClusterClusterIDDefault) Code() int { - return o._statusCode -} - -func (o *PutClusterClusterIDDefault) Error() string { - return fmt.Sprintf("[PUT /cluster/{cluster_id}][%d] PutClusterClusterID default %+v", o._statusCode, o.Payload) -} - -func (o *PutClusterClusterIDDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *PutClusterClusterIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_parameters.go b/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_parameters.go deleted file mode 100644 index c5bdcc216b8..00000000000 --- a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_parameters.go +++ /dev/null @@ -1,191 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// NewPutClusterClusterIDTaskTaskTypeTaskIDParams creates a new PutClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized. -func NewPutClusterClusterIDTaskTaskTypeTaskIDParams() *PutClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDParamsWithTimeout creates a new PutClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDParamsWithTimeout(timeout time.Duration) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDParams{ - - timeout: timeout, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDParamsWithContext creates a new PutClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a context for a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDParamsWithContext(ctx context.Context) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDParams{ - - Context: ctx, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDParamsWithHTTPClient creates a new PutClusterClusterIDTaskTaskTypeTaskIDParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDParamsWithHTTPClient(client *http.Client) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDParams{ - HTTPClient: client, - } -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDParams contains all the parameters to send to the API endpoint -for the put cluster cluster ID task task type task ID operation typically these are written to a http.Request -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDParams struct { - - /*ClusterID*/ - ClusterID string - /*TaskFields*/ - TaskFields *models.TaskUpdate - /*TaskID*/ - TaskID string - /*TaskType*/ - TaskType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) WithTimeout(timeout time.Duration) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) WithContext(ctx context.Context) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) WithHTTPClient(client *http.Client) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) WithClusterID(clusterID string) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithTaskFields adds the taskFields to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) WithTaskFields(taskFields *models.TaskUpdate) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTaskFields(taskFields) - return o -} - -// SetTaskFields adds the taskFields to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) SetTaskFields(taskFields *models.TaskUpdate) { - o.TaskFields = taskFields -} - -// WithTaskID adds the taskID to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) WithTaskID(taskID string) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) SetTaskID(taskID string) { - o.TaskID = taskID -} - -// WithTaskType adds the taskType to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) WithTaskType(taskType string) *PutClusterClusterIDTaskTaskTypeTaskIDParams { - o.SetTaskType(taskType) - return o -} - -// SetTaskType adds the taskType to the put cluster cluster ID task task type task ID params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) SetTaskType(taskType string) { - o.TaskType = taskType -} - -// WriteToRequest writes these params to a swagger request -func (o *PutClusterClusterIDTaskTaskTypeTaskIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if o.TaskFields != nil { - if err := r.SetBodyParam(o.TaskFields); err != nil { - return err - } - } - - // path param task_id - if err := r.SetPathParam("task_id", o.TaskID); err != nil { - return err - } - - // path param task_type - if err := r.SetPathParam("task_type", o.TaskType); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_responses.go b/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_responses.go deleted file mode 100644 index b39c5a8b27d..00000000000 --- a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_responses.go +++ /dev/null @@ -1,120 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// PutClusterClusterIDTaskTaskTypeTaskIDReader is a Reader for the PutClusterClusterIDTaskTaskTypeTaskID structure. -type PutClusterClusterIDTaskTaskTypeTaskIDReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutClusterClusterIDTaskTaskTypeTaskIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutClusterClusterIDTaskTaskTypeTaskIDOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPutClusterClusterIDTaskTaskTypeTaskIDDefault(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 - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDOK creates a PutClusterClusterIDTaskTaskTypeTaskIDOK with default headers values -func NewPutClusterClusterIDTaskTaskTypeTaskIDOK() *PutClusterClusterIDTaskTaskTypeTaskIDOK { - return &PutClusterClusterIDTaskTaskTypeTaskIDOK{} -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDOK handles this case with default header values. - -Updated task info -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDOK struct { - Payload *models.Task -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDOK) Error() string { - return fmt.Sprintf("[PUT /cluster/{cluster_id}/task/{task_type}/{task_id}][%d] putClusterClusterIdTaskTaskTypeTaskIdOK %+v", 200, o.Payload) -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDOK) GetPayload() *models.Task { - return o.Payload -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.Task) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDDefault creates a PutClusterClusterIDTaskTaskTypeTaskIDDefault with default headers values -func NewPutClusterClusterIDTaskTaskTypeTaskIDDefault(code int) *PutClusterClusterIDTaskTaskTypeTaskIDDefault { - return &PutClusterClusterIDTaskTaskTypeTaskIDDefault{ - _statusCode: code, - } -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDDefault handles this case with default header values. - -Unexpected error -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the put cluster cluster ID task task type task ID default response -func (o *PutClusterClusterIDTaskTaskTypeTaskIDDefault) Code() int { - return o._statusCode -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDDefault) Error() string { - return fmt.Sprintf("[PUT /cluster/{cluster_id}/task/{task_type}/{task_id}][%d] PutClusterClusterIDTaskTaskTypeTaskID default %+v", o._statusCode, o.Payload) -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_start_parameters.go b/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_start_parameters.go deleted file mode 100644 index 443341d5302..00000000000 --- a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_start_parameters.go +++ /dev/null @@ -1,193 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStartParams creates a new PutClusterClusterIDTaskTaskTypeTaskIDStartParams object -// with the default values initialized. -func NewPutClusterClusterIDTaskTaskTypeTaskIDStartParams() *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDStartParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStartParamsWithTimeout creates a new PutClusterClusterIDTaskTaskTypeTaskIDStartParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDStartParamsWithTimeout(timeout time.Duration) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDStartParams{ - - timeout: timeout, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStartParamsWithContext creates a new PutClusterClusterIDTaskTaskTypeTaskIDStartParams object -// with the default values initialized, and the ability to set a context for a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDStartParamsWithContext(ctx context.Context) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDStartParams{ - - Context: ctx, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStartParamsWithHTTPClient creates a new PutClusterClusterIDTaskTaskTypeTaskIDStartParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDStartParamsWithHTTPClient(client *http.Client) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDStartParams{ - HTTPClient: client, - } -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDStartParams contains all the parameters to send to the API endpoint -for the put cluster cluster ID task task type task ID start operation typically these are written to a http.Request -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDStartParams struct { - - /*ClusterID*/ - ClusterID string - /*Continue*/ - Continue bool - /*TaskID*/ - TaskID string - /*TaskType*/ - TaskType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) WithTimeout(timeout time.Duration) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) WithContext(ctx context.Context) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) WithHTTPClient(client *http.Client) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) WithClusterID(clusterID string) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithContinue adds the continueVar to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) WithContinue(continueVar bool) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - o.SetContinue(continueVar) - return o -} - -// SetContinue adds the continue to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) SetContinue(continueVar bool) { - o.Continue = continueVar -} - -// WithTaskID adds the taskID to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) WithTaskID(taskID string) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) SetTaskID(taskID string) { - o.TaskID = taskID -} - -// WithTaskType adds the taskType to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) WithTaskType(taskType string) *PutClusterClusterIDTaskTaskTypeTaskIDStartParams { - o.SetTaskType(taskType) - return o -} - -// SetTaskType adds the taskType to the put cluster cluster ID task task type task ID start params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) SetTaskType(taskType string) { - o.TaskType = taskType -} - -// WriteToRequest writes these params to a swagger request -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - // query param continue - qrContinue := o.Continue - qContinue := swag.FormatBool(qrContinue) - if qContinue != "" { - if err := r.SetQueryParam("continue", qContinue); err != nil { - return err - } - } - - // path param task_id - if err := r.SetPathParam("task_id", o.TaskID); err != nil { - return err - } - - // path param task_type - if err := r.SetPathParam("task_type", o.TaskType); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_start_responses.go b/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_start_responses.go deleted file mode 100644 index 44083cfb1e5..00000000000 --- a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_start_responses.go +++ /dev/null @@ -1,108 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// PutClusterClusterIDTaskTaskTypeTaskIDStartReader is a Reader for the PutClusterClusterIDTaskTaskTypeTaskIDStart structure. -type PutClusterClusterIDTaskTaskTypeTaskIDStartReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutClusterClusterIDTaskTaskTypeTaskIDStartOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPutClusterClusterIDTaskTaskTypeTaskIDStartDefault(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 - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStartOK creates a PutClusterClusterIDTaskTaskTypeTaskIDStartOK with default headers values -func NewPutClusterClusterIDTaskTaskTypeTaskIDStartOK() *PutClusterClusterIDTaskTaskTypeTaskIDStartOK { - return &PutClusterClusterIDTaskTaskTypeTaskIDStartOK{} -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDStartOK handles this case with default header values. - -Task started -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDStartOK struct { -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartOK) Error() string { - return fmt.Sprintf("[PUT /cluster/{cluster_id}/task/{task_type}/{task_id}/start][%d] putClusterClusterIdTaskTaskTypeTaskIdStartOK ", 200) -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStartDefault creates a PutClusterClusterIDTaskTaskTypeTaskIDStartDefault with default headers values -func NewPutClusterClusterIDTaskTaskTypeTaskIDStartDefault(code int) *PutClusterClusterIDTaskTaskTypeTaskIDStartDefault { - return &PutClusterClusterIDTaskTaskTypeTaskIDStartDefault{ - _statusCode: code, - } -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDStartDefault handles this case with default header values. - -Unexpected error -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDStartDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the put cluster cluster ID task task type task ID start default response -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartDefault) Code() int { - return o._statusCode -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartDefault) Error() string { - return fmt.Sprintf("[PUT /cluster/{cluster_id}/task/{task_type}/{task_id}/start][%d] PutClusterClusterIDTaskTaskTypeTaskIDStart default %+v", o._statusCode, o.Payload) -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStartDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_stop_parameters.go b/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_stop_parameters.go deleted file mode 100644 index b0ae958242a..00000000000 --- a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_stop_parameters.go +++ /dev/null @@ -1,200 +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/swag" - - strfmt "github.com/go-openapi/strfmt" -) - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStopParams creates a new PutClusterClusterIDTaskTaskTypeTaskIDStopParams object -// with the default values initialized. -func NewPutClusterClusterIDTaskTaskTypeTaskIDStopParams() *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDStopParams{ - - timeout: cr.DefaultTimeout, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStopParamsWithTimeout creates a new PutClusterClusterIDTaskTaskTypeTaskIDStopParams object -// with the default values initialized, and the ability to set a timeout on a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDStopParamsWithTimeout(timeout time.Duration) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDStopParams{ - - timeout: timeout, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStopParamsWithContext creates a new PutClusterClusterIDTaskTaskTypeTaskIDStopParams object -// with the default values initialized, and the ability to set a context for a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDStopParamsWithContext(ctx context.Context) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDStopParams{ - - Context: ctx, - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStopParamsWithHTTPClient creates a new PutClusterClusterIDTaskTaskTypeTaskIDStopParams object -// with the default values initialized, and the ability to set a custom HTTPClient for a request -func NewPutClusterClusterIDTaskTaskTypeTaskIDStopParamsWithHTTPClient(client *http.Client) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - var () - return &PutClusterClusterIDTaskTaskTypeTaskIDStopParams{ - HTTPClient: client, - } -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDStopParams contains all the parameters to send to the API endpoint -for the put cluster cluster ID task task type task ID stop operation typically these are written to a http.Request -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDStopParams struct { - - /*ClusterID*/ - ClusterID string - /*Disable*/ - Disable *bool - /*TaskID*/ - TaskID string - /*TaskType*/ - TaskType string - - timeout time.Duration - Context context.Context - HTTPClient *http.Client -} - -// WithTimeout adds the timeout to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) WithTimeout(timeout time.Duration) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - o.SetTimeout(timeout) - return o -} - -// SetTimeout adds the timeout to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) SetTimeout(timeout time.Duration) { - o.timeout = timeout -} - -// WithContext adds the context to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) WithContext(ctx context.Context) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - o.SetContext(ctx) - return o -} - -// SetContext adds the context to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) SetContext(ctx context.Context) { - o.Context = ctx -} - -// WithHTTPClient adds the HTTPClient to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) WithHTTPClient(client *http.Client) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - o.SetHTTPClient(client) - return o -} - -// SetHTTPClient adds the HTTPClient to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) SetHTTPClient(client *http.Client) { - o.HTTPClient = client -} - -// WithClusterID adds the clusterID to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) WithClusterID(clusterID string) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - o.SetClusterID(clusterID) - return o -} - -// SetClusterID adds the clusterId to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) SetClusterID(clusterID string) { - o.ClusterID = clusterID -} - -// WithDisable adds the disable to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) WithDisable(disable *bool) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - o.SetDisable(disable) - return o -} - -// SetDisable adds the disable to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) SetDisable(disable *bool) { - o.Disable = disable -} - -// WithTaskID adds the taskID to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) WithTaskID(taskID string) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - o.SetTaskID(taskID) - return o -} - -// SetTaskID adds the taskId to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) SetTaskID(taskID string) { - o.TaskID = taskID -} - -// WithTaskType adds the taskType to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) WithTaskType(taskType string) *PutClusterClusterIDTaskTaskTypeTaskIDStopParams { - o.SetTaskType(taskType) - return o -} - -// SetTaskType adds the taskType to the put cluster cluster ID task task type task ID stop params -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) SetTaskType(taskType string) { - o.TaskType = taskType -} - -// WriteToRequest writes these params to a swagger request -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { - - if err := r.SetTimeout(o.timeout); err != nil { - return err - } - var res []error - - // path param cluster_id - if err := r.SetPathParam("cluster_id", o.ClusterID); err != nil { - return err - } - - if o.Disable != nil { - - // query param disable - var qrDisable bool - if o.Disable != nil { - qrDisable = *o.Disable - } - qDisable := swag.FormatBool(qrDisable) - if qDisable != "" { - if err := r.SetQueryParam("disable", qDisable); err != nil { - return err - } - } - - } - - // path param task_id - if err := r.SetPathParam("task_id", o.TaskID); err != nil { - return err - } - - // path param task_type - if err := r.SetPathParam("task_type", o.TaskType); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_stop_responses.go b/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_stop_responses.go deleted file mode 100644 index cfc8b42282e..00000000000 --- a/pkg/mermaidclient/internal/client/operations/put_cluster_cluster_id_task_task_type_task_id_stop_responses.go +++ /dev/null @@ -1,108 +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" - - strfmt "github.com/go-openapi/strfmt" - - models "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// PutClusterClusterIDTaskTaskTypeTaskIDStopReader is a Reader for the PutClusterClusterIDTaskTaskTypeTaskIDStop structure. -type PutClusterClusterIDTaskTaskTypeTaskIDStopReader struct { - formats strfmt.Registry -} - -// ReadResponse reads a server response into the received o. -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { - switch response.Code() { - case 200: - result := NewPutClusterClusterIDTaskTaskTypeTaskIDStopOK() - if err := result.readResponse(response, consumer, o.formats); err != nil { - return nil, err - } - return result, nil - default: - result := NewPutClusterClusterIDTaskTaskTypeTaskIDStopDefault(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 - } -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStopOK creates a PutClusterClusterIDTaskTaskTypeTaskIDStopOK with default headers values -func NewPutClusterClusterIDTaskTaskTypeTaskIDStopOK() *PutClusterClusterIDTaskTaskTypeTaskIDStopOK { - return &PutClusterClusterIDTaskTaskTypeTaskIDStopOK{} -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDStopOK handles this case with default header values. - -Task stopped -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDStopOK struct { -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopOK) Error() string { - return fmt.Sprintf("[PUT /cluster/{cluster_id}/task/{task_type}/{task_id}/stop][%d] putClusterClusterIdTaskTaskTypeTaskIdStopOK ", 200) -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - return nil -} - -// NewPutClusterClusterIDTaskTaskTypeTaskIDStopDefault creates a PutClusterClusterIDTaskTaskTypeTaskIDStopDefault with default headers values -func NewPutClusterClusterIDTaskTaskTypeTaskIDStopDefault(code int) *PutClusterClusterIDTaskTaskTypeTaskIDStopDefault { - return &PutClusterClusterIDTaskTaskTypeTaskIDStopDefault{ - _statusCode: code, - } -} - -/* -PutClusterClusterIDTaskTaskTypeTaskIDStopDefault handles this case with default header values. - -Unexpected error -*/ -type PutClusterClusterIDTaskTaskTypeTaskIDStopDefault struct { - _statusCode int - - Payload *models.ErrorResponse -} - -// Code gets the status code for the put cluster cluster ID task task type task ID stop default response -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopDefault) Code() int { - return o._statusCode -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopDefault) Error() string { - return fmt.Sprintf("[PUT /cluster/{cluster_id}/task/{task_type}/{task_id}/stop][%d] PutClusterClusterIDTaskTaskTypeTaskIDStop default %+v", o._statusCode, o.Payload) -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopDefault) GetPayload() *models.ErrorResponse { - return o.Payload -} - -func (o *PutClusterClusterIDTaskTaskTypeTaskIDStopDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - - o.Payload = new(models.ErrorResponse) - - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { - return err - } - - return nil -} diff --git a/pkg/mermaidclient/internal/models/backup_files_info.go b/pkg/mermaidclient/internal/models/backup_files_info.go deleted file mode 100644 index 227d4e1cacb..00000000000 --- a/pkg/mermaidclient/internal/models/backup_files_info.go +++ /dev/null @@ -1,132 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// BackupFilesInfo backup files info -// swagger:model BackupFilesInfo -type BackupFilesInfo struct { - - // files - Files []*BackupFilesInfoFilesItems0 `json:"files"` - - // location - Location string `json:"location,omitempty"` - - // schema - Schema string `json:"schema,omitempty"` -} - -// Validate validates this backup files info -func (m *BackupFilesInfo) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateFiles(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupFilesInfo) validateFiles(formats strfmt.Registry) error { - - if swag.IsZero(m.Files) { // not required - return nil - } - - for i := 0; i < len(m.Files); i++ { - if swag.IsZero(m.Files[i]) { // not required - continue - } - - if m.Files[i] != nil { - if err := m.Files[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("files" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupFilesInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupFilesInfo) UnmarshalBinary(b []byte) error { - var res BackupFilesInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// BackupFilesInfoFilesItems0 backup files info files items0 -// swagger:model BackupFilesInfoFilesItems0 -type BackupFilesInfoFilesItems0 struct { - - // files - Files []string `json:"files"` - - // keyspace - Keyspace string `json:"keyspace,omitempty"` - - // path - Path string `json:"path,omitempty"` - - // size - Size int64 `json:"size,omitempty"` - - // table - Table string `json:"table,omitempty"` - - // version - Version string `json:"version,omitempty"` -} - -// Validate validates this backup files info files items0 -func (m *BackupFilesInfoFilesItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupFilesInfoFilesItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupFilesInfoFilesItems0) UnmarshalBinary(b []byte) error { - var res BackupFilesInfoFilesItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/backup_list_item.go b/pkg/mermaidclient/internal/models/backup_list_item.go deleted file mode 100644 index 1dba1503f36..00000000000 --- a/pkg/mermaidclient/internal/models/backup_list_item.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// BackupListItem backup list item -// swagger:model BackupListItem -type BackupListItem struct { - - // cluster id - ClusterID string `json:"cluster_id,omitempty"` - - // snapshot info - SnapshotInfo []*SnapshotInfo `json:"snapshot_info"` - - // units - Units []*BackupUnit `json:"units"` -} - -// Validate validates this backup list item -func (m *BackupListItem) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSnapshotInfo(formats); err != nil { - res = append(res, err) - } - - if err := m.validateUnits(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupListItem) validateSnapshotInfo(formats strfmt.Registry) error { - - if swag.IsZero(m.SnapshotInfo) { // not required - return nil - } - - for i := 0; i < len(m.SnapshotInfo); i++ { - if swag.IsZero(m.SnapshotInfo[i]) { // not required - continue - } - - if m.SnapshotInfo[i] != nil { - if err := m.SnapshotInfo[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("snapshot_info" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupListItem) validateUnits(formats strfmt.Registry) error { - - if swag.IsZero(m.Units) { // not required - return nil - } - - for i := 0; i < len(m.Units); i++ { - if swag.IsZero(m.Units[i]) { // not required - continue - } - - if m.Units[i] != nil { - if err := m.Units[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("units" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupListItem) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupListItem) UnmarshalBinary(b []byte) error { - var res BackupListItem - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/backup_progress.go b/pkg/mermaidclient/internal/models/backup_progress.go deleted file mode 100644 index 4aec5928596..00000000000 --- a/pkg/mermaidclient/internal/models/backup_progress.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// BackupProgress backup progress -// swagger:model BackupProgress -type BackupProgress struct { - - // completed at - // Format: date-time - CompletedAt *strfmt.DateTime `json:"completed_at,omitempty"` - - // dcs - Dcs []string `json:"dcs"` - - // failed - Failed int64 `json:"failed,omitempty"` - - // hosts - Hosts []*HostProgress `json:"hosts"` - - // size - Size int64 `json:"size,omitempty"` - - // skipped - Skipped int64 `json:"skipped,omitempty"` - - // snapshot tag - SnapshotTag string `json:"snapshot_tag,omitempty"` - - // stage - Stage string `json:"stage,omitempty"` - - // started at - // Format: date-time - StartedAt *strfmt.DateTime `json:"started_at,omitempty"` - - // uploaded - Uploaded int64 `json:"uploaded,omitempty"` -} - -// Validate validates this backup progress -func (m *BackupProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCompletedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartedAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupProgress) validateCompletedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.CompletedAt) { // not required - return nil - } - - if err := validate.FormatOf("completed_at", "body", "date-time", m.CompletedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *BackupProgress) validateHosts(formats strfmt.Registry) error { - - if swag.IsZero(m.Hosts) { // not required - return nil - } - - for i := 0; i < len(m.Hosts); i++ { - if swag.IsZero(m.Hosts[i]) { // not required - continue - } - - if m.Hosts[i] != nil { - if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *BackupProgress) validateStartedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.StartedAt) { // not required - return nil - } - - if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupProgress) UnmarshalBinary(b []byte) error { - var res BackupProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/backup_target.go b/pkg/mermaidclient/internal/models/backup_target.go deleted file mode 100644 index fafd3c61274..00000000000 --- a/pkg/mermaidclient/internal/models/backup_target.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// BackupTarget backup target -// swagger:model BackupTarget -type BackupTarget struct { - - // cluster id - ClusterID string `json:"cluster_id,omitempty"` - - // dc - Dc []string `json:"dc"` - - // host - Host string `json:"host,omitempty"` - - // location - Location []string `json:"location"` - - // rate limit - RateLimit []string `json:"rate_limit"` - - // retention - Retention int64 `json:"retention,omitempty"` - - // size - Size int64 `json:"size,omitempty"` - - // snapshot parallel - SnapshotParallel []string `json:"snapshot_parallel"` - - // units - Units []*BackupUnit `json:"units"` - - // upload parallel - UploadParallel []string `json:"upload_parallel"` - - // with hosts - WithHosts []string `json:"with_hosts"` -} - -// Validate validates this backup target -func (m *BackupTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnits(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *BackupTarget) validateUnits(formats strfmt.Registry) error { - - if swag.IsZero(m.Units) { // not required - return nil - } - - for i := 0; i < len(m.Units); i++ { - if swag.IsZero(m.Units[i]) { // not required - continue - } - - if m.Units[i] != nil { - if err := m.Units[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("units" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *BackupTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupTarget) UnmarshalBinary(b []byte) error { - var res BackupTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/backup_unit.go b/pkg/mermaidclient/internal/models/backup_unit.go deleted file mode 100644 index 5482916c2b4..00000000000 --- a/pkg/mermaidclient/internal/models/backup_unit.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/swag" -) - -// BackupUnit backup unit -// swagger:model BackupUnit -type BackupUnit struct { - - // all tables - AllTables bool `json:"all_tables,omitempty"` - - // keyspace - Keyspace string `json:"keyspace,omitempty"` - - // tables - Tables []string `json:"tables"` -} - -// Validate validates this backup unit -func (m *BackupUnit) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *BackupUnit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *BackupUnit) UnmarshalBinary(b []byte) error { - var res BackupUnit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/cluster.go b/pkg/mermaidclient/internal/models/cluster.go deleted file mode 100644 index f0173a0e57e..00000000000 --- a/pkg/mermaidclient/internal/models/cluster.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// Cluster cluster -// swagger:model Cluster -type Cluster struct { - - // auth token - AuthToken string `json:"auth_token,omitempty"` - - // host - Host string `json:"host,omitempty"` - - // id - ID string `json:"id,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // password - Password string `json:"password,omitempty"` - - // ssl user cert file - // Format: byte - SslUserCertFile strfmt.Base64 `json:"ssl_user_cert_file,omitempty"` - - // ssl user key file - // Format: byte - SslUserKeyFile strfmt.Base64 `json:"ssl_user_key_file,omitempty"` - - // username - Username string `json:"username,omitempty"` - - // without repair - WithoutRepair bool `json:"without_repair,omitempty"` -} - -// Validate validates this cluster -func (m *Cluster) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSslUserCertFile(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSslUserKeyFile(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Cluster) validateSslUserCertFile(formats strfmt.Registry) error { - - if swag.IsZero(m.SslUserCertFile) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - - return nil -} - -func (m *Cluster) validateSslUserKeyFile(formats strfmt.Registry) error { - - if swag.IsZero(m.SslUserKeyFile) { // not required - return nil - } - - // Format "byte" (base64 string) is already validated when unmarshalled - - return nil -} - -// MarshalBinary interface implementation -func (m *Cluster) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Cluster) UnmarshalBinary(b []byte) error { - var res Cluster - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/cluster_status.go b/pkg/mermaidclient/internal/models/cluster_status.go deleted file mode 100644 index fcf87118676..00000000000 --- a/pkg/mermaidclient/internal/models/cluster_status.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// ClusterStatus cluster status -// swagger:model ClusterStatus -type ClusterStatus []*ClusterStatusItems0 - -// Validate validates this cluster status -func (m ClusterStatus) Validate(formats strfmt.Registry) error { - var res []error - - for i := 0; i < len(m); i++ { - if swag.IsZero(m[i]) { // not required - continue - } - - if m[i] != nil { - if err := m[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName(strconv.Itoa(i)) - } - return err - } - } - - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// ClusterStatusItems0 cluster status items0 -// swagger:model ClusterStatusItems0 -type ClusterStatusItems0 struct { - - // agent version - AgentVersion string `json:"agent_version,omitempty"` - - // alternator rtt ms - AlternatorRttMs float32 `json:"alternator_rtt_ms,omitempty"` - - // alternator status - AlternatorStatus string `json:"alternator_status,omitempty"` - - // cpu count - CPUCount int64 `json:"cpu_count,omitempty"` - - // cql rtt ms - CqlRttMs float32 `json:"cql_rtt_ms,omitempty"` - - // cql status - CqlStatus string `json:"cql_status,omitempty"` - - // dc - Dc string `json:"dc,omitempty"` - - // host - Host string `json:"host,omitempty"` - - // host id - HostID string `json:"host_id,omitempty"` - - // rest rtt ms - RestRttMs float32 `json:"rest_rtt_ms,omitempty"` - - // rest status - RestStatus string `json:"rest_status,omitempty"` - - // scylla version - ScyllaVersion string `json:"scylla_version,omitempty"` - - // ssl - Ssl bool `json:"ssl,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // total ram - TotalRAM int64 `json:"total_ram,omitempty"` - - // uptime - Uptime int64 `json:"uptime,omitempty"` -} - -// Validate validates this cluster status items0 -func (m *ClusterStatusItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ClusterStatusItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ClusterStatusItems0) UnmarshalBinary(b []byte) error { - var res ClusterStatusItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/error_response.go b/pkg/mermaidclient/internal/models/error_response.go deleted file mode 100644 index c44f076fe1b..00000000000 --- a/pkg/mermaidclient/internal/models/error_response.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/swag" -) - -// ErrorResponse error response -// swagger:model ErrorResponse -type ErrorResponse struct { - - // Error description - Message string `json:"message,omitempty"` - - // Request ID for tracing in logs - TraceID string `json:"trace_id,omitempty"` -} - -// Validate validates this error response -func (m *ErrorResponse) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *ErrorResponse) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ErrorResponse) UnmarshalBinary(b []byte) error { - var res ErrorResponse - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/extended_task.go b/pkg/mermaidclient/internal/models/extended_task.go deleted file mode 100644 index 40e780126a5..00000000000 --- a/pkg/mermaidclient/internal/models/extended_task.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// ExtendedTask extended task -// swagger:model ExtendedTask -type ExtendedTask struct { - - // cause - Cause string `json:"cause,omitempty"` - - // cluster id - ClusterID string `json:"cluster_id,omitempty"` - - // enabled - Enabled bool `json:"enabled,omitempty"` - - // end time - // Format: date-time - EndTime strfmt.DateTime `json:"end_time,omitempty"` - - // failures - Failures int64 `json:"failures,omitempty"` - - // id - ID string `json:"id,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // next activation - // Format: date-time - NextActivation strfmt.DateTime `json:"next_activation,omitempty"` - - // properties - Properties interface{} `json:"properties,omitempty"` - - // schedule - Schedule *Schedule `json:"schedule,omitempty"` - - // start time - // Format: date-time - StartTime strfmt.DateTime `json:"start_time,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // tags - Tags []string `json:"tags"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this extended task -func (m *ExtendedTask) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateNextActivation(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *ExtendedTask) validateEndTime(formats strfmt.Registry) error { - - if swag.IsZero(m.EndTime) { // not required - return nil - } - - if err := validate.FormatOf("end_time", "body", "date-time", m.EndTime.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *ExtendedTask) validateNextActivation(formats strfmt.Registry) error { - - if swag.IsZero(m.NextActivation) { // not required - return nil - } - - if err := validate.FormatOf("next_activation", "body", "date-time", m.NextActivation.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *ExtendedTask) validateSchedule(formats strfmt.Registry) error { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } - return err - } - } - - return nil -} - -func (m *ExtendedTask) validateStartTime(formats strfmt.Registry) error { - - if swag.IsZero(m.StartTime) { // not required - return nil - } - - if err := validate.FormatOf("start_time", "body", "date-time", m.StartTime.String(), formats); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *ExtendedTask) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *ExtendedTask) UnmarshalBinary(b []byte) error { - var res ExtendedTask - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/host_progress.go b/pkg/mermaidclient/internal/models/host_progress.go deleted file mode 100644 index 894f6b5ed0e..00000000000 --- a/pkg/mermaidclient/internal/models/host_progress.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// HostProgress host progress -// swagger:model HostProgress -type HostProgress struct { - - // completed at - // Format: date-time - CompletedAt *strfmt.DateTime `json:"completed_at,omitempty"` - - // failed - Failed int64 `json:"failed,omitempty"` - - // host - Host string `json:"host,omitempty"` - - // keyspaces - Keyspaces []*KeyspaceProgress `json:"keyspaces"` - - // size - Size int64 `json:"size,omitempty"` - - // skipped - Skipped int64 `json:"skipped,omitempty"` - - // started at - // Format: date-time - StartedAt *strfmt.DateTime `json:"started_at,omitempty"` - - // uploaded - Uploaded int64 `json:"uploaded,omitempty"` -} - -// Validate validates this host progress -func (m *HostProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCompletedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateKeyspaces(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartedAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *HostProgress) validateCompletedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.CompletedAt) { // not required - return nil - } - - if err := validate.FormatOf("completed_at", "body", "date-time", m.CompletedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *HostProgress) validateKeyspaces(formats strfmt.Registry) error { - - if swag.IsZero(m.Keyspaces) { // not required - return nil - } - - for i := 0; i < len(m.Keyspaces); i++ { - if swag.IsZero(m.Keyspaces[i]) { // not required - continue - } - - if m.Keyspaces[i] != nil { - if err := m.Keyspaces[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("keyspaces" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *HostProgress) validateStartedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.StartedAt) { // not required - return nil - } - - if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *HostProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *HostProgress) UnmarshalBinary(b []byte) error { - var res HostProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/keyspace_progress.go b/pkg/mermaidclient/internal/models/keyspace_progress.go deleted file mode 100644 index 2858fd831ef..00000000000 --- a/pkg/mermaidclient/internal/models/keyspace_progress.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// KeyspaceProgress keyspace progress -// swagger:model KeyspaceProgress -type KeyspaceProgress struct { - - // completed at - // Format: date-time - CompletedAt *strfmt.DateTime `json:"completed_at,omitempty"` - - // failed - Failed int64 `json:"failed,omitempty"` - - // keyspace - Keyspace string `json:"keyspace,omitempty"` - - // size - Size int64 `json:"size,omitempty"` - - // skipped - Skipped int64 `json:"skipped,omitempty"` - - // started at - // Format: date-time - StartedAt *strfmt.DateTime `json:"started_at,omitempty"` - - // tables - Tables []*TableProgress `json:"tables"` - - // uploaded - Uploaded int64 `json:"uploaded,omitempty"` -} - -// Validate validates this keyspace progress -func (m *KeyspaceProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCompletedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTables(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *KeyspaceProgress) validateCompletedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.CompletedAt) { // not required - return nil - } - - if err := validate.FormatOf("completed_at", "body", "date-time", m.CompletedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *KeyspaceProgress) validateStartedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.StartedAt) { // not required - return nil - } - - if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *KeyspaceProgress) validateTables(formats strfmt.Registry) error { - - if swag.IsZero(m.Tables) { // not required - return nil - } - - for i := 0; i < len(m.Tables); i++ { - if swag.IsZero(m.Tables[i]) { // not required - continue - } - - if m.Tables[i] != nil { - if err := m.Tables[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tables" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *KeyspaceProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *KeyspaceProgress) UnmarshalBinary(b []byte) error { - var res KeyspaceProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/repair_progress.go b/pkg/mermaidclient/internal/models/repair_progress.go deleted file mode 100644 index fd2996e18dd..00000000000 --- a/pkg/mermaidclient/internal/models/repair_progress.go +++ /dev/null @@ -1,238 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// RepairProgress repair progress -// swagger:model RepairProgress -type RepairProgress struct { - - // completed at - // Format: date-time - CompletedAt *strfmt.DateTime `json:"completed_at,omitempty"` - - // dcs - Dcs []string `json:"dcs"` - - // error - Error int64 `json:"error,omitempty"` - - // hosts - Hosts []*RepairProgressHostsItems0 `json:"hosts"` - - // started at - // Format: date-time - StartedAt *strfmt.DateTime `json:"started_at,omitempty"` - - // success - Success int64 `json:"success,omitempty"` - - // tables - Tables []*TableRepairProgress `json:"tables"` - - // token ranges - TokenRanges int64 `json:"token_ranges,omitempty"` -} - -// Validate validates this repair progress -func (m *RepairProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCompletedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateHosts(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateTables(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepairProgress) validateCompletedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.CompletedAt) { // not required - return nil - } - - if err := validate.FormatOf("completed_at", "body", "date-time", m.CompletedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *RepairProgress) validateHosts(formats strfmt.Registry) error { - - if swag.IsZero(m.Hosts) { // not required - return nil - } - - for i := 0; i < len(m.Hosts); i++ { - if swag.IsZero(m.Hosts[i]) { // not required - continue - } - - if m.Hosts[i] != nil { - if err := m.Hosts[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *RepairProgress) validateStartedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.StartedAt) { // not required - return nil - } - - if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *RepairProgress) validateTables(formats strfmt.Registry) error { - - if swag.IsZero(m.Tables) { // not required - return nil - } - - for i := 0; i < len(m.Tables); i++ { - if swag.IsZero(m.Tables[i]) { // not required - continue - } - - if m.Tables[i] != nil { - if err := m.Tables[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tables" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepairProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepairProgress) UnmarshalBinary(b []byte) error { - var res RepairProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// RepairProgressHostsItems0 repair progress hosts items0 -// swagger:model RepairProgressHostsItems0 -type RepairProgressHostsItems0 struct { - - // host - Host string `json:"host,omitempty"` - - // intensity - Intensity float64 `json:"intensity,omitempty"` - - // tables - Tables []*TableRepairProgress `json:"tables"` -} - -// Validate validates this repair progress hosts items0 -func (m *RepairProgressHostsItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateTables(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepairProgressHostsItems0) validateTables(formats strfmt.Registry) error { - - if swag.IsZero(m.Tables) { // not required - return nil - } - - for i := 0; i < len(m.Tables); i++ { - if swag.IsZero(m.Tables[i]) { // not required - continue - } - - if m.Tables[i] != nil { - if err := m.Tables[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("tables" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepairProgressHostsItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepairProgressHostsItems0) UnmarshalBinary(b []byte) error { - var res RepairProgressHostsItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/repair_target.go b/pkg/mermaidclient/internal/models/repair_target.go deleted file mode 100644 index 22e6fe401c8..00000000000 --- a/pkg/mermaidclient/internal/models/repair_target.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// RepairTarget repair target -// swagger:model RepairTarget -type RepairTarget struct { - - // cluster id - ClusterID string `json:"cluster_id,omitempty"` - - // dc - Dc []string `json:"dc"` - - // host - Host string `json:"host,omitempty"` - - // token ranges - TokenRanges string `json:"token_ranges,omitempty"` - - // units - Units []*RepairUnit `json:"units"` - - // with hosts - WithHosts []string `json:"with_hosts"` -} - -// Validate validates this repair target -func (m *RepairTarget) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateUnits(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *RepairTarget) validateUnits(formats strfmt.Registry) error { - - if swag.IsZero(m.Units) { // not required - return nil - } - - for i := 0; i < len(m.Units); i++ { - if swag.IsZero(m.Units[i]) { // not required - continue - } - - if m.Units[i] != nil { - if err := m.Units[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("units" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *RepairTarget) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepairTarget) UnmarshalBinary(b []byte) error { - var res RepairTarget - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/repair_unit.go b/pkg/mermaidclient/internal/models/repair_unit.go deleted file mode 100644 index 4a27673eac8..00000000000 --- a/pkg/mermaidclient/internal/models/repair_unit.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/swag" -) - -// RepairUnit repair unit -// swagger:model RepairUnit -type RepairUnit struct { - - // all tables - AllTables bool `json:"all_tables,omitempty"` - - // keyspace - Keyspace string `json:"keyspace,omitempty"` - - // tables - Tables []string `json:"tables"` -} - -// Validate validates this repair unit -func (m *RepairUnit) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *RepairUnit) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *RepairUnit) UnmarshalBinary(b []byte) error { - var res RepairUnit - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/schedule.go b/pkg/mermaidclient/internal/models/schedule.go deleted file mode 100644 index 2b5ef3e2ed4..00000000000 --- a/pkg/mermaidclient/internal/models/schedule.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// Schedule schedule -// swagger:model Schedule -type Schedule struct { - - // interval - Interval string `json:"interval,omitempty"` - - // num retries - NumRetries int64 `json:"num_retries,omitempty"` - - // start date - // Format: date-time - StartDate strfmt.DateTime `json:"start_date,omitempty"` -} - -// Validate validates this schedule -func (m *Schedule) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateStartDate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Schedule) validateStartDate(formats strfmt.Registry) error { - - if swag.IsZero(m.StartDate) { // not required - return nil - } - - if err := validate.FormatOf("start_date", "body", "date-time", m.StartDate.String(), formats); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Schedule) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Schedule) UnmarshalBinary(b []byte) error { - var res Schedule - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/snapshot_info.go b/pkg/mermaidclient/internal/models/snapshot_info.go deleted file mode 100644 index 18d73b67e03..00000000000 --- a/pkg/mermaidclient/internal/models/snapshot_info.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/swag" -) - -// SnapshotInfo snapshot info -// swagger:model SnapshotInfo -type SnapshotInfo struct { - - // size - Size int64 `json:"size,omitempty"` - - // snapshot tag - SnapshotTag string `json:"snapshot_tag,omitempty"` -} - -// Validate validates this snapshot info -func (m *SnapshotInfo) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *SnapshotInfo) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *SnapshotInfo) UnmarshalBinary(b []byte) error { - var res SnapshotInfo - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/table_progress.go b/pkg/mermaidclient/internal/models/table_progress.go deleted file mode 100644 index 7145fd4240f..00000000000 --- a/pkg/mermaidclient/internal/models/table_progress.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TableProgress table progress -// swagger:model TableProgress -type TableProgress struct { - - // completed at - // Format: date-time - CompletedAt *strfmt.DateTime `json:"completed_at,omitempty"` - - // error - Error string `json:"error,omitempty"` - - // failed - Failed int64 `json:"failed,omitempty"` - - // size - Size int64 `json:"size,omitempty"` - - // skipped - Skipped int64 `json:"skipped,omitempty"` - - // started at - // Format: date-time - StartedAt *strfmt.DateTime `json:"started_at,omitempty"` - - // table - Table string `json:"table,omitempty"` - - // uploaded - Uploaded int64 `json:"uploaded,omitempty"` -} - -// Validate validates this table progress -func (m *TableProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCompletedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartedAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TableProgress) validateCompletedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.CompletedAt) { // not required - return nil - } - - if err := validate.FormatOf("completed_at", "body", "date-time", m.CompletedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *TableProgress) validateStartedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.StartedAt) { // not required - return nil - } - - if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TableProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TableProgress) UnmarshalBinary(b []byte) error { - var res TableProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/table_repair_progress.go b/pkg/mermaidclient/internal/models/table_repair_progress.go deleted file mode 100644 index 95565f5885c..00000000000 --- a/pkg/mermaidclient/internal/models/table_repair_progress.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TableRepairProgress table repair progress -// swagger:model TableRepairProgress -type TableRepairProgress struct { - - // completed at - // Format: date-time - CompletedAt *strfmt.DateTime `json:"completed_at,omitempty"` - - // error - Error int64 `json:"error,omitempty"` - - // keyspace - Keyspace string `json:"keyspace,omitempty"` - - // started at - // Format: date-time - StartedAt *strfmt.DateTime `json:"started_at,omitempty"` - - // success - Success int64 `json:"success,omitempty"` - - // table - Table string `json:"table,omitempty"` - - // token ranges - TokenRanges int64 `json:"token_ranges,omitempty"` -} - -// Validate validates this table repair progress -func (m *TableRepairProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCompletedAt(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartedAt(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TableRepairProgress) validateCompletedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.CompletedAt) { // not required - return nil - } - - if err := validate.FormatOf("completed_at", "body", "date-time", m.CompletedAt.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *TableRepairProgress) validateStartedAt(formats strfmt.Registry) error { - - if swag.IsZero(m.StartedAt) { // not required - return nil - } - - if err := validate.FormatOf("started_at", "body", "date-time", m.StartedAt.String(), formats); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TableRepairProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TableRepairProgress) UnmarshalBinary(b []byte) error { - var res TableRepairProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/task.go b/pkg/mermaidclient/internal/models/task.go deleted file mode 100644 index 22a34340561..00000000000 --- a/pkg/mermaidclient/internal/models/task.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// Task task -// swagger:model Task -type Task struct { - - // cluster id - ClusterID string `json:"cluster_id,omitempty"` - - // enabled - Enabled bool `json:"enabled,omitempty"` - - // id - ID string `json:"id,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // properties - Properties interface{} `json:"properties,omitempty"` - - // schedule - Schedule *Schedule `json:"schedule,omitempty"` - - // tags - Tags []string `json:"tags"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this task -func (m *Task) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *Task) validateSchedule(formats strfmt.Registry) error { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *Task) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Task) UnmarshalBinary(b []byte) error { - var res Task - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/task_run.go b/pkg/mermaidclient/internal/models/task_run.go deleted file mode 100644 index ff64518e99d..00000000000 --- a/pkg/mermaidclient/internal/models/task_run.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// TaskRun task run -// swagger:model TaskRun -type TaskRun struct { - - // cause - Cause string `json:"cause,omitempty"` - - // cluster id - ClusterID string `json:"cluster_id,omitempty"` - - // end time - // Format: date-time - EndTime strfmt.DateTime `json:"end_time,omitempty"` - - // id - ID string `json:"id,omitempty"` - - // start time - // Format: date-time - StartTime strfmt.DateTime `json:"start_time,omitempty"` - - // status - Status string `json:"status,omitempty"` - - // task id - TaskID string `json:"task_id,omitempty"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this task run -func (m *TaskRun) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEndTime(formats); err != nil { - res = append(res, err) - } - - if err := m.validateStartTime(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TaskRun) validateEndTime(formats strfmt.Registry) error { - - if swag.IsZero(m.EndTime) { // not required - return nil - } - - if err := validate.FormatOf("end_time", "body", "date-time", m.EndTime.String(), formats); err != nil { - return err - } - - return nil -} - -func (m *TaskRun) validateStartTime(formats strfmt.Registry) error { - - if swag.IsZero(m.StartTime) { // not required - return nil - } - - if err := validate.FormatOf("start_time", "body", "date-time", m.StartTime.String(), formats); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TaskRun) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskRun) UnmarshalBinary(b []byte) error { - var res TaskRun - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/task_run_backup_progress.go b/pkg/mermaidclient/internal/models/task_run_backup_progress.go deleted file mode 100644 index 530f2da6c56..00000000000 --- a/pkg/mermaidclient/internal/models/task_run_backup_progress.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// TaskRunBackupProgress task run backup progress -// swagger:model TaskRunBackupProgress -type TaskRunBackupProgress struct { - - // progress - Progress *BackupProgress `json:"progress,omitempty"` - - // run - Run *TaskRun `json:"run,omitempty"` -} - -// Validate validates this task run backup progress -func (m *TaskRunBackupProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProgress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRun(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TaskRunBackupProgress) validateProgress(formats strfmt.Registry) error { - - if swag.IsZero(m.Progress) { // not required - return nil - } - - if m.Progress != nil { - if err := m.Progress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progress") - } - return err - } - } - - return nil -} - -func (m *TaskRunBackupProgress) validateRun(formats strfmt.Registry) error { - - if swag.IsZero(m.Run) { // not required - return nil - } - - if m.Run != nil { - if err := m.Run.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("run") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TaskRunBackupProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskRunBackupProgress) UnmarshalBinary(b []byte) error { - var res TaskRunBackupProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/task_run_repair_progress.go b/pkg/mermaidclient/internal/models/task_run_repair_progress.go deleted file mode 100644 index cfdbbcbcbd2..00000000000 --- a/pkg/mermaidclient/internal/models/task_run_repair_progress.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// TaskRunRepairProgress task run repair progress -// swagger:model TaskRunRepairProgress -type TaskRunRepairProgress struct { - - // progress - Progress *RepairProgress `json:"progress,omitempty"` - - // run - Run *TaskRun `json:"run,omitempty"` -} - -// Validate validates this task run repair progress -func (m *TaskRunRepairProgress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProgress(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRun(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TaskRunRepairProgress) validateProgress(formats strfmt.Registry) error { - - if swag.IsZero(m.Progress) { // not required - return nil - } - - if m.Progress != nil { - if err := m.Progress.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("progress") - } - return err - } - } - - return nil -} - -func (m *TaskRunRepairProgress) validateRun(formats strfmt.Registry) error { - - if swag.IsZero(m.Run) { // not required - return nil - } - - if m.Run != nil { - if err := m.Run.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("run") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TaskRunRepairProgress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskRunRepairProgress) UnmarshalBinary(b []byte) error { - var res TaskRunRepairProgress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/task_update.go b/pkg/mermaidclient/internal/models/task_update.go deleted file mode 100644 index d8be36a6957..00000000000 --- a/pkg/mermaidclient/internal/models/task_update.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/errors" - "github.com/go-openapi/swag" -) - -// TaskUpdate task update -// swagger:model TaskUpdate -type TaskUpdate struct { - - // enabled - Enabled bool `json:"enabled,omitempty"` - - // name - Name string `json:"name,omitempty"` - - // properties - Properties interface{} `json:"properties,omitempty"` - - // schedule - Schedule *Schedule `json:"schedule,omitempty"` - - // tags - Tags []string `json:"tags"` - - // type - Type string `json:"type,omitempty"` -} - -// Validate validates this task update -func (m *TaskUpdate) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateSchedule(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *TaskUpdate) validateSchedule(formats strfmt.Registry) error { - - if swag.IsZero(m.Schedule) { // not required - return nil - } - - if m.Schedule != nil { - if err := m.Schedule.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("schedule") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *TaskUpdate) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *TaskUpdate) UnmarshalBinary(b []byte) error { - var res TaskUpdate - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internal/models/version.go b/pkg/mermaidclient/internal/models/version.go deleted file mode 100644 index f8104067550..00000000000 --- a/pkg/mermaidclient/internal/models/version.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - strfmt "github.com/go-openapi/strfmt" - - "github.com/go-openapi/swag" -) - -// Version version -// swagger:model Version -type Version struct { - - // version - Version string `json:"version,omitempty"` -} - -// Validate validates this version -func (m *Version) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *Version) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *Version) UnmarshalBinary(b []byte) error { - var res Version - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/pkg/mermaidclient/internalgen.sh b/pkg/mermaidclient/internalgen.sh deleted file mode 100755 index e32af19a6bf..00000000000 --- a/pkg/mermaidclient/internalgen.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (C) 2017 ScyllaDB -# - -set -eu -o pipefail - -echo "Swagger $(swagger version)" - -rm -rf internal/client internal/models -swagger generate client -A mermaid -f mermaid.json -t ./internal diff --git a/pkg/mermaidclient/mermaid.json b/pkg/mermaidclient/mermaid.json deleted file mode 100644 index ad0b5e600dd..00000000000 --- a/pkg/mermaidclient/mermaid.json +++ /dev/null @@ -1,1533 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Scylla Manager API", - "version": "0.1" - }, - "basePath": "/api/v1", - "produces": [ - "application/json" - ], - "consumes": [ - "application/json" - ], - "definitions": { - "Version": { - "type": "object", - "properties": { - "version": { - "type": "string" - } - } - }, - "Cluster": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "host": { - "type": "string" - }, - "auth_token": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "ssl_user_cert_file": { - "type": "string", - "format": "byte" - }, - "ssl_user_key_file": { - "type": "string", - "format": "byte" - }, - "without_repair": { - "type": "boolean" - } - } - }, - "RepairUnit": { - "type": "object", - "properties": { - "keyspace": { - "type": "string" - }, - "tables": { - "type": "array", - "items": { - "type": "string" - } - }, - "all_tables": { - "type": "boolean" - } - } - }, - "ClusterStatus": { - "type": "array", - "items": { - "properties": { - "dc": { - "type": "string" - }, - "host_id": { - "type": "string" - }, - "host": { - "type": "string" - }, - "status": { - "type": "string" - }, - "ssl": { - "type": "boolean" - }, - "alternator_status": { - "type": "string" - }, - "alternator_rtt_ms": { - "type": "number", - "format": "float" - }, - "cql_status": { - "type": "string" - }, - "cql_rtt_ms": { - "type": "number", - "format": "float" - }, - "rest_status": { - "type": "string" - }, - "rest_rtt_ms": { - "type": "number", - "format": "float" - }, - "total_ram": { - "type": "integer" - }, - "uptime": { - "type": "integer" - }, - "cpu_count": { - "type": "integer" - }, - "scylla_version": { - "type": "string" - }, - "agent_version": { - "type": "string" - } - } - } - }, - "RepairProgress": { - "type": "object", - "properties": { - "token_ranges": { - "type": "number", - "format": "int" - }, - "success": { - "type": "number", - "format": "int" - }, - "error": { - "type": "number", - "format": "int" - }, - "started_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "completed_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "dcs": { - "type": "array", - "items": { - "type": "string" - } - }, - "hosts": { - "type": "array", - "items": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "intensity":{ - "type": "number" - }, - "tables": { - "type": "array", - "items": { - "$ref": "#/definitions/TableRepairProgress" - } - } - } - } - }, - "tables": { - "type": "array", - "items": { - "$ref": "#/definitions/TableRepairProgress" - } - } - } - }, - "TableRepairProgress": { - "properties": { - "token_ranges": { - "type": "number", - "format": "int" - }, - "success": { - "type": "number", - "format": "int" - }, - "error": { - "type": "number", - "format": "int" - }, - "started_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "completed_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "keyspace": { - "type": "string" - }, - "table": { - "type": "string" - } - } - }, - "Schedule": { - "type": "object", - "properties": { - "start_date": { - "type": "string", - "format": "date-time" - }, - "interval": { - "type": "string" - }, - "num_retries": { - "type": "number", - "format": "int" - } - } - }, - "Task": { - "type": "object", - "properties": { - "cluster_id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean" - }, - "schedule": { - "$ref": "#/definitions/Schedule" - }, - "properties": { - "type": "object", - "additionalProperties": true - } - } - }, - "ExtendedTask": { - "type": "object", - "properties": { - "cluster_id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean" - }, - "schedule": { - "$ref": "#/definitions/Schedule" - }, - "properties": { - "type": "object", - "additionalProperties": true - }, - "status": { - "type": "string" - }, - "cause": { - "type": "string" - }, - "start_time": { - "type": "string", - "format": "date-time" - }, - "end_time": { - "type": "string", - "format": "date-time" - }, - "next_activation": { - "type": "string", - "format": "date-time" - }, - "failures": { - "type": "integer" - } - } - }, - "TaskUpdate": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "enabled": { - "type": "boolean" - }, - "schedule": { - "$ref": "#/definitions/Schedule" - }, - "properties": { - "type": "object", - "additionalProperties": true - } - } - }, - "TaskRun": { - "type": "object", - "properties": { - "cluster_id": { - "type": "string" - }, - "type": { - "type": "string" - }, - "task_id": { - "type": "string" - }, - "id": { - "type": "string" - }, - "status": { - "type": "string" - }, - "cause": { - "type": "string" - }, - "start_time": { - "type": "string", - "format": "date-time" - }, - "end_time": { - "type": "string", - "format": "date-time" - } - } - }, - "TaskRunRepairProgress": { - "type": "object", - "properties": { - "run": { - "$ref": "#/definitions/TaskRun" - }, - "progress": { - "$ref": "#/definitions/RepairProgress" - } - } - }, - "RepairTarget": { - "type": "object", - "properties": { - "cluster_id": { - "type": "string" - }, - "host": { - "type": "string" - }, - "dc": { - "type": "array", - "items": { - "type": "string" - } - }, - "with_hosts": { - "type": "array", - "items": { - "type": "string" - } - }, - "token_ranges": { - "type": "string" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/RepairUnit" - } - } - } - }, - "BackupListItem": { - "type": "object", - "properties": { - "cluster_id": { - "type": "string" - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/BackupUnit" - } - }, - "snapshot_info": { - "type": "array", - "items": { - "$ref": "#/definitions/SnapshotInfo" - } - } - } - }, - "BackupFilesInfo": { - "type": "object", - "properties": { - "location": { - "type": "string" - }, - "schema": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "keyspace": { - "type": "string" - }, - "table": { - "type": "string" - }, - "version": { - "type": "string" - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - }, - "size": { - "type": "integer" - } - } - } - } - } - }, - "BackupTarget": { - "type": "object", - "properties": { - "cluster_id": { - "type": "string" - }, - "host": { - "type": "string" - }, - "dc": { - "type": "array", - "items": { - "type": "string" - } - }, - "with_hosts": { - "type": "array", - "items": { - "type": "string" - } - }, - "location": { - "type": "array", - "items": { - "type": "string" - } - }, - "retention": { - "type": "integer" - }, - "rate_limit": { - "type": "array", - "items": { - "type": "string" - } - }, - "snapshot_parallel": { - "type": "array", - "items": { - "type": "string" - } - }, - "upload_parallel": { - "type": "array", - "items": { - "type": "string" - } - }, - "units": { - "type": "array", - "items": { - "$ref": "#/definitions/BackupUnit" - } - }, - "size": { - "type": "integer" - } - } - }, - "BackupUnit": { - "type": "object", - "properties": { - "keyspace": { - "type": "string" - }, - "tables": { - "type": "array", - "items": { - "type": "string" - } - }, - "all_tables": { - "type": "boolean" - } - } - }, - "SnapshotInfo": { - "type": "object", - "properties": { - "snapshot_tag": { - "type": "string" - }, - "size": { - "type": "integer" - } - } - }, - "TaskRunBackupProgress": { - "type": "object", - "properties": { - "run": { - "$ref": "#/definitions/TaskRun" - }, - "progress": { - "$ref": "#/definitions/BackupProgress" - } - } - }, - "BackupProgress": { - "type": "object", - "properties": { - "snapshot_tag": { - "type": "string" - }, - "dcs": { - "type": "array", - "items": { - "type": "string" - } - }, - "hosts": { - "type": "array", - "items": { - "$ref": "#/definitions/HostProgress" - } - }, - "stage": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "uploaded": { - "type": "integer" - }, - "skipped": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "started_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "completed_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - } - } - }, - "HostProgress": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "keyspaces": { - "type": "array", - "items": { - "$ref": "#/definitions/KeyspaceProgress" - } - }, - "size": { - "type": "integer" - }, - "uploaded": { - "type": "integer" - }, - "skipped": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "started_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "completed_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - } - } - }, - "KeyspaceProgress": { - "type": "object", - "properties": { - "keyspace": { - "type": "string" - }, - "tables": { - "type": "array", - "items": { - "$ref": "#/definitions/TableProgress" - } - }, - "size": { - "type": "integer" - }, - "uploaded": { - "type": "integer" - }, - "skipped": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "started_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "completed_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - } - } - }, - "TableProgress": { - "type": "object", - "properties": { - "table": { - "type": "string" - }, - "error": { - "type": "string" - }, - "size": { - "type": "integer" - }, - "uploaded": { - "type": "integer" - }, - "skipped": { - "type": "integer" - }, - "failed": { - "type": "integer" - }, - "started_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - }, - "completed_at": { - "type": "string", - "format": "date-time", - "x-nullable": true - } - } - }, - "ErrorResponse": { - "type": "object", - "properties": { - "message": { - "description": "Error description", - "type": "string" - }, - "trace_id": { - "description": "Request ID for tracing in logs", - "type": "string" - } - } - } - }, - "paths": { - "/version": { - "get": { - "responses": { - "200": { - "description": "Server version", - "schema": { - "$ref": "#/definitions/Version" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/clusters": { - "get": { - "responses": { - "200": { - "description": "List of all clusters", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Cluster" - } - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "post": { - "parameters": [ - { - "name": "cluster", - "in": "body", - "schema": { - "$ref": "#/definitions/Cluster" - } - } - ], - "responses": { - "201": { - "description": "Cluster added", - "headers": { - "Location": { - "type": "string" - } - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - } - ], - "get": { - "responses": { - "200": { - "description": "Cluster info", - "schema": { - "$ref": "#/definitions/Cluster" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "parameters": [ - { - "name": "cluster", - "in": "body", - "schema": { - "$ref": "#/definitions/Cluster" - } - } - ], - "responses": { - "200": { - "description": "Updated cluster info", - "schema": { - "$ref": "#/definitions/Cluster" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "parameters": [ - { - "type": "boolean", - "name": "cql_creds", - "in": "query" - }, - { - "type": "boolean", - "name": "ssl_user_cert", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Cluster deleted" - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/status": { - "get": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "Cluster hosts and their statuses", - "schema": { - "$ref": "#/definitions/ClusterStatus" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/tasks": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - } - ], - "get": { - "parameters": [ - { - "name": "all", - "in": "query", - "type": "boolean", - "required": false - }, - { - "name": "type", - "in": "query", - "type": "string", - "required": false - }, - { - "name": "status", - "in": "query", - "type": "string", - "required": false - } - ], - "responses": { - "200": { - "description": "List of tasks", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ExtendedTask" - } - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "post": { - "parameters": [ - { - "name": "taskFields", - "in": "body", - "schema": { - "$ref": "#/definitions/TaskUpdate" - } - } - ], - "responses": { - "201": { - "description": "Task added", - "headers": { - "Location": { - "type": "string" - } - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/tasks/repair/target": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - } - ], - "get": { - "parameters": [ - { - "name": "taskFields", - "in": "body", - "schema": { - "$ref": "#/definitions/TaskUpdate" - } - } - ], - "responses": { - "200": { - "description": "Repair target", - "schema": { - "$ref": "#/definitions/RepairTarget" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/tasks/backup/target": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - } - ], - "get": { - "parameters": [ - { - "name": "taskFields", - "in": "body", - "schema": { - "$ref": "#/definitions/TaskUpdate" - } - } - ], - "responses": { - "200": { - "description": "Backup target", - "schema": { - "$ref": "#/definitions/BackupTarget" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/task/{task_type}/{task_id}": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_type", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_id", - "in": "path", - "required": true - } - ], - "get": { - "responses": { - "200": { - "description": "Task info", - "schema": { - "$ref": "#/definitions/Task" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "put": { - "parameters": [ - { - "name": "taskFields", - "in": "body", - "schema": { - "$ref": "#/definitions/TaskUpdate" - } - } - ], - "responses": { - "200": { - "description": "Updated task info", - "schema": { - "$ref": "#/definitions/Task" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "responses": { - "200": { - "description": "Task deleted" - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/task/{task_type}/{task_id}/start": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_type", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_id", - "in": "path", - "required": true - }, - { - "type": "boolean", - "name": "continue", - "in": "query", - "required": true - } - ], - "put": { - "responses": { - "200": { - "description": "Task started" - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/task/{task_type}/{task_id}/stop": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_type", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_id", - "in": "path", - "required": true - }, - { - "type": "boolean", - "name": "disable", - "in": "query", - "required": false - } - ], - "put": { - "responses": { - "200": { - "description": "Task stopped" - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/task/{task_type}/{task_id}/history": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_type", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_id", - "in": "path", - "required": true - } - ], - "get": { - "parameters": [ - { - "name": "limit", - "in": "query", - "type": "integer", - "format": "int", - "required": false - } - ], - "responses": { - "200": { - "description": "List of task runs", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TaskRun" - } - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/task/repair/{task_id}/{run_id}": { - "get": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "run_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "Repair progress", - "schema": { - "$ref": "#/definitions/TaskRunRepairProgress" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/task/backup/{task_id}/{run_id}": { - "get": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "task_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "run_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "Backup progress", - "schema": { - "$ref": "#/definitions/TaskRunBackupProgress" - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/backups": { - "get": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "locations", - "in": "query" - }, - { - "type": "string", - "name": "cluster_id", - "in": "query" - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "keyspace", - "in": "query", - "required": true - }, - { - "type": "string", - "format": "date-time", - "name": "min_date", - "in": "query" - }, - { - "type": "string", - "format": "date-time", - "name": "max_date", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Backup list", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/BackupListItem" - } - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - }, - "delete": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "string", - "name": "snapshot_tag", - "in": "query", - "required": true - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "locations", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK" - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/backups/files": { - "get": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "keyspace", - "in": "query", - "required": true - }, - { - "type": "string", - "name": "snapshot_tag", - "in": "query", - "required": true - }, - { - "type": "array", - "items": { - "type": "string" - }, - "name": "locations", - "in": "query" - }, - { - "type": "string", - "name": "cluster_id", - "in": "query" - } - ], - "responses": { - "200": { - "description": "Backup list", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/BackupFilesInfo" - } - } - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - }, - "/cluster/{cluster_id}/repairs/intensity": { - "post": { - "parameters": [ - { - "type": "string", - "name": "cluster_id", - "in": "path", - "required": true - }, - { - "type": "number", - "name": "intensity", - "in": "query", - "required": true - } - ], - "responses": { - "200": { - "description": "OK" - }, - "default": { - "description": "Unexpected error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - } - } - } - } -} diff --git a/pkg/mermaidclient/model.go b/pkg/mermaidclient/model.go deleted file mode 100644 index 182fb55fcd4..00000000000 --- a/pkg/mermaidclient/model.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (C) 2017 ScyllaDB - -package mermaidclient - -import ( - "io" - - "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// ErrorResponse is returned in case of an error. -type ErrorResponse = models.ErrorResponse - -// TableRenderer is the interface that components need to implement -// if they can render themselves as tables. -type TableRenderer interface { - Render(io.Writer) error -} - -// Cluster is cluster.Cluster representation. -type Cluster = models.Cluster - -// ClusterSlice is []*cluster.Cluster representation. -type ClusterSlice []*models.Cluster - -// ClusterStatus contains cluster status info. -type ClusterStatus models.ClusterStatus - -// Task is a scheduler.Task representation. -type Task = models.Task - -func makeTaskUpdate(t *Task) *models.TaskUpdate { - return &models.TaskUpdate{ - Type: t.Type, - Enabled: t.Enabled, - Name: t.Name, - Schedule: t.Schedule, - Tags: t.Tags, - Properties: t.Properties, - } -} - -// RepairTarget is a representing results of dry running repair task. -type RepairTarget struct { - models.RepairTarget - ShowTables int -} - -// BackupTarget is a representing results of dry running backup task. -type BackupTarget struct { - models.BackupTarget - ShowTables int -} - -// ExtendedTask is a representation of scheduler.Task with additional fields -// from scheduler.Run. -type ExtendedTask = models.ExtendedTask - -// ExtendedTaskSlice is a representation of a slice of scheduler.Task with -// additional fields from scheduler.Run. -type ExtendedTaskSlice = []*models.ExtendedTask - -// ExtendedTasks is a representation of []*scheduler.Task with additional -// fields from scheduler.Run. -type ExtendedTasks struct { - ExtendedTaskSlice - All bool -} - -// Schedule is a scheduler.Schedule representation. -type Schedule = models.Schedule - -// TaskRun is a scheduler.TaskRun representation. -type TaskRun = models.TaskRun - -// TaskRunSlice is a []*scheduler.TaskRun representation. -type TaskRunSlice []*TaskRun - -// RepairProgress contains shard progress info. -type RepairProgress struct { - *models.TaskRunRepairProgress -} - -// RepairUnitProgress contains unit progress info. -type RepairUnitProgress = models.RepairProgressHostsItems0 - -// BackupProgress contains shard progress info. -type BackupProgress = *models.TaskRunBackupProgress - -// BackupListItems is a []backup.ListItem representation. -type BackupListItems = []*models.BackupListItem diff --git a/pkg/mermaidclient/status.go b/pkg/mermaidclient/status.go deleted file mode 100644 index 56c1e1fc5bf..00000000000 --- a/pkg/mermaidclient/status.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2017 ScyllaDB - -package mermaidclient - -import ( - "github.com/go-openapi/runtime" - "github.com/pkg/errors" - "github.com/scylladb/scylla-operator/pkg/mermaidclient/internal/models" -) - -// StatusCodeOf returns HTTP status code carried by the error or it's cause. -// If not status can be found it returns 0. -func StatusCodeOf(err error) int { - err = errors.Cause(err) - switch v := err.(type) { - case interface { - Code() int - }: - return v.Code() - case *runtime.APIError: - return v.Code - } - return 0 -} - -// MessageOf returns error message embedded in returned error. -func MessageOf(err error) string { - err = errors.Cause(err) - switch v := err.(type) { - case interface { - GetPayload() *models.ErrorResponse - }: - return v.GetPayload().Message - } - return err.Error() -} diff --git a/pkg/mermaidclient/utils.go b/pkg/mermaidclient/utils.go deleted file mode 100644 index e222f05ccdb..00000000000 --- a/pkg/mermaidclient/utils.go +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (C) 2017 ScyllaDB - -package mermaidclient - -import ( - "fmt" - "io" - "math" - "net/url" - "path" - "regexp" - "strconv" - "strings" - "time" - - "github.com/go-openapi/strfmt" - "github.com/pkg/errors" - "github.com/scylladb/scylla-operator/pkg/util/duration" - "github.com/scylladb/scylla-operator/pkg/util/timeutc" - "github.com/scylladb/scylla-operator/pkg/util/uuid" -) - -const ( - nowSafety = 30 * time.Second - rfc822WithSec = "02 Jan 06 15:04:05 MST" -) - -// TaskSplit attempts to split a string into type and id. -func TaskSplit(s string) (taskType string, taskID uuid.UUID, err error) { - i := strings.LastIndex(s, "/") - if i != -1 { - taskType = s[:i] - } - taskID, err = uuid.Parse(s[i+1:]) - return -} - -// TaskJoin creates a new type id string in the form `taskType/taskId`. -func TaskJoin(taskType string, taskID interface{}) string { - return fmt.Sprint(taskType, "/", taskID) -} - -// ParseStartDate parses the supplied string as a strfmt.DateTime. -func ParseStartDate(value string) (strfmt.DateTime, error) { - now := timeutc.Now() - - if value == "now" { - return strfmt.DateTime(now.Add(nowSafety)), nil - } - - if strings.HasPrefix(value, "now") { - d, err := duration.ParseDuration(value[3:]) - if err != nil { - return strfmt.DateTime{}, err - } - if d < 0 { - return strfmt.DateTime(time.Time{}), errors.New("start date cannot be in the past") - } - if d.Duration() < nowSafety { - return strfmt.DateTime(time.Time{}), errors.Errorf("start date must be at least in %s", nowSafety) - } - return strfmt.DateTime(now.Add(d.Duration())), nil - } - - // No more heuristics, assume the user passed a date formatted string - t, err := timeutc.Parse(time.RFC3339, value) - if err != nil { - return strfmt.DateTime(t), err - } - if t.Before(now) { - return strfmt.DateTime(time.Time{}), errors.New("start date cannot be in the past") - } - if t.Before(now.Add(nowSafety)) { - return strfmt.DateTime(time.Time{}), errors.Errorf("start date must be at least in %s", nowSafety) - } - return strfmt.DateTime(t), nil -} - -// ParseDate parses the supplied string as a strfmt.DateTime. -func ParseDate(value string) (strfmt.DateTime, error) { - now := timeutc.Now() - - if value == "now" { - return strfmt.DateTime(now), nil - } - - if strings.HasPrefix(value, "now") { - d, err := duration.ParseDuration(value[3:]) - if err != nil { - return strfmt.DateTime{}, err - } - return strfmt.DateTime(now.Add(d.Duration())), nil - } - - // No more heuristics, assume the user passed a date formatted string - t, err := timeutc.Parse(time.RFC3339, value) - if err != nil { - return strfmt.DateTime(t), err - } - return strfmt.DateTime(t), nil -} - -func uuidFromLocation(location string) (uuid.UUID, error) { - l, err := url.Parse(location) - if err != nil { - return uuid.Nil, err - } - _, id := path.Split(l.Path) - - return uuid.Parse(id) -} - -// FormatProgress creates complete vs. failed representation. -func FormatProgress(complete, failed float32) string { - if failed == 0 { - return FormatPercent(complete) - } - return FormatPercent(complete) + " / " + FormatPercent(failed) -} - -// FormatPercent simply creates a percent representation of the supplied value. -func FormatPercent(p float32) string { - return fmt.Sprintf("%0.2f%%", p) -} - -// FormatUploadProgress calculates percentage of success and failed uploads -func FormatUploadProgress(size, uploaded, skipped, failed int64) string { - if size == 0 { - return "100%" - } - transferred := uploaded + skipped - out := fmt.Sprintf("%d%%", - transferred*100/size, - ) - if failed > 0 { - out += fmt.Sprintf("/%d%%", failed*100/size) - } - return out -} - -// ByteCountBinary returns string representation of the byte count with proper -// unit appended if withUnit is true. -func ByteCountBinary(b int64) string { - const unit = 1024 - if b < unit { - return fmt.Sprintf("%dB", b) - } - div, exp := int64(unit), 0 - for n := b / unit; n >= unit; n /= unit { - div *= unit - exp++ - } - // One decimal by default, two decimals for GiB and three for more than - // that. - format := "%.0f%ciB" - if exp == 2 { - format = "%.2f%ciB" - } else if exp > 2 { - format = "%.3f%ciB" - } - return fmt.Sprintf(format, float64(b)/float64(div), "KMGTPE"[exp]) -} - -// FormatTime formats the supplied DateTime in `02 Jan 06 15:04:05 MST` format. -func FormatTime(t strfmt.DateTime) string { - if isZero(t) { - return "" - } - return time.Time(t).Local().Format(rfc822WithSec) -} - -// FormatDuration creates and formats the duration between -// the supplied DateTime values. -func FormatDuration(t0, t1 strfmt.DateTime) string { - if isZero(t0) && isZero(t1) { - return "0s" - } - var d time.Duration - if isZero(t1) { - d = timeutc.Now().Sub(time.Time(t0)) - } else { - d = time.Time(t1).Sub(time.Time(t0)) - } - - return fmt.Sprint(d.Truncate(time.Second)) -} - -func isZero(t strfmt.DateTime) bool { - return time.Time(t).IsZero() -} - -// FormatError formats messages created by using multierror with -// errors wrapped with host IP so that each host error is in it's own line. -// It also adds "failed to" prefix if needed. -func FormatError(msg string) string { - const prefix = " " - - // Fairly relaxed IPv4 and IPv6 heuristic pattern, a proper pattern can - // be very complex - const ipRegex = `([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(\d{1,3}\.){3}\d{1,3}` - - // Move host errors to newline - r := regexp.MustCompile(`(^|: |; )(` + ipRegex + `): `) - msg = r.ReplaceAllString(msg, "\n"+prefix+"${2}: ") - - // Add "failed to" prefix if needed - if !strings.HasPrefix(msg, "failed to") && !strings.HasPrefix(msg, "\n") { - msg = "failed to " + msg - } - - return msg -} - -// FormatTables returns tables listing if number of tables is lower than -// threshold. It prints (n tables) or (table_a, table_b, ...). -func FormatTables(threshold int, tables []string, all bool) string { - var out string - if len(tables) == 0 || threshold == 0 || (threshold > 0 && len(tables) > threshold) { - if len(tables) == 1 { - out = "(1 table)" - } else { - out = fmt.Sprintf("(%d tables)", len(tables)) - } - } - if out == "" { - out = "(" + strings.Join(tables, ", ") + ")" - } - if all { - out = "all " + out - } - return out -} - -// FormatClusterName writes cluster name and id to the writer. -func FormatClusterName(w io.Writer, c *Cluster) { - fmt.Fprintf(w, "Cluster: %s (%s)\n", c.Name, c.ID) -} - -// StringByteCount returns string representation of the byte count with proper -// unit. -func StringByteCount(b int64) string { - const unit = 1024 - if b < unit { - return fmt.Sprintf("%dB", b) - } - div, exp := int64(unit), 0 - for n := b / unit; n >= unit; n /= unit { - div *= unit - exp++ - } - // No decimals by default, two decimals for GiB and three for more than - // that. - format := "%.0f%ciB" - if exp == 2 { - format = "%.2f%ciB" - } else if exp > 2 { - format = "%.3f%ciB" - } - return fmt.Sprintf(format, float64(b)/float64(div), "KMGTPE"[exp]) -} - -var ( - byteCountRe = regexp.MustCompile(`([0-9]+(?:\.[0-9]+)?)(B|[KMGTPE]iB)`) - byteCountReValueIdx = 1 - byteCountReSuffixIdx = 2 -) - -// ParseByteCount returns byte count parsed from input string. -// This is opposite of StringByteCount function. -func ParseByteCount(s string) (int64, error) { - const unit = 1024 - var exps = []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"} - parts := byteCountRe.FindStringSubmatch(s) - if len(parts) != 3 { - return 0, errors.Errorf("invalid byte size string: %q; it must be real number with unit suffix: %s", s, strings.Join(exps, ",")) - } - - v, err := strconv.ParseFloat(parts[byteCountReValueIdx], 64) - if err != nil { - return 0, errors.Wrapf(err, "parsing value for byte size string: %s", s) - } - - pow := 0 - for i, e := range exps { - if e == parts[byteCountReSuffixIdx] { - pow = i - } - } - - mul := math.Pow(unit, float64(pow)) - - return int64(v * mul), nil -}