repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cloud/cloud_target_delete_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cloud/cloud_target_delete_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package cloud // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewCloudTargetDeleteParams creates a new CloudTargetDeleteParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewCloudTargetDeleteParams() *CloudTargetDeleteParams { return &CloudTargetDeleteParams{ timeout: cr.DefaultTimeout, } } // NewCloudTargetDeleteParamsWithTimeout creates a new CloudTargetDeleteParams object // with the ability to set a timeout on a request. func NewCloudTargetDeleteParamsWithTimeout(timeout time.Duration) *CloudTargetDeleteParams { return &CloudTargetDeleteParams{ timeout: timeout, } } // NewCloudTargetDeleteParamsWithContext creates a new CloudTargetDeleteParams object // with the ability to set a context for a request. func NewCloudTargetDeleteParamsWithContext(ctx context.Context) *CloudTargetDeleteParams { return &CloudTargetDeleteParams{ Context: ctx, } } // NewCloudTargetDeleteParamsWithHTTPClient creates a new CloudTargetDeleteParams object // with the ability to set a custom HTTPClient for a request. func NewCloudTargetDeleteParamsWithHTTPClient(client *http.Client) *CloudTargetDeleteParams { return &CloudTargetDeleteParams{ HTTPClient: client, } } /* CloudTargetDeleteParams contains all the parameters to send to the API endpoint for the cloud target delete operation. Typically these are written to a http.Request. */ type CloudTargetDeleteParams struct { /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. Cloud target UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the cloud target delete params (not the query body). // // All values with no default are reset to their zero value. func (o *CloudTargetDeleteParams) WithDefaults() *CloudTargetDeleteParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the cloud target delete params (not the query body). // // All values with no default are reset to their zero value. func (o *CloudTargetDeleteParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := CloudTargetDeleteParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the cloud target delete params func (o *CloudTargetDeleteParams) WithTimeout(timeout time.Duration) *CloudTargetDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the cloud target delete params func (o *CloudTargetDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the cloud target delete params func (o *CloudTargetDeleteParams) WithContext(ctx context.Context) *CloudTargetDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the cloud target delete params func (o *CloudTargetDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the cloud target delete params func (o *CloudTargetDeleteParams) WithHTTPClient(client *http.Client) *CloudTargetDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the cloud target delete params func (o *CloudTargetDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithReturnTimeout adds the returnTimeout to the cloud target delete params func (o *CloudTargetDeleteParams) WithReturnTimeout(returnTimeout *int64) *CloudTargetDeleteParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the cloud target delete params func (o *CloudTargetDeleteParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the cloud target delete params func (o *CloudTargetDeleteParams) WithUUID(uuid string) *CloudTargetDeleteParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the cloud target delete params func (o *CloudTargetDeleteParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *CloudTargetDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cloud/cloud_target_create_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cloud/cloud_target_create_responses.go
// Code generated by go-swagger; DO NOT EDIT. package cloud // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // CloudTargetCreateReader is a Reader for the CloudTargetCreate structure. type CloudTargetCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *CloudTargetCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewCloudTargetCreateAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewCloudTargetCreateDefault(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 } } // NewCloudTargetCreateAccepted creates a CloudTargetCreateAccepted with default headers values func NewCloudTargetCreateAccepted() *CloudTargetCreateAccepted { return &CloudTargetCreateAccepted{} } /* CloudTargetCreateAccepted describes a response with status code 202, with default header values. Accepted */ type CloudTargetCreateAccepted struct { /* Useful for tracking the resource location */ Location string Payload *models.JobLinkResponse } // IsSuccess returns true when this cloud target create accepted response has a 2xx status code func (o *CloudTargetCreateAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this cloud target create accepted response has a 3xx status code func (o *CloudTargetCreateAccepted) IsRedirect() bool { return false } // IsClientError returns true when this cloud target create accepted response has a 4xx status code func (o *CloudTargetCreateAccepted) IsClientError() bool { return false } // IsServerError returns true when this cloud target create accepted response has a 5xx status code func (o *CloudTargetCreateAccepted) IsServerError() bool { return false } // IsCode returns true when this cloud target create accepted response a status code equal to that given func (o *CloudTargetCreateAccepted) IsCode(code int) bool { return code == 202 } func (o *CloudTargetCreateAccepted) Error() string { return fmt.Sprintf("[POST /cloud/targets][%d] cloudTargetCreateAccepted %+v", 202, o.Payload) } func (o *CloudTargetCreateAccepted) String() string { return fmt.Sprintf("[POST /cloud/targets][%d] cloudTargetCreateAccepted %+v", 202, o.Payload) } func (o *CloudTargetCreateAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *CloudTargetCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Location hdrLocation := response.GetHeader("Location") if hdrLocation != "" { o.Location = hdrLocation } o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewCloudTargetCreateDefault creates a CloudTargetCreateDefault with default headers values func NewCloudTargetCreateDefault(code int) *CloudTargetCreateDefault { return &CloudTargetCreateDefault{ _statusCode: code, } } /* CloudTargetCreateDefault describes a response with status code -1, with default header values. Error */ type CloudTargetCreateDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the cloud target create default response func (o *CloudTargetCreateDefault) Code() int { return o._statusCode } // IsSuccess returns true when this cloud target create default response has a 2xx status code func (o *CloudTargetCreateDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this cloud target create default response has a 3xx status code func (o *CloudTargetCreateDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this cloud target create default response has a 4xx status code func (o *CloudTargetCreateDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this cloud target create default response has a 5xx status code func (o *CloudTargetCreateDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this cloud target create default response a status code equal to that given func (o *CloudTargetCreateDefault) IsCode(code int) bool { return o._statusCode == code } func (o *CloudTargetCreateDefault) Error() string { return fmt.Sprintf("[POST /cloud/targets][%d] cloud_target_create default %+v", o._statusCode, o.Payload) } func (o *CloudTargetCreateDefault) String() string { return fmt.Sprintf("[POST /cloud/targets][%d] cloud_target_create default %+v", o._statusCode, o.Payload) } func (o *CloudTargetCreateDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *CloudTargetCreateDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cloud/cloud_target_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/cloud/cloud_target_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package cloud // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // CloudTargetCollectionGetReader is a Reader for the CloudTargetCollectionGet structure. type CloudTargetCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *CloudTargetCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewCloudTargetCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewCloudTargetCollectionGetDefault(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 } } // NewCloudTargetCollectionGetOK creates a CloudTargetCollectionGetOK with default headers values func NewCloudTargetCollectionGetOK() *CloudTargetCollectionGetOK { return &CloudTargetCollectionGetOK{} } /* CloudTargetCollectionGetOK describes a response with status code 200, with default header values. OK */ type CloudTargetCollectionGetOK struct { Payload *models.CloudTargetResponse } // IsSuccess returns true when this cloud target collection get o k response has a 2xx status code func (o *CloudTargetCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this cloud target collection get o k response has a 3xx status code func (o *CloudTargetCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this cloud target collection get o k response has a 4xx status code func (o *CloudTargetCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this cloud target collection get o k response has a 5xx status code func (o *CloudTargetCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this cloud target collection get o k response a status code equal to that given func (o *CloudTargetCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *CloudTargetCollectionGetOK) Error() string { return fmt.Sprintf("[GET /cloud/targets][%d] cloudTargetCollectionGetOK %+v", 200, o.Payload) } func (o *CloudTargetCollectionGetOK) String() string { return fmt.Sprintf("[GET /cloud/targets][%d] cloudTargetCollectionGetOK %+v", 200, o.Payload) } func (o *CloudTargetCollectionGetOK) GetPayload() *models.CloudTargetResponse { return o.Payload } func (o *CloudTargetCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.CloudTargetResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewCloudTargetCollectionGetDefault creates a CloudTargetCollectionGetDefault with default headers values func NewCloudTargetCollectionGetDefault(code int) *CloudTargetCollectionGetDefault { return &CloudTargetCollectionGetDefault{ _statusCode: code, } } /* CloudTargetCollectionGetDefault describes a response with status code -1, with default header values. Error */ type CloudTargetCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the cloud target collection get default response func (o *CloudTargetCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this cloud target collection get default response has a 2xx status code func (o *CloudTargetCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this cloud target collection get default response has a 3xx status code func (o *CloudTargetCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this cloud target collection get default response has a 4xx status code func (o *CloudTargetCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this cloud target collection get default response has a 5xx status code func (o *CloudTargetCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this cloud target collection get default response a status code equal to that given func (o *CloudTargetCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *CloudTargetCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /cloud/targets][%d] cloud_target_collection_get default %+v", o._statusCode, o.Payload) } func (o *CloudTargetCollectionGetDefault) String() string { return fmt.Sprintf("[GET /cloud/targets][%d] cloud_target_collection_get default %+v", o._statusCode, o.Payload) } func (o *CloudTargetCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *CloudTargetCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmGetReader is a Reader for the SvmGet structure. type SvmGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmGetDefault(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 } } // NewSvmGetOK creates a SvmGetOK with default headers values func NewSvmGetOK() *SvmGetOK { return &SvmGetOK{} } /* SvmGetOK describes a response with status code 200, with default header values. OK */ type SvmGetOK struct { Payload *models.Svm } // IsSuccess returns true when this svm get o k response has a 2xx status code func (o *SvmGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm get o k response has a 3xx status code func (o *SvmGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm get o k response has a 4xx status code func (o *SvmGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm get o k response has a 5xx status code func (o *SvmGetOK) IsServerError() bool { return false } // IsCode returns true when this svm get o k response a status code equal to that given func (o *SvmGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmGetOK) Error() string { return fmt.Sprintf("[GET /svm/svms/{uuid}][%d] svmGetOK %+v", 200, o.Payload) } func (o *SvmGetOK) String() string { return fmt.Sprintf("[GET /svm/svms/{uuid}][%d] svmGetOK %+v", 200, o.Payload) } func (o *SvmGetOK) GetPayload() *models.Svm { return o.Payload } func (o *SvmGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Svm) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmGetDefault creates a SvmGetDefault with default headers values func NewSvmGetDefault(code int) *SvmGetDefault { return &SvmGetDefault{ _statusCode: code, } } /* SvmGetDefault describes a response with status code -1, with default header values. Error */ type SvmGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm get default response func (o *SvmGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm get default response has a 2xx status code func (o *SvmGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm get default response has a 3xx status code func (o *SvmGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm get default response has a 4xx status code func (o *SvmGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm get default response has a 5xx status code func (o *SvmGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm get default response a status code equal to that given func (o *SvmGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmGetDefault) Error() string { return fmt.Sprintf("[GET /svm/svms/{uuid}][%d] svm_get default %+v", o._statusCode, o.Payload) } func (o *SvmGetDefault) String() string { return fmt.Sprintf("[GET /svm/svms/{uuid}][%d] svm_get default %+v", o._statusCode, o.Payload) } func (o *SvmGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmMigrationGetParams creates a new SvmMigrationGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmMigrationGetParams() *SvmMigrationGetParams { return &SvmMigrationGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmMigrationGetParamsWithTimeout creates a new SvmMigrationGetParams object // with the ability to set a timeout on a request. func NewSvmMigrationGetParamsWithTimeout(timeout time.Duration) *SvmMigrationGetParams { return &SvmMigrationGetParams{ timeout: timeout, } } // NewSvmMigrationGetParamsWithContext creates a new SvmMigrationGetParams object // with the ability to set a context for a request. func NewSvmMigrationGetParamsWithContext(ctx context.Context) *SvmMigrationGetParams { return &SvmMigrationGetParams{ Context: ctx, } } // NewSvmMigrationGetParamsWithHTTPClient creates a new SvmMigrationGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmMigrationGetParamsWithHTTPClient(client *http.Client) *SvmMigrationGetParams { return &SvmMigrationGetParams{ HTTPClient: client, } } /* SvmMigrationGetParams contains all the parameters to send to the API endpoint for the svm migration get operation. Typically these are written to a http.Request. */ type SvmMigrationGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* UUID. Migration UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm migration get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationGetParams) WithDefaults() *SvmMigrationGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm migration get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationGetParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the svm migration get params func (o *SvmMigrationGetParams) WithTimeout(timeout time.Duration) *SvmMigrationGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm migration get params func (o *SvmMigrationGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm migration get params func (o *SvmMigrationGetParams) WithContext(ctx context.Context) *SvmMigrationGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm migration get params func (o *SvmMigrationGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm migration get params func (o *SvmMigrationGetParams) WithHTTPClient(client *http.Client) *SvmMigrationGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm migration get params func (o *SvmMigrationGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the svm migration get params func (o *SvmMigrationGetParams) WithFields(fields []string) *SvmMigrationGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm migration get params func (o *SvmMigrationGetParams) SetFields(fields []string) { o.Fields = fields } // WithUUID adds the uuid to the svm migration get params func (o *SvmMigrationGetParams) WithUUID(uuid string) *SvmMigrationGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm migration get params func (o *SvmMigrationGetParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmMigrationGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSvmMigrationGet binds the parameter fields func (o *SvmMigrationGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/web_svm_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/web_svm_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewWebSvmGetParams creates a new WebSvmGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewWebSvmGetParams() *WebSvmGetParams { return &WebSvmGetParams{ timeout: cr.DefaultTimeout, } } // NewWebSvmGetParamsWithTimeout creates a new WebSvmGetParams object // with the ability to set a timeout on a request. func NewWebSvmGetParamsWithTimeout(timeout time.Duration) *WebSvmGetParams { return &WebSvmGetParams{ timeout: timeout, } } // NewWebSvmGetParamsWithContext creates a new WebSvmGetParams object // with the ability to set a context for a request. func NewWebSvmGetParamsWithContext(ctx context.Context) *WebSvmGetParams { return &WebSvmGetParams{ Context: ctx, } } // NewWebSvmGetParamsWithHTTPClient creates a new WebSvmGetParams object // with the ability to set a custom HTTPClient for a request. func NewWebSvmGetParamsWithHTTPClient(client *http.Client) *WebSvmGetParams { return &WebSvmGetParams{ HTTPClient: client, } } /* WebSvmGetParams contains all the parameters to send to the API endpoint for the web svm get operation. Typically these are written to a http.Request. */ type WebSvmGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* SvmUUID. UUID of the SVM to which this object belongs. */ SvmUUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the web svm get params (not the query body). // // All values with no default are reset to their zero value. func (o *WebSvmGetParams) WithDefaults() *WebSvmGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the web svm get params (not the query body). // // All values with no default are reset to their zero value. func (o *WebSvmGetParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the web svm get params func (o *WebSvmGetParams) WithTimeout(timeout time.Duration) *WebSvmGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the web svm get params func (o *WebSvmGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the web svm get params func (o *WebSvmGetParams) WithContext(ctx context.Context) *WebSvmGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the web svm get params func (o *WebSvmGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the web svm get params func (o *WebSvmGetParams) WithHTTPClient(client *http.Client) *WebSvmGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the web svm get params func (o *WebSvmGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the web svm get params func (o *WebSvmGetParams) WithFields(fields []string) *WebSvmGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the web svm get params func (o *WebSvmGetParams) SetFields(fields []string) { o.Fields = fields } // WithSvmUUID adds the svmUUID to the web svm get params func (o *WebSvmGetParams) WithSvmUUID(svmUUID string) *WebSvmGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the web svm get params func (o *WebSvmGetParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WriteToRequest writes these params to a swagger request func (o *WebSvmGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamWebSvmGet binds the parameter fields func (o *WebSvmGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_create_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_create_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmMigrationCreateReader is a Reader for the SvmMigrationCreate structure. type SvmMigrationCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmMigrationCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmMigrationCreateAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmMigrationCreateDefault(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 } } // NewSvmMigrationCreateAccepted creates a SvmMigrationCreateAccepted with default headers values func NewSvmMigrationCreateAccepted() *SvmMigrationCreateAccepted { return &SvmMigrationCreateAccepted{} } /* SvmMigrationCreateAccepted describes a response with status code 202, with default header values. Accepted */ type SvmMigrationCreateAccepted struct { /* Useful for tracking the resource location */ Location string Payload *models.SvmMigrationCreate } // IsSuccess returns true when this svm migration create accepted response has a 2xx status code func (o *SvmMigrationCreateAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm migration create accepted response has a 3xx status code func (o *SvmMigrationCreateAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm migration create accepted response has a 4xx status code func (o *SvmMigrationCreateAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm migration create accepted response has a 5xx status code func (o *SvmMigrationCreateAccepted) IsServerError() bool { return false } // IsCode returns true when this svm migration create accepted response a status code equal to that given func (o *SvmMigrationCreateAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmMigrationCreateAccepted) Error() string { return fmt.Sprintf("[POST /svm/migrations][%d] svmMigrationCreateAccepted %+v", 202, o.Payload) } func (o *SvmMigrationCreateAccepted) String() string { return fmt.Sprintf("[POST /svm/migrations][%d] svmMigrationCreateAccepted %+v", 202, o.Payload) } func (o *SvmMigrationCreateAccepted) GetPayload() *models.SvmMigrationCreate { return o.Payload } func (o *SvmMigrationCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Location hdrLocation := response.GetHeader("Location") if hdrLocation != "" { o.Location = hdrLocation } o.Payload = new(models.SvmMigrationCreate) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmMigrationCreateDefault creates a SvmMigrationCreateDefault with default headers values func NewSvmMigrationCreateDefault(code int) *SvmMigrationCreateDefault { return &SvmMigrationCreateDefault{ _statusCode: code, } } /* SvmMigrationCreateDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 262245 | The value provided is invalid. | | 13172746 | SVM migration cannot be started. This is a generic code, see the response message for details. | */ type SvmMigrationCreateDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm migration create default response func (o *SvmMigrationCreateDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm migration create default response has a 2xx status code func (o *SvmMigrationCreateDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm migration create default response has a 3xx status code func (o *SvmMigrationCreateDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm migration create default response has a 4xx status code func (o *SvmMigrationCreateDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm migration create default response has a 5xx status code func (o *SvmMigrationCreateDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm migration create default response a status code equal to that given func (o *SvmMigrationCreateDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmMigrationCreateDefault) Error() string { return fmt.Sprintf("[POST /svm/migrations][%d] svm_migration_create default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationCreateDefault) String() string { return fmt.Sprintf("[POST /svm/migrations][%d] svm_migration_create default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationCreateDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmMigrationCreateDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_instance_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_instance_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerPermissionInstanceGetReader is a Reader for the SvmPeerPermissionInstanceGet structure. type SvmPeerPermissionInstanceGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerPermissionInstanceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmPeerPermissionInstanceGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerPermissionInstanceGetDefault(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 } } // NewSvmPeerPermissionInstanceGetOK creates a SvmPeerPermissionInstanceGetOK with default headers values func NewSvmPeerPermissionInstanceGetOK() *SvmPeerPermissionInstanceGetOK { return &SvmPeerPermissionInstanceGetOK{} } /* SvmPeerPermissionInstanceGetOK describes a response with status code 200, with default header values. OK */ type SvmPeerPermissionInstanceGetOK struct { Payload *models.SvmPeerPermission } // IsSuccess returns true when this svm peer permission instance get o k response has a 2xx status code func (o *SvmPeerPermissionInstanceGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer permission instance get o k response has a 3xx status code func (o *SvmPeerPermissionInstanceGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm peer permission instance get o k response has a 4xx status code func (o *SvmPeerPermissionInstanceGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm peer permission instance get o k response has a 5xx status code func (o *SvmPeerPermissionInstanceGetOK) IsServerError() bool { return false } // IsCode returns true when this svm peer permission instance get o k response a status code equal to that given func (o *SvmPeerPermissionInstanceGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmPeerPermissionInstanceGetOK) Error() string { return fmt.Sprintf("[GET /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svmPeerPermissionInstanceGetOK %+v", 200, o.Payload) } func (o *SvmPeerPermissionInstanceGetOK) String() string { return fmt.Sprintf("[GET /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svmPeerPermissionInstanceGetOK %+v", 200, o.Payload) } func (o *SvmPeerPermissionInstanceGetOK) GetPayload() *models.SvmPeerPermission { return o.Payload } func (o *SvmPeerPermissionInstanceGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmPeerPermission) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmPeerPermissionInstanceGetDefault creates a SvmPeerPermissionInstanceGetDefault with default headers values func NewSvmPeerPermissionInstanceGetDefault(code int) *SvmPeerPermissionInstanceGetDefault { return &SvmPeerPermissionInstanceGetDefault{ _statusCode: code, } } /* SvmPeerPermissionInstanceGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 26345574 | Failed to find the SVM or volume name with UUID. | ``` <br/> */ type SvmPeerPermissionInstanceGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer permission instance get default response func (o *SvmPeerPermissionInstanceGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer permission instance get default response has a 2xx status code func (o *SvmPeerPermissionInstanceGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer permission instance get default response has a 3xx status code func (o *SvmPeerPermissionInstanceGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer permission instance get default response has a 4xx status code func (o *SvmPeerPermissionInstanceGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer permission instance get default response has a 5xx status code func (o *SvmPeerPermissionInstanceGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer permission instance get default response a status code equal to that given func (o *SvmPeerPermissionInstanceGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerPermissionInstanceGetDefault) Error() string { return fmt.Sprintf("[GET /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svm_peer_permission_instance_get default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionInstanceGetDefault) String() string { return fmt.Sprintf("[GET /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svm_peer_permission_instance_get default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionInstanceGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerPermissionInstanceGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_modify_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_modify_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSvmModifyParams creates a new SvmModifyParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmModifyParams() *SvmModifyParams { return &SvmModifyParams{ timeout: cr.DefaultTimeout, } } // NewSvmModifyParamsWithTimeout creates a new SvmModifyParams object // with the ability to set a timeout on a request. func NewSvmModifyParamsWithTimeout(timeout time.Duration) *SvmModifyParams { return &SvmModifyParams{ timeout: timeout, } } // NewSvmModifyParamsWithContext creates a new SvmModifyParams object // with the ability to set a context for a request. func NewSvmModifyParamsWithContext(ctx context.Context) *SvmModifyParams { return &SvmModifyParams{ Context: ctx, } } // NewSvmModifyParamsWithHTTPClient creates a new SvmModifyParams object // with the ability to set a custom HTTPClient for a request. func NewSvmModifyParamsWithHTTPClient(client *http.Client) *SvmModifyParams { return &SvmModifyParams{ HTTPClient: client, } } /* SvmModifyParams contains all the parameters to send to the API endpoint for the svm modify operation. Typically these are written to a http.Request. */ type SvmModifyParams struct { /* Info. Info specification */ Info *models.Svm /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. Filter by UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmModifyParams) WithDefaults() *SvmModifyParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmModifyParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := SvmModifyParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm modify params func (o *SvmModifyParams) WithTimeout(timeout time.Duration) *SvmModifyParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm modify params func (o *SvmModifyParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm modify params func (o *SvmModifyParams) WithContext(ctx context.Context) *SvmModifyParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm modify params func (o *SvmModifyParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm modify params func (o *SvmModifyParams) WithHTTPClient(client *http.Client) *SvmModifyParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm modify params func (o *SvmModifyParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the svm modify params func (o *SvmModifyParams) WithInfo(info *models.Svm) *SvmModifyParams { o.SetInfo(info) return o } // SetInfo adds the info to the svm modify params func (o *SvmModifyParams) SetInfo(info *models.Svm) { o.Info = info } // WithReturnTimeout adds the returnTimeout to the svm modify params func (o *SvmModifyParams) WithReturnTimeout(returnTimeout *int64) *SvmModifyParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm modify params func (o *SvmModifyParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the svm modify params func (o *SvmModifyParams) WithUUID(uuid string) *SvmModifyParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm modify params func (o *SvmModifyParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/web_svm_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/web_svm_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // WebSvmGetReader is a Reader for the WebSvmGet structure. type WebSvmGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *WebSvmGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewWebSvmGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewWebSvmGetDefault(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 } } // NewWebSvmGetOK creates a WebSvmGetOK with default headers values func NewWebSvmGetOK() *WebSvmGetOK { return &WebSvmGetOK{} } /* WebSvmGetOK describes a response with status code 200, with default header values. OK */ type WebSvmGetOK struct { Payload *models.WebSvm } // IsSuccess returns true when this web svm get o k response has a 2xx status code func (o *WebSvmGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this web svm get o k response has a 3xx status code func (o *WebSvmGetOK) IsRedirect() bool { return false } // IsClientError returns true when this web svm get o k response has a 4xx status code func (o *WebSvmGetOK) IsClientError() bool { return false } // IsServerError returns true when this web svm get o k response has a 5xx status code func (o *WebSvmGetOK) IsServerError() bool { return false } // IsCode returns true when this web svm get o k response a status code equal to that given func (o *WebSvmGetOK) IsCode(code int) bool { return code == 200 } func (o *WebSvmGetOK) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/web][%d] webSvmGetOK %+v", 200, o.Payload) } func (o *WebSvmGetOK) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/web][%d] webSvmGetOK %+v", 200, o.Payload) } func (o *WebSvmGetOK) GetPayload() *models.WebSvm { return o.Payload } func (o *WebSvmGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.WebSvm) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewWebSvmGetDefault creates a WebSvmGetDefault with default headers values func NewWebSvmGetDefault(code int) *WebSvmGetDefault { return &WebSvmGetDefault{ _statusCode: code, } } /* WebSvmGetDefault describes a response with status code -1, with default header values. Error */ type WebSvmGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the web svm get default response func (o *WebSvmGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this web svm get default response has a 2xx status code func (o *WebSvmGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this web svm get default response has a 3xx status code func (o *WebSvmGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this web svm get default response has a 4xx status code func (o *WebSvmGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this web svm get default response has a 5xx status code func (o *WebSvmGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this web svm get default response a status code equal to that given func (o *WebSvmGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *WebSvmGetDefault) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/web][%d] web_svm_get default %+v", o._statusCode, o.Payload) } func (o *WebSvmGetDefault) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/web][%d] web_svm_get default %+v", o._statusCode, o.Payload) } func (o *WebSvmGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *WebSvmGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerPermissionCollectionGetReader is a Reader for the SvmPeerPermissionCollectionGet structure. type SvmPeerPermissionCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerPermissionCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmPeerPermissionCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerPermissionCollectionGetDefault(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 } } // NewSvmPeerPermissionCollectionGetOK creates a SvmPeerPermissionCollectionGetOK with default headers values func NewSvmPeerPermissionCollectionGetOK() *SvmPeerPermissionCollectionGetOK { return &SvmPeerPermissionCollectionGetOK{} } /* SvmPeerPermissionCollectionGetOK describes a response with status code 200, with default header values. OK */ type SvmPeerPermissionCollectionGetOK struct { Payload *models.SvmPeerPermissionResponse } // IsSuccess returns true when this svm peer permission collection get o k response has a 2xx status code func (o *SvmPeerPermissionCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer permission collection get o k response has a 3xx status code func (o *SvmPeerPermissionCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm peer permission collection get o k response has a 4xx status code func (o *SvmPeerPermissionCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm peer permission collection get o k response has a 5xx status code func (o *SvmPeerPermissionCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this svm peer permission collection get o k response a status code equal to that given func (o *SvmPeerPermissionCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmPeerPermissionCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/peer-permissions][%d] svmPeerPermissionCollectionGetOK %+v", 200, o.Payload) } func (o *SvmPeerPermissionCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/peer-permissions][%d] svmPeerPermissionCollectionGetOK %+v", 200, o.Payload) } func (o *SvmPeerPermissionCollectionGetOK) GetPayload() *models.SvmPeerPermissionResponse { return o.Payload } func (o *SvmPeerPermissionCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmPeerPermissionResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmPeerPermissionCollectionGetDefault creates a SvmPeerPermissionCollectionGetDefault with default headers values func NewSvmPeerPermissionCollectionGetDefault(code int) *SvmPeerPermissionCollectionGetDefault { return &SvmPeerPermissionCollectionGetDefault{ _statusCode: code, } } /* SvmPeerPermissionCollectionGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 26345574 | Failed to find the SVM or volume name with UUID. | ``` <br/> */ type SvmPeerPermissionCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer permission collection get default response func (o *SvmPeerPermissionCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer permission collection get default response has a 2xx status code func (o *SvmPeerPermissionCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer permission collection get default response has a 3xx status code func (o *SvmPeerPermissionCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer permission collection get default response has a 4xx status code func (o *SvmPeerPermissionCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer permission collection get default response has a 5xx status code func (o *SvmPeerPermissionCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer permission collection get default response a status code equal to that given func (o *SvmPeerPermissionCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerPermissionCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/peer-permissions][%d] svm_peer_permission_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/peer-permissions][%d] svm_peer_permission_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerPermissionCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmMigrationCollectionGetParams creates a new SvmMigrationCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmMigrationCollectionGetParams() *SvmMigrationCollectionGetParams { return &SvmMigrationCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmMigrationCollectionGetParamsWithTimeout creates a new SvmMigrationCollectionGetParams object // with the ability to set a timeout on a request. func NewSvmMigrationCollectionGetParamsWithTimeout(timeout time.Duration) *SvmMigrationCollectionGetParams { return &SvmMigrationCollectionGetParams{ timeout: timeout, } } // NewSvmMigrationCollectionGetParamsWithContext creates a new SvmMigrationCollectionGetParams object // with the ability to set a context for a request. func NewSvmMigrationCollectionGetParamsWithContext(ctx context.Context) *SvmMigrationCollectionGetParams { return &SvmMigrationCollectionGetParams{ Context: ctx, } } // NewSvmMigrationCollectionGetParamsWithHTTPClient creates a new SvmMigrationCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmMigrationCollectionGetParamsWithHTTPClient(client *http.Client) *SvmMigrationCollectionGetParams { return &SvmMigrationCollectionGetParams{ HTTPClient: client, } } /* SvmMigrationCollectionGetParams contains all the parameters to send to the API endpoint for the svm migration collection get operation. Typically these are written to a http.Request. */ type SvmMigrationCollectionGetParams struct { /* AutoCutover. Filter by auto_cutover */ AutoCutover *bool /* AutoSourceCleanup. Filter by auto_source_cleanup */ AutoSourceCleanup *bool /* CurrentOperation. Filter by current_operation */ CurrentOperation *string /* DestinationIpspaceName. Filter by destination.ipspace.name */ DestinationIpspaceName *string /* DestinationIpspaceUUID. Filter by destination.ipspace.uuid */ DestinationIpspaceUUID *string /* Fields. Specify the fields to return. */ Fields []string /* LastFailedState. Filter by last_failed_state */ LastFailedState *string /* LastOperation. Filter by last_operation */ LastOperation *string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* MessagesCode. Filter by messages.code */ MessagesCode *string /* MessagesMessage. Filter by messages.message */ MessagesMessage *string /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* PointOfNoReturn. Filter by point_of_no_return */ PointOfNoReturn *bool /* RestartCount. Filter by restart_count */ RestartCount *int64 /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SourceClusterName. Filter by source.cluster.name */ SourceClusterName *string /* SourceClusterUUID. Filter by source.cluster.uuid */ SourceClusterUUID *string /* SourceSvmName. Filter by source.svm.name */ SourceSvmName *string /* SourceSvmUUID. Filter by source.svm.uuid */ SourceSvmUUID *string /* State. Filter by state */ State *string /* Throttle. Filter by throttle */ Throttle *int64 /* TimeMetricsCutoverCompleteTime. Filter by time_metrics.cutover_complete_time */ TimeMetricsCutoverCompleteTime *string /* TimeMetricsCutoverStartTime. Filter by time_metrics.cutover_start_time */ TimeMetricsCutoverStartTime *string /* TimeMetricsCutoverTriggerTime. Filter by time_metrics.cutover_trigger_time */ TimeMetricsCutoverTriggerTime *string /* TimeMetricsEndTime. Filter by time_metrics.end_time */ TimeMetricsEndTime *string /* TimeMetricsLastPauseTime. Filter by time_metrics.last_pause_time */ TimeMetricsLastPauseTime *string /* TimeMetricsLastResumeTime. Filter by time_metrics.last_resume_time */ TimeMetricsLastResumeTime *string /* TimeMetricsStartTime. Filter by time_metrics.start_time */ TimeMetricsStartTime *string /* UUID. Filter by uuid */ UUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm migration collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationCollectionGetParams) WithDefaults() *SvmMigrationCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm migration collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SvmMigrationCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithTimeout(timeout time.Duration) *SvmMigrationCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithContext(ctx context.Context) *SvmMigrationCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithHTTPClient(client *http.Client) *SvmMigrationCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithAutoCutover adds the autoCutover to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithAutoCutover(autoCutover *bool) *SvmMigrationCollectionGetParams { o.SetAutoCutover(autoCutover) return o } // SetAutoCutover adds the autoCutover to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetAutoCutover(autoCutover *bool) { o.AutoCutover = autoCutover } // WithAutoSourceCleanup adds the autoSourceCleanup to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithAutoSourceCleanup(autoSourceCleanup *bool) *SvmMigrationCollectionGetParams { o.SetAutoSourceCleanup(autoSourceCleanup) return o } // SetAutoSourceCleanup adds the autoSourceCleanup to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetAutoSourceCleanup(autoSourceCleanup *bool) { o.AutoSourceCleanup = autoSourceCleanup } // WithCurrentOperation adds the currentOperation to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithCurrentOperation(currentOperation *string) *SvmMigrationCollectionGetParams { o.SetCurrentOperation(currentOperation) return o } // SetCurrentOperation adds the currentOperation to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetCurrentOperation(currentOperation *string) { o.CurrentOperation = currentOperation } // WithDestinationIpspaceName adds the destinationIpspaceName to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithDestinationIpspaceName(destinationIpspaceName *string) *SvmMigrationCollectionGetParams { o.SetDestinationIpspaceName(destinationIpspaceName) return o } // SetDestinationIpspaceName adds the destinationIpspaceName to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetDestinationIpspaceName(destinationIpspaceName *string) { o.DestinationIpspaceName = destinationIpspaceName } // WithDestinationIpspaceUUID adds the destinationIpspaceUUID to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithDestinationIpspaceUUID(destinationIpspaceUUID *string) *SvmMigrationCollectionGetParams { o.SetDestinationIpspaceUUID(destinationIpspaceUUID) return o } // SetDestinationIpspaceUUID adds the destinationIpspaceUuid to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetDestinationIpspaceUUID(destinationIpspaceUUID *string) { o.DestinationIpspaceUUID = destinationIpspaceUUID } // WithFields adds the fields to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithFields(fields []string) *SvmMigrationCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithLastFailedState adds the lastFailedState to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithLastFailedState(lastFailedState *string) *SvmMigrationCollectionGetParams { o.SetLastFailedState(lastFailedState) return o } // SetLastFailedState adds the lastFailedState to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetLastFailedState(lastFailedState *string) { o.LastFailedState = lastFailedState } // WithLastOperation adds the lastOperation to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithLastOperation(lastOperation *string) *SvmMigrationCollectionGetParams { o.SetLastOperation(lastOperation) return o } // SetLastOperation adds the lastOperation to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetLastOperation(lastOperation *string) { o.LastOperation = lastOperation } // WithMaxRecords adds the maxRecords to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithMaxRecords(maxRecords *int64) *SvmMigrationCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithMessagesCode adds the messagesCode to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithMessagesCode(messagesCode *string) *SvmMigrationCollectionGetParams { o.SetMessagesCode(messagesCode) return o } // SetMessagesCode adds the messagesCode to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetMessagesCode(messagesCode *string) { o.MessagesCode = messagesCode } // WithMessagesMessage adds the messagesMessage to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithMessagesMessage(messagesMessage *string) *SvmMigrationCollectionGetParams { o.SetMessagesMessage(messagesMessage) return o } // SetMessagesMessage adds the messagesMessage to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetMessagesMessage(messagesMessage *string) { o.MessagesMessage = messagesMessage } // WithOrderBy adds the orderBy to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithOrderBy(orderBy []string) *SvmMigrationCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithPointOfNoReturn adds the pointOfNoReturn to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithPointOfNoReturn(pointOfNoReturn *bool) *SvmMigrationCollectionGetParams { o.SetPointOfNoReturn(pointOfNoReturn) return o } // SetPointOfNoReturn adds the pointOfNoReturn to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetPointOfNoReturn(pointOfNoReturn *bool) { o.PointOfNoReturn = pointOfNoReturn } // WithRestartCount adds the restartCount to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithRestartCount(restartCount *int64) *SvmMigrationCollectionGetParams { o.SetRestartCount(restartCount) return o } // SetRestartCount adds the restartCount to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetRestartCount(restartCount *int64) { o.RestartCount = restartCount } // WithReturnRecords adds the returnRecords to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithReturnRecords(returnRecords *bool) *SvmMigrationCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SvmMigrationCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSourceClusterName adds the sourceClusterName to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithSourceClusterName(sourceClusterName *string) *SvmMigrationCollectionGetParams { o.SetSourceClusterName(sourceClusterName) return o } // SetSourceClusterName adds the sourceClusterName to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetSourceClusterName(sourceClusterName *string) { o.SourceClusterName = sourceClusterName } // WithSourceClusterUUID adds the sourceClusterUUID to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithSourceClusterUUID(sourceClusterUUID *string) *SvmMigrationCollectionGetParams { o.SetSourceClusterUUID(sourceClusterUUID) return o } // SetSourceClusterUUID adds the sourceClusterUuid to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetSourceClusterUUID(sourceClusterUUID *string) { o.SourceClusterUUID = sourceClusterUUID } // WithSourceSvmName adds the sourceSvmName to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithSourceSvmName(sourceSvmName *string) *SvmMigrationCollectionGetParams { o.SetSourceSvmName(sourceSvmName) return o } // SetSourceSvmName adds the sourceSvmName to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetSourceSvmName(sourceSvmName *string) { o.SourceSvmName = sourceSvmName } // WithSourceSvmUUID adds the sourceSvmUUID to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithSourceSvmUUID(sourceSvmUUID *string) *SvmMigrationCollectionGetParams { o.SetSourceSvmUUID(sourceSvmUUID) return o } // SetSourceSvmUUID adds the sourceSvmUuid to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetSourceSvmUUID(sourceSvmUUID *string) { o.SourceSvmUUID = sourceSvmUUID } // WithState adds the state to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithState(state *string) *SvmMigrationCollectionGetParams { o.SetState(state) return o } // SetState adds the state to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetState(state *string) { o.State = state } // WithThrottle adds the throttle to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithThrottle(throttle *int64) *SvmMigrationCollectionGetParams { o.SetThrottle(throttle) return o } // SetThrottle adds the throttle to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetThrottle(throttle *int64) { o.Throttle = throttle } // WithTimeMetricsCutoverCompleteTime adds the timeMetricsCutoverCompleteTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithTimeMetricsCutoverCompleteTime(timeMetricsCutoverCompleteTime *string) *SvmMigrationCollectionGetParams { o.SetTimeMetricsCutoverCompleteTime(timeMetricsCutoverCompleteTime) return o } // SetTimeMetricsCutoverCompleteTime adds the timeMetricsCutoverCompleteTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetTimeMetricsCutoverCompleteTime(timeMetricsCutoverCompleteTime *string) { o.TimeMetricsCutoverCompleteTime = timeMetricsCutoverCompleteTime } // WithTimeMetricsCutoverStartTime adds the timeMetricsCutoverStartTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithTimeMetricsCutoverStartTime(timeMetricsCutoverStartTime *string) *SvmMigrationCollectionGetParams { o.SetTimeMetricsCutoverStartTime(timeMetricsCutoverStartTime) return o } // SetTimeMetricsCutoverStartTime adds the timeMetricsCutoverStartTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetTimeMetricsCutoverStartTime(timeMetricsCutoverStartTime *string) { o.TimeMetricsCutoverStartTime = timeMetricsCutoverStartTime } // WithTimeMetricsCutoverTriggerTime adds the timeMetricsCutoverTriggerTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithTimeMetricsCutoverTriggerTime(timeMetricsCutoverTriggerTime *string) *SvmMigrationCollectionGetParams { o.SetTimeMetricsCutoverTriggerTime(timeMetricsCutoverTriggerTime) return o } // SetTimeMetricsCutoverTriggerTime adds the timeMetricsCutoverTriggerTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetTimeMetricsCutoverTriggerTime(timeMetricsCutoverTriggerTime *string) { o.TimeMetricsCutoverTriggerTime = timeMetricsCutoverTriggerTime } // WithTimeMetricsEndTime adds the timeMetricsEndTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithTimeMetricsEndTime(timeMetricsEndTime *string) *SvmMigrationCollectionGetParams { o.SetTimeMetricsEndTime(timeMetricsEndTime) return o } // SetTimeMetricsEndTime adds the timeMetricsEndTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetTimeMetricsEndTime(timeMetricsEndTime *string) { o.TimeMetricsEndTime = timeMetricsEndTime } // WithTimeMetricsLastPauseTime adds the timeMetricsLastPauseTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithTimeMetricsLastPauseTime(timeMetricsLastPauseTime *string) *SvmMigrationCollectionGetParams { o.SetTimeMetricsLastPauseTime(timeMetricsLastPauseTime) return o } // SetTimeMetricsLastPauseTime adds the timeMetricsLastPauseTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetTimeMetricsLastPauseTime(timeMetricsLastPauseTime *string) { o.TimeMetricsLastPauseTime = timeMetricsLastPauseTime } // WithTimeMetricsLastResumeTime adds the timeMetricsLastResumeTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithTimeMetricsLastResumeTime(timeMetricsLastResumeTime *string) *SvmMigrationCollectionGetParams { o.SetTimeMetricsLastResumeTime(timeMetricsLastResumeTime) return o } // SetTimeMetricsLastResumeTime adds the timeMetricsLastResumeTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetTimeMetricsLastResumeTime(timeMetricsLastResumeTime *string) { o.TimeMetricsLastResumeTime = timeMetricsLastResumeTime } // WithTimeMetricsStartTime adds the timeMetricsStartTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithTimeMetricsStartTime(timeMetricsStartTime *string) *SvmMigrationCollectionGetParams { o.SetTimeMetricsStartTime(timeMetricsStartTime) return o } // SetTimeMetricsStartTime adds the timeMetricsStartTime to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetTimeMetricsStartTime(timeMetricsStartTime *string) { o.TimeMetricsStartTime = timeMetricsStartTime } // WithUUID adds the uuid to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) WithUUID(uuid *string) *SvmMigrationCollectionGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm migration collection get params func (o *SvmMigrationCollectionGetParams) SetUUID(uuid *string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmMigrationCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.AutoCutover != nil { // query param auto_cutover var qrAutoCutover bool if o.AutoCutover != nil { qrAutoCutover = *o.AutoCutover } qAutoCutover := swag.FormatBool(qrAutoCutover) if qAutoCutover != "" { if err := r.SetQueryParam("auto_cutover", qAutoCutover); err != nil { return err } } } if o.AutoSourceCleanup != nil { // query param auto_source_cleanup var qrAutoSourceCleanup bool if o.AutoSourceCleanup != nil { qrAutoSourceCleanup = *o.AutoSourceCleanup } qAutoSourceCleanup := swag.FormatBool(qrAutoSourceCleanup) if qAutoSourceCleanup != "" { if err := r.SetQueryParam("auto_source_cleanup", qAutoSourceCleanup); err != nil { return err } } } if o.CurrentOperation != nil { // query param current_operation var qrCurrentOperation string if o.CurrentOperation != nil { qrCurrentOperation = *o.CurrentOperation } qCurrentOperation := qrCurrentOperation if qCurrentOperation != "" { if err := r.SetQueryParam("current_operation", qCurrentOperation); err != nil { return err } } } if o.DestinationIpspaceName != nil { // query param destination.ipspace.name var qrDestinationIpspaceName string if o.DestinationIpspaceName != nil { qrDestinationIpspaceName = *o.DestinationIpspaceName } qDestinationIpspaceName := qrDestinationIpspaceName if qDestinationIpspaceName != "" { if err := r.SetQueryParam("destination.ipspace.name", qDestinationIpspaceName); err != nil { return err } } } if o.DestinationIpspaceUUID != nil { // query param destination.ipspace.uuid var qrDestinationIpspaceUUID string if o.DestinationIpspaceUUID != nil { qrDestinationIpspaceUUID = *o.DestinationIpspaceUUID } qDestinationIpspaceUUID := qrDestinationIpspaceUUID if qDestinationIpspaceUUID != "" { if err := r.SetQueryParam("destination.ipspace.uuid", qDestinationIpspaceUUID); err != nil { return err } } } if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.LastFailedState != nil { // query param last_failed_state var qrLastFailedState string if o.LastFailedState != nil { qrLastFailedState = *o.LastFailedState } qLastFailedState := qrLastFailedState if qLastFailedState != "" { if err := r.SetQueryParam("last_failed_state", qLastFailedState); err != nil { return err } } } if o.LastOperation != nil { // query param last_operation var qrLastOperation string if o.LastOperation != nil { qrLastOperation = *o.LastOperation } qLastOperation := qrLastOperation if qLastOperation != "" { if err := r.SetQueryParam("last_operation", qLastOperation); err != nil { return err } } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.MessagesCode != nil { // query param messages.code var qrMessagesCode string if o.MessagesCode != nil { qrMessagesCode = *o.MessagesCode } qMessagesCode := qrMessagesCode if qMessagesCode != "" { if err := r.SetQueryParam("messages.code", qMessagesCode); err != nil { return err } } } if o.MessagesMessage != nil { // query param messages.message var qrMessagesMessage string if o.MessagesMessage != nil { qrMessagesMessage = *o.MessagesMessage } qMessagesMessage := qrMessagesMessage if qMessagesMessage != "" { if err := r.SetQueryParam("messages.message", qMessagesMessage); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.PointOfNoReturn != nil { // query param point_of_no_return var qrPointOfNoReturn bool if o.PointOfNoReturn != nil { qrPointOfNoReturn = *o.PointOfNoReturn } qPointOfNoReturn := swag.FormatBool(qrPointOfNoReturn) if qPointOfNoReturn != "" { if err := r.SetQueryParam("point_of_no_return", qPointOfNoReturn); err != nil { return err } } } if o.RestartCount != nil { // query param restart_count var qrRestartCount int64 if o.RestartCount != nil { qrRestartCount = *o.RestartCount } qRestartCount := swag.FormatInt64(qrRestartCount) if qRestartCount != "" { if err := r.SetQueryParam("restart_count", qRestartCount); err != nil { return err } } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.SourceClusterName != nil { // query param source.cluster.name var qrSourceClusterName string if o.SourceClusterName != nil { qrSourceClusterName = *o.SourceClusterName } qSourceClusterName := qrSourceClusterName if qSourceClusterName != "" { if err := r.SetQueryParam("source.cluster.name", qSourceClusterName); err != nil { return err } } } if o.SourceClusterUUID != nil { // query param source.cluster.uuid var qrSourceClusterUUID string if o.SourceClusterUUID != nil { qrSourceClusterUUID = *o.SourceClusterUUID } qSourceClusterUUID := qrSourceClusterUUID if qSourceClusterUUID != "" { if err := r.SetQueryParam("source.cluster.uuid", qSourceClusterUUID); err != nil { return err } } } if o.SourceSvmName != nil { // query param source.svm.name var qrSourceSvmName string if o.SourceSvmName != nil { qrSourceSvmName = *o.SourceSvmName } qSourceSvmName := qrSourceSvmName if qSourceSvmName != "" { if err := r.SetQueryParam("source.svm.name", qSourceSvmName); err != nil { return err } } } if o.SourceSvmUUID != nil { // query param source.svm.uuid var qrSourceSvmUUID string if o.SourceSvmUUID != nil { qrSourceSvmUUID = *o.SourceSvmUUID } qSourceSvmUUID := qrSourceSvmUUID if qSourceSvmUUID != "" { if err := r.SetQueryParam("source.svm.uuid", qSourceSvmUUID); err != nil { return err } } } if o.State != nil { // query param state var qrState string if o.State != nil { qrState = *o.State } qState := qrState if qState != "" { if err := r.SetQueryParam("state", qState); err != nil { return err } } } if o.Throttle != nil { // query param throttle var qrThrottle int64 if o.Throttle != nil { qrThrottle = *o.Throttle } qThrottle := swag.FormatInt64(qrThrottle) if qThrottle != "" { if err := r.SetQueryParam("throttle", qThrottle); err != nil { return err } } } if o.TimeMetricsCutoverCompleteTime != nil { // query param time_metrics.cutover_complete_time var qrTimeMetricsCutoverCompleteTime string if o.TimeMetricsCutoverCompleteTime != nil { qrTimeMetricsCutoverCompleteTime = *o.TimeMetricsCutoverCompleteTime } qTimeMetricsCutoverCompleteTime := qrTimeMetricsCutoverCompleteTime if qTimeMetricsCutoverCompleteTime != "" { if err := r.SetQueryParam("time_metrics.cutover_complete_time", qTimeMetricsCutoverCompleteTime); err != nil { return err } } } if o.TimeMetricsCutoverStartTime != nil { // query param time_metrics.cutover_start_time var qrTimeMetricsCutoverStartTime string if o.TimeMetricsCutoverStartTime != nil { qrTimeMetricsCutoverStartTime = *o.TimeMetricsCutoverStartTime } qTimeMetricsCutoverStartTime := qrTimeMetricsCutoverStartTime if qTimeMetricsCutoverStartTime != "" { if err := r.SetQueryParam("time_metrics.cutover_start_time", qTimeMetricsCutoverStartTime); err != nil { return err } } } if o.TimeMetricsCutoverTriggerTime != nil { // query param time_metrics.cutover_trigger_time var qrTimeMetricsCutoverTriggerTime string if o.TimeMetricsCutoverTriggerTime != nil { qrTimeMetricsCutoverTriggerTime = *o.TimeMetricsCutoverTriggerTime } qTimeMetricsCutoverTriggerTime := qrTimeMetricsCutoverTriggerTime if qTimeMetricsCutoverTriggerTime != "" { if err := r.SetQueryParam("time_metrics.cutover_trigger_time", qTimeMetricsCutoverTriggerTime); err != nil { return err } } } if o.TimeMetricsEndTime != nil { // query param time_metrics.end_time var qrTimeMetricsEndTime string if o.TimeMetricsEndTime != nil { qrTimeMetricsEndTime = *o.TimeMetricsEndTime } qTimeMetricsEndTime := qrTimeMetricsEndTime if qTimeMetricsEndTime != "" { if err := r.SetQueryParam("time_metrics.end_time", qTimeMetricsEndTime); err != nil { return err } } } if o.TimeMetricsLastPauseTime != nil { // query param time_metrics.last_pause_time var qrTimeMetricsLastPauseTime string if o.TimeMetricsLastPauseTime != nil { qrTimeMetricsLastPauseTime = *o.TimeMetricsLastPauseTime } qTimeMetricsLastPauseTime := qrTimeMetricsLastPauseTime if qTimeMetricsLastPauseTime != "" { if err := r.SetQueryParam("time_metrics.last_pause_time", qTimeMetricsLastPauseTime); err != nil { return err } } } if o.TimeMetricsLastResumeTime != nil { // query param time_metrics.last_resume_time var qrTimeMetricsLastResumeTime string if o.TimeMetricsLastResumeTime != nil { qrTimeMetricsLastResumeTime = *o.TimeMetricsLastResumeTime } qTimeMetricsLastResumeTime := qrTimeMetricsLastResumeTime if qTimeMetricsLastResumeTime != "" { if err := r.SetQueryParam("time_metrics.last_resume_time", qTimeMetricsLastResumeTime); err != nil { return err } } } if o.TimeMetricsStartTime != nil { // query param time_metrics.start_time var qrTimeMetricsStartTime string if o.TimeMetricsStartTime != nil { qrTimeMetricsStartTime = *o.TimeMetricsStartTime } qTimeMetricsStartTime := qrTimeMetricsStartTime
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_volume_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_volume_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmMigrationVolumeGetParams creates a new SvmMigrationVolumeGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmMigrationVolumeGetParams() *SvmMigrationVolumeGetParams { return &SvmMigrationVolumeGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmMigrationVolumeGetParamsWithTimeout creates a new SvmMigrationVolumeGetParams object // with the ability to set a timeout on a request. func NewSvmMigrationVolumeGetParamsWithTimeout(timeout time.Duration) *SvmMigrationVolumeGetParams { return &SvmMigrationVolumeGetParams{ timeout: timeout, } } // NewSvmMigrationVolumeGetParamsWithContext creates a new SvmMigrationVolumeGetParams object // with the ability to set a context for a request. func NewSvmMigrationVolumeGetParamsWithContext(ctx context.Context) *SvmMigrationVolumeGetParams { return &SvmMigrationVolumeGetParams{ Context: ctx, } } // NewSvmMigrationVolumeGetParamsWithHTTPClient creates a new SvmMigrationVolumeGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmMigrationVolumeGetParamsWithHTTPClient(client *http.Client) *SvmMigrationVolumeGetParams { return &SvmMigrationVolumeGetParams{ HTTPClient: client, } } /* SvmMigrationVolumeGetParams contains all the parameters to send to the API endpoint for the svm migration volume get operation. Typically these are written to a http.Request. */ type SvmMigrationVolumeGetParams struct { /* ErrorsCode. Filter by errors.code */ ErrorsCode *string /* ErrorsMessage. Filter by errors.message */ ErrorsMessage *string /* Fields. Specify the fields to return. */ Fields []string /* Healthy. Filter by healthy */ Healthy *bool /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* NodeName. Filter by node.name */ NodeName *string /* NodeUUID. Filter by node.uuid */ NodeUUID *string /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SvmName. Filter by svm.name */ SvmName *string /* SvmUUID. Filter by svm.uuid */ SvmUUID *string /* SvmMigrationUUID. Migration UUID */ SvmMigrationUUID string /* TransferState. Filter by transfer_state */ TransferState *string /* VolumeName. Filter by volume.name */ VolumeName *string /* VolumeUUID. Volume UUID */ VolumeUUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm migration volume get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationVolumeGetParams) WithDefaults() *SvmMigrationVolumeGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm migration volume get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationVolumeGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SvmMigrationVolumeGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithTimeout(timeout time.Duration) *SvmMigrationVolumeGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithContext(ctx context.Context) *SvmMigrationVolumeGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithHTTPClient(client *http.Client) *SvmMigrationVolumeGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithErrorsCode adds the errorsCode to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithErrorsCode(errorsCode *string) *SvmMigrationVolumeGetParams { o.SetErrorsCode(errorsCode) return o } // SetErrorsCode adds the errorsCode to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetErrorsCode(errorsCode *string) { o.ErrorsCode = errorsCode } // WithErrorsMessage adds the errorsMessage to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithErrorsMessage(errorsMessage *string) *SvmMigrationVolumeGetParams { o.SetErrorsMessage(errorsMessage) return o } // SetErrorsMessage adds the errorsMessage to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetErrorsMessage(errorsMessage *string) { o.ErrorsMessage = errorsMessage } // WithFields adds the fields to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithFields(fields []string) *SvmMigrationVolumeGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetFields(fields []string) { o.Fields = fields } // WithHealthy adds the healthy to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithHealthy(healthy *bool) *SvmMigrationVolumeGetParams { o.SetHealthy(healthy) return o } // SetHealthy adds the healthy to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetHealthy(healthy *bool) { o.Healthy = healthy } // WithMaxRecords adds the maxRecords to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithMaxRecords(maxRecords *int64) *SvmMigrationVolumeGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithNodeName adds the nodeName to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithNodeName(nodeName *string) *SvmMigrationVolumeGetParams { o.SetNodeName(nodeName) return o } // SetNodeName adds the nodeName to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetNodeName(nodeName *string) { o.NodeName = nodeName } // WithNodeUUID adds the nodeUUID to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithNodeUUID(nodeUUID *string) *SvmMigrationVolumeGetParams { o.SetNodeUUID(nodeUUID) return o } // SetNodeUUID adds the nodeUuid to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetNodeUUID(nodeUUID *string) { o.NodeUUID = nodeUUID } // WithOrderBy adds the orderBy to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithOrderBy(orderBy []string) *SvmMigrationVolumeGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithReturnRecords adds the returnRecords to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithReturnRecords(returnRecords *bool) *SvmMigrationVolumeGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithReturnTimeout(returnTimeout *int64) *SvmMigrationVolumeGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmName adds the svmName to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithSvmName(svmName *string) *SvmMigrationVolumeGetParams { o.SetSvmName(svmName) return o } // SetSvmName adds the svmName to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetSvmName(svmName *string) { o.SvmName = svmName } // WithSvmUUID adds the svmUUID to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithSvmUUID(svmUUID *string) *SvmMigrationVolumeGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetSvmUUID(svmUUID *string) { o.SvmUUID = svmUUID } // WithSvmMigrationUUID adds the svmMigrationUUID to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithSvmMigrationUUID(svmMigrationUUID string) *SvmMigrationVolumeGetParams { o.SetSvmMigrationUUID(svmMigrationUUID) return o } // SetSvmMigrationUUID adds the svmMigrationUuid to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetSvmMigrationUUID(svmMigrationUUID string) { o.SvmMigrationUUID = svmMigrationUUID } // WithTransferState adds the transferState to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithTransferState(transferState *string) *SvmMigrationVolumeGetParams { o.SetTransferState(transferState) return o } // SetTransferState adds the transferState to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetTransferState(transferState *string) { o.TransferState = transferState } // WithVolumeName adds the volumeName to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithVolumeName(volumeName *string) *SvmMigrationVolumeGetParams { o.SetVolumeName(volumeName) return o } // SetVolumeName adds the volumeName to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetVolumeName(volumeName *string) { o.VolumeName = volumeName } // WithVolumeUUID adds the volumeUUID to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) WithVolumeUUID(volumeUUID string) *SvmMigrationVolumeGetParams { o.SetVolumeUUID(volumeUUID) return o } // SetVolumeUUID adds the volumeUuid to the svm migration volume get params func (o *SvmMigrationVolumeGetParams) SetVolumeUUID(volumeUUID string) { o.VolumeUUID = volumeUUID } // WriteToRequest writes these params to a swagger request func (o *SvmMigrationVolumeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ErrorsCode != nil { // query param errors.code var qrErrorsCode string if o.ErrorsCode != nil { qrErrorsCode = *o.ErrorsCode } qErrorsCode := qrErrorsCode if qErrorsCode != "" { if err := r.SetQueryParam("errors.code", qErrorsCode); err != nil { return err } } } if o.ErrorsMessage != nil { // query param errors.message var qrErrorsMessage string if o.ErrorsMessage != nil { qrErrorsMessage = *o.ErrorsMessage } qErrorsMessage := qrErrorsMessage if qErrorsMessage != "" { if err := r.SetQueryParam("errors.message", qErrorsMessage); err != nil { return err } } } if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.Healthy != nil { // query param healthy var qrHealthy bool if o.Healthy != nil { qrHealthy = *o.Healthy } qHealthy := swag.FormatBool(qrHealthy) if qHealthy != "" { if err := r.SetQueryParam("healthy", qHealthy); err != nil { return err } } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.NodeName != nil { // query param node.name var qrNodeName string if o.NodeName != nil { qrNodeName = *o.NodeName } qNodeName := qrNodeName if qNodeName != "" { if err := r.SetQueryParam("node.name", qNodeName); err != nil { return err } } } if o.NodeUUID != nil { // query param node.uuid var qrNodeUUID string if o.NodeUUID != nil { qrNodeUUID = *o.NodeUUID } qNodeUUID := qrNodeUUID if qNodeUUID != "" { if err := r.SetQueryParam("node.uuid", qNodeUUID); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.SvmName != nil { // query param svm.name var qrSvmName string if o.SvmName != nil { qrSvmName = *o.SvmName } qSvmName := qrSvmName if qSvmName != "" { if err := r.SetQueryParam("svm.name", qSvmName); err != nil { return err } } } if o.SvmUUID != nil { // query param svm.uuid var qrSvmUUID string if o.SvmUUID != nil { qrSvmUUID = *o.SvmUUID } qSvmUUID := qrSvmUUID if qSvmUUID != "" { if err := r.SetQueryParam("svm.uuid", qSvmUUID); err != nil { return err } } } // path param svm_migration.uuid if err := r.SetPathParam("svm_migration.uuid", o.SvmMigrationUUID); err != nil { return err } if o.TransferState != nil { // query param transfer_state var qrTransferState string if o.TransferState != nil { qrTransferState = *o.TransferState } qTransferState := qrTransferState if qTransferState != "" { if err := r.SetQueryParam("transfer_state", qTransferState); err != nil { return err } } } if o.VolumeName != nil { // query param volume.name var qrVolumeName string if o.VolumeName != nil { qrVolumeName = *o.VolumeName } qVolumeName := qrVolumeName if qVolumeName != "" { if err := r.SetQueryParam("volume.name", qVolumeName); err != nil { return err } } } // path param volume.uuid if err := r.SetPathParam("volume.uuid", o.VolumeUUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSvmMigrationVolumeGet binds the parameter fields func (o *SvmMigrationVolumeGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamSvmMigrationVolumeGet binds the parameter order_by func (o *SvmMigrationVolumeGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_create_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_create_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSvmPeerCreateParams creates a new SvmPeerCreateParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerCreateParams() *SvmPeerCreateParams { return &SvmPeerCreateParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerCreateParamsWithTimeout creates a new SvmPeerCreateParams object // with the ability to set a timeout on a request. func NewSvmPeerCreateParamsWithTimeout(timeout time.Duration) *SvmPeerCreateParams { return &SvmPeerCreateParams{ timeout: timeout, } } // NewSvmPeerCreateParamsWithContext creates a new SvmPeerCreateParams object // with the ability to set a context for a request. func NewSvmPeerCreateParamsWithContext(ctx context.Context) *SvmPeerCreateParams { return &SvmPeerCreateParams{ Context: ctx, } } // NewSvmPeerCreateParamsWithHTTPClient creates a new SvmPeerCreateParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerCreateParamsWithHTTPClient(client *http.Client) *SvmPeerCreateParams { return &SvmPeerCreateParams{ HTTPClient: client, } } /* SvmPeerCreateParams contains all the parameters to send to the API endpoint for the svm peer create operation. Typically these are written to a http.Request. */ type SvmPeerCreateParams struct { /* Info. Info specification */ Info *models.SvmPeer /* ReturnRecords. The default is false. If set to true, the records are returned. */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer create params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerCreateParams) WithDefaults() *SvmPeerCreateParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer create params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerCreateParams) SetDefaults() { var ( returnRecordsDefault = bool(false) returnTimeoutDefault = int64(0) ) val := SvmPeerCreateParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm peer create params func (o *SvmPeerCreateParams) WithTimeout(timeout time.Duration) *SvmPeerCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer create params func (o *SvmPeerCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer create params func (o *SvmPeerCreateParams) WithContext(ctx context.Context) *SvmPeerCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer create params func (o *SvmPeerCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer create params func (o *SvmPeerCreateParams) WithHTTPClient(client *http.Client) *SvmPeerCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer create params func (o *SvmPeerCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the svm peer create params func (o *SvmPeerCreateParams) WithInfo(info *models.SvmPeer) *SvmPeerCreateParams { o.SetInfo(info) return o } // SetInfo adds the info to the svm peer create params func (o *SvmPeerCreateParams) SetInfo(info *models.SvmPeer) { o.Info = info } // WithReturnRecords adds the returnRecords to the svm peer create params func (o *SvmPeerCreateParams) WithReturnRecords(returnRecords *bool) *SvmPeerCreateParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm peer create params func (o *SvmPeerCreateParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm peer create params func (o *SvmPeerCreateParams) WithReturnTimeout(returnTimeout *int64) *SvmPeerCreateParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm peer create params func (o *SvmPeerCreateParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WriteToRequest writes these params to a swagger request func (o *SvmPeerCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_delete_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_delete_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmPeerDeleteParams creates a new SvmPeerDeleteParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerDeleteParams() *SvmPeerDeleteParams { return &SvmPeerDeleteParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerDeleteParamsWithTimeout creates a new SvmPeerDeleteParams object // with the ability to set a timeout on a request. func NewSvmPeerDeleteParamsWithTimeout(timeout time.Duration) *SvmPeerDeleteParams { return &SvmPeerDeleteParams{ timeout: timeout, } } // NewSvmPeerDeleteParamsWithContext creates a new SvmPeerDeleteParams object // with the ability to set a context for a request. func NewSvmPeerDeleteParamsWithContext(ctx context.Context) *SvmPeerDeleteParams { return &SvmPeerDeleteParams{ Context: ctx, } } // NewSvmPeerDeleteParamsWithHTTPClient creates a new SvmPeerDeleteParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerDeleteParamsWithHTTPClient(client *http.Client) *SvmPeerDeleteParams { return &SvmPeerDeleteParams{ HTTPClient: client, } } /* SvmPeerDeleteParams contains all the parameters to send to the API endpoint for the svm peer delete operation. Typically these are written to a http.Request. */ type SvmPeerDeleteParams struct { /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. SVM peer relationship UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerDeleteParams) WithDefaults() *SvmPeerDeleteParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerDeleteParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := SvmPeerDeleteParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm peer delete params func (o *SvmPeerDeleteParams) WithTimeout(timeout time.Duration) *SvmPeerDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer delete params func (o *SvmPeerDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer delete params func (o *SvmPeerDeleteParams) WithContext(ctx context.Context) *SvmPeerDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer delete params func (o *SvmPeerDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer delete params func (o *SvmPeerDeleteParams) WithHTTPClient(client *http.Client) *SvmPeerDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer delete params func (o *SvmPeerDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithReturnTimeout adds the returnTimeout to the svm peer delete params func (o *SvmPeerDeleteParams) WithReturnTimeout(returnTimeout *int64) *SvmPeerDeleteParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm peer delete params func (o *SvmPeerDeleteParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the svm peer delete params func (o *SvmPeerDeleteParams) WithUUID(uuid string) *SvmPeerDeleteParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm peer delete params func (o *SvmPeerDeleteParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmPeerDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_delete_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_delete_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmMigrationDeleteParams creates a new SvmMigrationDeleteParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmMigrationDeleteParams() *SvmMigrationDeleteParams { return &SvmMigrationDeleteParams{ timeout: cr.DefaultTimeout, } } // NewSvmMigrationDeleteParamsWithTimeout creates a new SvmMigrationDeleteParams object // with the ability to set a timeout on a request. func NewSvmMigrationDeleteParamsWithTimeout(timeout time.Duration) *SvmMigrationDeleteParams { return &SvmMigrationDeleteParams{ timeout: timeout, } } // NewSvmMigrationDeleteParamsWithContext creates a new SvmMigrationDeleteParams object // with the ability to set a context for a request. func NewSvmMigrationDeleteParamsWithContext(ctx context.Context) *SvmMigrationDeleteParams { return &SvmMigrationDeleteParams{ Context: ctx, } } // NewSvmMigrationDeleteParamsWithHTTPClient creates a new SvmMigrationDeleteParams object // with the ability to set a custom HTTPClient for a request. func NewSvmMigrationDeleteParamsWithHTTPClient(client *http.Client) *SvmMigrationDeleteParams { return &SvmMigrationDeleteParams{ HTTPClient: client, } } /* SvmMigrationDeleteParams contains all the parameters to send to the API endpoint for the svm migration delete operation. Typically these are written to a http.Request. */ type SvmMigrationDeleteParams struct { /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. SVM migration UUID. */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm migration delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationDeleteParams) WithDefaults() *SvmMigrationDeleteParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm migration delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationDeleteParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := SvmMigrationDeleteParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm migration delete params func (o *SvmMigrationDeleteParams) WithTimeout(timeout time.Duration) *SvmMigrationDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm migration delete params func (o *SvmMigrationDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm migration delete params func (o *SvmMigrationDeleteParams) WithContext(ctx context.Context) *SvmMigrationDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm migration delete params func (o *SvmMigrationDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm migration delete params func (o *SvmMigrationDeleteParams) WithHTTPClient(client *http.Client) *SvmMigrationDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm migration delete params func (o *SvmMigrationDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithReturnTimeout adds the returnTimeout to the svm migration delete params func (o *SvmMigrationDeleteParams) WithReturnTimeout(returnTimeout *int64) *SvmMigrationDeleteParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm migration delete params func (o *SvmMigrationDeleteParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the svm migration delete params func (o *SvmMigrationDeleteParams) WithUUID(uuid string) *SvmMigrationDeleteParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm migration delete params func (o *SvmMigrationDeleteParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmMigrationDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmCollectionGetReader is a Reader for the SvmCollectionGet structure. type SvmCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmCollectionGetDefault(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 } } // NewSvmCollectionGetOK creates a SvmCollectionGetOK with default headers values func NewSvmCollectionGetOK() *SvmCollectionGetOK { return &SvmCollectionGetOK{} } /* SvmCollectionGetOK describes a response with status code 200, with default header values. OK */ type SvmCollectionGetOK struct { Payload *models.SvmResponse } // IsSuccess returns true when this svm collection get o k response has a 2xx status code func (o *SvmCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm collection get o k response has a 3xx status code func (o *SvmCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm collection get o k response has a 4xx status code func (o *SvmCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm collection get o k response has a 5xx status code func (o *SvmCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this svm collection get o k response a status code equal to that given func (o *SvmCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/svms][%d] svmCollectionGetOK %+v", 200, o.Payload) } func (o *SvmCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/svms][%d] svmCollectionGetOK %+v", 200, o.Payload) } func (o *SvmCollectionGetOK) GetPayload() *models.SvmResponse { return o.Payload } func (o *SvmCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmCollectionGetDefault creates a SvmCollectionGetDefault with default headers values func NewSvmCollectionGetDefault(code int) *SvmCollectionGetDefault { return &SvmCollectionGetDefault{ _statusCode: code, } } /* SvmCollectionGetDefault describes a response with status code -1, with default header values. Error */ type SvmCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm collection get default response func (o *SvmCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm collection get default response has a 2xx status code func (o *SvmCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm collection get default response has a 3xx status code func (o *SvmCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm collection get default response has a 4xx status code func (o *SvmCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm collection get default response has a 5xx status code func (o *SvmCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm collection get default response a status code equal to that given func (o *SvmCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/svms][%d] svm_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/svms][%d] svm_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_modify_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_modify_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSvmPeerModifyParams creates a new SvmPeerModifyParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerModifyParams() *SvmPeerModifyParams { return &SvmPeerModifyParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerModifyParamsWithTimeout creates a new SvmPeerModifyParams object // with the ability to set a timeout on a request. func NewSvmPeerModifyParamsWithTimeout(timeout time.Duration) *SvmPeerModifyParams { return &SvmPeerModifyParams{ timeout: timeout, } } // NewSvmPeerModifyParamsWithContext creates a new SvmPeerModifyParams object // with the ability to set a context for a request. func NewSvmPeerModifyParamsWithContext(ctx context.Context) *SvmPeerModifyParams { return &SvmPeerModifyParams{ Context: ctx, } } // NewSvmPeerModifyParamsWithHTTPClient creates a new SvmPeerModifyParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerModifyParamsWithHTTPClient(client *http.Client) *SvmPeerModifyParams { return &SvmPeerModifyParams{ HTTPClient: client, } } /* SvmPeerModifyParams contains all the parameters to send to the API endpoint for the svm peer modify operation. Typically these are written to a http.Request. */ type SvmPeerModifyParams struct { /* Info. Info specification */ Info *models.SvmPeer /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. SVM peer relationship UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerModifyParams) WithDefaults() *SvmPeerModifyParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerModifyParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := SvmPeerModifyParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm peer modify params func (o *SvmPeerModifyParams) WithTimeout(timeout time.Duration) *SvmPeerModifyParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer modify params func (o *SvmPeerModifyParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer modify params func (o *SvmPeerModifyParams) WithContext(ctx context.Context) *SvmPeerModifyParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer modify params func (o *SvmPeerModifyParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer modify params func (o *SvmPeerModifyParams) WithHTTPClient(client *http.Client) *SvmPeerModifyParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer modify params func (o *SvmPeerModifyParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the svm peer modify params func (o *SvmPeerModifyParams) WithInfo(info *models.SvmPeer) *SvmPeerModifyParams { o.SetInfo(info) return o } // SetInfo adds the info to the svm peer modify params func (o *SvmPeerModifyParams) SetInfo(info *models.SvmPeer) { o.Info = info } // WithReturnTimeout adds the returnTimeout to the svm peer modify params func (o *SvmPeerModifyParams) WithReturnTimeout(returnTimeout *int64) *SvmPeerModifyParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm peer modify params func (o *SvmPeerModifyParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the svm peer modify params func (o *SvmPeerModifyParams) WithUUID(uuid string) *SvmPeerModifyParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm peer modify params func (o *SvmPeerModifyParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmPeerModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_create_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_create_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerPermissionCreateReader is a Reader for the SvmPeerPermissionCreate structure. type SvmPeerPermissionCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerPermissionCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 201: result := NewSvmPeerPermissionCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerPermissionCreateDefault(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 } } // NewSvmPeerPermissionCreateCreated creates a SvmPeerPermissionCreateCreated with default headers values func NewSvmPeerPermissionCreateCreated() *SvmPeerPermissionCreateCreated { return &SvmPeerPermissionCreateCreated{} } /* SvmPeerPermissionCreateCreated describes a response with status code 201, with default header values. Created */ type SvmPeerPermissionCreateCreated struct { /* Useful for tracking the resource location */ Location string Payload *models.SvmPeerPermission } // IsSuccess returns true when this svm peer permission create created response has a 2xx status code func (o *SvmPeerPermissionCreateCreated) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer permission create created response has a 3xx status code func (o *SvmPeerPermissionCreateCreated) IsRedirect() bool { return false } // IsClientError returns true when this svm peer permission create created response has a 4xx status code func (o *SvmPeerPermissionCreateCreated) IsClientError() bool { return false } // IsServerError returns true when this svm peer permission create created response has a 5xx status code func (o *SvmPeerPermissionCreateCreated) IsServerError() bool { return false } // IsCode returns true when this svm peer permission create created response a status code equal to that given func (o *SvmPeerPermissionCreateCreated) IsCode(code int) bool { return code == 201 } func (o *SvmPeerPermissionCreateCreated) Error() string { return fmt.Sprintf("[POST /svm/peer-permissions][%d] svmPeerPermissionCreateCreated %+v", 201, o.Payload) } func (o *SvmPeerPermissionCreateCreated) String() string { return fmt.Sprintf("[POST /svm/peer-permissions][%d] svmPeerPermissionCreateCreated %+v", 201, o.Payload) } func (o *SvmPeerPermissionCreateCreated) GetPayload() *models.SvmPeerPermission { return o.Payload } func (o *SvmPeerPermissionCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Location hdrLocation := response.GetHeader("Location") if hdrLocation != "" { o.Location = hdrLocation } o.Payload = new(models.SvmPeerPermission) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmPeerPermissionCreateDefault creates a SvmPeerPermissionCreateDefault with default headers values func NewSvmPeerPermissionCreateDefault(code int) *SvmPeerPermissionCreateDefault { return &SvmPeerPermissionCreateDefault{ _statusCode: code, } } /* SvmPeerPermissionCreateDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 26345572 | {field} is a required field. | | 26345573 | Failed to find the SVM or volume UUID with name. | | 26345574 | Failed to find the SVM or volume name with UUID. | | 26345575 | The specified peer cluster name and peer cluster UUID do not match. | ``` <br/> */ type SvmPeerPermissionCreateDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer permission create default response func (o *SvmPeerPermissionCreateDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer permission create default response has a 2xx status code func (o *SvmPeerPermissionCreateDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer permission create default response has a 3xx status code func (o *SvmPeerPermissionCreateDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer permission create default response has a 4xx status code func (o *SvmPeerPermissionCreateDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer permission create default response has a 5xx status code func (o *SvmPeerPermissionCreateDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer permission create default response a status code equal to that given func (o *SvmPeerPermissionCreateDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerPermissionCreateDefault) Error() string { return fmt.Sprintf("[POST /svm/peer-permissions][%d] svm_peer_permission_create default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionCreateDefault) String() string { return fmt.Sprintf("[POST /svm/peer-permissions][%d] svm_peer_permission_create default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionCreateDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerPermissionCreateDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_user_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_user_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewTopMetricsSvmUserCollectionGetParams creates a new TopMetricsSvmUserCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewTopMetricsSvmUserCollectionGetParams() *TopMetricsSvmUserCollectionGetParams { return &TopMetricsSvmUserCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewTopMetricsSvmUserCollectionGetParamsWithTimeout creates a new TopMetricsSvmUserCollectionGetParams object // with the ability to set a timeout on a request. func NewTopMetricsSvmUserCollectionGetParamsWithTimeout(timeout time.Duration) *TopMetricsSvmUserCollectionGetParams { return &TopMetricsSvmUserCollectionGetParams{ timeout: timeout, } } // NewTopMetricsSvmUserCollectionGetParamsWithContext creates a new TopMetricsSvmUserCollectionGetParams object // with the ability to set a context for a request. func NewTopMetricsSvmUserCollectionGetParamsWithContext(ctx context.Context) *TopMetricsSvmUserCollectionGetParams { return &TopMetricsSvmUserCollectionGetParams{ Context: ctx, } } // NewTopMetricsSvmUserCollectionGetParamsWithHTTPClient creates a new TopMetricsSvmUserCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewTopMetricsSvmUserCollectionGetParamsWithHTTPClient(client *http.Client) *TopMetricsSvmUserCollectionGetParams { return &TopMetricsSvmUserCollectionGetParams{ HTTPClient: client, } } /* TopMetricsSvmUserCollectionGetParams contains all the parameters to send to the API endpoint for the top metrics svm user collection get operation. Typically these are written to a http.Request. */ type TopMetricsSvmUserCollectionGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* IopsErrorLowerBound. Filter by iops.error.lower_bound */ IopsErrorLowerBound *int64 /* IopsErrorUpperBound. Filter by iops.error.upper_bound */ IopsErrorUpperBound *int64 /* IopsRead. Filter by iops.read */ IopsRead *int64 /* IopsWrite. Filter by iops.write */ IopsWrite *int64 /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SvmName. Filter by svm.name */ SvmName *string /* SvmUUID. SVM UUID */ SvmUUID string /* ThroughputErrorLowerBound. Filter by throughput.error.lower_bound */ ThroughputErrorLowerBound *int64 /* ThroughputErrorUpperBound. Filter by throughput.error.upper_bound */ ThroughputErrorUpperBound *int64 /* ThroughputRead. Filter by throughput.read */ ThroughputRead *int64 /* ThroughputWrite. Filter by throughput.write */ ThroughputWrite *int64 /* TopMetric. IO activity type Default: "iops.read" */ TopMetric *string /* UserID. Filter by user_id */ UserID *string /* UserName. Filter by user_name */ UserName *string /* VolumesName. Filter by volumes.name */ VolumesName *string /* VolumesUUID. Filter by volumes.uuid */ VolumesUUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the top metrics svm user collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *TopMetricsSvmUserCollectionGetParams) WithDefaults() *TopMetricsSvmUserCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the top metrics svm user collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *TopMetricsSvmUserCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) topMetricDefault = string("iops.read") ) val := TopMetricsSvmUserCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, TopMetric: &topMetricDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithTimeout(timeout time.Duration) *TopMetricsSvmUserCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithContext(ctx context.Context) *TopMetricsSvmUserCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithHTTPClient(client *http.Client) *TopMetricsSvmUserCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithFields(fields []string) *TopMetricsSvmUserCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithIopsErrorLowerBound adds the iopsErrorLowerBound to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithIopsErrorLowerBound(iopsErrorLowerBound *int64) *TopMetricsSvmUserCollectionGetParams { o.SetIopsErrorLowerBound(iopsErrorLowerBound) return o } // SetIopsErrorLowerBound adds the iopsErrorLowerBound to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetIopsErrorLowerBound(iopsErrorLowerBound *int64) { o.IopsErrorLowerBound = iopsErrorLowerBound } // WithIopsErrorUpperBound adds the iopsErrorUpperBound to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithIopsErrorUpperBound(iopsErrorUpperBound *int64) *TopMetricsSvmUserCollectionGetParams { o.SetIopsErrorUpperBound(iopsErrorUpperBound) return o } // SetIopsErrorUpperBound adds the iopsErrorUpperBound to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetIopsErrorUpperBound(iopsErrorUpperBound *int64) { o.IopsErrorUpperBound = iopsErrorUpperBound } // WithIopsRead adds the iopsRead to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithIopsRead(iopsRead *int64) *TopMetricsSvmUserCollectionGetParams { o.SetIopsRead(iopsRead) return o } // SetIopsRead adds the iopsRead to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetIopsRead(iopsRead *int64) { o.IopsRead = iopsRead } // WithIopsWrite adds the iopsWrite to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithIopsWrite(iopsWrite *int64) *TopMetricsSvmUserCollectionGetParams { o.SetIopsWrite(iopsWrite) return o } // SetIopsWrite adds the iopsWrite to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetIopsWrite(iopsWrite *int64) { o.IopsWrite = iopsWrite } // WithMaxRecords adds the maxRecords to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithMaxRecords(maxRecords *int64) *TopMetricsSvmUserCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithOrderBy adds the orderBy to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithOrderBy(orderBy []string) *TopMetricsSvmUserCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithReturnRecords adds the returnRecords to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithReturnRecords(returnRecords *bool) *TopMetricsSvmUserCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *TopMetricsSvmUserCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmName adds the svmName to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithSvmName(svmName *string) *TopMetricsSvmUserCollectionGetParams { o.SetSvmName(svmName) return o } // SetSvmName adds the svmName to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetSvmName(svmName *string) { o.SvmName = svmName } // WithSvmUUID adds the svmUUID to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithSvmUUID(svmUUID string) *TopMetricsSvmUserCollectionGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WithThroughputErrorLowerBound adds the throughputErrorLowerBound to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithThroughputErrorLowerBound(throughputErrorLowerBound *int64) *TopMetricsSvmUserCollectionGetParams { o.SetThroughputErrorLowerBound(throughputErrorLowerBound) return o } // SetThroughputErrorLowerBound adds the throughputErrorLowerBound to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetThroughputErrorLowerBound(throughputErrorLowerBound *int64) { o.ThroughputErrorLowerBound = throughputErrorLowerBound } // WithThroughputErrorUpperBound adds the throughputErrorUpperBound to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithThroughputErrorUpperBound(throughputErrorUpperBound *int64) *TopMetricsSvmUserCollectionGetParams { o.SetThroughputErrorUpperBound(throughputErrorUpperBound) return o } // SetThroughputErrorUpperBound adds the throughputErrorUpperBound to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetThroughputErrorUpperBound(throughputErrorUpperBound *int64) { o.ThroughputErrorUpperBound = throughputErrorUpperBound } // WithThroughputRead adds the throughputRead to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithThroughputRead(throughputRead *int64) *TopMetricsSvmUserCollectionGetParams { o.SetThroughputRead(throughputRead) return o } // SetThroughputRead adds the throughputRead to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetThroughputRead(throughputRead *int64) { o.ThroughputRead = throughputRead } // WithThroughputWrite adds the throughputWrite to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithThroughputWrite(throughputWrite *int64) *TopMetricsSvmUserCollectionGetParams { o.SetThroughputWrite(throughputWrite) return o } // SetThroughputWrite adds the throughputWrite to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetThroughputWrite(throughputWrite *int64) { o.ThroughputWrite = throughputWrite } // WithTopMetric adds the topMetric to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithTopMetric(topMetric *string) *TopMetricsSvmUserCollectionGetParams { o.SetTopMetric(topMetric) return o } // SetTopMetric adds the topMetric to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetTopMetric(topMetric *string) { o.TopMetric = topMetric } // WithUserID adds the userID to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithUserID(userID *string) *TopMetricsSvmUserCollectionGetParams { o.SetUserID(userID) return o } // SetUserID adds the userId to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetUserID(userID *string) { o.UserID = userID } // WithUserName adds the userName to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithUserName(userName *string) *TopMetricsSvmUserCollectionGetParams { o.SetUserName(userName) return o } // SetUserName adds the userName to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetUserName(userName *string) { o.UserName = userName } // WithVolumesName adds the volumesName to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithVolumesName(volumesName *string) *TopMetricsSvmUserCollectionGetParams { o.SetVolumesName(volumesName) return o } // SetVolumesName adds the volumesName to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetVolumesName(volumesName *string) { o.VolumesName = volumesName } // WithVolumesUUID adds the volumesUUID to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) WithVolumesUUID(volumesUUID *string) *TopMetricsSvmUserCollectionGetParams { o.SetVolumesUUID(volumesUUID) return o } // SetVolumesUUID adds the volumesUuid to the top metrics svm user collection get params func (o *TopMetricsSvmUserCollectionGetParams) SetVolumesUUID(volumesUUID *string) { o.VolumesUUID = volumesUUID } // WriteToRequest writes these params to a swagger request func (o *TopMetricsSvmUserCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.IopsErrorLowerBound != nil { // query param iops.error.lower_bound var qrIopsErrorLowerBound int64 if o.IopsErrorLowerBound != nil { qrIopsErrorLowerBound = *o.IopsErrorLowerBound } qIopsErrorLowerBound := swag.FormatInt64(qrIopsErrorLowerBound) if qIopsErrorLowerBound != "" { if err := r.SetQueryParam("iops.error.lower_bound", qIopsErrorLowerBound); err != nil { return err } } } if o.IopsErrorUpperBound != nil { // query param iops.error.upper_bound var qrIopsErrorUpperBound int64 if o.IopsErrorUpperBound != nil { qrIopsErrorUpperBound = *o.IopsErrorUpperBound } qIopsErrorUpperBound := swag.FormatInt64(qrIopsErrorUpperBound) if qIopsErrorUpperBound != "" { if err := r.SetQueryParam("iops.error.upper_bound", qIopsErrorUpperBound); err != nil { return err } } } if o.IopsRead != nil { // query param iops.read var qrIopsRead int64 if o.IopsRead != nil { qrIopsRead = *o.IopsRead } qIopsRead := swag.FormatInt64(qrIopsRead) if qIopsRead != "" { if err := r.SetQueryParam("iops.read", qIopsRead); err != nil { return err } } } if o.IopsWrite != nil { // query param iops.write var qrIopsWrite int64 if o.IopsWrite != nil { qrIopsWrite = *o.IopsWrite } qIopsWrite := swag.FormatInt64(qrIopsWrite) if qIopsWrite != "" { if err := r.SetQueryParam("iops.write", qIopsWrite); err != nil { return err } } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.SvmName != nil { // query param svm.name var qrSvmName string if o.SvmName != nil { qrSvmName = *o.SvmName } qSvmName := qrSvmName if qSvmName != "" { if err := r.SetQueryParam("svm.name", qSvmName); err != nil { return err } } } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if o.ThroughputErrorLowerBound != nil { // query param throughput.error.lower_bound var qrThroughputErrorLowerBound int64 if o.ThroughputErrorLowerBound != nil { qrThroughputErrorLowerBound = *o.ThroughputErrorLowerBound } qThroughputErrorLowerBound := swag.FormatInt64(qrThroughputErrorLowerBound) if qThroughputErrorLowerBound != "" { if err := r.SetQueryParam("throughput.error.lower_bound", qThroughputErrorLowerBound); err != nil { return err } } } if o.ThroughputErrorUpperBound != nil { // query param throughput.error.upper_bound var qrThroughputErrorUpperBound int64 if o.ThroughputErrorUpperBound != nil { qrThroughputErrorUpperBound = *o.ThroughputErrorUpperBound } qThroughputErrorUpperBound := swag.FormatInt64(qrThroughputErrorUpperBound) if qThroughputErrorUpperBound != "" { if err := r.SetQueryParam("throughput.error.upper_bound", qThroughputErrorUpperBound); err != nil { return err } } } if o.ThroughputRead != nil { // query param throughput.read var qrThroughputRead int64 if o.ThroughputRead != nil { qrThroughputRead = *o.ThroughputRead } qThroughputRead := swag.FormatInt64(qrThroughputRead) if qThroughputRead != "" { if err := r.SetQueryParam("throughput.read", qThroughputRead); err != nil { return err } } } if o.ThroughputWrite != nil { // query param throughput.write var qrThroughputWrite int64 if o.ThroughputWrite != nil { qrThroughputWrite = *o.ThroughputWrite } qThroughputWrite := swag.FormatInt64(qrThroughputWrite) if qThroughputWrite != "" { if err := r.SetQueryParam("throughput.write", qThroughputWrite); err != nil { return err } } } if o.TopMetric != nil { // query param top_metric var qrTopMetric string if o.TopMetric != nil { qrTopMetric = *o.TopMetric } qTopMetric := qrTopMetric if qTopMetric != "" { if err := r.SetQueryParam("top_metric", qTopMetric); err != nil { return err } } } if o.UserID != nil { // query param user_id var qrUserID string if o.UserID != nil { qrUserID = *o.UserID } qUserID := qrUserID if qUserID != "" { if err := r.SetQueryParam("user_id", qUserID); err != nil { return err } } } if o.UserName != nil { // query param user_name var qrUserName string if o.UserName != nil { qrUserName = *o.UserName } qUserName := qrUserName if qUserName != "" { if err := r.SetQueryParam("user_name", qUserName); err != nil { return err } } } if o.VolumesName != nil { // query param volumes.name var qrVolumesName string if o.VolumesName != nil { qrVolumesName = *o.VolumesName } qVolumesName := qrVolumesName if qVolumesName != "" { if err := r.SetQueryParam("volumes.name", qVolumesName); err != nil { return err } } } if o.VolumesUUID != nil { // query param volumes.uuid var qrVolumesUUID string if o.VolumesUUID != nil { qrVolumesUUID = *o.VolumesUUID } qVolumesUUID := qrVolumesUUID if qVolumesUUID != "" { if err := r.SetQueryParam("volumes.uuid", qVolumesUUID); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamTopMetricsSvmUserCollectionGet binds the parameter fields func (o *TopMetricsSvmUserCollectionGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamTopMetricsSvmUserCollectionGet binds the parameter order_by func (o *TopMetricsSvmUserCollectionGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_modify_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_modify_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSvmMigrationModifyParams creates a new SvmMigrationModifyParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmMigrationModifyParams() *SvmMigrationModifyParams { return &SvmMigrationModifyParams{ timeout: cr.DefaultTimeout, } } // NewSvmMigrationModifyParamsWithTimeout creates a new SvmMigrationModifyParams object // with the ability to set a timeout on a request. func NewSvmMigrationModifyParamsWithTimeout(timeout time.Duration) *SvmMigrationModifyParams { return &SvmMigrationModifyParams{ timeout: timeout, } } // NewSvmMigrationModifyParamsWithContext creates a new SvmMigrationModifyParams object // with the ability to set a context for a request. func NewSvmMigrationModifyParamsWithContext(ctx context.Context) *SvmMigrationModifyParams { return &SvmMigrationModifyParams{ Context: ctx, } } // NewSvmMigrationModifyParamsWithHTTPClient creates a new SvmMigrationModifyParams object // with the ability to set a custom HTTPClient for a request. func NewSvmMigrationModifyParamsWithHTTPClient(client *http.Client) *SvmMigrationModifyParams { return &SvmMigrationModifyParams{ HTTPClient: client, } } /* SvmMigrationModifyParams contains all the parameters to send to the API endpoint for the svm migration modify operation. Typically these are written to a http.Request. */ type SvmMigrationModifyParams struct { /* Action. The pause action pauses the SVM migration. This action stops data transfer and configuration replication. This operation must be performed on the destination cluster. The resume action resumes an SVM migration from a paused or failed state. This operation must be performed on the destination cluster. The cutover action triggers the cutover of an SVM from the source cluster to the destination cluster. The source_clean up action performs a clean up of the SVM on the source cluster. */ Action *string /* AutoCutover. Optional property that when set to true automatically performs cutover when the migration state reaches "ready for cutover". Default: true */ AutoCutover *bool /* AutoSourceCleanup. Optional property that when set to true automatically cleans up the SVM on the source cluster after the migration cutover. Default: true */ AutoSourceCleanup *bool /* Info. Info specification */ Info *models.SvmMigration /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. SVM migration UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm migration modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationModifyParams) WithDefaults() *SvmMigrationModifyParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm migration modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationModifyParams) SetDefaults() { var ( autoCutoverDefault = bool(true) autoSourceCleanupDefault = bool(true) returnTimeoutDefault = int64(0) ) val := SvmMigrationModifyParams{ AutoCutover: &autoCutoverDefault, AutoSourceCleanup: &autoSourceCleanupDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm migration modify params func (o *SvmMigrationModifyParams) WithTimeout(timeout time.Duration) *SvmMigrationModifyParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm migration modify params func (o *SvmMigrationModifyParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm migration modify params func (o *SvmMigrationModifyParams) WithContext(ctx context.Context) *SvmMigrationModifyParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm migration modify params func (o *SvmMigrationModifyParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm migration modify params func (o *SvmMigrationModifyParams) WithHTTPClient(client *http.Client) *SvmMigrationModifyParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm migration modify params func (o *SvmMigrationModifyParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithAction adds the action to the svm migration modify params func (o *SvmMigrationModifyParams) WithAction(action *string) *SvmMigrationModifyParams { o.SetAction(action) return o } // SetAction adds the action to the svm migration modify params func (o *SvmMigrationModifyParams) SetAction(action *string) { o.Action = action } // WithAutoCutover adds the autoCutover to the svm migration modify params func (o *SvmMigrationModifyParams) WithAutoCutover(autoCutover *bool) *SvmMigrationModifyParams { o.SetAutoCutover(autoCutover) return o } // SetAutoCutover adds the autoCutover to the svm migration modify params func (o *SvmMigrationModifyParams) SetAutoCutover(autoCutover *bool) { o.AutoCutover = autoCutover } // WithAutoSourceCleanup adds the autoSourceCleanup to the svm migration modify params func (o *SvmMigrationModifyParams) WithAutoSourceCleanup(autoSourceCleanup *bool) *SvmMigrationModifyParams { o.SetAutoSourceCleanup(autoSourceCleanup) return o } // SetAutoSourceCleanup adds the autoSourceCleanup to the svm migration modify params func (o *SvmMigrationModifyParams) SetAutoSourceCleanup(autoSourceCleanup *bool) { o.AutoSourceCleanup = autoSourceCleanup } // WithInfo adds the info to the svm migration modify params func (o *SvmMigrationModifyParams) WithInfo(info *models.SvmMigration) *SvmMigrationModifyParams { o.SetInfo(info) return o } // SetInfo adds the info to the svm migration modify params func (o *SvmMigrationModifyParams) SetInfo(info *models.SvmMigration) { o.Info = info } // WithReturnTimeout adds the returnTimeout to the svm migration modify params func (o *SvmMigrationModifyParams) WithReturnTimeout(returnTimeout *int64) *SvmMigrationModifyParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm migration modify params func (o *SvmMigrationModifyParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the svm migration modify params func (o *SvmMigrationModifyParams) WithUUID(uuid string) *SvmMigrationModifyParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm migration modify params func (o *SvmMigrationModifyParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmMigrationModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Action != nil { // query param action var qrAction string if o.Action != nil { qrAction = *o.Action } qAction := qrAction if qAction != "" { if err := r.SetQueryParam("action", qAction); err != nil { return err } } } if o.AutoCutover != nil { // query param auto_cutover var qrAutoCutover bool if o.AutoCutover != nil { qrAutoCutover = *o.AutoCutover } qAutoCutover := swag.FormatBool(qrAutoCutover) if qAutoCutover != "" { if err := r.SetQueryParam("auto_cutover", qAutoCutover); err != nil { return err } } } if o.AutoSourceCleanup != nil { // query param auto_source_cleanup var qrAutoSourceCleanup bool if o.AutoSourceCleanup != nil { qrAutoSourceCleanup = *o.AutoSourceCleanup } qAutoSourceCleanup := swag.FormatBool(qrAutoSourceCleanup) if qAutoSourceCleanup != "" { if err := r.SetQueryParam("auto_source_cleanup", qAutoSourceCleanup); err != nil { return err } } } if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_directory_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_directory_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // TopMetricsSvmDirectoryCollectionGetReader is a Reader for the TopMetricsSvmDirectoryCollectionGet structure. type TopMetricsSvmDirectoryCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *TopMetricsSvmDirectoryCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewTopMetricsSvmDirectoryCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewTopMetricsSvmDirectoryCollectionGetDefault(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 } } // NewTopMetricsSvmDirectoryCollectionGetOK creates a TopMetricsSvmDirectoryCollectionGetOK with default headers values func NewTopMetricsSvmDirectoryCollectionGetOK() *TopMetricsSvmDirectoryCollectionGetOK { return &TopMetricsSvmDirectoryCollectionGetOK{} } /* TopMetricsSvmDirectoryCollectionGetOK describes a response with status code 200, with default header values. OK */ type TopMetricsSvmDirectoryCollectionGetOK struct { Payload *models.TopMetricsSvmDirectoryResponse } // IsSuccess returns true when this top metrics svm directory collection get o k response has a 2xx status code func (o *TopMetricsSvmDirectoryCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this top metrics svm directory collection get o k response has a 3xx status code func (o *TopMetricsSvmDirectoryCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this top metrics svm directory collection get o k response has a 4xx status code func (o *TopMetricsSvmDirectoryCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this top metrics svm directory collection get o k response has a 5xx status code func (o *TopMetricsSvmDirectoryCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this top metrics svm directory collection get o k response a status code equal to that given func (o *TopMetricsSvmDirectoryCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *TopMetricsSvmDirectoryCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/directories][%d] topMetricsSvmDirectoryCollectionGetOK %+v", 200, o.Payload) } func (o *TopMetricsSvmDirectoryCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/directories][%d] topMetricsSvmDirectoryCollectionGetOK %+v", 200, o.Payload) } func (o *TopMetricsSvmDirectoryCollectionGetOK) GetPayload() *models.TopMetricsSvmDirectoryResponse { return o.Payload } func (o *TopMetricsSvmDirectoryCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.TopMetricsSvmDirectoryResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewTopMetricsSvmDirectoryCollectionGetDefault creates a TopMetricsSvmDirectoryCollectionGetDefault with default headers values func NewTopMetricsSvmDirectoryCollectionGetDefault(code int) *TopMetricsSvmDirectoryCollectionGetDefault { return &TopMetricsSvmDirectoryCollectionGetDefault{ _statusCode: code, } } /* TopMetricsSvmDirectoryCollectionGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 124519405 | The activity tracking report for SVM svm.name returned zero records. Check whether the volumes belonging to the SVM have read/write traffic. Refer to the REST API documentation for more information on why there might be no records. | | 124519406 | Failed to get the activity tracking report for SVM svm.name. Reason:<Reason for failure>. | | 124519407 | SVM wildcard queries are not supported for activity tracking reports. | | 124519408 | Activity tracking is not supported on SVM svm.name, because it is configured as a destination for SVM DR. | | 124519409 | Activity tracking is not supported on SVM svm.name, because it is configured as a destination of a MetroCluster SVM relationship and the SVM admin state is stopped. | */ type TopMetricsSvmDirectoryCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the top metrics svm directory collection get default response func (o *TopMetricsSvmDirectoryCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this top metrics svm directory collection get default response has a 2xx status code func (o *TopMetricsSvmDirectoryCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this top metrics svm directory collection get default response has a 3xx status code func (o *TopMetricsSvmDirectoryCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this top metrics svm directory collection get default response has a 4xx status code func (o *TopMetricsSvmDirectoryCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this top metrics svm directory collection get default response has a 5xx status code func (o *TopMetricsSvmDirectoryCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this top metrics svm directory collection get default response a status code equal to that given func (o *TopMetricsSvmDirectoryCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *TopMetricsSvmDirectoryCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/directories][%d] top_metrics_svm_directory_collection_get default %+v", o._statusCode, o.Payload) } func (o *TopMetricsSvmDirectoryCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/directories][%d] top_metrics_svm_directory_collection_get default %+v", o._statusCode, o.Payload) } func (o *TopMetricsSvmDirectoryCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *TopMetricsSvmDirectoryCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_volume_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_volume_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmMigrationVolumeGetReader is a Reader for the SvmMigrationVolumeGet structure. type SvmMigrationVolumeGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmMigrationVolumeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmMigrationVolumeGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmMigrationVolumeGetDefault(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 } } // NewSvmMigrationVolumeGetOK creates a SvmMigrationVolumeGetOK with default headers values func NewSvmMigrationVolumeGetOK() *SvmMigrationVolumeGetOK { return &SvmMigrationVolumeGetOK{} } /* SvmMigrationVolumeGetOK describes a response with status code 200, with default header values. OK */ type SvmMigrationVolumeGetOK struct { Payload *models.SvmMigrationVolume } // IsSuccess returns true when this svm migration volume get o k response has a 2xx status code func (o *SvmMigrationVolumeGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm migration volume get o k response has a 3xx status code func (o *SvmMigrationVolumeGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm migration volume get o k response has a 4xx status code func (o *SvmMigrationVolumeGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm migration volume get o k response has a 5xx status code func (o *SvmMigrationVolumeGetOK) IsServerError() bool { return false } // IsCode returns true when this svm migration volume get o k response a status code equal to that given func (o *SvmMigrationVolumeGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmMigrationVolumeGetOK) Error() string { return fmt.Sprintf("[GET /svm/migrations/{svm_migration.uuid}/volumes/{volume.uuid}][%d] svmMigrationVolumeGetOK %+v", 200, o.Payload) } func (o *SvmMigrationVolumeGetOK) String() string { return fmt.Sprintf("[GET /svm/migrations/{svm_migration.uuid}/volumes/{volume.uuid}][%d] svmMigrationVolumeGetOK %+v", 200, o.Payload) } func (o *SvmMigrationVolumeGetOK) GetPayload() *models.SvmMigrationVolume { return o.Payload } func (o *SvmMigrationVolumeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmMigrationVolume) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmMigrationVolumeGetDefault creates a SvmMigrationVolumeGetDefault with default headers values func NewSvmMigrationVolumeGetDefault(code int) *SvmMigrationVolumeGetDefault { return &SvmMigrationVolumeGetDefault{ _statusCode: code, } } /* SvmMigrationVolumeGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 13172783 | Migrate RDB lookup failed | */ type SvmMigrationVolumeGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm migration volume get default response func (o *SvmMigrationVolumeGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm migration volume get default response has a 2xx status code func (o *SvmMigrationVolumeGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm migration volume get default response has a 3xx status code func (o *SvmMigrationVolumeGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm migration volume get default response has a 4xx status code func (o *SvmMigrationVolumeGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm migration volume get default response has a 5xx status code func (o *SvmMigrationVolumeGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm migration volume get default response a status code equal to that given func (o *SvmMigrationVolumeGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmMigrationVolumeGetDefault) Error() string { return fmt.Sprintf("[GET /svm/migrations/{svm_migration.uuid}/volumes/{volume.uuid}][%d] svm_migration_volume_get default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationVolumeGetDefault) String() string { return fmt.Sprintf("[GET /svm/migrations/{svm_migration.uuid}/volumes/{volume.uuid}][%d] svm_migration_volume_get default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationVolumeGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmMigrationVolumeGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_client_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_client_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewTopMetricsSvmClientCollectionGetParams creates a new TopMetricsSvmClientCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewTopMetricsSvmClientCollectionGetParams() *TopMetricsSvmClientCollectionGetParams { return &TopMetricsSvmClientCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewTopMetricsSvmClientCollectionGetParamsWithTimeout creates a new TopMetricsSvmClientCollectionGetParams object // with the ability to set a timeout on a request. func NewTopMetricsSvmClientCollectionGetParamsWithTimeout(timeout time.Duration) *TopMetricsSvmClientCollectionGetParams { return &TopMetricsSvmClientCollectionGetParams{ timeout: timeout, } } // NewTopMetricsSvmClientCollectionGetParamsWithContext creates a new TopMetricsSvmClientCollectionGetParams object // with the ability to set a context for a request. func NewTopMetricsSvmClientCollectionGetParamsWithContext(ctx context.Context) *TopMetricsSvmClientCollectionGetParams { return &TopMetricsSvmClientCollectionGetParams{ Context: ctx, } } // NewTopMetricsSvmClientCollectionGetParamsWithHTTPClient creates a new TopMetricsSvmClientCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewTopMetricsSvmClientCollectionGetParamsWithHTTPClient(client *http.Client) *TopMetricsSvmClientCollectionGetParams { return &TopMetricsSvmClientCollectionGetParams{ HTTPClient: client, } } /* TopMetricsSvmClientCollectionGetParams contains all the parameters to send to the API endpoint for the top metrics svm client collection get operation. Typically these are written to a http.Request. */ type TopMetricsSvmClientCollectionGetParams struct { /* ClientIP. Filter by client_ip */ ClientIP *string /* Fields. Specify the fields to return. */ Fields []string /* IopsErrorLowerBound. Filter by iops.error.lower_bound */ IopsErrorLowerBound *int64 /* IopsErrorUpperBound. Filter by iops.error.upper_bound */ IopsErrorUpperBound *int64 /* IopsRead. Filter by iops.read */ IopsRead *int64 /* IopsWrite. Filter by iops.write */ IopsWrite *int64 /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SvmName. Filter by svm.name */ SvmName *string /* SvmUUID. SVM UUID */ SvmUUID string /* ThroughputErrorLowerBound. Filter by throughput.error.lower_bound */ ThroughputErrorLowerBound *int64 /* ThroughputErrorUpperBound. Filter by throughput.error.upper_bound */ ThroughputErrorUpperBound *int64 /* ThroughputRead. Filter by throughput.read */ ThroughputRead *int64 /* ThroughputWrite. Filter by throughput.write */ ThroughputWrite *int64 /* TopMetric. IO activity type Default: "iops.read" */ TopMetric *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the top metrics svm client collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *TopMetricsSvmClientCollectionGetParams) WithDefaults() *TopMetricsSvmClientCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the top metrics svm client collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *TopMetricsSvmClientCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) topMetricDefault = string("iops.read") ) val := TopMetricsSvmClientCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, TopMetric: &topMetricDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithTimeout(timeout time.Duration) *TopMetricsSvmClientCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithContext(ctx context.Context) *TopMetricsSvmClientCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithHTTPClient(client *http.Client) *TopMetricsSvmClientCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithClientIP adds the clientIP to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithClientIP(clientIP *string) *TopMetricsSvmClientCollectionGetParams { o.SetClientIP(clientIP) return o } // SetClientIP adds the clientIp to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetClientIP(clientIP *string) { o.ClientIP = clientIP } // WithFields adds the fields to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithFields(fields []string) *TopMetricsSvmClientCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithIopsErrorLowerBound adds the iopsErrorLowerBound to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithIopsErrorLowerBound(iopsErrorLowerBound *int64) *TopMetricsSvmClientCollectionGetParams { o.SetIopsErrorLowerBound(iopsErrorLowerBound) return o } // SetIopsErrorLowerBound adds the iopsErrorLowerBound to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetIopsErrorLowerBound(iopsErrorLowerBound *int64) { o.IopsErrorLowerBound = iopsErrorLowerBound } // WithIopsErrorUpperBound adds the iopsErrorUpperBound to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithIopsErrorUpperBound(iopsErrorUpperBound *int64) *TopMetricsSvmClientCollectionGetParams { o.SetIopsErrorUpperBound(iopsErrorUpperBound) return o } // SetIopsErrorUpperBound adds the iopsErrorUpperBound to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetIopsErrorUpperBound(iopsErrorUpperBound *int64) { o.IopsErrorUpperBound = iopsErrorUpperBound } // WithIopsRead adds the iopsRead to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithIopsRead(iopsRead *int64) *TopMetricsSvmClientCollectionGetParams { o.SetIopsRead(iopsRead) return o } // SetIopsRead adds the iopsRead to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetIopsRead(iopsRead *int64) { o.IopsRead = iopsRead } // WithIopsWrite adds the iopsWrite to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithIopsWrite(iopsWrite *int64) *TopMetricsSvmClientCollectionGetParams { o.SetIopsWrite(iopsWrite) return o } // SetIopsWrite adds the iopsWrite to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetIopsWrite(iopsWrite *int64) { o.IopsWrite = iopsWrite } // WithMaxRecords adds the maxRecords to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithMaxRecords(maxRecords *int64) *TopMetricsSvmClientCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithOrderBy adds the orderBy to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithOrderBy(orderBy []string) *TopMetricsSvmClientCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithReturnRecords adds the returnRecords to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithReturnRecords(returnRecords *bool) *TopMetricsSvmClientCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *TopMetricsSvmClientCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmName adds the svmName to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithSvmName(svmName *string) *TopMetricsSvmClientCollectionGetParams { o.SetSvmName(svmName) return o } // SetSvmName adds the svmName to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetSvmName(svmName *string) { o.SvmName = svmName } // WithSvmUUID adds the svmUUID to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithSvmUUID(svmUUID string) *TopMetricsSvmClientCollectionGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WithThroughputErrorLowerBound adds the throughputErrorLowerBound to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithThroughputErrorLowerBound(throughputErrorLowerBound *int64) *TopMetricsSvmClientCollectionGetParams { o.SetThroughputErrorLowerBound(throughputErrorLowerBound) return o } // SetThroughputErrorLowerBound adds the throughputErrorLowerBound to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetThroughputErrorLowerBound(throughputErrorLowerBound *int64) { o.ThroughputErrorLowerBound = throughputErrorLowerBound } // WithThroughputErrorUpperBound adds the throughputErrorUpperBound to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithThroughputErrorUpperBound(throughputErrorUpperBound *int64) *TopMetricsSvmClientCollectionGetParams { o.SetThroughputErrorUpperBound(throughputErrorUpperBound) return o } // SetThroughputErrorUpperBound adds the throughputErrorUpperBound to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetThroughputErrorUpperBound(throughputErrorUpperBound *int64) { o.ThroughputErrorUpperBound = throughputErrorUpperBound } // WithThroughputRead adds the throughputRead to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithThroughputRead(throughputRead *int64) *TopMetricsSvmClientCollectionGetParams { o.SetThroughputRead(throughputRead) return o } // SetThroughputRead adds the throughputRead to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetThroughputRead(throughputRead *int64) { o.ThroughputRead = throughputRead } // WithThroughputWrite adds the throughputWrite to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithThroughputWrite(throughputWrite *int64) *TopMetricsSvmClientCollectionGetParams { o.SetThroughputWrite(throughputWrite) return o } // SetThroughputWrite adds the throughputWrite to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetThroughputWrite(throughputWrite *int64) { o.ThroughputWrite = throughputWrite } // WithTopMetric adds the topMetric to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) WithTopMetric(topMetric *string) *TopMetricsSvmClientCollectionGetParams { o.SetTopMetric(topMetric) return o } // SetTopMetric adds the topMetric to the top metrics svm client collection get params func (o *TopMetricsSvmClientCollectionGetParams) SetTopMetric(topMetric *string) { o.TopMetric = topMetric } // WriteToRequest writes these params to a swagger request func (o *TopMetricsSvmClientCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ClientIP != nil { // query param client_ip var qrClientIP string if o.ClientIP != nil { qrClientIP = *o.ClientIP } qClientIP := qrClientIP if qClientIP != "" { if err := r.SetQueryParam("client_ip", qClientIP); err != nil { return err } } } if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.IopsErrorLowerBound != nil { // query param iops.error.lower_bound var qrIopsErrorLowerBound int64 if o.IopsErrorLowerBound != nil { qrIopsErrorLowerBound = *o.IopsErrorLowerBound } qIopsErrorLowerBound := swag.FormatInt64(qrIopsErrorLowerBound) if qIopsErrorLowerBound != "" { if err := r.SetQueryParam("iops.error.lower_bound", qIopsErrorLowerBound); err != nil { return err } } } if o.IopsErrorUpperBound != nil { // query param iops.error.upper_bound var qrIopsErrorUpperBound int64 if o.IopsErrorUpperBound != nil { qrIopsErrorUpperBound = *o.IopsErrorUpperBound } qIopsErrorUpperBound := swag.FormatInt64(qrIopsErrorUpperBound) if qIopsErrorUpperBound != "" { if err := r.SetQueryParam("iops.error.upper_bound", qIopsErrorUpperBound); err != nil { return err } } } if o.IopsRead != nil { // query param iops.read var qrIopsRead int64 if o.IopsRead != nil { qrIopsRead = *o.IopsRead } qIopsRead := swag.FormatInt64(qrIopsRead) if qIopsRead != "" { if err := r.SetQueryParam("iops.read", qIopsRead); err != nil { return err } } } if o.IopsWrite != nil { // query param iops.write var qrIopsWrite int64 if o.IopsWrite != nil { qrIopsWrite = *o.IopsWrite } qIopsWrite := swag.FormatInt64(qrIopsWrite) if qIopsWrite != "" { if err := r.SetQueryParam("iops.write", qIopsWrite); err != nil { return err } } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.SvmName != nil { // query param svm.name var qrSvmName string if o.SvmName != nil { qrSvmName = *o.SvmName } qSvmName := qrSvmName if qSvmName != "" { if err := r.SetQueryParam("svm.name", qSvmName); err != nil { return err } } } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if o.ThroughputErrorLowerBound != nil { // query param throughput.error.lower_bound var qrThroughputErrorLowerBound int64 if o.ThroughputErrorLowerBound != nil { qrThroughputErrorLowerBound = *o.ThroughputErrorLowerBound } qThroughputErrorLowerBound := swag.FormatInt64(qrThroughputErrorLowerBound) if qThroughputErrorLowerBound != "" { if err := r.SetQueryParam("throughput.error.lower_bound", qThroughputErrorLowerBound); err != nil { return err } } } if o.ThroughputErrorUpperBound != nil { // query param throughput.error.upper_bound var qrThroughputErrorUpperBound int64 if o.ThroughputErrorUpperBound != nil { qrThroughputErrorUpperBound = *o.ThroughputErrorUpperBound } qThroughputErrorUpperBound := swag.FormatInt64(qrThroughputErrorUpperBound) if qThroughputErrorUpperBound != "" { if err := r.SetQueryParam("throughput.error.upper_bound", qThroughputErrorUpperBound); err != nil { return err } } } if o.ThroughputRead != nil { // query param throughput.read var qrThroughputRead int64 if o.ThroughputRead != nil { qrThroughputRead = *o.ThroughputRead } qThroughputRead := swag.FormatInt64(qrThroughputRead) if qThroughputRead != "" { if err := r.SetQueryParam("throughput.read", qThroughputRead); err != nil { return err } } } if o.ThroughputWrite != nil { // query param throughput.write var qrThroughputWrite int64 if o.ThroughputWrite != nil { qrThroughputWrite = *o.ThroughputWrite } qThroughputWrite := swag.FormatInt64(qrThroughputWrite) if qThroughputWrite != "" { if err := r.SetQueryParam("throughput.write", qThroughputWrite); err != nil { return err } } } if o.TopMetric != nil { // query param top_metric var qrTopMetric string if o.TopMetric != nil { qrTopMetric = *o.TopMetric } qTopMetric := qrTopMetric if qTopMetric != "" { if err := r.SetQueryParam("top_metric", qTopMetric); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamTopMetricsSvmClientCollectionGet binds the parameter fields func (o *TopMetricsSvmClientCollectionGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamTopMetricsSvmClientCollectionGet binds the parameter order_by func (o *TopMetricsSvmClientCollectionGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_delete_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_delete_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmMigrationDeleteReader is a Reader for the SvmMigrationDelete structure. type SvmMigrationDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmMigrationDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmMigrationDeleteAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmMigrationDeleteDefault(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 } } // NewSvmMigrationDeleteAccepted creates a SvmMigrationDeleteAccepted with default headers values func NewSvmMigrationDeleteAccepted() *SvmMigrationDeleteAccepted { return &SvmMigrationDeleteAccepted{} } /* SvmMigrationDeleteAccepted describes a response with status code 202, with default header values. Accepted */ type SvmMigrationDeleteAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this svm migration delete accepted response has a 2xx status code func (o *SvmMigrationDeleteAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm migration delete accepted response has a 3xx status code func (o *SvmMigrationDeleteAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm migration delete accepted response has a 4xx status code func (o *SvmMigrationDeleteAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm migration delete accepted response has a 5xx status code func (o *SvmMigrationDeleteAccepted) IsServerError() bool { return false } // IsCode returns true when this svm migration delete accepted response a status code equal to that given func (o *SvmMigrationDeleteAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmMigrationDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /svm/migrations/{uuid}][%d] svmMigrationDeleteAccepted %+v", 202, o.Payload) } func (o *SvmMigrationDeleteAccepted) String() string { return fmt.Sprintf("[DELETE /svm/migrations/{uuid}][%d] svmMigrationDeleteAccepted %+v", 202, o.Payload) } func (o *SvmMigrationDeleteAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SvmMigrationDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmMigrationDeleteDefault creates a SvmMigrationDeleteDefault with default headers values func NewSvmMigrationDeleteDefault(code int) *SvmMigrationDeleteDefault { return &SvmMigrationDeleteDefault{ _statusCode: code, } } /* SvmMigrationDeleteDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 13172783 | Migrate RDB lookup failed | */ type SvmMigrationDeleteDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm migration delete default response func (o *SvmMigrationDeleteDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm migration delete default response has a 2xx status code func (o *SvmMigrationDeleteDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm migration delete default response has a 3xx status code func (o *SvmMigrationDeleteDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm migration delete default response has a 4xx status code func (o *SvmMigrationDeleteDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm migration delete default response has a 5xx status code func (o *SvmMigrationDeleteDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm migration delete default response a status code equal to that given func (o *SvmMigrationDeleteDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmMigrationDeleteDefault) Error() string { return fmt.Sprintf("[DELETE /svm/migrations/{uuid}][%d] svm_migration_delete default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationDeleteDefault) String() string { return fmt.Sprintf("[DELETE /svm/migrations/{uuid}][%d] svm_migration_delete default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationDeleteDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmMigrationDeleteDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmPeerCollectionGetParams creates a new SvmPeerCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerCollectionGetParams() *SvmPeerCollectionGetParams { return &SvmPeerCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerCollectionGetParamsWithTimeout creates a new SvmPeerCollectionGetParams object // with the ability to set a timeout on a request. func NewSvmPeerCollectionGetParamsWithTimeout(timeout time.Duration) *SvmPeerCollectionGetParams { return &SvmPeerCollectionGetParams{ timeout: timeout, } } // NewSvmPeerCollectionGetParamsWithContext creates a new SvmPeerCollectionGetParams object // with the ability to set a context for a request. func NewSvmPeerCollectionGetParamsWithContext(ctx context.Context) *SvmPeerCollectionGetParams { return &SvmPeerCollectionGetParams{ Context: ctx, } } // NewSvmPeerCollectionGetParamsWithHTTPClient creates a new SvmPeerCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerCollectionGetParamsWithHTTPClient(client *http.Client) *SvmPeerCollectionGetParams { return &SvmPeerCollectionGetParams{ HTTPClient: client, } } /* SvmPeerCollectionGetParams contains all the parameters to send to the API endpoint for the svm peer collection get operation. Typically these are written to a http.Request. */ type SvmPeerCollectionGetParams struct { /* Applications. Filter by applications */ Applications *string /* Fields. Specify the fields to return. */ Fields []string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* Name. Filter by name */ Name *string /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* PeerClusterName. Filter by peer.cluster.name */ PeerClusterName *string /* PeerClusterUUID. Filter by peer.cluster.uuid */ PeerClusterUUID *string /* PeerSvmName. Filter by peer.svm.name */ PeerSvmName *string /* PeerSvmUUID. Filter by peer.svm.uuid */ PeerSvmUUID *string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* State. Filter by state */ State *string /* SvmName. Filter by svm.name */ SvmName *string /* SvmUUID. Filter by svm.uuid */ SvmUUID *string /* UUID. Filter by uuid */ UUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerCollectionGetParams) WithDefaults() *SvmPeerCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SvmPeerCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithTimeout(timeout time.Duration) *SvmPeerCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithContext(ctx context.Context) *SvmPeerCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithHTTPClient(client *http.Client) *SvmPeerCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithApplications adds the applications to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithApplications(applications *string) *SvmPeerCollectionGetParams { o.SetApplications(applications) return o } // SetApplications adds the applications to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetApplications(applications *string) { o.Applications = applications } // WithFields adds the fields to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithFields(fields []string) *SvmPeerCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithMaxRecords adds the maxRecords to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithMaxRecords(maxRecords *int64) *SvmPeerCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithName adds the name to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithName(name *string) *SvmPeerCollectionGetParams { o.SetName(name) return o } // SetName adds the name to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetName(name *string) { o.Name = name } // WithOrderBy adds the orderBy to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithOrderBy(orderBy []string) *SvmPeerCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithPeerClusterName adds the peerClusterName to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithPeerClusterName(peerClusterName *string) *SvmPeerCollectionGetParams { o.SetPeerClusterName(peerClusterName) return o } // SetPeerClusterName adds the peerClusterName to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetPeerClusterName(peerClusterName *string) { o.PeerClusterName = peerClusterName } // WithPeerClusterUUID adds the peerClusterUUID to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithPeerClusterUUID(peerClusterUUID *string) *SvmPeerCollectionGetParams { o.SetPeerClusterUUID(peerClusterUUID) return o } // SetPeerClusterUUID adds the peerClusterUuid to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetPeerClusterUUID(peerClusterUUID *string) { o.PeerClusterUUID = peerClusterUUID } // WithPeerSvmName adds the peerSvmName to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithPeerSvmName(peerSvmName *string) *SvmPeerCollectionGetParams { o.SetPeerSvmName(peerSvmName) return o } // SetPeerSvmName adds the peerSvmName to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetPeerSvmName(peerSvmName *string) { o.PeerSvmName = peerSvmName } // WithPeerSvmUUID adds the peerSvmUUID to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithPeerSvmUUID(peerSvmUUID *string) *SvmPeerCollectionGetParams { o.SetPeerSvmUUID(peerSvmUUID) return o } // SetPeerSvmUUID adds the peerSvmUuid to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetPeerSvmUUID(peerSvmUUID *string) { o.PeerSvmUUID = peerSvmUUID } // WithReturnRecords adds the returnRecords to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithReturnRecords(returnRecords *bool) *SvmPeerCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SvmPeerCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithState adds the state to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithState(state *string) *SvmPeerCollectionGetParams { o.SetState(state) return o } // SetState adds the state to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetState(state *string) { o.State = state } // WithSvmName adds the svmName to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithSvmName(svmName *string) *SvmPeerCollectionGetParams { o.SetSvmName(svmName) return o } // SetSvmName adds the svmName to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetSvmName(svmName *string) { o.SvmName = svmName } // WithSvmUUID adds the svmUUID to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithSvmUUID(svmUUID *string) *SvmPeerCollectionGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetSvmUUID(svmUUID *string) { o.SvmUUID = svmUUID } // WithUUID adds the uuid to the svm peer collection get params func (o *SvmPeerCollectionGetParams) WithUUID(uuid *string) *SvmPeerCollectionGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm peer collection get params func (o *SvmPeerCollectionGetParams) SetUUID(uuid *string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmPeerCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Applications != nil { // query param applications var qrApplications string if o.Applications != nil { qrApplications = *o.Applications } qApplications := qrApplications if qApplications != "" { if err := r.SetQueryParam("applications", qApplications); err != nil { return err } } } if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.Name != nil { // query param name var qrName string if o.Name != nil { qrName = *o.Name } qName := qrName if qName != "" { if err := r.SetQueryParam("name", qName); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.PeerClusterName != nil { // query param peer.cluster.name var qrPeerClusterName string if o.PeerClusterName != nil { qrPeerClusterName = *o.PeerClusterName } qPeerClusterName := qrPeerClusterName if qPeerClusterName != "" { if err := r.SetQueryParam("peer.cluster.name", qPeerClusterName); err != nil { return err } } } if o.PeerClusterUUID != nil { // query param peer.cluster.uuid var qrPeerClusterUUID string if o.PeerClusterUUID != nil { qrPeerClusterUUID = *o.PeerClusterUUID } qPeerClusterUUID := qrPeerClusterUUID if qPeerClusterUUID != "" { if err := r.SetQueryParam("peer.cluster.uuid", qPeerClusterUUID); err != nil { return err } } } if o.PeerSvmName != nil { // query param peer.svm.name var qrPeerSvmName string if o.PeerSvmName != nil { qrPeerSvmName = *o.PeerSvmName } qPeerSvmName := qrPeerSvmName if qPeerSvmName != "" { if err := r.SetQueryParam("peer.svm.name", qPeerSvmName); err != nil { return err } } } if o.PeerSvmUUID != nil { // query param peer.svm.uuid var qrPeerSvmUUID string if o.PeerSvmUUID != nil { qrPeerSvmUUID = *o.PeerSvmUUID } qPeerSvmUUID := qrPeerSvmUUID if qPeerSvmUUID != "" { if err := r.SetQueryParam("peer.svm.uuid", qPeerSvmUUID); err != nil { return err } } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.State != nil { // query param state var qrState string if o.State != nil { qrState = *o.State } qState := qrState if qState != "" { if err := r.SetQueryParam("state", qState); err != nil { return err } } } if o.SvmName != nil { // query param svm.name var qrSvmName string if o.SvmName != nil { qrSvmName = *o.SvmName } qSvmName := qrSvmName if qSvmName != "" { if err := r.SetQueryParam("svm.name", qSvmName); err != nil { return err } } } if o.SvmUUID != nil { // query param svm.uuid var qrSvmUUID string if o.SvmUUID != nil { qrSvmUUID = *o.SvmUUID } qSvmUUID := qrSvmUUID if qSvmUUID != "" { if err := r.SetQueryParam("svm.uuid", qSvmUUID); err != nil { return err } } } if o.UUID != nil { // query param uuid var qrUUID string if o.UUID != nil { qrUUID = *o.UUID } qUUID := qrUUID if qUUID != "" { if err := r.SetQueryParam("uuid", qUUID); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSvmPeerCollectionGet binds the parameter fields func (o *SvmPeerCollectionGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamSvmPeerCollectionGet binds the parameter order_by func (o *SvmPeerCollectionGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/web_svm_modify_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/web_svm_modify_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewWebSvmModifyParams creates a new WebSvmModifyParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewWebSvmModifyParams() *WebSvmModifyParams { return &WebSvmModifyParams{ timeout: cr.DefaultTimeout, } } // NewWebSvmModifyParamsWithTimeout creates a new WebSvmModifyParams object // with the ability to set a timeout on a request. func NewWebSvmModifyParamsWithTimeout(timeout time.Duration) *WebSvmModifyParams { return &WebSvmModifyParams{ timeout: timeout, } } // NewWebSvmModifyParamsWithContext creates a new WebSvmModifyParams object // with the ability to set a context for a request. func NewWebSvmModifyParamsWithContext(ctx context.Context) *WebSvmModifyParams { return &WebSvmModifyParams{ Context: ctx, } } // NewWebSvmModifyParamsWithHTTPClient creates a new WebSvmModifyParams object // with the ability to set a custom HTTPClient for a request. func NewWebSvmModifyParamsWithHTTPClient(client *http.Client) *WebSvmModifyParams { return &WebSvmModifyParams{ HTTPClient: client, } } /* WebSvmModifyParams contains all the parameters to send to the API endpoint for the web svm modify operation. Typically these are written to a http.Request. */ type WebSvmModifyParams struct { /* Info. Web services security configuration. */ Info *models.WebSvm /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* SvmUUID. UUID of the SVM to which this object belongs. */ SvmUUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the web svm modify params (not the query body). // // All values with no default are reset to their zero value. func (o *WebSvmModifyParams) WithDefaults() *WebSvmModifyParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the web svm modify params (not the query body). // // All values with no default are reset to their zero value. func (o *WebSvmModifyParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := WebSvmModifyParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the web svm modify params func (o *WebSvmModifyParams) WithTimeout(timeout time.Duration) *WebSvmModifyParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the web svm modify params func (o *WebSvmModifyParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the web svm modify params func (o *WebSvmModifyParams) WithContext(ctx context.Context) *WebSvmModifyParams { o.SetContext(ctx) return o } // SetContext adds the context to the web svm modify params func (o *WebSvmModifyParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the web svm modify params func (o *WebSvmModifyParams) WithHTTPClient(client *http.Client) *WebSvmModifyParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the web svm modify params func (o *WebSvmModifyParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the web svm modify params func (o *WebSvmModifyParams) WithInfo(info *models.WebSvm) *WebSvmModifyParams { o.SetInfo(info) return o } // SetInfo adds the info to the web svm modify params func (o *WebSvmModifyParams) SetInfo(info *models.WebSvm) { o.Info = info } // WithReturnTimeout adds the returnTimeout to the web svm modify params func (o *WebSvmModifyParams) WithReturnTimeout(returnTimeout *int64) *WebSvmModifyParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the web svm modify params func (o *WebSvmModifyParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmUUID adds the svmUUID to the web svm modify params func (o *WebSvmModifyParams) WithSvmUUID(svmUUID string) *WebSvmModifyParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the web svm modify params func (o *WebSvmModifyParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WriteToRequest writes these params to a swagger request func (o *WebSvmModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_modify_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_modify_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerPermissionModifyReader is a Reader for the SvmPeerPermissionModify structure. type SvmPeerPermissionModifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerPermissionModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmPeerPermissionModifyOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerPermissionModifyDefault(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 } } // NewSvmPeerPermissionModifyOK creates a SvmPeerPermissionModifyOK with default headers values func NewSvmPeerPermissionModifyOK() *SvmPeerPermissionModifyOK { return &SvmPeerPermissionModifyOK{} } /* SvmPeerPermissionModifyOK describes a response with status code 200, with default header values. OK */ type SvmPeerPermissionModifyOK struct { Payload *models.SvmPeerPermission } // IsSuccess returns true when this svm peer permission modify o k response has a 2xx status code func (o *SvmPeerPermissionModifyOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer permission modify o k response has a 3xx status code func (o *SvmPeerPermissionModifyOK) IsRedirect() bool { return false } // IsClientError returns true when this svm peer permission modify o k response has a 4xx status code func (o *SvmPeerPermissionModifyOK) IsClientError() bool { return false } // IsServerError returns true when this svm peer permission modify o k response has a 5xx status code func (o *SvmPeerPermissionModifyOK) IsServerError() bool { return false } // IsCode returns true when this svm peer permission modify o k response a status code equal to that given func (o *SvmPeerPermissionModifyOK) IsCode(code int) bool { return code == 200 } func (o *SvmPeerPermissionModifyOK) Error() string { return fmt.Sprintf("[PATCH /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svmPeerPermissionModifyOK %+v", 200, o.Payload) } func (o *SvmPeerPermissionModifyOK) String() string { return fmt.Sprintf("[PATCH /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svmPeerPermissionModifyOK %+v", 200, o.Payload) } func (o *SvmPeerPermissionModifyOK) GetPayload() *models.SvmPeerPermission { return o.Payload } func (o *SvmPeerPermissionModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmPeerPermission) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmPeerPermissionModifyDefault creates a SvmPeerPermissionModifyDefault with default headers values func NewSvmPeerPermissionModifyDefault(code int) *SvmPeerPermissionModifyDefault { return &SvmPeerPermissionModifyDefault{ _statusCode: code, } } /* SvmPeerPermissionModifyDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 26345572 | {field} is a required field. | | 26345574 | Failed to find the SVM or volume name with UUID. | ``` <br/> */ type SvmPeerPermissionModifyDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer permission modify default response func (o *SvmPeerPermissionModifyDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer permission modify default response has a 2xx status code func (o *SvmPeerPermissionModifyDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer permission modify default response has a 3xx status code func (o *SvmPeerPermissionModifyDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer permission modify default response has a 4xx status code func (o *SvmPeerPermissionModifyDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer permission modify default response has a 5xx status code func (o *SvmPeerPermissionModifyDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer permission modify default response a status code equal to that given func (o *SvmPeerPermissionModifyDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerPermissionModifyDefault) Error() string { return fmt.Sprintf("[PATCH /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svm_peer_permission_modify default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionModifyDefault) String() string { return fmt.Sprintf("[PATCH /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svm_peer_permission_modify default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionModifyDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerPermissionModifyDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_delete_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_delete_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerDeleteReader is a Reader for the SvmPeerDelete structure. type SvmPeerDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmPeerDeleteAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerDeleteDefault(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 } } // NewSvmPeerDeleteAccepted creates a SvmPeerDeleteAccepted with default headers values func NewSvmPeerDeleteAccepted() *SvmPeerDeleteAccepted { return &SvmPeerDeleteAccepted{} } /* SvmPeerDeleteAccepted describes a response with status code 202, with default header values. Accepted */ type SvmPeerDeleteAccepted struct { } // IsSuccess returns true when this svm peer delete accepted response has a 2xx status code func (o *SvmPeerDeleteAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer delete accepted response has a 3xx status code func (o *SvmPeerDeleteAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm peer delete accepted response has a 4xx status code func (o *SvmPeerDeleteAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm peer delete accepted response has a 5xx status code func (o *SvmPeerDeleteAccepted) IsServerError() bool { return false } // IsCode returns true when this svm peer delete accepted response a status code equal to that given func (o *SvmPeerDeleteAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmPeerDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /svm/peers/{uuid}][%d] svmPeerDeleteAccepted ", 202) } func (o *SvmPeerDeleteAccepted) String() string { return fmt.Sprintf("[DELETE /svm/peers/{uuid}][%d] svmPeerDeleteAccepted ", 202) } func (o *SvmPeerDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewSvmPeerDeleteDefault creates a SvmPeerDeleteDefault with default headers values func NewSvmPeerDeleteDefault(code int) *SvmPeerDeleteDefault { return &SvmPeerDeleteDefault{ _statusCode: code, } } /* SvmPeerDeleteDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 26345578 | Internal error. Unable to retrieve local or peer SVM name. | ``` <br/> */ type SvmPeerDeleteDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer delete default response func (o *SvmPeerDeleteDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer delete default response has a 2xx status code func (o *SvmPeerDeleteDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer delete default response has a 3xx status code func (o *SvmPeerDeleteDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer delete default response has a 4xx status code func (o *SvmPeerDeleteDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer delete default response has a 5xx status code func (o *SvmPeerDeleteDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer delete default response a status code equal to that given func (o *SvmPeerDeleteDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerDeleteDefault) Error() string { return fmt.Sprintf("[DELETE /svm/peers/{uuid}][%d] svm_peer_delete default %+v", o._statusCode, o.Payload) } func (o *SvmPeerDeleteDefault) String() string { return fmt.Sprintf("[DELETE /svm/peers/{uuid}][%d] svm_peer_delete default %+v", o._statusCode, o.Payload) } func (o *SvmPeerDeleteDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerDeleteDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_volume_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_volume_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmMigrationVolumeCollectionGetReader is a Reader for the SvmMigrationVolumeCollectionGet structure. type SvmMigrationVolumeCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmMigrationVolumeCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmMigrationVolumeCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmMigrationVolumeCollectionGetDefault(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 } } // NewSvmMigrationVolumeCollectionGetOK creates a SvmMigrationVolumeCollectionGetOK with default headers values func NewSvmMigrationVolumeCollectionGetOK() *SvmMigrationVolumeCollectionGetOK { return &SvmMigrationVolumeCollectionGetOK{} } /* SvmMigrationVolumeCollectionGetOK describes a response with status code 200, with default header values. OK */ type SvmMigrationVolumeCollectionGetOK struct { Payload *models.SvmMigrationVolumeResponse } // IsSuccess returns true when this svm migration volume collection get o k response has a 2xx status code func (o *SvmMigrationVolumeCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm migration volume collection get o k response has a 3xx status code func (o *SvmMigrationVolumeCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm migration volume collection get o k response has a 4xx status code func (o *SvmMigrationVolumeCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm migration volume collection get o k response has a 5xx status code func (o *SvmMigrationVolumeCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this svm migration volume collection get o k response a status code equal to that given func (o *SvmMigrationVolumeCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmMigrationVolumeCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/migrations/{svm_migration.uuid}/volumes][%d] svmMigrationVolumeCollectionGetOK %+v", 200, o.Payload) } func (o *SvmMigrationVolumeCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/migrations/{svm_migration.uuid}/volumes][%d] svmMigrationVolumeCollectionGetOK %+v", 200, o.Payload) } func (o *SvmMigrationVolumeCollectionGetOK) GetPayload() *models.SvmMigrationVolumeResponse { return o.Payload } func (o *SvmMigrationVolumeCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmMigrationVolumeResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmMigrationVolumeCollectionGetDefault creates a SvmMigrationVolumeCollectionGetDefault with default headers values func NewSvmMigrationVolumeCollectionGetDefault(code int) *SvmMigrationVolumeCollectionGetDefault { return &SvmMigrationVolumeCollectionGetDefault{ _statusCode: code, } } /* SvmMigrationVolumeCollectionGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 13172783 | Migrate RDB lookup failed | */ type SvmMigrationVolumeCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm migration volume collection get default response func (o *SvmMigrationVolumeCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm migration volume collection get default response has a 2xx status code func (o *SvmMigrationVolumeCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm migration volume collection get default response has a 3xx status code func (o *SvmMigrationVolumeCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm migration volume collection get default response has a 4xx status code func (o *SvmMigrationVolumeCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm migration volume collection get default response has a 5xx status code func (o *SvmMigrationVolumeCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm migration volume collection get default response a status code equal to that given func (o *SvmMigrationVolumeCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmMigrationVolumeCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/migrations/{svm_migration.uuid}/volumes][%d] svm_migration_volume_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationVolumeCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/migrations/{svm_migration.uuid}/volumes][%d] svm_migration_volume_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationVolumeCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmMigrationVolumeCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmCollectionGetParams creates a new SvmCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmCollectionGetParams() *SvmCollectionGetParams { return &SvmCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmCollectionGetParamsWithTimeout creates a new SvmCollectionGetParams object // with the ability to set a timeout on a request. func NewSvmCollectionGetParamsWithTimeout(timeout time.Duration) *SvmCollectionGetParams { return &SvmCollectionGetParams{ timeout: timeout, } } // NewSvmCollectionGetParamsWithContext creates a new SvmCollectionGetParams object // with the ability to set a context for a request. func NewSvmCollectionGetParamsWithContext(ctx context.Context) *SvmCollectionGetParams { return &SvmCollectionGetParams{ Context: ctx, } } // NewSvmCollectionGetParamsWithHTTPClient creates a new SvmCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmCollectionGetParamsWithHTTPClient(client *http.Client) *SvmCollectionGetParams { return &SvmCollectionGetParams{ HTTPClient: client, } } /* SvmCollectionGetParams contains all the parameters to send to the API endpoint for the svm collection get operation. Typically these are written to a http.Request. */ type SvmCollectionGetParams struct { /* AggregatesName. Filter by aggregates.name */ AggregatesName *string /* AggregatesUUID. Filter by aggregates.uuid */ AggregatesUUID *string /* AntiRansomwareDefaultVolumeState. Filter by anti_ransomware_default_volume_state */ AntiRansomwareDefaultVolumeState *string /* AutoEnableActivityTracking. Filter by auto_enable_activity_tracking. */ AutoEnableActivityTracking *bool /* AutoEnableAnalytics. Filter by auto_enable_analytics. */ AutoEnableAnalytics *bool /* CertificateUUID. Filter by certificate.uuid */ CertificateUUID *string /* CifsAdDomainFqdn. Filter by cifs.ad_domain.fqdn */ CifsAdDomainFqdn *string /* CifsAdDomainOrganizationalUnit. Filter by cifs.ad_domain.organizational_unit */ CifsAdDomainOrganizationalUnit *string /* CifsAllowed. Filter by cifs.allowed */ CifsAllowed *bool /* CifsEnabled. Filter by cifs.enabled */ CifsEnabled *bool /* CifsName. Filter by cifs.name */ CifsName *string /* Comment. Filter by comment */ Comment *string /* DNSDomains. Filter by dns.domains */ DNSDomains *string /* DNSServers. Filter by dns.servers */ DNSServers *string /* FcInterfacesDataProtocol. Filter by fc_interfaces.data_protocol */ FcInterfacesDataProtocol *string /* FcInterfacesName. Filter by fc_interfaces.name */ FcInterfacesName *string /* FcpAllowed. Filter by fcp.allowed */ FcpAllowed *bool /* FcpEnabled. Filter by fcp.enabled */ FcpEnabled *bool /* Fields. Specify the fields to return. */ Fields []string /* IpspaceName. Filter by ipspace.name */ IpspaceName *string /* IpspaceUUID. Filter by ipspace.uuid */ IpspaceUUID *string /* IscsiAllowed. Filter by iscsi.allowed */ IscsiAllowed *bool /* IscsiEnabled. Filter by iscsi.enabled */ IscsiEnabled *bool /* Language. Filter by language */ Language *string /* LdapAdDomain. Filter by ldap.ad_domain */ LdapAdDomain *string /* LdapBaseDn. Filter by ldap.base_dn */ LdapBaseDn *string /* LdapBindDn. Filter by ldap.bind_dn */ LdapBindDn *string /* LdapEnabled. Filter by ldap.enabled */ LdapEnabled *bool /* LdapServers. Filter by ldap.servers */ LdapServers *string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* MaxVolumes. Filter max_volumes */ MaxVolumes *string /* Name. Filter by name */ Name *string /* NdmpAllowed. Filter by ndmp.allowed */ NdmpAllowed *bool /* NfsAllowed. Filter by nfs.allowed */ NfsAllowed *bool /* NfsEnabled. Filter by nfs.enabled */ NfsEnabled *bool /* NisDomain. Filter by nis.domain */ NisDomain *string /* NisEnabled. Filter by nis.enabled */ NisEnabled *bool /* NisServers. Filter by nis.servers */ NisServers *string /* NsswitchGroup. Filter by nsswitch.group */ NsswitchGroup *string /* NsswitchHosts. Filter by nsswitch.hosts */ NsswitchHosts *string /* NsswitchNamemap. Filter by nsswitch.namemap */ NsswitchNamemap *string /* NsswitchNetgroup. Filter by nsswitch.netgroup */ NsswitchNetgroup *string /* NsswitchPasswd. Filter by nsswitch.passwd */ NsswitchPasswd *string /* NvmeAllowed. Filter by nvme.allowed */ NvmeAllowed *bool /* NvmeEnabled. Filter by nvme.enabled */ NvmeEnabled *bool /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* QosPolicyName. Filter qos_policy.name */ QosPolicyName *string /* QosPolicyUUID. Filter qos_policy.uuid */ QosPolicyUUID *string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* S3Allowed. Filter by s3.allowed */ S3Allowed *bool /* S3Enabled. Filter by s3.enabled */ S3Enabled *bool /* S3Name. Filter by s3.name */ S3Name *string /* SnapshotPolicyName. Filter by snapshot_policy.name */ SnapshotPolicyName *string /* SnapshotPolicyUUID. Filter by snapshot_policy.uuid */ SnapshotPolicyUUID *string /* State. Filter by state */ State *string /* Subtype. Filter by subtype */ Subtype *string /* UUID. Filter by uuid */ UUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmCollectionGetParams) WithDefaults() *SvmCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SvmCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm collection get params func (o *SvmCollectionGetParams) WithTimeout(timeout time.Duration) *SvmCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm collection get params func (o *SvmCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm collection get params func (o *SvmCollectionGetParams) WithContext(ctx context.Context) *SvmCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm collection get params func (o *SvmCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm collection get params func (o *SvmCollectionGetParams) WithHTTPClient(client *http.Client) *SvmCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm collection get params func (o *SvmCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithAggregatesName adds the aggregatesName to the svm collection get params func (o *SvmCollectionGetParams) WithAggregatesName(aggregatesName *string) *SvmCollectionGetParams { o.SetAggregatesName(aggregatesName) return o } // SetAggregatesName adds the aggregatesName to the svm collection get params func (o *SvmCollectionGetParams) SetAggregatesName(aggregatesName *string) { o.AggregatesName = aggregatesName } // WithAggregatesUUID adds the aggregatesUUID to the svm collection get params func (o *SvmCollectionGetParams) WithAggregatesUUID(aggregatesUUID *string) *SvmCollectionGetParams { o.SetAggregatesUUID(aggregatesUUID) return o } // SetAggregatesUUID adds the aggregatesUuid to the svm collection get params func (o *SvmCollectionGetParams) SetAggregatesUUID(aggregatesUUID *string) { o.AggregatesUUID = aggregatesUUID } // WithAntiRansomwareDefaultVolumeState adds the antiRansomwareDefaultVolumeState to the svm collection get params func (o *SvmCollectionGetParams) WithAntiRansomwareDefaultVolumeState(antiRansomwareDefaultVolumeState *string) *SvmCollectionGetParams { o.SetAntiRansomwareDefaultVolumeState(antiRansomwareDefaultVolumeState) return o } // SetAntiRansomwareDefaultVolumeState adds the antiRansomwareDefaultVolumeState to the svm collection get params func (o *SvmCollectionGetParams) SetAntiRansomwareDefaultVolumeState(antiRansomwareDefaultVolumeState *string) { o.AntiRansomwareDefaultVolumeState = antiRansomwareDefaultVolumeState } // WithAutoEnableActivityTracking adds the autoEnableActivityTracking to the svm collection get params func (o *SvmCollectionGetParams) WithAutoEnableActivityTracking(autoEnableActivityTracking *bool) *SvmCollectionGetParams { o.SetAutoEnableActivityTracking(autoEnableActivityTracking) return o } // SetAutoEnableActivityTracking adds the autoEnableActivityTracking to the svm collection get params func (o *SvmCollectionGetParams) SetAutoEnableActivityTracking(autoEnableActivityTracking *bool) { o.AutoEnableActivityTracking = autoEnableActivityTracking } // WithAutoEnableAnalytics adds the autoEnableAnalytics to the svm collection get params func (o *SvmCollectionGetParams) WithAutoEnableAnalytics(autoEnableAnalytics *bool) *SvmCollectionGetParams { o.SetAutoEnableAnalytics(autoEnableAnalytics) return o } // SetAutoEnableAnalytics adds the autoEnableAnalytics to the svm collection get params func (o *SvmCollectionGetParams) SetAutoEnableAnalytics(autoEnableAnalytics *bool) { o.AutoEnableAnalytics = autoEnableAnalytics } // WithCertificateUUID adds the certificateUUID to the svm collection get params func (o *SvmCollectionGetParams) WithCertificateUUID(certificateUUID *string) *SvmCollectionGetParams { o.SetCertificateUUID(certificateUUID) return o } // SetCertificateUUID adds the certificateUuid to the svm collection get params func (o *SvmCollectionGetParams) SetCertificateUUID(certificateUUID *string) { o.CertificateUUID = certificateUUID } // WithCifsAdDomainFqdn adds the cifsAdDomainFqdn to the svm collection get params func (o *SvmCollectionGetParams) WithCifsAdDomainFqdn(cifsAdDomainFqdn *string) *SvmCollectionGetParams { o.SetCifsAdDomainFqdn(cifsAdDomainFqdn) return o } // SetCifsAdDomainFqdn adds the cifsAdDomainFqdn to the svm collection get params func (o *SvmCollectionGetParams) SetCifsAdDomainFqdn(cifsAdDomainFqdn *string) { o.CifsAdDomainFqdn = cifsAdDomainFqdn } // WithCifsAdDomainOrganizationalUnit adds the cifsAdDomainOrganizationalUnit to the svm collection get params func (o *SvmCollectionGetParams) WithCifsAdDomainOrganizationalUnit(cifsAdDomainOrganizationalUnit *string) *SvmCollectionGetParams { o.SetCifsAdDomainOrganizationalUnit(cifsAdDomainOrganizationalUnit) return o } // SetCifsAdDomainOrganizationalUnit adds the cifsAdDomainOrganizationalUnit to the svm collection get params func (o *SvmCollectionGetParams) SetCifsAdDomainOrganizationalUnit(cifsAdDomainOrganizationalUnit *string) { o.CifsAdDomainOrganizationalUnit = cifsAdDomainOrganizationalUnit } // WithCifsAllowed adds the cifsAllowed to the svm collection get params func (o *SvmCollectionGetParams) WithCifsAllowed(cifsAllowed *bool) *SvmCollectionGetParams { o.SetCifsAllowed(cifsAllowed) return o } // SetCifsAllowed adds the cifsAllowed to the svm collection get params func (o *SvmCollectionGetParams) SetCifsAllowed(cifsAllowed *bool) { o.CifsAllowed = cifsAllowed } // WithCifsEnabled adds the cifsEnabled to the svm collection get params func (o *SvmCollectionGetParams) WithCifsEnabled(cifsEnabled *bool) *SvmCollectionGetParams { o.SetCifsEnabled(cifsEnabled) return o } // SetCifsEnabled adds the cifsEnabled to the svm collection get params func (o *SvmCollectionGetParams) SetCifsEnabled(cifsEnabled *bool) { o.CifsEnabled = cifsEnabled } // WithCifsName adds the cifsName to the svm collection get params func (o *SvmCollectionGetParams) WithCifsName(cifsName *string) *SvmCollectionGetParams { o.SetCifsName(cifsName) return o } // SetCifsName adds the cifsName to the svm collection get params func (o *SvmCollectionGetParams) SetCifsName(cifsName *string) { o.CifsName = cifsName } // WithComment adds the comment to the svm collection get params func (o *SvmCollectionGetParams) WithComment(comment *string) *SvmCollectionGetParams { o.SetComment(comment) return o } // SetComment adds the comment to the svm collection get params func (o *SvmCollectionGetParams) SetComment(comment *string) { o.Comment = comment } // WithDNSDomains adds the dNSDomains to the svm collection get params func (o *SvmCollectionGetParams) WithDNSDomains(dNSDomains *string) *SvmCollectionGetParams { o.SetDNSDomains(dNSDomains) return o } // SetDNSDomains adds the dnsDomains to the svm collection get params func (o *SvmCollectionGetParams) SetDNSDomains(dNSDomains *string) { o.DNSDomains = dNSDomains } // WithDNSServers adds the dNSServers to the svm collection get params func (o *SvmCollectionGetParams) WithDNSServers(dNSServers *string) *SvmCollectionGetParams { o.SetDNSServers(dNSServers) return o } // SetDNSServers adds the dnsServers to the svm collection get params func (o *SvmCollectionGetParams) SetDNSServers(dNSServers *string) { o.DNSServers = dNSServers } // WithFcInterfacesDataProtocol adds the fcInterfacesDataProtocol to the svm collection get params func (o *SvmCollectionGetParams) WithFcInterfacesDataProtocol(fcInterfacesDataProtocol *string) *SvmCollectionGetParams { o.SetFcInterfacesDataProtocol(fcInterfacesDataProtocol) return o } // SetFcInterfacesDataProtocol adds the fcInterfacesDataProtocol to the svm collection get params func (o *SvmCollectionGetParams) SetFcInterfacesDataProtocol(fcInterfacesDataProtocol *string) { o.FcInterfacesDataProtocol = fcInterfacesDataProtocol } // WithFcInterfacesName adds the fcInterfacesName to the svm collection get params func (o *SvmCollectionGetParams) WithFcInterfacesName(fcInterfacesName *string) *SvmCollectionGetParams { o.SetFcInterfacesName(fcInterfacesName) return o } // SetFcInterfacesName adds the fcInterfacesName to the svm collection get params func (o *SvmCollectionGetParams) SetFcInterfacesName(fcInterfacesName *string) { o.FcInterfacesName = fcInterfacesName } // WithFcpAllowed adds the fcpAllowed to the svm collection get params func (o *SvmCollectionGetParams) WithFcpAllowed(fcpAllowed *bool) *SvmCollectionGetParams { o.SetFcpAllowed(fcpAllowed) return o } // SetFcpAllowed adds the fcpAllowed to the svm collection get params func (o *SvmCollectionGetParams) SetFcpAllowed(fcpAllowed *bool) { o.FcpAllowed = fcpAllowed } // WithFcpEnabled adds the fcpEnabled to the svm collection get params func (o *SvmCollectionGetParams) WithFcpEnabled(fcpEnabled *bool) *SvmCollectionGetParams { o.SetFcpEnabled(fcpEnabled) return o } // SetFcpEnabled adds the fcpEnabled to the svm collection get params func (o *SvmCollectionGetParams) SetFcpEnabled(fcpEnabled *bool) { o.FcpEnabled = fcpEnabled } // WithFields adds the fields to the svm collection get params func (o *SvmCollectionGetParams) WithFields(fields []string) *SvmCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm collection get params func (o *SvmCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithIpspaceName adds the ipspaceName to the svm collection get params func (o *SvmCollectionGetParams) WithIpspaceName(ipspaceName *string) *SvmCollectionGetParams { o.SetIpspaceName(ipspaceName) return o } // SetIpspaceName adds the ipspaceName to the svm collection get params func (o *SvmCollectionGetParams) SetIpspaceName(ipspaceName *string) { o.IpspaceName = ipspaceName } // WithIpspaceUUID adds the ipspaceUUID to the svm collection get params func (o *SvmCollectionGetParams) WithIpspaceUUID(ipspaceUUID *string) *SvmCollectionGetParams { o.SetIpspaceUUID(ipspaceUUID) return o } // SetIpspaceUUID adds the ipspaceUuid to the svm collection get params func (o *SvmCollectionGetParams) SetIpspaceUUID(ipspaceUUID *string) { o.IpspaceUUID = ipspaceUUID } // WithIscsiAllowed adds the iscsiAllowed to the svm collection get params func (o *SvmCollectionGetParams) WithIscsiAllowed(iscsiAllowed *bool) *SvmCollectionGetParams { o.SetIscsiAllowed(iscsiAllowed) return o } // SetIscsiAllowed adds the iscsiAllowed to the svm collection get params func (o *SvmCollectionGetParams) SetIscsiAllowed(iscsiAllowed *bool) { o.IscsiAllowed = iscsiAllowed } // WithIscsiEnabled adds the iscsiEnabled to the svm collection get params func (o *SvmCollectionGetParams) WithIscsiEnabled(iscsiEnabled *bool) *SvmCollectionGetParams { o.SetIscsiEnabled(iscsiEnabled) return o } // SetIscsiEnabled adds the iscsiEnabled to the svm collection get params func (o *SvmCollectionGetParams) SetIscsiEnabled(iscsiEnabled *bool) { o.IscsiEnabled = iscsiEnabled } // WithLanguage adds the language to the svm collection get params func (o *SvmCollectionGetParams) WithLanguage(language *string) *SvmCollectionGetParams { o.SetLanguage(language) return o } // SetLanguage adds the language to the svm collection get params func (o *SvmCollectionGetParams) SetLanguage(language *string) { o.Language = language } // WithLdapAdDomain adds the ldapAdDomain to the svm collection get params func (o *SvmCollectionGetParams) WithLdapAdDomain(ldapAdDomain *string) *SvmCollectionGetParams { o.SetLdapAdDomain(ldapAdDomain) return o } // SetLdapAdDomain adds the ldapAdDomain to the svm collection get params func (o *SvmCollectionGetParams) SetLdapAdDomain(ldapAdDomain *string) { o.LdapAdDomain = ldapAdDomain } // WithLdapBaseDn adds the ldapBaseDn to the svm collection get params func (o *SvmCollectionGetParams) WithLdapBaseDn(ldapBaseDn *string) *SvmCollectionGetParams { o.SetLdapBaseDn(ldapBaseDn) return o } // SetLdapBaseDn adds the ldapBaseDn to the svm collection get params func (o *SvmCollectionGetParams) SetLdapBaseDn(ldapBaseDn *string) { o.LdapBaseDn = ldapBaseDn } // WithLdapBindDn adds the ldapBindDn to the svm collection get params func (o *SvmCollectionGetParams) WithLdapBindDn(ldapBindDn *string) *SvmCollectionGetParams { o.SetLdapBindDn(ldapBindDn) return o } // SetLdapBindDn adds the ldapBindDn to the svm collection get params func (o *SvmCollectionGetParams) SetLdapBindDn(ldapBindDn *string) { o.LdapBindDn = ldapBindDn } // WithLdapEnabled adds the ldapEnabled to the svm collection get params func (o *SvmCollectionGetParams) WithLdapEnabled(ldapEnabled *bool) *SvmCollectionGetParams { o.SetLdapEnabled(ldapEnabled) return o } // SetLdapEnabled adds the ldapEnabled to the svm collection get params func (o *SvmCollectionGetParams) SetLdapEnabled(ldapEnabled *bool) { o.LdapEnabled = ldapEnabled } // WithLdapServers adds the ldapServers to the svm collection get params func (o *SvmCollectionGetParams) WithLdapServers(ldapServers *string) *SvmCollectionGetParams { o.SetLdapServers(ldapServers) return o } // SetLdapServers adds the ldapServers to the svm collection get params func (o *SvmCollectionGetParams) SetLdapServers(ldapServers *string) { o.LdapServers = ldapServers } // WithMaxRecords adds the maxRecords to the svm collection get params func (o *SvmCollectionGetParams) WithMaxRecords(maxRecords *int64) *SvmCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the svm collection get params func (o *SvmCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithMaxVolumes adds the maxVolumes to the svm collection get params func (o *SvmCollectionGetParams) WithMaxVolumes(maxVolumes *string) *SvmCollectionGetParams { o.SetMaxVolumes(maxVolumes) return o } // SetMaxVolumes adds the maxVolumes to the svm collection get params func (o *SvmCollectionGetParams) SetMaxVolumes(maxVolumes *string) { o.MaxVolumes = maxVolumes } // WithName adds the name to the svm collection get params func (o *SvmCollectionGetParams) WithName(name *string) *SvmCollectionGetParams { o.SetName(name) return o } // SetName adds the name to the svm collection get params func (o *SvmCollectionGetParams) SetName(name *string) { o.Name = name } // WithNdmpAllowed adds the ndmpAllowed to the svm collection get params func (o *SvmCollectionGetParams) WithNdmpAllowed(ndmpAllowed *bool) *SvmCollectionGetParams { o.SetNdmpAllowed(ndmpAllowed) return o } // SetNdmpAllowed adds the ndmpAllowed to the svm collection get params func (o *SvmCollectionGetParams) SetNdmpAllowed(ndmpAllowed *bool) { o.NdmpAllowed = ndmpAllowed } // WithNfsAllowed adds the nfsAllowed to the svm collection get params func (o *SvmCollectionGetParams) WithNfsAllowed(nfsAllowed *bool) *SvmCollectionGetParams { o.SetNfsAllowed(nfsAllowed) return o } // SetNfsAllowed adds the nfsAllowed to the svm collection get params func (o *SvmCollectionGetParams) SetNfsAllowed(nfsAllowed *bool) { o.NfsAllowed = nfsAllowed } // WithNfsEnabled adds the nfsEnabled to the svm collection get params func (o *SvmCollectionGetParams) WithNfsEnabled(nfsEnabled *bool) *SvmCollectionGetParams { o.SetNfsEnabled(nfsEnabled) return o } // SetNfsEnabled adds the nfsEnabled to the svm collection get params func (o *SvmCollectionGetParams) SetNfsEnabled(nfsEnabled *bool) { o.NfsEnabled = nfsEnabled } // WithNisDomain adds the nisDomain to the svm collection get params func (o *SvmCollectionGetParams) WithNisDomain(nisDomain *string) *SvmCollectionGetParams { o.SetNisDomain(nisDomain) return o } // SetNisDomain adds the nisDomain to the svm collection get params func (o *SvmCollectionGetParams) SetNisDomain(nisDomain *string) { o.NisDomain = nisDomain } // WithNisEnabled adds the nisEnabled to the svm collection get params func (o *SvmCollectionGetParams) WithNisEnabled(nisEnabled *bool) *SvmCollectionGetParams { o.SetNisEnabled(nisEnabled) return o } // SetNisEnabled adds the nisEnabled to the svm collection get params func (o *SvmCollectionGetParams) SetNisEnabled(nisEnabled *bool) { o.NisEnabled = nisEnabled } // WithNisServers adds the nisServers to the svm collection get params func (o *SvmCollectionGetParams) WithNisServers(nisServers *string) *SvmCollectionGetParams { o.SetNisServers(nisServers) return o } // SetNisServers adds the nisServers to the svm collection get params func (o *SvmCollectionGetParams) SetNisServers(nisServers *string) { o.NisServers = nisServers } // WithNsswitchGroup adds the nsswitchGroup to the svm collection get params func (o *SvmCollectionGetParams) WithNsswitchGroup(nsswitchGroup *string) *SvmCollectionGetParams { o.SetNsswitchGroup(nsswitchGroup) return o } // SetNsswitchGroup adds the nsswitchGroup to the svm collection get params func (o *SvmCollectionGetParams) SetNsswitchGroup(nsswitchGroup *string) { o.NsswitchGroup = nsswitchGroup } // WithNsswitchHosts adds the nsswitchHosts to the svm collection get params func (o *SvmCollectionGetParams) WithNsswitchHosts(nsswitchHosts *string) *SvmCollectionGetParams { o.SetNsswitchHosts(nsswitchHosts) return o } // SetNsswitchHosts adds the nsswitchHosts to the svm collection get params func (o *SvmCollectionGetParams) SetNsswitchHosts(nsswitchHosts *string) { o.NsswitchHosts = nsswitchHosts } // WithNsswitchNamemap adds the nsswitchNamemap to the svm collection get params func (o *SvmCollectionGetParams) WithNsswitchNamemap(nsswitchNamemap *string) *SvmCollectionGetParams { o.SetNsswitchNamemap(nsswitchNamemap) return o } // SetNsswitchNamemap adds the nsswitchNamemap to the svm collection get params func (o *SvmCollectionGetParams) SetNsswitchNamemap(nsswitchNamemap *string) { o.NsswitchNamemap = nsswitchNamemap } // WithNsswitchNetgroup adds the nsswitchNetgroup to the svm collection get params func (o *SvmCollectionGetParams) WithNsswitchNetgroup(nsswitchNetgroup *string) *SvmCollectionGetParams { o.SetNsswitchNetgroup(nsswitchNetgroup) return o } // SetNsswitchNetgroup adds the nsswitchNetgroup to the svm collection get params func (o *SvmCollectionGetParams) SetNsswitchNetgroup(nsswitchNetgroup *string) { o.NsswitchNetgroup = nsswitchNetgroup } // WithNsswitchPasswd adds the nsswitchPasswd to the svm collection get params func (o *SvmCollectionGetParams) WithNsswitchPasswd(nsswitchPasswd *string) *SvmCollectionGetParams { o.SetNsswitchPasswd(nsswitchPasswd) return o } // SetNsswitchPasswd adds the nsswitchPasswd to the svm collection get params func (o *SvmCollectionGetParams) SetNsswitchPasswd(nsswitchPasswd *string) { o.NsswitchPasswd = nsswitchPasswd } // WithNvmeAllowed adds the nvmeAllowed to the svm collection get params func (o *SvmCollectionGetParams) WithNvmeAllowed(nvmeAllowed *bool) *SvmCollectionGetParams { o.SetNvmeAllowed(nvmeAllowed) return o } // SetNvmeAllowed adds the nvmeAllowed to the svm collection get params func (o *SvmCollectionGetParams) SetNvmeAllowed(nvmeAllowed *bool) { o.NvmeAllowed = nvmeAllowed } // WithNvmeEnabled adds the nvmeEnabled to the svm collection get params func (o *SvmCollectionGetParams) WithNvmeEnabled(nvmeEnabled *bool) *SvmCollectionGetParams { o.SetNvmeEnabled(nvmeEnabled) return o } // SetNvmeEnabled adds the nvmeEnabled to the svm collection get params func (o *SvmCollectionGetParams) SetNvmeEnabled(nvmeEnabled *bool) { o.NvmeEnabled = nvmeEnabled } // WithOrderBy adds the orderBy to the svm collection get params func (o *SvmCollectionGetParams) WithOrderBy(orderBy []string) *SvmCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the svm collection get params func (o *SvmCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithQosPolicyName adds the qosPolicyName to the svm collection get params func (o *SvmCollectionGetParams) WithQosPolicyName(qosPolicyName *string) *SvmCollectionGetParams { o.SetQosPolicyName(qosPolicyName) return o } // SetQosPolicyName adds the qosPolicyName to the svm collection get params func (o *SvmCollectionGetParams) SetQosPolicyName(qosPolicyName *string) { o.QosPolicyName = qosPolicyName } // WithQosPolicyUUID adds the qosPolicyUUID to the svm collection get params func (o *SvmCollectionGetParams) WithQosPolicyUUID(qosPolicyUUID *string) *SvmCollectionGetParams { o.SetQosPolicyUUID(qosPolicyUUID) return o } // SetQosPolicyUUID adds the qosPolicyUuid to the svm collection get params func (o *SvmCollectionGetParams) SetQosPolicyUUID(qosPolicyUUID *string) { o.QosPolicyUUID = qosPolicyUUID } // WithReturnRecords adds the returnRecords to the svm collection get params func (o *SvmCollectionGetParams) WithReturnRecords(returnRecords *bool) *SvmCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm collection get params func (o *SvmCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm collection get params func (o *SvmCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SvmCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm collection get params func (o *SvmCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithS3Allowed adds the s3Allowed to the svm collection get params func (o *SvmCollectionGetParams) WithS3Allowed(s3Allowed *bool) *SvmCollectionGetParams { o.SetS3Allowed(s3Allowed) return o } // SetS3Allowed adds the s3Allowed to the svm collection get params func (o *SvmCollectionGetParams) SetS3Allowed(s3Allowed *bool) { o.S3Allowed = s3Allowed } // WithS3Enabled adds the s3Enabled to the svm collection get params func (o *SvmCollectionGetParams) WithS3Enabled(s3Enabled *bool) *SvmCollectionGetParams { o.SetS3Enabled(s3Enabled) return o } // SetS3Enabled adds the s3Enabled to the svm collection get params func (o *SvmCollectionGetParams) SetS3Enabled(s3Enabled *bool) { o.S3Enabled = s3Enabled } // WithS3Name adds the s3Name to the svm collection get params func (o *SvmCollectionGetParams) WithS3Name(s3Name *string) *SvmCollectionGetParams { o.SetS3Name(s3Name) return o } // SetS3Name adds the s3Name to the svm collection get params func (o *SvmCollectionGetParams) SetS3Name(s3Name *string) { o.S3Name = s3Name } // WithSnapshotPolicyName adds the snapshotPolicyName to the svm collection get params func (o *SvmCollectionGetParams) WithSnapshotPolicyName(snapshotPolicyName *string) *SvmCollectionGetParams { o.SetSnapshotPolicyName(snapshotPolicyName) return o } // SetSnapshotPolicyName adds the snapshotPolicyName to the svm collection get params func (o *SvmCollectionGetParams) SetSnapshotPolicyName(snapshotPolicyName *string) { o.SnapshotPolicyName = snapshotPolicyName } // WithSnapshotPolicyUUID adds the snapshotPolicyUUID to the svm collection get params func (o *SvmCollectionGetParams) WithSnapshotPolicyUUID(snapshotPolicyUUID *string) *SvmCollectionGetParams { o.SetSnapshotPolicyUUID(snapshotPolicyUUID) return o } // SetSnapshotPolicyUUID adds the snapshotPolicyUuid to the svm collection get params func (o *SvmCollectionGetParams) SetSnapshotPolicyUUID(snapshotPolicyUUID *string) { o.SnapshotPolicyUUID = snapshotPolicyUUID } // WithState adds the state to the svm collection get params func (o *SvmCollectionGetParams) WithState(state *string) *SvmCollectionGetParams { o.SetState(state) return o } // SetState adds the state to the svm collection get params func (o *SvmCollectionGetParams) SetState(state *string) { o.State = state } // WithSubtype adds the subtype to the svm collection get params func (o *SvmCollectionGetParams) WithSubtype(subtype *string) *SvmCollectionGetParams { o.SetSubtype(subtype) return o } // SetSubtype adds the subtype to the svm collection get params func (o *SvmCollectionGetParams) SetSubtype(subtype *string) { o.Subtype = subtype } // WithUUID adds the uuid to the svm collection get params func (o *SvmCollectionGetParams) WithUUID(uuid *string) *SvmCollectionGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm collection get params func (o *SvmCollectionGetParams) SetUUID(uuid *string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.AggregatesName != nil { // query param aggregates.name var qrAggregatesName string if o.AggregatesName != nil { qrAggregatesName = *o.AggregatesName } qAggregatesName := qrAggregatesName if qAggregatesName != "" { if err := r.SetQueryParam("aggregates.name", qAggregatesName); err != nil { return err } } } if o.AggregatesUUID != nil { // query param aggregates.uuid var qrAggregatesUUID string if o.AggregatesUUID != nil { qrAggregatesUUID = *o.AggregatesUUID } qAggregatesUUID := qrAggregatesUUID if qAggregatesUUID != "" { if err := r.SetQueryParam("aggregates.uuid", qAggregatesUUID); err != nil { return err } } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_instance_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_instance_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerInstanceGetReader is a Reader for the SvmPeerInstanceGet structure. type SvmPeerInstanceGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerInstanceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmPeerInstanceGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerInstanceGetDefault(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 } } // NewSvmPeerInstanceGetOK creates a SvmPeerInstanceGetOK with default headers values func NewSvmPeerInstanceGetOK() *SvmPeerInstanceGetOK { return &SvmPeerInstanceGetOK{} } /* SvmPeerInstanceGetOK describes a response with status code 200, with default header values. OK */ type SvmPeerInstanceGetOK struct { Payload *models.SvmPeer } // IsSuccess returns true when this svm peer instance get o k response has a 2xx status code func (o *SvmPeerInstanceGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer instance get o k response has a 3xx status code func (o *SvmPeerInstanceGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm peer instance get o k response has a 4xx status code func (o *SvmPeerInstanceGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm peer instance get o k response has a 5xx status code func (o *SvmPeerInstanceGetOK) IsServerError() bool { return false } // IsCode returns true when this svm peer instance get o k response a status code equal to that given func (o *SvmPeerInstanceGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmPeerInstanceGetOK) Error() string { return fmt.Sprintf("[GET /svm/peers/{uuid}][%d] svmPeerInstanceGetOK %+v", 200, o.Payload) } func (o *SvmPeerInstanceGetOK) String() string { return fmt.Sprintf("[GET /svm/peers/{uuid}][%d] svmPeerInstanceGetOK %+v", 200, o.Payload) } func (o *SvmPeerInstanceGetOK) GetPayload() *models.SvmPeer { return o.Payload } func (o *SvmPeerInstanceGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmPeer) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmPeerInstanceGetDefault creates a SvmPeerInstanceGetDefault with default headers values func NewSvmPeerInstanceGetDefault(code int) *SvmPeerInstanceGetDefault { return &SvmPeerInstanceGetDefault{ _statusCode: code, } } /* SvmPeerInstanceGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 26345578 | Internal error. Unable to retrieve local or peer SVM name. | ``` <br/> */ type SvmPeerInstanceGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer instance get default response func (o *SvmPeerInstanceGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer instance get default response has a 2xx status code func (o *SvmPeerInstanceGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer instance get default response has a 3xx status code func (o *SvmPeerInstanceGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer instance get default response has a 4xx status code func (o *SvmPeerInstanceGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer instance get default response has a 5xx status code func (o *SvmPeerInstanceGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer instance get default response a status code equal to that given func (o *SvmPeerInstanceGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerInstanceGetDefault) Error() string { return fmt.Sprintf("[GET /svm/peers/{uuid}][%d] svm_peer_instance_get default %+v", o._statusCode, o.Payload) } func (o *SvmPeerInstanceGetDefault) String() string { return fmt.Sprintf("[GET /svm/peers/{uuid}][%d] svm_peer_instance_get default %+v", o._statusCode, o.Payload) } func (o *SvmPeerInstanceGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerInstanceGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_create_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_create_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSvmPeerPermissionCreateParams creates a new SvmPeerPermissionCreateParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerPermissionCreateParams() *SvmPeerPermissionCreateParams { return &SvmPeerPermissionCreateParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerPermissionCreateParamsWithTimeout creates a new SvmPeerPermissionCreateParams object // with the ability to set a timeout on a request. func NewSvmPeerPermissionCreateParamsWithTimeout(timeout time.Duration) *SvmPeerPermissionCreateParams { return &SvmPeerPermissionCreateParams{ timeout: timeout, } } // NewSvmPeerPermissionCreateParamsWithContext creates a new SvmPeerPermissionCreateParams object // with the ability to set a context for a request. func NewSvmPeerPermissionCreateParamsWithContext(ctx context.Context) *SvmPeerPermissionCreateParams { return &SvmPeerPermissionCreateParams{ Context: ctx, } } // NewSvmPeerPermissionCreateParamsWithHTTPClient creates a new SvmPeerPermissionCreateParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerPermissionCreateParamsWithHTTPClient(client *http.Client) *SvmPeerPermissionCreateParams { return &SvmPeerPermissionCreateParams{ HTTPClient: client, } } /* SvmPeerPermissionCreateParams contains all the parameters to send to the API endpoint for the svm peer permission create operation. Typically these are written to a http.Request. */ type SvmPeerPermissionCreateParams struct { /* Info. Info specification */ Info *models.SvmPeerPermission /* ReturnRecords. The default is false. If set to true, the records are returned. */ ReturnRecords *bool timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer permission create params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionCreateParams) WithDefaults() *SvmPeerPermissionCreateParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer permission create params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionCreateParams) SetDefaults() { var ( returnRecordsDefault = bool(false) ) val := SvmPeerPermissionCreateParams{ ReturnRecords: &returnRecordsDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) WithTimeout(timeout time.Duration) *SvmPeerPermissionCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) WithContext(ctx context.Context) *SvmPeerPermissionCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) WithHTTPClient(client *http.Client) *SvmPeerPermissionCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) WithInfo(info *models.SvmPeerPermission) *SvmPeerPermissionCreateParams { o.SetInfo(info) return o } // SetInfo adds the info to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) SetInfo(info *models.SvmPeerPermission) { o.Info = info } // WithReturnRecords adds the returnRecords to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) WithReturnRecords(returnRecords *bool) *SvmPeerPermissionCreateParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm peer permission create params func (o *SvmPeerPermissionCreateParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WriteToRequest writes these params to a swagger request func (o *SvmPeerPermissionCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmGetParams creates a new SvmGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmGetParams() *SvmGetParams { return &SvmGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmGetParamsWithTimeout creates a new SvmGetParams object // with the ability to set a timeout on a request. func NewSvmGetParamsWithTimeout(timeout time.Duration) *SvmGetParams { return &SvmGetParams{ timeout: timeout, } } // NewSvmGetParamsWithContext creates a new SvmGetParams object // with the ability to set a context for a request. func NewSvmGetParamsWithContext(ctx context.Context) *SvmGetParams { return &SvmGetParams{ Context: ctx, } } // NewSvmGetParamsWithHTTPClient creates a new SvmGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmGetParamsWithHTTPClient(client *http.Client) *SvmGetParams { return &SvmGetParams{ HTTPClient: client, } } /* SvmGetParams contains all the parameters to send to the API endpoint for the svm get operation. Typically these are written to a http.Request. */ type SvmGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* UUID. Filter by UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmGetParams) WithDefaults() *SvmGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmGetParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the svm get params func (o *SvmGetParams) WithTimeout(timeout time.Duration) *SvmGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm get params func (o *SvmGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm get params func (o *SvmGetParams) WithContext(ctx context.Context) *SvmGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm get params func (o *SvmGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm get params func (o *SvmGetParams) WithHTTPClient(client *http.Client) *SvmGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm get params func (o *SvmGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the svm get params func (o *SvmGetParams) WithFields(fields []string) *SvmGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm get params func (o *SvmGetParams) SetFields(fields []string) { o.Fields = fields } // WithUUID adds the uuid to the svm get params func (o *SvmGetParams) WithUUID(uuid string) *SvmGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm get params func (o *SvmGetParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSvmGet binds the parameter fields func (o *SvmGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_modify_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_modify_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSvmPeerPermissionModifyParams creates a new SvmPeerPermissionModifyParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerPermissionModifyParams() *SvmPeerPermissionModifyParams { return &SvmPeerPermissionModifyParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerPermissionModifyParamsWithTimeout creates a new SvmPeerPermissionModifyParams object // with the ability to set a timeout on a request. func NewSvmPeerPermissionModifyParamsWithTimeout(timeout time.Duration) *SvmPeerPermissionModifyParams { return &SvmPeerPermissionModifyParams{ timeout: timeout, } } // NewSvmPeerPermissionModifyParamsWithContext creates a new SvmPeerPermissionModifyParams object // with the ability to set a context for a request. func NewSvmPeerPermissionModifyParamsWithContext(ctx context.Context) *SvmPeerPermissionModifyParams { return &SvmPeerPermissionModifyParams{ Context: ctx, } } // NewSvmPeerPermissionModifyParamsWithHTTPClient creates a new SvmPeerPermissionModifyParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerPermissionModifyParamsWithHTTPClient(client *http.Client) *SvmPeerPermissionModifyParams { return &SvmPeerPermissionModifyParams{ HTTPClient: client, } } /* SvmPeerPermissionModifyParams contains all the parameters to send to the API endpoint for the svm peer permission modify operation. Typically these are written to a http.Request. */ type SvmPeerPermissionModifyParams struct { /* ClusterPeerUUID. Peer cluster UUID */ ClusterPeerUUID string /* Info. Info specification */ Info *models.SvmPeerPermission /* SvmUUID. SVM UUID */ SvmUUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer permission modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionModifyParams) WithDefaults() *SvmPeerPermissionModifyParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer permission modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionModifyParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) WithTimeout(timeout time.Duration) *SvmPeerPermissionModifyParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) WithContext(ctx context.Context) *SvmPeerPermissionModifyParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) WithHTTPClient(client *http.Client) *SvmPeerPermissionModifyParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithClusterPeerUUID adds the clusterPeerUUID to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) WithClusterPeerUUID(clusterPeerUUID string) *SvmPeerPermissionModifyParams { o.SetClusterPeerUUID(clusterPeerUUID) return o } // SetClusterPeerUUID adds the clusterPeerUuid to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) SetClusterPeerUUID(clusterPeerUUID string) { o.ClusterPeerUUID = clusterPeerUUID } // WithInfo adds the info to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) WithInfo(info *models.SvmPeerPermission) *SvmPeerPermissionModifyParams { o.SetInfo(info) return o } // SetInfo adds the info to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) SetInfo(info *models.SvmPeerPermission) { o.Info = info } // WithSvmUUID adds the svmUUID to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) WithSvmUUID(svmUUID string) *SvmPeerPermissionModifyParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the svm peer permission modify params func (o *SvmPeerPermissionModifyParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WriteToRequest writes these params to a swagger request func (o *SvmPeerPermissionModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // path param cluster_peer.uuid if err := r.SetPathParam("cluster_peer.uuid", o.ClusterPeerUUID); err != nil { return err } if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_volume_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_volume_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmMigrationVolumeCollectionGetParams creates a new SvmMigrationVolumeCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmMigrationVolumeCollectionGetParams() *SvmMigrationVolumeCollectionGetParams { return &SvmMigrationVolumeCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmMigrationVolumeCollectionGetParamsWithTimeout creates a new SvmMigrationVolumeCollectionGetParams object // with the ability to set a timeout on a request. func NewSvmMigrationVolumeCollectionGetParamsWithTimeout(timeout time.Duration) *SvmMigrationVolumeCollectionGetParams { return &SvmMigrationVolumeCollectionGetParams{ timeout: timeout, } } // NewSvmMigrationVolumeCollectionGetParamsWithContext creates a new SvmMigrationVolumeCollectionGetParams object // with the ability to set a context for a request. func NewSvmMigrationVolumeCollectionGetParamsWithContext(ctx context.Context) *SvmMigrationVolumeCollectionGetParams { return &SvmMigrationVolumeCollectionGetParams{ Context: ctx, } } // NewSvmMigrationVolumeCollectionGetParamsWithHTTPClient creates a new SvmMigrationVolumeCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmMigrationVolumeCollectionGetParamsWithHTTPClient(client *http.Client) *SvmMigrationVolumeCollectionGetParams { return &SvmMigrationVolumeCollectionGetParams{ HTTPClient: client, } } /* SvmMigrationVolumeCollectionGetParams contains all the parameters to send to the API endpoint for the svm migration volume collection get operation. Typically these are written to a http.Request. */ type SvmMigrationVolumeCollectionGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SvmMigrationUUID. Migration UUID */ SvmMigrationUUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm migration volume collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationVolumeCollectionGetParams) WithDefaults() *SvmMigrationVolumeCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm migration volume collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationVolumeCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SvmMigrationVolumeCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithTimeout(timeout time.Duration) *SvmMigrationVolumeCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithContext(ctx context.Context) *SvmMigrationVolumeCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithHTTPClient(client *http.Client) *SvmMigrationVolumeCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithFields(fields []string) *SvmMigrationVolumeCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithMaxRecords adds the maxRecords to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithMaxRecords(maxRecords *int64) *SvmMigrationVolumeCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithOrderBy adds the orderBy to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithOrderBy(orderBy []string) *SvmMigrationVolumeCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithReturnRecords adds the returnRecords to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithReturnRecords(returnRecords *bool) *SvmMigrationVolumeCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SvmMigrationVolumeCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmMigrationUUID adds the svmMigrationUUID to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) WithSvmMigrationUUID(svmMigrationUUID string) *SvmMigrationVolumeCollectionGetParams { o.SetSvmMigrationUUID(svmMigrationUUID) return o } // SetSvmMigrationUUID adds the svmMigrationUuid to the svm migration volume collection get params func (o *SvmMigrationVolumeCollectionGetParams) SetSvmMigrationUUID(svmMigrationUUID string) { o.SvmMigrationUUID = svmMigrationUUID } // WriteToRequest writes these params to a swagger request func (o *SvmMigrationVolumeCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param svm_migration.uuid if err := r.SetPathParam("svm_migration.uuid", o.SvmMigrationUUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSvmMigrationVolumeCollectionGet binds the parameter fields func (o *SvmMigrationVolumeCollectionGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamSvmMigrationVolumeCollectionGet binds the parameter order_by func (o *SvmMigrationVolumeCollectionGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_modify_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_modify_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmModifyReader is a Reader for the SvmModify structure. type SvmModifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmModifyAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmModifyDefault(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 } } // NewSvmModifyAccepted creates a SvmModifyAccepted with default headers values func NewSvmModifyAccepted() *SvmModifyAccepted { return &SvmModifyAccepted{} } /* SvmModifyAccepted describes a response with status code 202, with default header values. Accepted */ type SvmModifyAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this svm modify accepted response has a 2xx status code func (o *SvmModifyAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm modify accepted response has a 3xx status code func (o *SvmModifyAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm modify accepted response has a 4xx status code func (o *SvmModifyAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm modify accepted response has a 5xx status code func (o *SvmModifyAccepted) IsServerError() bool { return false } // IsCode returns true when this svm modify accepted response a status code equal to that given func (o *SvmModifyAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmModifyAccepted) Error() string { return fmt.Sprintf("[PATCH /svm/svms/{uuid}][%d] svmModifyAccepted %+v", 202, o.Payload) } func (o *SvmModifyAccepted) String() string { return fmt.Sprintf("[PATCH /svm/svms/{uuid}][%d] svmModifyAccepted %+v", 202, o.Payload) } func (o *SvmModifyAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SvmModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmModifyDefault creates a SvmModifyDefault with default headers values func NewSvmModifyDefault(code int) *SvmModifyDefault { return &SvmModifyDefault{ _statusCode: code, } } /* SvmModifyDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 13434880 | Failed to modify SVM parameters. | | 13434881 | Failed to rename SVM. | | 13434883 | SVM parameters except name modified successfully. | | 13434885 | Non-UTF8 language(s) not supported. | | 13434886 | Invalid Snapshot copy policy. | | 13434902 | Modification of NSSwitch parameters failed for the SVM. | | 13434906 | Operation not supported for an SVM of type sync-destination. | | 12451843 | Certificate does not exist. | | 13434908 | Invalid SVM name. The name is already in use by another SVM, IPSpace or cluster. | | 13434916 | SVM is in the process of being created. Wait a few minutes, and then try the command again. | | 13434915 | Failed to unlock the SVM because SVM create or delete job is in progress. Wait a few minutes, and then try the command again. | | 13434911 | Invalid SVM name. Maximum supported length is 41 if SVM is of type \\\"sync-source\\\", otherwise 47. | ``` <br/> */ type SvmModifyDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm modify default response func (o *SvmModifyDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm modify default response has a 2xx status code func (o *SvmModifyDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm modify default response has a 3xx status code func (o *SvmModifyDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm modify default response has a 4xx status code func (o *SvmModifyDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm modify default response has a 5xx status code func (o *SvmModifyDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm modify default response a status code equal to that given func (o *SvmModifyDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmModifyDefault) Error() string { return fmt.Sprintf("[PATCH /svm/svms/{uuid}][%d] svm_modify default %+v", o._statusCode, o.Payload) } func (o *SvmModifyDefault) String() string { return fmt.Sprintf("[PATCH /svm/svms/{uuid}][%d] svm_modify default %+v", o._statusCode, o.Payload) } func (o *SvmModifyDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmModifyDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmMigrationCollectionGetReader is a Reader for the SvmMigrationCollectionGet structure. type SvmMigrationCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmMigrationCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmMigrationCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmMigrationCollectionGetDefault(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 } } // NewSvmMigrationCollectionGetOK creates a SvmMigrationCollectionGetOK with default headers values func NewSvmMigrationCollectionGetOK() *SvmMigrationCollectionGetOK { return &SvmMigrationCollectionGetOK{} } /* SvmMigrationCollectionGetOK describes a response with status code 200, with default header values. OK */ type SvmMigrationCollectionGetOK struct { Payload *models.SvmMigrationResponse } // IsSuccess returns true when this svm migration collection get o k response has a 2xx status code func (o *SvmMigrationCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm migration collection get o k response has a 3xx status code func (o *SvmMigrationCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm migration collection get o k response has a 4xx status code func (o *SvmMigrationCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm migration collection get o k response has a 5xx status code func (o *SvmMigrationCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this svm migration collection get o k response a status code equal to that given func (o *SvmMigrationCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmMigrationCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/migrations][%d] svmMigrationCollectionGetOK %+v", 200, o.Payload) } func (o *SvmMigrationCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/migrations][%d] svmMigrationCollectionGetOK %+v", 200, o.Payload) } func (o *SvmMigrationCollectionGetOK) GetPayload() *models.SvmMigrationResponse { return o.Payload } func (o *SvmMigrationCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmMigrationResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmMigrationCollectionGetDefault creates a SvmMigrationCollectionGetDefault with default headers values func NewSvmMigrationCollectionGetDefault(code int) *SvmMigrationCollectionGetDefault { return &SvmMigrationCollectionGetDefault{ _statusCode: code, } } /* SvmMigrationCollectionGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 13172783 | Migrate RDB lookup failed | */ type SvmMigrationCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm migration collection get default response func (o *SvmMigrationCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm migration collection get default response has a 2xx status code func (o *SvmMigrationCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm migration collection get default response has a 3xx status code func (o *SvmMigrationCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm migration collection get default response has a 4xx status code func (o *SvmMigrationCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm migration collection get default response has a 5xx status code func (o *SvmMigrationCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm migration collection get default response a status code equal to that given func (o *SvmMigrationCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmMigrationCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/migrations][%d] svm_migration_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/migrations][%d] svm_migration_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmMigrationCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_create_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_create_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerCreateReader is a Reader for the SvmPeerCreate structure. type SvmPeerCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmPeerCreateAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerCreateDefault(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 } } // NewSvmPeerCreateAccepted creates a SvmPeerCreateAccepted with default headers values func NewSvmPeerCreateAccepted() *SvmPeerCreateAccepted { return &SvmPeerCreateAccepted{} } /* SvmPeerCreateAccepted describes a response with status code 202, with default header values. Accepted */ type SvmPeerCreateAccepted struct { /* Useful for tracking the resource location */ Location string Payload *models.SvmPeer } // IsSuccess returns true when this svm peer create accepted response has a 2xx status code func (o *SvmPeerCreateAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer create accepted response has a 3xx status code func (o *SvmPeerCreateAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm peer create accepted response has a 4xx status code func (o *SvmPeerCreateAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm peer create accepted response has a 5xx status code func (o *SvmPeerCreateAccepted) IsServerError() bool { return false } // IsCode returns true when this svm peer create accepted response a status code equal to that given func (o *SvmPeerCreateAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmPeerCreateAccepted) Error() string { return fmt.Sprintf("[POST /svm/peers][%d] svmPeerCreateAccepted %+v", 202, o.Payload) } func (o *SvmPeerCreateAccepted) String() string { return fmt.Sprintf("[POST /svm/peers][%d] svmPeerCreateAccepted %+v", 202, o.Payload) } func (o *SvmPeerCreateAccepted) GetPayload() *models.SvmPeer { return o.Payload } func (o *SvmPeerCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Location hdrLocation := response.GetHeader("Location") if hdrLocation != "" { o.Location = hdrLocation } o.Payload = new(models.SvmPeer) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmPeerCreateDefault creates a SvmPeerCreateDefault with default headers values func NewSvmPeerCreateDefault(code int) *SvmPeerCreateDefault { return &SvmPeerCreateDefault{ _statusCode: code, } } /* SvmPeerCreateDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 13434889 | Internal error. Wait and retry. | | 26345575 | The specified peer cluster name and peer cluster UUID do not match. | | 26345579 | The specified field is invalid. | | 26345580 | SVM name or SVM UUID must be provided. | ``` <br/> */ type SvmPeerCreateDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer create default response func (o *SvmPeerCreateDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer create default response has a 2xx status code func (o *SvmPeerCreateDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer create default response has a 3xx status code func (o *SvmPeerCreateDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer create default response has a 4xx status code func (o *SvmPeerCreateDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer create default response has a 5xx status code func (o *SvmPeerCreateDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer create default response a status code equal to that given func (o *SvmPeerCreateDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerCreateDefault) Error() string { return fmt.Sprintf("[POST /svm/peers][%d] svm_peer_create default %+v", o._statusCode, o.Payload) } func (o *SvmPeerCreateDefault) String() string { return fmt.Sprintf("[POST /svm/peers][%d] svm_peer_create default %+v", o._statusCode, o.Payload) } func (o *SvmPeerCreateDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerCreateDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_create_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_create_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSvmMigrationCreateParams creates a new SvmMigrationCreateParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmMigrationCreateParams() *SvmMigrationCreateParams { return &SvmMigrationCreateParams{ timeout: cr.DefaultTimeout, } } // NewSvmMigrationCreateParamsWithTimeout creates a new SvmMigrationCreateParams object // with the ability to set a timeout on a request. func NewSvmMigrationCreateParamsWithTimeout(timeout time.Duration) *SvmMigrationCreateParams { return &SvmMigrationCreateParams{ timeout: timeout, } } // NewSvmMigrationCreateParamsWithContext creates a new SvmMigrationCreateParams object // with the ability to set a context for a request. func NewSvmMigrationCreateParamsWithContext(ctx context.Context) *SvmMigrationCreateParams { return &SvmMigrationCreateParams{ Context: ctx, } } // NewSvmMigrationCreateParamsWithHTTPClient creates a new SvmMigrationCreateParams object // with the ability to set a custom HTTPClient for a request. func NewSvmMigrationCreateParamsWithHTTPClient(client *http.Client) *SvmMigrationCreateParams { return &SvmMigrationCreateParams{ HTTPClient: client, } } /* SvmMigrationCreateParams contains all the parameters to send to the API endpoint for the svm migration create operation. Typically these are written to a http.Request. */ type SvmMigrationCreateParams struct { /* Info. SVM migration information */ Info *models.SvmMigration /* ReturnRecords. The default is false. If set to true, the records are returned. */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm migration create params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationCreateParams) WithDefaults() *SvmMigrationCreateParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm migration create params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmMigrationCreateParams) SetDefaults() { var ( returnRecordsDefault = bool(false) returnTimeoutDefault = int64(0) ) val := SvmMigrationCreateParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm migration create params func (o *SvmMigrationCreateParams) WithTimeout(timeout time.Duration) *SvmMigrationCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm migration create params func (o *SvmMigrationCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm migration create params func (o *SvmMigrationCreateParams) WithContext(ctx context.Context) *SvmMigrationCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm migration create params func (o *SvmMigrationCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm migration create params func (o *SvmMigrationCreateParams) WithHTTPClient(client *http.Client) *SvmMigrationCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm migration create params func (o *SvmMigrationCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the svm migration create params func (o *SvmMigrationCreateParams) WithInfo(info *models.SvmMigration) *SvmMigrationCreateParams { o.SetInfo(info) return o } // SetInfo adds the info to the svm migration create params func (o *SvmMigrationCreateParams) SetInfo(info *models.SvmMigration) { o.Info = info } // WithReturnRecords adds the returnRecords to the svm migration create params func (o *SvmMigrationCreateParams) WithReturnRecords(returnRecords *bool) *SvmMigrationCreateParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm migration create params func (o *SvmMigrationCreateParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm migration create params func (o *SvmMigrationCreateParams) WithReturnTimeout(returnTimeout *int64) *SvmMigrationCreateParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm migration create params func (o *SvmMigrationCreateParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WriteToRequest writes these params to a swagger request func (o *SvmMigrationCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_delete_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_delete_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmDeleteReader is a Reader for the SvmDelete structure. type SvmDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmDeleteAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmDeleteDefault(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 } } // NewSvmDeleteAccepted creates a SvmDeleteAccepted with default headers values func NewSvmDeleteAccepted() *SvmDeleteAccepted { return &SvmDeleteAccepted{} } /* SvmDeleteAccepted describes a response with status code 202, with default header values. Accepted */ type SvmDeleteAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this svm delete accepted response has a 2xx status code func (o *SvmDeleteAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm delete accepted response has a 3xx status code func (o *SvmDeleteAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm delete accepted response has a 4xx status code func (o *SvmDeleteAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm delete accepted response has a 5xx status code func (o *SvmDeleteAccepted) IsServerError() bool { return false } // IsCode returns true when this svm delete accepted response a status code equal to that given func (o *SvmDeleteAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /svm/svms/{uuid}][%d] svmDeleteAccepted %+v", 202, o.Payload) } func (o *SvmDeleteAccepted) String() string { return fmt.Sprintf("[DELETE /svm/svms/{uuid}][%d] svmDeleteAccepted %+v", 202, o.Payload) } func (o *SvmDeleteAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SvmDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmDeleteDefault creates a SvmDeleteDefault with default headers values func NewSvmDeleteDefault(code int) *SvmDeleteDefault { return &SvmDeleteDefault{ _statusCode: code, } } /* SvmDeleteDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 13434894 | Maximum allowed SVM jobs exceeded. Wait and retry. | ``` <br/> */ type SvmDeleteDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm delete default response func (o *SvmDeleteDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm delete default response has a 2xx status code func (o *SvmDeleteDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm delete default response has a 3xx status code func (o *SvmDeleteDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm delete default response has a 4xx status code func (o *SvmDeleteDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm delete default response has a 5xx status code func (o *SvmDeleteDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm delete default response a status code equal to that given func (o *SvmDeleteDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmDeleteDefault) Error() string { return fmt.Sprintf("[DELETE /svm/svms/{uuid}][%d] svm_delete default %+v", o._statusCode, o.Payload) } func (o *SvmDeleteDefault) String() string { return fmt.Sprintf("[DELETE /svm/svms/{uuid}][%d] svm_delete default %+v", o._statusCode, o.Payload) } func (o *SvmDeleteDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmDeleteDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_delete_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_delete_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmDeleteParams creates a new SvmDeleteParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmDeleteParams() *SvmDeleteParams { return &SvmDeleteParams{ timeout: cr.DefaultTimeout, } } // NewSvmDeleteParamsWithTimeout creates a new SvmDeleteParams object // with the ability to set a timeout on a request. func NewSvmDeleteParamsWithTimeout(timeout time.Duration) *SvmDeleteParams { return &SvmDeleteParams{ timeout: timeout, } } // NewSvmDeleteParamsWithContext creates a new SvmDeleteParams object // with the ability to set a context for a request. func NewSvmDeleteParamsWithContext(ctx context.Context) *SvmDeleteParams { return &SvmDeleteParams{ Context: ctx, } } // NewSvmDeleteParamsWithHTTPClient creates a new SvmDeleteParams object // with the ability to set a custom HTTPClient for a request. func NewSvmDeleteParamsWithHTTPClient(client *http.Client) *SvmDeleteParams { return &SvmDeleteParams{ HTTPClient: client, } } /* SvmDeleteParams contains all the parameters to send to the API endpoint for the svm delete operation. Typically these are written to a http.Request. */ type SvmDeleteParams struct { /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. Filter by UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmDeleteParams) WithDefaults() *SvmDeleteParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmDeleteParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := SvmDeleteParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm delete params func (o *SvmDeleteParams) WithTimeout(timeout time.Duration) *SvmDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm delete params func (o *SvmDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm delete params func (o *SvmDeleteParams) WithContext(ctx context.Context) *SvmDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm delete params func (o *SvmDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm delete params func (o *SvmDeleteParams) WithHTTPClient(client *http.Client) *SvmDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm delete params func (o *SvmDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithReturnTimeout adds the returnTimeout to the svm delete params func (o *SvmDeleteParams) WithReturnTimeout(returnTimeout *int64) *SvmDeleteParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm delete params func (o *SvmDeleteParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the svm delete params func (o *SvmDeleteParams) WithUUID(uuid string) *SvmDeleteParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm delete params func (o *SvmDeleteParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_modify_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_modify_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerModifyReader is a Reader for the SvmPeerModify structure. type SvmPeerModifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmPeerModifyAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerModifyDefault(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 } } // NewSvmPeerModifyAccepted creates a SvmPeerModifyAccepted with default headers values func NewSvmPeerModifyAccepted() *SvmPeerModifyAccepted { return &SvmPeerModifyAccepted{} } /* SvmPeerModifyAccepted describes a response with status code 202, with default header values. Accepted */ type SvmPeerModifyAccepted struct { } // IsSuccess returns true when this svm peer modify accepted response has a 2xx status code func (o *SvmPeerModifyAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer modify accepted response has a 3xx status code func (o *SvmPeerModifyAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm peer modify accepted response has a 4xx status code func (o *SvmPeerModifyAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm peer modify accepted response has a 5xx status code func (o *SvmPeerModifyAccepted) IsServerError() bool { return false } // IsCode returns true when this svm peer modify accepted response a status code equal to that given func (o *SvmPeerModifyAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmPeerModifyAccepted) Error() string { return fmt.Sprintf("[PATCH /svm/peers/{uuid}][%d] svmPeerModifyAccepted ", 202) } func (o *SvmPeerModifyAccepted) String() string { return fmt.Sprintf("[PATCH /svm/peers/{uuid}][%d] svmPeerModifyAccepted ", 202) } func (o *SvmPeerModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewSvmPeerModifyDefault creates a SvmPeerModifyDefault with default headers values func NewSvmPeerModifyDefault(code int) *SvmPeerModifyDefault { return &SvmPeerModifyDefault{ _statusCode: code, } } /* SvmPeerModifyDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 13434889 | Internal error. Wait and retry. | | 26345575 | The specified peer cluster name and peer cluster UUID do not match. | | 26345576 | Given peer state is invalid. | | 26345577 | One of the following is required: applications, state, or name. | | 26345578 | Internal error. Unable to retrieve local or peer SVM name. | | 26345579 | The specified field is invalid. | | 26345581 | Peer cluster name could not be retrieved or validated. | ``` <br/> */ type SvmPeerModifyDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer modify default response func (o *SvmPeerModifyDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer modify default response has a 2xx status code func (o *SvmPeerModifyDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer modify default response has a 3xx status code func (o *SvmPeerModifyDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer modify default response has a 4xx status code func (o *SvmPeerModifyDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer modify default response has a 5xx status code func (o *SvmPeerModifyDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer modify default response a status code equal to that given func (o *SvmPeerModifyDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerModifyDefault) Error() string { return fmt.Sprintf("[PATCH /svm/peers/{uuid}][%d] svm_peer_modify default %+v", o._statusCode, o.Payload) } func (o *SvmPeerModifyDefault) String() string { return fmt.Sprintf("[PATCH /svm/peers/{uuid}][%d] svm_peer_modify default %+v", o._statusCode, o.Payload) } func (o *SvmPeerModifyDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerModifyDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_directory_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_directory_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewTopMetricsSvmDirectoryCollectionGetParams creates a new TopMetricsSvmDirectoryCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewTopMetricsSvmDirectoryCollectionGetParams() *TopMetricsSvmDirectoryCollectionGetParams { return &TopMetricsSvmDirectoryCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewTopMetricsSvmDirectoryCollectionGetParamsWithTimeout creates a new TopMetricsSvmDirectoryCollectionGetParams object // with the ability to set a timeout on a request. func NewTopMetricsSvmDirectoryCollectionGetParamsWithTimeout(timeout time.Duration) *TopMetricsSvmDirectoryCollectionGetParams { return &TopMetricsSvmDirectoryCollectionGetParams{ timeout: timeout, } } // NewTopMetricsSvmDirectoryCollectionGetParamsWithContext creates a new TopMetricsSvmDirectoryCollectionGetParams object // with the ability to set a context for a request. func NewTopMetricsSvmDirectoryCollectionGetParamsWithContext(ctx context.Context) *TopMetricsSvmDirectoryCollectionGetParams { return &TopMetricsSvmDirectoryCollectionGetParams{ Context: ctx, } } // NewTopMetricsSvmDirectoryCollectionGetParamsWithHTTPClient creates a new TopMetricsSvmDirectoryCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewTopMetricsSvmDirectoryCollectionGetParamsWithHTTPClient(client *http.Client) *TopMetricsSvmDirectoryCollectionGetParams { return &TopMetricsSvmDirectoryCollectionGetParams{ HTTPClient: client, } } /* TopMetricsSvmDirectoryCollectionGetParams contains all the parameters to send to the API endpoint for the top metrics svm directory collection get operation. Typically these are written to a http.Request. */ type TopMetricsSvmDirectoryCollectionGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* IopsErrorLowerBound. Filter by iops.error.lower_bound */ IopsErrorLowerBound *int64 /* IopsErrorUpperBound. Filter by iops.error.upper_bound */ IopsErrorUpperBound *int64 /* IopsRead. Filter by iops.read */ IopsRead *int64 /* IopsWrite. Filter by iops.write */ IopsWrite *int64 /* JunctionPath. Filter by junction-path */ JunctionPath *string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* MaxRecordsPerSvm. Max records per svm. */ MaxRecordsPerSvm *int64 /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* Path. Filter by path */ Path *string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SvmName. Filter by svm.name */ SvmName *string /* SvmUUID. SVM UUID */ SvmUUID string /* ThroughputErrorLowerBound. Filter by throughput.error.lower_bound */ ThroughputErrorLowerBound *int64 /* ThroughputErrorUpperBound. Filter by throughput.error.upper_bound */ ThroughputErrorUpperBound *int64 /* ThroughputRead. Filter by throughput.read */ ThroughputRead *int64 /* ThroughputWrite. Filter by throughput.write */ ThroughputWrite *int64 /* TopMetric. IO activity type Default: "iops.read" */ TopMetric *string /* VolumeName. Filter by volume.name */ VolumeName *string /* VolumeUUID. Filter by volume.uuid */ VolumeUUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the top metrics svm directory collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *TopMetricsSvmDirectoryCollectionGetParams) WithDefaults() *TopMetricsSvmDirectoryCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the top metrics svm directory collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *TopMetricsSvmDirectoryCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) topMetricDefault = string("iops.read") ) val := TopMetricsSvmDirectoryCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, TopMetric: &topMetricDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithTimeout(timeout time.Duration) *TopMetricsSvmDirectoryCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithContext(ctx context.Context) *TopMetricsSvmDirectoryCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithHTTPClient(client *http.Client) *TopMetricsSvmDirectoryCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithFields(fields []string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithIopsErrorLowerBound adds the iopsErrorLowerBound to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithIopsErrorLowerBound(iopsErrorLowerBound *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetIopsErrorLowerBound(iopsErrorLowerBound) return o } // SetIopsErrorLowerBound adds the iopsErrorLowerBound to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetIopsErrorLowerBound(iopsErrorLowerBound *int64) { o.IopsErrorLowerBound = iopsErrorLowerBound } // WithIopsErrorUpperBound adds the iopsErrorUpperBound to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithIopsErrorUpperBound(iopsErrorUpperBound *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetIopsErrorUpperBound(iopsErrorUpperBound) return o } // SetIopsErrorUpperBound adds the iopsErrorUpperBound to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetIopsErrorUpperBound(iopsErrorUpperBound *int64) { o.IopsErrorUpperBound = iopsErrorUpperBound } // WithIopsRead adds the iopsRead to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithIopsRead(iopsRead *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetIopsRead(iopsRead) return o } // SetIopsRead adds the iopsRead to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetIopsRead(iopsRead *int64) { o.IopsRead = iopsRead } // WithIopsWrite adds the iopsWrite to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithIopsWrite(iopsWrite *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetIopsWrite(iopsWrite) return o } // SetIopsWrite adds the iopsWrite to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetIopsWrite(iopsWrite *int64) { o.IopsWrite = iopsWrite } // WithJunctionPath adds the junctionPath to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithJunctionPath(junctionPath *string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetJunctionPath(junctionPath) return o } // SetJunctionPath adds the junctionPath to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetJunctionPath(junctionPath *string) { o.JunctionPath = junctionPath } // WithMaxRecords adds the maxRecords to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithMaxRecords(maxRecords *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithMaxRecordsPerSvm adds the maxRecordsPerSvm to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithMaxRecordsPerSvm(maxRecordsPerSvm *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetMaxRecordsPerSvm(maxRecordsPerSvm) return o } // SetMaxRecordsPerSvm adds the maxRecordsPerSvm to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetMaxRecordsPerSvm(maxRecordsPerSvm *int64) { o.MaxRecordsPerSvm = maxRecordsPerSvm } // WithOrderBy adds the orderBy to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithOrderBy(orderBy []string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithPath adds the path to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithPath(path *string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetPath(path) return o } // SetPath adds the path to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetPath(path *string) { o.Path = path } // WithReturnRecords adds the returnRecords to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithReturnRecords(returnRecords *bool) *TopMetricsSvmDirectoryCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmName adds the svmName to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithSvmName(svmName *string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetSvmName(svmName) return o } // SetSvmName adds the svmName to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetSvmName(svmName *string) { o.SvmName = svmName } // WithSvmUUID adds the svmUUID to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithSvmUUID(svmUUID string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WithThroughputErrorLowerBound adds the throughputErrorLowerBound to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithThroughputErrorLowerBound(throughputErrorLowerBound *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetThroughputErrorLowerBound(throughputErrorLowerBound) return o } // SetThroughputErrorLowerBound adds the throughputErrorLowerBound to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetThroughputErrorLowerBound(throughputErrorLowerBound *int64) { o.ThroughputErrorLowerBound = throughputErrorLowerBound } // WithThroughputErrorUpperBound adds the throughputErrorUpperBound to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithThroughputErrorUpperBound(throughputErrorUpperBound *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetThroughputErrorUpperBound(throughputErrorUpperBound) return o } // SetThroughputErrorUpperBound adds the throughputErrorUpperBound to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetThroughputErrorUpperBound(throughputErrorUpperBound *int64) { o.ThroughputErrorUpperBound = throughputErrorUpperBound } // WithThroughputRead adds the throughputRead to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithThroughputRead(throughputRead *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetThroughputRead(throughputRead) return o } // SetThroughputRead adds the throughputRead to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetThroughputRead(throughputRead *int64) { o.ThroughputRead = throughputRead } // WithThroughputWrite adds the throughputWrite to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithThroughputWrite(throughputWrite *int64) *TopMetricsSvmDirectoryCollectionGetParams { o.SetThroughputWrite(throughputWrite) return o } // SetThroughputWrite adds the throughputWrite to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetThroughputWrite(throughputWrite *int64) { o.ThroughputWrite = throughputWrite } // WithTopMetric adds the topMetric to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithTopMetric(topMetric *string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetTopMetric(topMetric) return o } // SetTopMetric adds the topMetric to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetTopMetric(topMetric *string) { o.TopMetric = topMetric } // WithVolumeName adds the volumeName to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithVolumeName(volumeName *string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetVolumeName(volumeName) return o } // SetVolumeName adds the volumeName to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetVolumeName(volumeName *string) { o.VolumeName = volumeName } // WithVolumeUUID adds the volumeUUID to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) WithVolumeUUID(volumeUUID *string) *TopMetricsSvmDirectoryCollectionGetParams { o.SetVolumeUUID(volumeUUID) return o } // SetVolumeUUID adds the volumeUuid to the top metrics svm directory collection get params func (o *TopMetricsSvmDirectoryCollectionGetParams) SetVolumeUUID(volumeUUID *string) { o.VolumeUUID = volumeUUID } // WriteToRequest writes these params to a swagger request func (o *TopMetricsSvmDirectoryCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.IopsErrorLowerBound != nil { // query param iops.error.lower_bound var qrIopsErrorLowerBound int64 if o.IopsErrorLowerBound != nil { qrIopsErrorLowerBound = *o.IopsErrorLowerBound } qIopsErrorLowerBound := swag.FormatInt64(qrIopsErrorLowerBound) if qIopsErrorLowerBound != "" { if err := r.SetQueryParam("iops.error.lower_bound", qIopsErrorLowerBound); err != nil { return err } } } if o.IopsErrorUpperBound != nil { // query param iops.error.upper_bound var qrIopsErrorUpperBound int64 if o.IopsErrorUpperBound != nil { qrIopsErrorUpperBound = *o.IopsErrorUpperBound } qIopsErrorUpperBound := swag.FormatInt64(qrIopsErrorUpperBound) if qIopsErrorUpperBound != "" { if err := r.SetQueryParam("iops.error.upper_bound", qIopsErrorUpperBound); err != nil { return err } } } if o.IopsRead != nil { // query param iops.read var qrIopsRead int64 if o.IopsRead != nil { qrIopsRead = *o.IopsRead } qIopsRead := swag.FormatInt64(qrIopsRead) if qIopsRead != "" { if err := r.SetQueryParam("iops.read", qIopsRead); err != nil { return err } } } if o.IopsWrite != nil { // query param iops.write var qrIopsWrite int64 if o.IopsWrite != nil { qrIopsWrite = *o.IopsWrite } qIopsWrite := swag.FormatInt64(qrIopsWrite) if qIopsWrite != "" { if err := r.SetQueryParam("iops.write", qIopsWrite); err != nil { return err } } } if o.JunctionPath != nil { // query param junction-path var qrJunctionPath string if o.JunctionPath != nil { qrJunctionPath = *o.JunctionPath } qJunctionPath := qrJunctionPath if qJunctionPath != "" { if err := r.SetQueryParam("junction-path", qJunctionPath); err != nil { return err } } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.MaxRecordsPerSvm != nil { // query param max_records_per_svm var qrMaxRecordsPerSvm int64 if o.MaxRecordsPerSvm != nil { qrMaxRecordsPerSvm = *o.MaxRecordsPerSvm } qMaxRecordsPerSvm := swag.FormatInt64(qrMaxRecordsPerSvm) if qMaxRecordsPerSvm != "" { if err := r.SetQueryParam("max_records_per_svm", qMaxRecordsPerSvm); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.Path != nil { // query param path var qrPath string if o.Path != nil { qrPath = *o.Path } qPath := qrPath if qPath != "" { if err := r.SetQueryParam("path", qPath); err != nil { return err } } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.SvmName != nil { // query param svm.name var qrSvmName string if o.SvmName != nil { qrSvmName = *o.SvmName } qSvmName := qrSvmName if qSvmName != "" { if err := r.SetQueryParam("svm.name", qSvmName); err != nil { return err } } } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if o.ThroughputErrorLowerBound != nil { // query param throughput.error.lower_bound var qrThroughputErrorLowerBound int64 if o.ThroughputErrorLowerBound != nil { qrThroughputErrorLowerBound = *o.ThroughputErrorLowerBound } qThroughputErrorLowerBound := swag.FormatInt64(qrThroughputErrorLowerBound) if qThroughputErrorLowerBound != "" { if err := r.SetQueryParam("throughput.error.lower_bound", qThroughputErrorLowerBound); err != nil { return err } } } if o.ThroughputErrorUpperBound != nil { // query param throughput.error.upper_bound var qrThroughputErrorUpperBound int64 if o.ThroughputErrorUpperBound != nil { qrThroughputErrorUpperBound = *o.ThroughputErrorUpperBound } qThroughputErrorUpperBound := swag.FormatInt64(qrThroughputErrorUpperBound) if qThroughputErrorUpperBound != "" { if err := r.SetQueryParam("throughput.error.upper_bound", qThroughputErrorUpperBound); err != nil { return err } } } if o.ThroughputRead != nil { // query param throughput.read var qrThroughputRead int64 if o.ThroughputRead != nil { qrThroughputRead = *o.ThroughputRead } qThroughputRead := swag.FormatInt64(qrThroughputRead) if qThroughputRead != "" { if err := r.SetQueryParam("throughput.read", qThroughputRead); err != nil { return err } } } if o.ThroughputWrite != nil { // query param throughput.write var qrThroughputWrite int64 if o.ThroughputWrite != nil { qrThroughputWrite = *o.ThroughputWrite } qThroughputWrite := swag.FormatInt64(qrThroughputWrite) if qThroughputWrite != "" { if err := r.SetQueryParam("throughput.write", qThroughputWrite); err != nil { return err } } } if o.TopMetric != nil { // query param top_metric var qrTopMetric string if o.TopMetric != nil { qrTopMetric = *o.TopMetric } qTopMetric := qrTopMetric if qTopMetric != "" { if err := r.SetQueryParam("top_metric", qTopMetric); err != nil { return err } } } if o.VolumeName != nil { // query param volume.name var qrVolumeName string if o.VolumeName != nil { qrVolumeName = *o.VolumeName } qVolumeName := qrVolumeName if qVolumeName != "" { if err := r.SetQueryParam("volume.name", qVolumeName); err != nil { return err } } } if o.VolumeUUID != nil { // query param volume.uuid var qrVolumeUUID string if o.VolumeUUID != nil { qrVolumeUUID = *o.VolumeUUID } qVolumeUUID := qrVolumeUUID if qVolumeUUID != "" { if err := r.SetQueryParam("volume.uuid", qVolumeUUID); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamTopMetricsSvmDirectoryCollectionGet binds the parameter fields func (o *TopMetricsSvmDirectoryCollectionGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamTopMetricsSvmDirectoryCollectionGet binds the parameter order_by func (o *TopMetricsSvmDirectoryCollectionGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_file_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_file_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // TopMetricsSvmFileCollectionGetReader is a Reader for the TopMetricsSvmFileCollectionGet structure. type TopMetricsSvmFileCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *TopMetricsSvmFileCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewTopMetricsSvmFileCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewTopMetricsSvmFileCollectionGetDefault(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 } } // NewTopMetricsSvmFileCollectionGetOK creates a TopMetricsSvmFileCollectionGetOK with default headers values func NewTopMetricsSvmFileCollectionGetOK() *TopMetricsSvmFileCollectionGetOK { return &TopMetricsSvmFileCollectionGetOK{} } /* TopMetricsSvmFileCollectionGetOK describes a response with status code 200, with default header values. OK */ type TopMetricsSvmFileCollectionGetOK struct { Payload *models.TopMetricsSvmFileResponse } // IsSuccess returns true when this top metrics svm file collection get o k response has a 2xx status code func (o *TopMetricsSvmFileCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this top metrics svm file collection get o k response has a 3xx status code func (o *TopMetricsSvmFileCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this top metrics svm file collection get o k response has a 4xx status code func (o *TopMetricsSvmFileCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this top metrics svm file collection get o k response has a 5xx status code func (o *TopMetricsSvmFileCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this top metrics svm file collection get o k response a status code equal to that given func (o *TopMetricsSvmFileCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *TopMetricsSvmFileCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/files][%d] topMetricsSvmFileCollectionGetOK %+v", 200, o.Payload) } func (o *TopMetricsSvmFileCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/files][%d] topMetricsSvmFileCollectionGetOK %+v", 200, o.Payload) } func (o *TopMetricsSvmFileCollectionGetOK) GetPayload() *models.TopMetricsSvmFileResponse { return o.Payload } func (o *TopMetricsSvmFileCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.TopMetricsSvmFileResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewTopMetricsSvmFileCollectionGetDefault creates a TopMetricsSvmFileCollectionGetDefault with default headers values func NewTopMetricsSvmFileCollectionGetDefault(code int) *TopMetricsSvmFileCollectionGetDefault { return &TopMetricsSvmFileCollectionGetDefault{ _statusCode: code, } } /* TopMetricsSvmFileCollectionGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 124519405 | The activity tracking report for SVM svm.name returned zero records. Check whether the volumes belonging to the SVM have read/write traffic. Refer to the REST API documentation for more information on why there might be no records. | | 124519406 | Failed to get the activity tracking report for SVM svm.name. Reason:<Reason for failure>. | | 124519407 | SVM wildcard queries are not supported for activity tracking reports. | | 124519408 | Activity tracking is not supported on SVM svm.name, because it is configured as a destination for SVM DR. | | 124519409 | Activity tracking is not supported on SVM svm.name, because it is configured as a destination of a MetroCluster SVM relationship and the SVM admin state is stopped. | */ type TopMetricsSvmFileCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the top metrics svm file collection get default response func (o *TopMetricsSvmFileCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this top metrics svm file collection get default response has a 2xx status code func (o *TopMetricsSvmFileCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this top metrics svm file collection get default response has a 3xx status code func (o *TopMetricsSvmFileCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this top metrics svm file collection get default response has a 4xx status code func (o *TopMetricsSvmFileCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this top metrics svm file collection get default response has a 5xx status code func (o *TopMetricsSvmFileCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this top metrics svm file collection get default response a status code equal to that given func (o *TopMetricsSvmFileCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *TopMetricsSvmFileCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/files][%d] top_metrics_svm_file_collection_get default %+v", o._statusCode, o.Payload) } func (o *TopMetricsSvmFileCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/files][%d] top_metrics_svm_file_collection_get default %+v", o._statusCode, o.Payload) } func (o *TopMetricsSvmFileCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *TopMetricsSvmFileCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/web_svm_modify_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/web_svm_modify_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // WebSvmModifyReader is a Reader for the WebSvmModify structure. type WebSvmModifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *WebSvmModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewWebSvmModifyOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 202: result := NewWebSvmModifyAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewWebSvmModifyDefault(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 } } // NewWebSvmModifyOK creates a WebSvmModifyOK with default headers values func NewWebSvmModifyOK() *WebSvmModifyOK { return &WebSvmModifyOK{} } /* WebSvmModifyOK describes a response with status code 200, with default header values. OK */ type WebSvmModifyOK struct { } // IsSuccess returns true when this web svm modify o k response has a 2xx status code func (o *WebSvmModifyOK) IsSuccess() bool { return true } // IsRedirect returns true when this web svm modify o k response has a 3xx status code func (o *WebSvmModifyOK) IsRedirect() bool { return false } // IsClientError returns true when this web svm modify o k response has a 4xx status code func (o *WebSvmModifyOK) IsClientError() bool { return false } // IsServerError returns true when this web svm modify o k response has a 5xx status code func (o *WebSvmModifyOK) IsServerError() bool { return false } // IsCode returns true when this web svm modify o k response a status code equal to that given func (o *WebSvmModifyOK) IsCode(code int) bool { return code == 200 } func (o *WebSvmModifyOK) Error() string { return fmt.Sprintf("[PATCH /svm/svms/{svm.uuid}/web][%d] webSvmModifyOK ", 200) } func (o *WebSvmModifyOK) String() string { return fmt.Sprintf("[PATCH /svm/svms/{svm.uuid}/web][%d] webSvmModifyOK ", 200) } func (o *WebSvmModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewWebSvmModifyAccepted creates a WebSvmModifyAccepted with default headers values func NewWebSvmModifyAccepted() *WebSvmModifyAccepted { return &WebSvmModifyAccepted{} } /* WebSvmModifyAccepted describes a response with status code 202, with default header values. Accepted */ type WebSvmModifyAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this web svm modify accepted response has a 2xx status code func (o *WebSvmModifyAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this web svm modify accepted response has a 3xx status code func (o *WebSvmModifyAccepted) IsRedirect() bool { return false } // IsClientError returns true when this web svm modify accepted response has a 4xx status code func (o *WebSvmModifyAccepted) IsClientError() bool { return false } // IsServerError returns true when this web svm modify accepted response has a 5xx status code func (o *WebSvmModifyAccepted) IsServerError() bool { return false } // IsCode returns true when this web svm modify accepted response a status code equal to that given func (o *WebSvmModifyAccepted) IsCode(code int) bool { return code == 202 } func (o *WebSvmModifyAccepted) Error() string { return fmt.Sprintf("[PATCH /svm/svms/{svm.uuid}/web][%d] webSvmModifyAccepted %+v", 202, o.Payload) } func (o *WebSvmModifyAccepted) String() string { return fmt.Sprintf("[PATCH /svm/svms/{svm.uuid}/web][%d] webSvmModifyAccepted %+v", 202, o.Payload) } func (o *WebSvmModifyAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *WebSvmModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewWebSvmModifyDefault creates a WebSvmModifyDefault with default headers values func NewWebSvmModifyDefault(code int) *WebSvmModifyDefault { return &WebSvmModifyDefault{ _statusCode: code, } } /* WebSvmModifyDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 9830442 | Client authentication cannot be enabled without a client ca certificate. | | 9830488 | The certificate is not a "server" certificate. | | 9830489 | The certificate does not exist for the given SVM. | */ type WebSvmModifyDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the web svm modify default response func (o *WebSvmModifyDefault) Code() int { return o._statusCode } // IsSuccess returns true when this web svm modify default response has a 2xx status code func (o *WebSvmModifyDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this web svm modify default response has a 3xx status code func (o *WebSvmModifyDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this web svm modify default response has a 4xx status code func (o *WebSvmModifyDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this web svm modify default response has a 5xx status code func (o *WebSvmModifyDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this web svm modify default response a status code equal to that given func (o *WebSvmModifyDefault) IsCode(code int) bool { return o._statusCode == code } func (o *WebSvmModifyDefault) Error() string { return fmt.Sprintf("[PATCH /svm/svms/{svm.uuid}/web][%d] web_svm_modify default %+v", o._statusCode, o.Payload) } func (o *WebSvmModifyDefault) String() string { return fmt.Sprintf("[PATCH /svm/svms/{svm.uuid}/web][%d] web_svm_modify default %+v", o._statusCode, o.Payload) } func (o *WebSvmModifyDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *WebSvmModifyDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_delete_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_delete_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" ) // NewSvmPeerPermissionDeleteParams creates a new SvmPeerPermissionDeleteParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerPermissionDeleteParams() *SvmPeerPermissionDeleteParams { return &SvmPeerPermissionDeleteParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerPermissionDeleteParamsWithTimeout creates a new SvmPeerPermissionDeleteParams object // with the ability to set a timeout on a request. func NewSvmPeerPermissionDeleteParamsWithTimeout(timeout time.Duration) *SvmPeerPermissionDeleteParams { return &SvmPeerPermissionDeleteParams{ timeout: timeout, } } // NewSvmPeerPermissionDeleteParamsWithContext creates a new SvmPeerPermissionDeleteParams object // with the ability to set a context for a request. func NewSvmPeerPermissionDeleteParamsWithContext(ctx context.Context) *SvmPeerPermissionDeleteParams { return &SvmPeerPermissionDeleteParams{ Context: ctx, } } // NewSvmPeerPermissionDeleteParamsWithHTTPClient creates a new SvmPeerPermissionDeleteParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerPermissionDeleteParamsWithHTTPClient(client *http.Client) *SvmPeerPermissionDeleteParams { return &SvmPeerPermissionDeleteParams{ HTTPClient: client, } } /* SvmPeerPermissionDeleteParams contains all the parameters to send to the API endpoint for the svm peer permission delete operation. Typically these are written to a http.Request. */ type SvmPeerPermissionDeleteParams struct { /* ClusterPeerUUID. Peer cluster UUID */ ClusterPeerUUID string /* SvmUUID. SVM UUID */ SvmUUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer permission delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionDeleteParams) WithDefaults() *SvmPeerPermissionDeleteParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer permission delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionDeleteParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) WithTimeout(timeout time.Duration) *SvmPeerPermissionDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) WithContext(ctx context.Context) *SvmPeerPermissionDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) WithHTTPClient(client *http.Client) *SvmPeerPermissionDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithClusterPeerUUID adds the clusterPeerUUID to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) WithClusterPeerUUID(clusterPeerUUID string) *SvmPeerPermissionDeleteParams { o.SetClusterPeerUUID(clusterPeerUUID) return o } // SetClusterPeerUUID adds the clusterPeerUuid to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) SetClusterPeerUUID(clusterPeerUUID string) { o.ClusterPeerUUID = clusterPeerUUID } // WithSvmUUID adds the svmUUID to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) WithSvmUUID(svmUUID string) *SvmPeerPermissionDeleteParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the svm peer permission delete params func (o *SvmPeerPermissionDeleteParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WriteToRequest writes these params to a swagger request func (o *SvmPeerPermissionDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // path param cluster_peer.uuid if err := r.SetPathParam("cluster_peer.uuid", o.ClusterPeerUUID); err != nil { return err } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_create_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_create_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSvmCreateParams creates a new SvmCreateParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmCreateParams() *SvmCreateParams { return &SvmCreateParams{ timeout: cr.DefaultTimeout, } } // NewSvmCreateParamsWithTimeout creates a new SvmCreateParams object // with the ability to set a timeout on a request. func NewSvmCreateParamsWithTimeout(timeout time.Duration) *SvmCreateParams { return &SvmCreateParams{ timeout: timeout, } } // NewSvmCreateParamsWithContext creates a new SvmCreateParams object // with the ability to set a context for a request. func NewSvmCreateParamsWithContext(ctx context.Context) *SvmCreateParams { return &SvmCreateParams{ Context: ctx, } } // NewSvmCreateParamsWithHTTPClient creates a new SvmCreateParams object // with the ability to set a custom HTTPClient for a request. func NewSvmCreateParamsWithHTTPClient(client *http.Client) *SvmCreateParams { return &SvmCreateParams{ HTTPClient: client, } } /* SvmCreateParams contains all the parameters to send to the API endpoint for the svm create operation. Typically these are written to a http.Request. */ type SvmCreateParams struct { /* Info. Info specification */ Info *models.Svm /* ReturnRecords. The default is false. If set to true, the records are returned. */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm create params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmCreateParams) WithDefaults() *SvmCreateParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm create params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmCreateParams) SetDefaults() { var ( returnRecordsDefault = bool(false) returnTimeoutDefault = int64(0) ) val := SvmCreateParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm create params func (o *SvmCreateParams) WithTimeout(timeout time.Duration) *SvmCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm create params func (o *SvmCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm create params func (o *SvmCreateParams) WithContext(ctx context.Context) *SvmCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm create params func (o *SvmCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm create params func (o *SvmCreateParams) WithHTTPClient(client *http.Client) *SvmCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm create params func (o *SvmCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the svm create params func (o *SvmCreateParams) WithInfo(info *models.Svm) *SvmCreateParams { o.SetInfo(info) return o } // SetInfo adds the info to the svm create params func (o *SvmCreateParams) SetInfo(info *models.Svm) { o.Info = info } // WithReturnRecords adds the returnRecords to the svm create params func (o *SvmCreateParams) WithReturnRecords(returnRecords *bool) *SvmCreateParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm create params func (o *SvmCreateParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm create params func (o *SvmCreateParams) WithReturnTimeout(returnTimeout *int64) *SvmCreateParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm create params func (o *SvmCreateParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WriteToRequest writes these params to a swagger request func (o *SvmCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_delete_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_delete_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerPermissionDeleteReader is a Reader for the SvmPeerPermissionDelete structure. type SvmPeerPermissionDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerPermissionDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmPeerPermissionDeleteOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerPermissionDeleteDefault(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 } } // NewSvmPeerPermissionDeleteOK creates a SvmPeerPermissionDeleteOK with default headers values func NewSvmPeerPermissionDeleteOK() *SvmPeerPermissionDeleteOK { return &SvmPeerPermissionDeleteOK{} } /* SvmPeerPermissionDeleteOK describes a response with status code 200, with default header values. OK */ type SvmPeerPermissionDeleteOK struct { } // IsSuccess returns true when this svm peer permission delete o k response has a 2xx status code func (o *SvmPeerPermissionDeleteOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer permission delete o k response has a 3xx status code func (o *SvmPeerPermissionDeleteOK) IsRedirect() bool { return false } // IsClientError returns true when this svm peer permission delete o k response has a 4xx status code func (o *SvmPeerPermissionDeleteOK) IsClientError() bool { return false } // IsServerError returns true when this svm peer permission delete o k response has a 5xx status code func (o *SvmPeerPermissionDeleteOK) IsServerError() bool { return false } // IsCode returns true when this svm peer permission delete o k response a status code equal to that given func (o *SvmPeerPermissionDeleteOK) IsCode(code int) bool { return code == 200 } func (o *SvmPeerPermissionDeleteOK) Error() string { return fmt.Sprintf("[DELETE /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svmPeerPermissionDeleteOK ", 200) } func (o *SvmPeerPermissionDeleteOK) String() string { return fmt.Sprintf("[DELETE /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svmPeerPermissionDeleteOK ", 200) } func (o *SvmPeerPermissionDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewSvmPeerPermissionDeleteDefault creates a SvmPeerPermissionDeleteDefault with default headers values func NewSvmPeerPermissionDeleteDefault(code int) *SvmPeerPermissionDeleteDefault { return &SvmPeerPermissionDeleteDefault{ _statusCode: code, } } /* SvmPeerPermissionDeleteDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 26345574 | Failed to find the SVM or volume name with UUID. | ``` <br/> */ type SvmPeerPermissionDeleteDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer permission delete default response func (o *SvmPeerPermissionDeleteDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer permission delete default response has a 2xx status code func (o *SvmPeerPermissionDeleteDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer permission delete default response has a 3xx status code func (o *SvmPeerPermissionDeleteDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer permission delete default response has a 4xx status code func (o *SvmPeerPermissionDeleteDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer permission delete default response has a 5xx status code func (o *SvmPeerPermissionDeleteDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer permission delete default response a status code equal to that given func (o *SvmPeerPermissionDeleteDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerPermissionDeleteDefault) Error() string { return fmt.Sprintf("[DELETE /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svm_peer_permission_delete default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionDeleteDefault) String() string { return fmt.Sprintf("[DELETE /svm/peer-permissions/{cluster_peer.uuid}/{svm.uuid}][%d] svm_peer_permission_delete default %+v", o._statusCode, o.Payload) } func (o *SvmPeerPermissionDeleteDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerPermissionDeleteDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_instance_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_instance_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmPeerPermissionInstanceGetParams creates a new SvmPeerPermissionInstanceGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerPermissionInstanceGetParams() *SvmPeerPermissionInstanceGetParams { return &SvmPeerPermissionInstanceGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerPermissionInstanceGetParamsWithTimeout creates a new SvmPeerPermissionInstanceGetParams object // with the ability to set a timeout on a request. func NewSvmPeerPermissionInstanceGetParamsWithTimeout(timeout time.Duration) *SvmPeerPermissionInstanceGetParams { return &SvmPeerPermissionInstanceGetParams{ timeout: timeout, } } // NewSvmPeerPermissionInstanceGetParamsWithContext creates a new SvmPeerPermissionInstanceGetParams object // with the ability to set a context for a request. func NewSvmPeerPermissionInstanceGetParamsWithContext(ctx context.Context) *SvmPeerPermissionInstanceGetParams { return &SvmPeerPermissionInstanceGetParams{ Context: ctx, } } // NewSvmPeerPermissionInstanceGetParamsWithHTTPClient creates a new SvmPeerPermissionInstanceGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerPermissionInstanceGetParamsWithHTTPClient(client *http.Client) *SvmPeerPermissionInstanceGetParams { return &SvmPeerPermissionInstanceGetParams{ HTTPClient: client, } } /* SvmPeerPermissionInstanceGetParams contains all the parameters to send to the API endpoint for the svm peer permission instance get operation. Typically these are written to a http.Request. */ type SvmPeerPermissionInstanceGetParams struct { /* ClusterPeerUUID. Peer cluster UUID */ ClusterPeerUUID string /* Fields. Specify the fields to return. */ Fields []string /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SvmUUID. SVM UUID */ SvmUUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer permission instance get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionInstanceGetParams) WithDefaults() *SvmPeerPermissionInstanceGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer permission instance get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionInstanceGetParams) SetDefaults() { var ( returnTimeoutDefault = int64(15) ) val := SvmPeerPermissionInstanceGetParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) WithTimeout(timeout time.Duration) *SvmPeerPermissionInstanceGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) WithContext(ctx context.Context) *SvmPeerPermissionInstanceGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) WithHTTPClient(client *http.Client) *SvmPeerPermissionInstanceGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithClusterPeerUUID adds the clusterPeerUUID to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) WithClusterPeerUUID(clusterPeerUUID string) *SvmPeerPermissionInstanceGetParams { o.SetClusterPeerUUID(clusterPeerUUID) return o } // SetClusterPeerUUID adds the clusterPeerUuid to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) SetClusterPeerUUID(clusterPeerUUID string) { o.ClusterPeerUUID = clusterPeerUUID } // WithFields adds the fields to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) WithFields(fields []string) *SvmPeerPermissionInstanceGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) SetFields(fields []string) { o.Fields = fields } // WithReturnTimeout adds the returnTimeout to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) WithReturnTimeout(returnTimeout *int64) *SvmPeerPermissionInstanceGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmUUID adds the svmUUID to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) WithSvmUUID(svmUUID string) *SvmPeerPermissionInstanceGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the svm peer permission instance get params func (o *SvmPeerPermissionInstanceGetParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WriteToRequest writes these params to a swagger request func (o *SvmPeerPermissionInstanceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error // path param cluster_peer.uuid if err := r.SetPathParam("cluster_peer.uuid", o.ClusterPeerUUID); err != nil { return err } if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSvmPeerPermissionInstanceGet binds the parameter fields func (o *SvmPeerPermissionInstanceGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_instance_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_instance_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmPeerInstanceGetParams creates a new SvmPeerInstanceGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerInstanceGetParams() *SvmPeerInstanceGetParams { return &SvmPeerInstanceGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerInstanceGetParamsWithTimeout creates a new SvmPeerInstanceGetParams object // with the ability to set a timeout on a request. func NewSvmPeerInstanceGetParamsWithTimeout(timeout time.Duration) *SvmPeerInstanceGetParams { return &SvmPeerInstanceGetParams{ timeout: timeout, } } // NewSvmPeerInstanceGetParamsWithContext creates a new SvmPeerInstanceGetParams object // with the ability to set a context for a request. func NewSvmPeerInstanceGetParamsWithContext(ctx context.Context) *SvmPeerInstanceGetParams { return &SvmPeerInstanceGetParams{ Context: ctx, } } // NewSvmPeerInstanceGetParamsWithHTTPClient creates a new SvmPeerInstanceGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerInstanceGetParamsWithHTTPClient(client *http.Client) *SvmPeerInstanceGetParams { return &SvmPeerInstanceGetParams{ HTTPClient: client, } } /* SvmPeerInstanceGetParams contains all the parameters to send to the API endpoint for the svm peer instance get operation. Typically these are written to a http.Request. */ type SvmPeerInstanceGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* UUID. SVM peer relation UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer instance get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerInstanceGetParams) WithDefaults() *SvmPeerInstanceGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer instance get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerInstanceGetParams) SetDefaults() { var ( returnTimeoutDefault = int64(15) ) val := SvmPeerInstanceGetParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm peer instance get params func (o *SvmPeerInstanceGetParams) WithTimeout(timeout time.Duration) *SvmPeerInstanceGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer instance get params func (o *SvmPeerInstanceGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer instance get params func (o *SvmPeerInstanceGetParams) WithContext(ctx context.Context) *SvmPeerInstanceGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer instance get params func (o *SvmPeerInstanceGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer instance get params func (o *SvmPeerInstanceGetParams) WithHTTPClient(client *http.Client) *SvmPeerInstanceGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer instance get params func (o *SvmPeerInstanceGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the svm peer instance get params func (o *SvmPeerInstanceGetParams) WithFields(fields []string) *SvmPeerInstanceGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm peer instance get params func (o *SvmPeerInstanceGetParams) SetFields(fields []string) { o.Fields = fields } // WithReturnTimeout adds the returnTimeout to the svm peer instance get params func (o *SvmPeerInstanceGetParams) WithReturnTimeout(returnTimeout *int64) *SvmPeerInstanceGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm peer instance get params func (o *SvmPeerInstanceGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the svm peer instance get params func (o *SvmPeerInstanceGetParams) WithUUID(uuid string) *SvmPeerInstanceGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the svm peer instance get params func (o *SvmPeerInstanceGetParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SvmPeerInstanceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSvmPeerInstanceGet binds the parameter fields func (o *SvmPeerInstanceGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_file_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_file_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewTopMetricsSvmFileCollectionGetParams creates a new TopMetricsSvmFileCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewTopMetricsSvmFileCollectionGetParams() *TopMetricsSvmFileCollectionGetParams { return &TopMetricsSvmFileCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewTopMetricsSvmFileCollectionGetParamsWithTimeout creates a new TopMetricsSvmFileCollectionGetParams object // with the ability to set a timeout on a request. func NewTopMetricsSvmFileCollectionGetParamsWithTimeout(timeout time.Duration) *TopMetricsSvmFileCollectionGetParams { return &TopMetricsSvmFileCollectionGetParams{ timeout: timeout, } } // NewTopMetricsSvmFileCollectionGetParamsWithContext creates a new TopMetricsSvmFileCollectionGetParams object // with the ability to set a context for a request. func NewTopMetricsSvmFileCollectionGetParamsWithContext(ctx context.Context) *TopMetricsSvmFileCollectionGetParams { return &TopMetricsSvmFileCollectionGetParams{ Context: ctx, } } // NewTopMetricsSvmFileCollectionGetParamsWithHTTPClient creates a new TopMetricsSvmFileCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewTopMetricsSvmFileCollectionGetParamsWithHTTPClient(client *http.Client) *TopMetricsSvmFileCollectionGetParams { return &TopMetricsSvmFileCollectionGetParams{ HTTPClient: client, } } /* TopMetricsSvmFileCollectionGetParams contains all the parameters to send to the API endpoint for the top metrics svm file collection get operation. Typically these are written to a http.Request. */ type TopMetricsSvmFileCollectionGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* IopsErrorLowerBound. Filter by iops.error.lower_bound */ IopsErrorLowerBound *int64 /* IopsErrorUpperBound. Filter by iops.error.upper_bound */ IopsErrorUpperBound *int64 /* IopsRead. Filter by iops.read */ IopsRead *int64 /* IopsWrite. Filter by iops.write */ IopsWrite *int64 /* JunctionPath. Filter by junction-path */ JunctionPath *string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* MaxRecordsPerSvm. Max records per svm. */ MaxRecordsPerSvm *int64 /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* Path. Filter by path */ Path *string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SvmName. Filter by svm.name */ SvmName *string /* SvmUUID. SVM UUID */ SvmUUID string /* ThroughputErrorLowerBound. Filter by throughput.error.lower_bound */ ThroughputErrorLowerBound *int64 /* ThroughputErrorUpperBound. Filter by throughput.error.upper_bound */ ThroughputErrorUpperBound *int64 /* ThroughputRead. Filter by throughput.read */ ThroughputRead *int64 /* ThroughputWrite. Filter by throughput.write */ ThroughputWrite *int64 /* TopMetric. IO activity type Default: "iops.read" */ TopMetric *string /* VolumeName. Filter by volume.name */ VolumeName *string /* VolumeUUID. Filter by volume.uuid */ VolumeUUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the top metrics svm file collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *TopMetricsSvmFileCollectionGetParams) WithDefaults() *TopMetricsSvmFileCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the top metrics svm file collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *TopMetricsSvmFileCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) topMetricDefault = string("iops.read") ) val := TopMetricsSvmFileCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, TopMetric: &topMetricDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithTimeout(timeout time.Duration) *TopMetricsSvmFileCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithContext(ctx context.Context) *TopMetricsSvmFileCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithHTTPClient(client *http.Client) *TopMetricsSvmFileCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithFields(fields []string) *TopMetricsSvmFileCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithIopsErrorLowerBound adds the iopsErrorLowerBound to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithIopsErrorLowerBound(iopsErrorLowerBound *int64) *TopMetricsSvmFileCollectionGetParams { o.SetIopsErrorLowerBound(iopsErrorLowerBound) return o } // SetIopsErrorLowerBound adds the iopsErrorLowerBound to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetIopsErrorLowerBound(iopsErrorLowerBound *int64) { o.IopsErrorLowerBound = iopsErrorLowerBound } // WithIopsErrorUpperBound adds the iopsErrorUpperBound to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithIopsErrorUpperBound(iopsErrorUpperBound *int64) *TopMetricsSvmFileCollectionGetParams { o.SetIopsErrorUpperBound(iopsErrorUpperBound) return o } // SetIopsErrorUpperBound adds the iopsErrorUpperBound to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetIopsErrorUpperBound(iopsErrorUpperBound *int64) { o.IopsErrorUpperBound = iopsErrorUpperBound } // WithIopsRead adds the iopsRead to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithIopsRead(iopsRead *int64) *TopMetricsSvmFileCollectionGetParams { o.SetIopsRead(iopsRead) return o } // SetIopsRead adds the iopsRead to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetIopsRead(iopsRead *int64) { o.IopsRead = iopsRead } // WithIopsWrite adds the iopsWrite to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithIopsWrite(iopsWrite *int64) *TopMetricsSvmFileCollectionGetParams { o.SetIopsWrite(iopsWrite) return o } // SetIopsWrite adds the iopsWrite to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetIopsWrite(iopsWrite *int64) { o.IopsWrite = iopsWrite } // WithJunctionPath adds the junctionPath to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithJunctionPath(junctionPath *string) *TopMetricsSvmFileCollectionGetParams { o.SetJunctionPath(junctionPath) return o } // SetJunctionPath adds the junctionPath to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetJunctionPath(junctionPath *string) { o.JunctionPath = junctionPath } // WithMaxRecords adds the maxRecords to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithMaxRecords(maxRecords *int64) *TopMetricsSvmFileCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithMaxRecordsPerSvm adds the maxRecordsPerSvm to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithMaxRecordsPerSvm(maxRecordsPerSvm *int64) *TopMetricsSvmFileCollectionGetParams { o.SetMaxRecordsPerSvm(maxRecordsPerSvm) return o } // SetMaxRecordsPerSvm adds the maxRecordsPerSvm to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetMaxRecordsPerSvm(maxRecordsPerSvm *int64) { o.MaxRecordsPerSvm = maxRecordsPerSvm } // WithOrderBy adds the orderBy to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithOrderBy(orderBy []string) *TopMetricsSvmFileCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithPath adds the path to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithPath(path *string) *TopMetricsSvmFileCollectionGetParams { o.SetPath(path) return o } // SetPath adds the path to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetPath(path *string) { o.Path = path } // WithReturnRecords adds the returnRecords to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithReturnRecords(returnRecords *bool) *TopMetricsSvmFileCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *TopMetricsSvmFileCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmName adds the svmName to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithSvmName(svmName *string) *TopMetricsSvmFileCollectionGetParams { o.SetSvmName(svmName) return o } // SetSvmName adds the svmName to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetSvmName(svmName *string) { o.SvmName = svmName } // WithSvmUUID adds the svmUUID to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithSvmUUID(svmUUID string) *TopMetricsSvmFileCollectionGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetSvmUUID(svmUUID string) { o.SvmUUID = svmUUID } // WithThroughputErrorLowerBound adds the throughputErrorLowerBound to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithThroughputErrorLowerBound(throughputErrorLowerBound *int64) *TopMetricsSvmFileCollectionGetParams { o.SetThroughputErrorLowerBound(throughputErrorLowerBound) return o } // SetThroughputErrorLowerBound adds the throughputErrorLowerBound to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetThroughputErrorLowerBound(throughputErrorLowerBound *int64) { o.ThroughputErrorLowerBound = throughputErrorLowerBound } // WithThroughputErrorUpperBound adds the throughputErrorUpperBound to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithThroughputErrorUpperBound(throughputErrorUpperBound *int64) *TopMetricsSvmFileCollectionGetParams { o.SetThroughputErrorUpperBound(throughputErrorUpperBound) return o } // SetThroughputErrorUpperBound adds the throughputErrorUpperBound to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetThroughputErrorUpperBound(throughputErrorUpperBound *int64) { o.ThroughputErrorUpperBound = throughputErrorUpperBound } // WithThroughputRead adds the throughputRead to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithThroughputRead(throughputRead *int64) *TopMetricsSvmFileCollectionGetParams { o.SetThroughputRead(throughputRead) return o } // SetThroughputRead adds the throughputRead to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetThroughputRead(throughputRead *int64) { o.ThroughputRead = throughputRead } // WithThroughputWrite adds the throughputWrite to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithThroughputWrite(throughputWrite *int64) *TopMetricsSvmFileCollectionGetParams { o.SetThroughputWrite(throughputWrite) return o } // SetThroughputWrite adds the throughputWrite to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetThroughputWrite(throughputWrite *int64) { o.ThroughputWrite = throughputWrite } // WithTopMetric adds the topMetric to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithTopMetric(topMetric *string) *TopMetricsSvmFileCollectionGetParams { o.SetTopMetric(topMetric) return o } // SetTopMetric adds the topMetric to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetTopMetric(topMetric *string) { o.TopMetric = topMetric } // WithVolumeName adds the volumeName to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithVolumeName(volumeName *string) *TopMetricsSvmFileCollectionGetParams { o.SetVolumeName(volumeName) return o } // SetVolumeName adds the volumeName to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetVolumeName(volumeName *string) { o.VolumeName = volumeName } // WithVolumeUUID adds the volumeUUID to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) WithVolumeUUID(volumeUUID *string) *TopMetricsSvmFileCollectionGetParams { o.SetVolumeUUID(volumeUUID) return o } // SetVolumeUUID adds the volumeUuid to the top metrics svm file collection get params func (o *TopMetricsSvmFileCollectionGetParams) SetVolumeUUID(volumeUUID *string) { o.VolumeUUID = volumeUUID } // WriteToRequest writes these params to a swagger request func (o *TopMetricsSvmFileCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.IopsErrorLowerBound != nil { // query param iops.error.lower_bound var qrIopsErrorLowerBound int64 if o.IopsErrorLowerBound != nil { qrIopsErrorLowerBound = *o.IopsErrorLowerBound } qIopsErrorLowerBound := swag.FormatInt64(qrIopsErrorLowerBound) if qIopsErrorLowerBound != "" { if err := r.SetQueryParam("iops.error.lower_bound", qIopsErrorLowerBound); err != nil { return err } } } if o.IopsErrorUpperBound != nil { // query param iops.error.upper_bound var qrIopsErrorUpperBound int64 if o.IopsErrorUpperBound != nil { qrIopsErrorUpperBound = *o.IopsErrorUpperBound } qIopsErrorUpperBound := swag.FormatInt64(qrIopsErrorUpperBound) if qIopsErrorUpperBound != "" { if err := r.SetQueryParam("iops.error.upper_bound", qIopsErrorUpperBound); err != nil { return err } } } if o.IopsRead != nil { // query param iops.read var qrIopsRead int64 if o.IopsRead != nil { qrIopsRead = *o.IopsRead } qIopsRead := swag.FormatInt64(qrIopsRead) if qIopsRead != "" { if err := r.SetQueryParam("iops.read", qIopsRead); err != nil { return err } } } if o.IopsWrite != nil { // query param iops.write var qrIopsWrite int64 if o.IopsWrite != nil { qrIopsWrite = *o.IopsWrite } qIopsWrite := swag.FormatInt64(qrIopsWrite) if qIopsWrite != "" { if err := r.SetQueryParam("iops.write", qIopsWrite); err != nil { return err } } } if o.JunctionPath != nil { // query param junction-path var qrJunctionPath string if o.JunctionPath != nil { qrJunctionPath = *o.JunctionPath } qJunctionPath := qrJunctionPath if qJunctionPath != "" { if err := r.SetQueryParam("junction-path", qJunctionPath); err != nil { return err } } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.MaxRecordsPerSvm != nil { // query param max_records_per_svm var qrMaxRecordsPerSvm int64 if o.MaxRecordsPerSvm != nil { qrMaxRecordsPerSvm = *o.MaxRecordsPerSvm } qMaxRecordsPerSvm := swag.FormatInt64(qrMaxRecordsPerSvm) if qMaxRecordsPerSvm != "" { if err := r.SetQueryParam("max_records_per_svm", qMaxRecordsPerSvm); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.Path != nil { // query param path var qrPath string if o.Path != nil { qrPath = *o.Path } qPath := qrPath if qPath != "" { if err := r.SetQueryParam("path", qPath); err != nil { return err } } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.SvmName != nil { // query param svm.name var qrSvmName string if o.SvmName != nil { qrSvmName = *o.SvmName } qSvmName := qrSvmName if qSvmName != "" { if err := r.SetQueryParam("svm.name", qSvmName); err != nil { return err } } } // path param svm.uuid if err := r.SetPathParam("svm.uuid", o.SvmUUID); err != nil { return err } if o.ThroughputErrorLowerBound != nil { // query param throughput.error.lower_bound var qrThroughputErrorLowerBound int64 if o.ThroughputErrorLowerBound != nil { qrThroughputErrorLowerBound = *o.ThroughputErrorLowerBound } qThroughputErrorLowerBound := swag.FormatInt64(qrThroughputErrorLowerBound) if qThroughputErrorLowerBound != "" { if err := r.SetQueryParam("throughput.error.lower_bound", qThroughputErrorLowerBound); err != nil { return err } } } if o.ThroughputErrorUpperBound != nil { // query param throughput.error.upper_bound var qrThroughputErrorUpperBound int64 if o.ThroughputErrorUpperBound != nil { qrThroughputErrorUpperBound = *o.ThroughputErrorUpperBound } qThroughputErrorUpperBound := swag.FormatInt64(qrThroughputErrorUpperBound) if qThroughputErrorUpperBound != "" { if err := r.SetQueryParam("throughput.error.upper_bound", qThroughputErrorUpperBound); err != nil { return err } } } if o.ThroughputRead != nil { // query param throughput.read var qrThroughputRead int64 if o.ThroughputRead != nil { qrThroughputRead = *o.ThroughputRead } qThroughputRead := swag.FormatInt64(qrThroughputRead) if qThroughputRead != "" { if err := r.SetQueryParam("throughput.read", qThroughputRead); err != nil { return err } } } if o.ThroughputWrite != nil { // query param throughput.write var qrThroughputWrite int64 if o.ThroughputWrite != nil { qrThroughputWrite = *o.ThroughputWrite } qThroughputWrite := swag.FormatInt64(qrThroughputWrite) if qThroughputWrite != "" { if err := r.SetQueryParam("throughput.write", qThroughputWrite); err != nil { return err } } } if o.TopMetric != nil { // query param top_metric var qrTopMetric string if o.TopMetric != nil { qrTopMetric = *o.TopMetric } qTopMetric := qrTopMetric if qTopMetric != "" { if err := r.SetQueryParam("top_metric", qTopMetric); err != nil { return err } } } if o.VolumeName != nil { // query param volume.name var qrVolumeName string if o.VolumeName != nil { qrVolumeName = *o.VolumeName } qVolumeName := qrVolumeName if qVolumeName != "" { if err := r.SetQueryParam("volume.name", qVolumeName); err != nil { return err } } } if o.VolumeUUID != nil { // query param volume.uuid var qrVolumeUUID string if o.VolumeUUID != nil { qrVolumeUUID = *o.VolumeUUID } qVolumeUUID := qrVolumeUUID if qVolumeUUID != "" { if err := r.SetQueryParam("volume.uuid", qVolumeUUID); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamTopMetricsSvmFileCollectionGet binds the parameter fields func (o *TopMetricsSvmFileCollectionGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamTopMetricsSvmFileCollectionGet binds the parameter order_by func (o *TopMetricsSvmFileCollectionGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmPeerCollectionGetReader is a Reader for the SvmPeerCollectionGet structure. type SvmPeerCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmPeerCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmPeerCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmPeerCollectionGetDefault(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 } } // NewSvmPeerCollectionGetOK creates a SvmPeerCollectionGetOK with default headers values func NewSvmPeerCollectionGetOK() *SvmPeerCollectionGetOK { return &SvmPeerCollectionGetOK{} } /* SvmPeerCollectionGetOK describes a response with status code 200, with default header values. OK */ type SvmPeerCollectionGetOK struct { Payload *models.SvmPeerResponse } // IsSuccess returns true when this svm peer collection get o k response has a 2xx status code func (o *SvmPeerCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm peer collection get o k response has a 3xx status code func (o *SvmPeerCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm peer collection get o k response has a 4xx status code func (o *SvmPeerCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm peer collection get o k response has a 5xx status code func (o *SvmPeerCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this svm peer collection get o k response a status code equal to that given func (o *SvmPeerCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmPeerCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/peers][%d] svmPeerCollectionGetOK %+v", 200, o.Payload) } func (o *SvmPeerCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/peers][%d] svmPeerCollectionGetOK %+v", 200, o.Payload) } func (o *SvmPeerCollectionGetOK) GetPayload() *models.SvmPeerResponse { return o.Payload } func (o *SvmPeerCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmPeerResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmPeerCollectionGetDefault creates a SvmPeerCollectionGetDefault with default headers values func NewSvmPeerCollectionGetDefault(code int) *SvmPeerCollectionGetDefault { return &SvmPeerCollectionGetDefault{ _statusCode: code, } } /* SvmPeerCollectionGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 26345578 | Internal error. Unable to retrieve local or peer SVM name. | ``` <br/> */ type SvmPeerCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm peer collection get default response func (o *SvmPeerCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm peer collection get default response has a 2xx status code func (o *SvmPeerCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm peer collection get default response has a 3xx status code func (o *SvmPeerCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm peer collection get default response has a 4xx status code func (o *SvmPeerCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm peer collection get default response has a 5xx status code func (o *SvmPeerCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm peer collection get default response a status code equal to that given func (o *SvmPeerCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmPeerCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/peers][%d] svm_peer_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmPeerCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/peers][%d] svm_peer_collection_get default %+v", o._statusCode, o.Payload) } func (o *SvmPeerCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmPeerCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_user_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_user_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // TopMetricsSvmUserCollectionGetReader is a Reader for the TopMetricsSvmUserCollectionGet structure. type TopMetricsSvmUserCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *TopMetricsSvmUserCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewTopMetricsSvmUserCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewTopMetricsSvmUserCollectionGetDefault(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 } } // NewTopMetricsSvmUserCollectionGetOK creates a TopMetricsSvmUserCollectionGetOK with default headers values func NewTopMetricsSvmUserCollectionGetOK() *TopMetricsSvmUserCollectionGetOK { return &TopMetricsSvmUserCollectionGetOK{} } /* TopMetricsSvmUserCollectionGetOK describes a response with status code 200, with default header values. OK */ type TopMetricsSvmUserCollectionGetOK struct { Payload *models.TopMetricsSvmUserResponse } // IsSuccess returns true when this top metrics svm user collection get o k response has a 2xx status code func (o *TopMetricsSvmUserCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this top metrics svm user collection get o k response has a 3xx status code func (o *TopMetricsSvmUserCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this top metrics svm user collection get o k response has a 4xx status code func (o *TopMetricsSvmUserCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this top metrics svm user collection get o k response has a 5xx status code func (o *TopMetricsSvmUserCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this top metrics svm user collection get o k response a status code equal to that given func (o *TopMetricsSvmUserCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *TopMetricsSvmUserCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/users][%d] topMetricsSvmUserCollectionGetOK %+v", 200, o.Payload) } func (o *TopMetricsSvmUserCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/users][%d] topMetricsSvmUserCollectionGetOK %+v", 200, o.Payload) } func (o *TopMetricsSvmUserCollectionGetOK) GetPayload() *models.TopMetricsSvmUserResponse { return o.Payload } func (o *TopMetricsSvmUserCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.TopMetricsSvmUserResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewTopMetricsSvmUserCollectionGetDefault creates a TopMetricsSvmUserCollectionGetDefault with default headers values func NewTopMetricsSvmUserCollectionGetDefault(code int) *TopMetricsSvmUserCollectionGetDefault { return &TopMetricsSvmUserCollectionGetDefault{ _statusCode: code, } } /* TopMetricsSvmUserCollectionGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 124519405 | The activity tracking report for SVM svm.name returned zero records. Check whether the volumes belonging to the SVM have read/write traffic. Refer to the REST API documentation for more information on why there might be no records. | | 124519406 | Failed to get the activity tracking report for SVM svm.name. Reason:<Reason for failure>. | | 124519407 | SVM wildcard queries are not supported for activity tracking reports. | | 124519408 | Activity tracking is not supported on SVM svm.name, because it is configured as a destination for SVM DR. | | 124519409 | Activity tracking is not supported on SVM svm.name, because it is configured as a destination of a MetroCluster SVM relationship and the SVM admin state is stopped. | */ type TopMetricsSvmUserCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the top metrics svm user collection get default response func (o *TopMetricsSvmUserCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this top metrics svm user collection get default response has a 2xx status code func (o *TopMetricsSvmUserCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this top metrics svm user collection get default response has a 3xx status code func (o *TopMetricsSvmUserCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this top metrics svm user collection get default response has a 4xx status code func (o *TopMetricsSvmUserCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this top metrics svm user collection get default response has a 5xx status code func (o *TopMetricsSvmUserCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this top metrics svm user collection get default response a status code equal to that given func (o *TopMetricsSvmUserCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *TopMetricsSvmUserCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/users][%d] top_metrics_svm_user_collection_get default %+v", o._statusCode, o.Payload) } func (o *TopMetricsSvmUserCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/users][%d] top_metrics_svm_user_collection_get default %+v", o._statusCode, o.Payload) } func (o *TopMetricsSvmUserCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *TopMetricsSvmUserCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_client.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_client.go
// Code generated by go-swagger; DO NOT EDIT. package svm // 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" "github.com/go-openapi/strfmt" ) // New creates a new svm API client. func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } /* Client for svm API */ type Client struct { transport runtime.ClientTransport formats strfmt.Registry } // ClientOption is the option for Client methods type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { SvmCollectionGet(params *SvmCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmCollectionGetOK, error) SvmCreate(params *SvmCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmCreateAccepted, error) SvmDelete(params *SvmDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmDeleteAccepted, error) SvmGet(params *SvmGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmGetOK, error) SvmMigrationCollectionGet(params *SvmMigrationCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationCollectionGetOK, error) SvmMigrationCreate(params *SvmMigrationCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationCreateAccepted, error) SvmMigrationDelete(params *SvmMigrationDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationDeleteAccepted, error) SvmMigrationGet(params *SvmMigrationGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationGetOK, error) SvmMigrationModify(params *SvmMigrationModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationModifyAccepted, error) SvmMigrationVolumeCollectionGet(params *SvmMigrationVolumeCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationVolumeCollectionGetOK, error) SvmMigrationVolumeGet(params *SvmMigrationVolumeGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationVolumeGetOK, error) SvmModify(params *SvmModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmModifyAccepted, error) SvmPeerCollectionGet(params *SvmPeerCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerCollectionGetOK, error) SvmPeerCreate(params *SvmPeerCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerCreateAccepted, error) SvmPeerDelete(params *SvmPeerDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerDeleteAccepted, error) SvmPeerInstanceGet(params *SvmPeerInstanceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerInstanceGetOK, error) SvmPeerModify(params *SvmPeerModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerModifyAccepted, error) SvmPeerPermissionCollectionGet(params *SvmPeerPermissionCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerPermissionCollectionGetOK, error) SvmPeerPermissionCreate(params *SvmPeerPermissionCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerPermissionCreateCreated, error) SvmPeerPermissionDelete(params *SvmPeerPermissionDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerPermissionDeleteOK, error) SvmPeerPermissionInstanceGet(params *SvmPeerPermissionInstanceGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerPermissionInstanceGetOK, error) SvmPeerPermissionModify(params *SvmPeerPermissionModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmPeerPermissionModifyOK, error) TopMetricsSvmClientCollectionGet(params *TopMetricsSvmClientCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TopMetricsSvmClientCollectionGetOK, error) TopMetricsSvmDirectoryCollectionGet(params *TopMetricsSvmDirectoryCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TopMetricsSvmDirectoryCollectionGetOK, error) TopMetricsSvmFileCollectionGet(params *TopMetricsSvmFileCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TopMetricsSvmFileCollectionGetOK, error) TopMetricsSvmUserCollectionGet(params *TopMetricsSvmUserCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*TopMetricsSvmUserCollectionGetOK, error) WebSvmGet(params *WebSvmGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WebSvmGetOK, error) WebSvmModify(params *WebSvmModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*WebSvmModifyOK, *WebSvmModifyAccepted, error) SetTransport(transport runtime.ClientTransport) } /* SvmCollectionGet Retrieves a list of SVMs and individual SVM properties. This includes protocol configurations such as CIFS and NFS, export policies, name service configurations, and network services. ### Important notes * The SVM object includes a large set of fields and can be expensive to retrieve. Use this API to list the collection of SVMs, and to retrieve only the full details of individual SVMs as needed. * It is not recommended to create or delete more than five SVMs in parallel. * REST APIs only expose a data SVM as an SVM. ### Expensive properties There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See [`Requesting specific fields`](#Requesting_specific_fields) to learn more. * `snapmirror.*` ### Related ONTAP commands * `vserver show` ### Examples 1. Retrieves a list of SVMs in the cluster sorted by name <br/> ``` GET "/api/svm/svms?order_by=name" ``` <br/> 2. Retrieves a list of SVMs in the cluster that have the NFS protocol enabled <br/> ``` GET "/api/svm/svms?nfs.enabled=true" ``` <br/> 3. Retrieves a list of SVMs in the cluster that have the CIFS protocol enabled <br/> ``` GET "/api/svm/svms?cifs.enabled=true" ``` <br/> 4. Retrieves a list of SVMs in the cluster that have the S3 protocol enabled <br/> ``` GET "/api/svm/svms?s3.enabled=true" ``` <br/> 5 Retrieves a list of SVMs in the cluster that have the FCP protocol allowed <br/> ``` GET "/api/svm/svms?fcp.allowed=true" ``` <br/> 6. Retrieves a list of SVMs in the cluster that have the CIFS protocol allowed <br/> ``` GET "/api/svm/svms?cifs.allowed=true" ``` <br/> 7. Retrieves a list of SVMs in the cluster where the NDMP protocol is specified as allowed <br/> ``` GET "/api/svm/svms?ndmp.allowed=true" ``` <br/> 8. Retrieves a list of SVMs in the cluster that have the s3 protocol allowed <br/> ``` GET "/api/svm/svms?s3.allowed=true" ``` <br/> ### Learn more * [`DOC /svm/svms`](#docs-svm-svm_svms) */ func (a *Client) SvmCollectionGet(params *SvmCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmCollectionGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmCollectionGetParams() } op := &runtime.ClientOperation{ ID: "svm_collection_get", Method: "GET", PathPattern: "/svm/svms", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmCollectionGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmCollectionGetOK) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmCollectionGetDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmCreate Creates and provisions an SVM. If no IPspace is provided, then the SVM is created on the `Default` IPspace. * The number of parallel SVMs that can be created must not be greater than five. * If a sixth SVM POST request is issued, the following error message is generated: "Maximum allowed SVM jobs exceeded. Wait for the existing SVM jobs to complete and try again." ### Required properties * `name` - Name of the SVM to be created. ### Recommended optional properties * `ipspace.name` or `ipspace.uuid` - IPspace of the SVM * `is_space_reporting_logical` - Logical Space Reporting parameter of the SVM * `is_space_enforcement_logical` - Logical Space Enforcement parameter of the SVM * `ip_interfaces` - If provided, the following fields are required: * `ip_interfaces.name` - Name of the interface * `ip_interfaces.ip.address` - IP address * `ip_interfaces.ip.netmask` - Netmask length or IP address * `ip_interfaces.location.broadcast_domain.uuid` or `ip_interfaces.location.broadcast_domain.name` - Broadcast domain name or UUID belonging to the same IPspace of the SVM. * `subnet.uuid` or `subnet.name` - Either name or UUID of the subnet to create. * `routes` - If provided, the following field is required: - `routes.gateway` - Gateway IP address * `cifs` - If provided, interfaces, routes and DNS must be provided. The following fields are also required: - `cifs.name` - Name of the CIFS server to be created for the SVM. - `cifs.ad_domain.fqdn` - Fully qualified domain name - `cifs.ad_domain.user` - Administrator username - `cifs.ad_domain.password` - User password * `ldap` - If provided, the following fields are required: - `ldap.servers` or `ldap.ad_domain` - LDAP server list or Active Directory domain - `ldap.bind_dn` - Bind DN - `ldap.base_dn` - Base DN * `nis` - If provided, the following fields are required: - `nis.servers` - NIS servers - `nis.domain` - NIS domain * `dns` - If provided, the following fields are required: - `dns.servers` - Name servers - `dns.domains` - Domains * `fc_interfaces` - If provided, the following fields are required: - `fc_interfaces.name` - Fibre Channel interface name - `fc_interfaces.data_protocol` - Fibre Channel interface data protocol - `fc_interfaces.location.port.uuid` or `fc_interfaces.location.port.name` and `fc_interfaces.location.port.node.name` - Either port UUID or port name and node name together must be provided. * `s3` - If provided, the following field should also be specified: - `s3.name` - Name of the S3 server. If `s3.name' is not specified while `s3.enabled` is set to 'true', the S3 server will be created with the default name '<svm.name>_S3Server'. * `auto_enable_analytics` - Auto-enable file system analytics on new volumes created in the SVM * `auto_enable_activity_tracking` - Auto-enable volume activity-tracking on new volumes created in the SVM ### Default property values If not specified in POST, the following default property values are assigned: * `language` - _C.UTF-8_ * `ipspace.name` - _Default_ * `snapshot_policy.name` - _Default_ * `subtype` - _Default_ ( _sync-source_ if MetroCluster configuration ) * `anti_ransomware_default_volume_state` - _disabled_ ### Related ONTAP commands * `vserver create` * `vserver add-aggregates` * `network interface create` * `network route create` * `vserver services name-service dns create` * `vserver nfs create` * `vserver services name-service ldap client create` * `vserver cifs create` * `vserver services name-service nis-domain create` * `vserver iscsi create` * `vserver nvme create` * `vserver fcp create` * `vserver services name-service ns-switch create` * `vserver object-store-server create` * `vserver add-protocols` * `vserver remove-protocols` ### Examples 1. Creates an SVM with default "snapshot_policy" <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}}' ``` <br/> 2. Creates an SVM and configures NFS, ISCSI and FCP <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "nfs":{"enabled":"true"}, "fcp":{"enabled":"true"}, "iscsi":{"enabled":"true"}}' ``` <br/> 3. Creates an SVM and configures NVMe <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "nvme":{"enabled":"true"}}' ``` <br/> 4. Creates an SVM and configures LDAP <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "ldap":{"servers":["10.140.101.1","10.140.101.2"], "ad_domain":"abc.com", "base_dn":"dc=netapp,dc=com", "bind_dn":"dc=netapp,dc=com"}}' ``` <br/> 5. Creates an SVM and configures NIS <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "nis":{"enabled":"true", "domain":"def.com","servers":["10.224.223.130", "10.224.223.131"]}}' ``` <br/> 6. Creates an SVM and configures DNS <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "snapshot_policy":{"name":"default"}, "dns":{"domains":["abc.com","def.com"], "servers":["10.224.223.130", "10.224.223.131"]}}' ``` <br/> 7. Creates an SVM and configures a LIF <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "ip_interfaces": [{"name":"lif1", "ip":{"address":"10.10.10.7", "netmask": "255.255.255.0"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}]}' ``` <br/> 8. Creates an SVM and configures a LIF with IPV6 address <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "ip_interfaces": [{"name":"lif2", "ip":{"address":"fd22:8b1e:b255:202:2a0:98ff:fe01:7d5b", "netmask":"24"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}]}' ``` <br/> 9. Creates an SVM and configures CIFS <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "cifs":{"name":"CIFDOC", "ad_domain":{"fqdn":"abc.def.com", "organizational_unit":"CN=Computers", "user":"cif_admin", "password":"abc123"}}, "ip_interfaces":[{"name":"lif1", "ip":{"address":"10.10.10.7", "netmask": "255.255.255.0"}, "location":{"broadcast_domain":{"name":"bd1"}, "home_node":{"name":"node1"}}, "service_policy": "default-management"}],"routes": [{"destination": {"address": "0.0.0.0", "netmask": "0"}, "gateway": "10.10.10.7"}], "dns":{"domains":["abc.def.com", "def.com"], "servers":["10.224.223.130", "10.224.223.131"]}}' ``` <br/> 10. Creates an SVM and configures an S3 server <br/> ``` POST "/api/svm/svms" '{"name":"svm5", "s3":{"name":"s3-server-1", "enabled":true}}' ``` <br/> 11. Creates an SVM and disallows NVMe service for the SVM <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "nvme":{"allowed":"false"}}' ``` <br/> 12. Creates an SVM, allows and configures the NFS service for the SVM <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "nfs":{"allowed":"true", "enabled":true}}' ``` <br/> 13. Create an SVM and set the max volume limit for the SVM <br/> ``` POST "/api/svm/svms/" '{"name":"testVs", "max_volumes":"200"}' ``` <br/> 14. Creates an SVM and disallows the NDMP service for the SVM. <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "ndmp":{"allowed":"false"}}' ``` <br/> 15. Creates an SVM and specifies whether file system analytics is enabled on all newly created volumes in the SVM. <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "auto_enable_analytics":true}}' ``` <br/> 16. Creates an SVM and specifies whether volume_activity_tracking is enabled on all newly created volumes in the SVM. <br/> ``` POST "/api/svm/svms" '{"name":"testVs", "auto_enable_activity_tracking":true}}' ``` <br/> ### Learn more * [`DOC /svm/svms`](#docs-svm-svm_svms) */ func (a *Client) SvmCreate(params *SvmCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmCreateAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmCreateParams() } op := &runtime.ClientOperation{ ID: "svm_create", Method: "POST", PathPattern: "/svm/svms", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmCreateAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmCreateDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmDelete Deletes an SVM. As a prerequisite, SVM objects must be deleted first. SnapMirror relationships must be deleted and data volumes must be offline and deleted. * The number of parallel SVMs that can be created must not be greater than five. * If a sixth SVM POST request is issued, the following error message is generated: "Maximum allowed SVM jobs exceeded. Wait for the existing SVM jobs to complete and try again." ### Related ONTAP commands * `vserver delete` ### Example Deleting an individual SVM in the cluster. <br/> ``` DELETE "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" ``` <br/> ### Learn more * [`DOC /svm/svms`](#docs-svm-svm_svms) */ func (a *Client) SvmDelete(params *SvmDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmDeleteAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmDeleteParams() } op := &runtime.ClientOperation{ ID: "svm_delete", Method: "DELETE", PathPattern: "/svm/svms/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmDeleteAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmDeleteDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmGet Retrieves the properties for an individual SVM. This includes protocol configurations such as CIFS and NFS, export policies, name service configurations, and network services. ### Important notes * The SVM object includes a large set of fields and can be expensive to retrieve. * REST APIs only expose a data SVM as an SVM. ### Expensive properties There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See [`Requesting specific fields`](#Requesting_specific_fields) to learn more. * `snapmirror.*` ### Example Retrieving an individual SVM in the cluster <br/> ``` GET "/api/svm/svms/f16f0935-5281-11e8-b94d-005056b46485" ``` <br/> */ func (a *Client) SvmGet(params *SvmGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmGetParams() } op := &runtime.ClientOperation{ ID: "svm_get", Method: "GET", PathPattern: "/svm/svms/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmGetOK) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmGetDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmMigrationCollectionGet Retrieves the SVM migration status. ### Related ONTAP commands * `vserver migrate show` */ func (a *Client) SvmMigrationCollectionGet(params *SvmMigrationCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationCollectionGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmMigrationCollectionGetParams() } op := &runtime.ClientOperation{ ID: "svm_migration_collection_get", Method: "GET", PathPattern: "/svm/migrations", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmMigrationCollectionGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmMigrationCollectionGetOK) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmMigrationCollectionGetDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmMigrationCreate Creates an SVM migration operation. This API must be executed on the destination cluster. This API creates an SVM on the destination cluster and preserves the SVM's identity specified in the source cluster. Optionally, you can specify the aggregate list for creating the volumes, and IPspace. You can perform pre-checks to verify if SVM migration is possible, by setting the "check-only" option to "true". By default the values for auto-source-cleanup and auto-cutover is true. ### Required properties * `source.svm.name` or `source.svm.uuid` - Source SVM name or source SVM UUID. * `source.cluster.name` or `source.cluster.uuid` - Source cluster name or source cluster UUID ### Optional properties * `destination.ipspace.name` or `destination.ipspace.uuid` - Destination IP Space name or UUID where the vserver will be migrated to. * `destination.volume_placement.aggregates` - List of aggregates where the migrating volumes should go on the destination. * `destination.volume_placement.volume_aggregate_pairs` - List of volume aggregate pairs indicating where the migrating volumes should go on the destination. * `ip_interface_placement` - List of source SVM's IP interface and port pairs on the destination for migrating the SVM's IP interfaces. * `auto_cutover` - Option to specify whether to perform cutover automatically. Default is true. * `auto_source_cleanup` - Option to specify whether to perform souce cleanup automatically. Default is true. * `check_only` - Option to perform all the prechecks for migrate without actually starting the migrate. Default is false. * `throttle` - Option to specify a throttle value in KB/s. Defaults to unlimited. ### Related ONTAP commands * `vserver migrate start` */ func (a *Client) SvmMigrationCreate(params *SvmMigrationCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationCreateAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmMigrationCreateParams() } op := &runtime.ClientOperation{ ID: "svm_migration_create", Method: "POST", PathPattern: "/svm/migrations", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmMigrationCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmMigrationCreateAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmMigrationCreateDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmMigrationDelete Deletes the SVM migration. ### Related ONTAP commands * `vserver migrate abort` */ func (a *Client) SvmMigrationDelete(params *SvmMigrationDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationDeleteAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmMigrationDeleteParams() } op := &runtime.ClientOperation{ ID: "svm_migration_delete", Method: "DELETE", PathPattern: "/svm/migrations/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmMigrationDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmMigrationDeleteAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmMigrationDeleteDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmMigrationGet Retrieves the migration status of an individual SVM. ### Important notes * The "migrations" object includes a large set of fields and can be expensive to retrieve. * REST APIs only expose a data SVM as an SVM. ### Example Retrieving an individual SVM migration status. <br/> ``` GET "/api/svm/migrations/a14ae39f-8d85-11e9-b4a7-00505682dc8b/svms/f16f0935-5281-11e8-b94d-005056b46485" ``` <br/> */ func (a *Client) SvmMigrationGet(params *SvmMigrationGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmMigrationGetParams() } op := &runtime.ClientOperation{ ID: "svm_migration_get", Method: "GET", PathPattern: "/svm/migrations/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmMigrationGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmMigrationGetOK) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmMigrationGetDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmMigrationModify Actions that can be performed during an SVM migration. ### Related ONTAP commands * `vserver migrate pause` * `vserver migrate resume` * `vserver migrate cutover` * `vserver migrate source-cleanup` */ func (a *Client) SvmMigrationModify(params *SvmMigrationModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationModifyAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmMigrationModifyParams() } op := &runtime.ClientOperation{ ID: "svm_migration_modify", Method: "PATCH", PathPattern: "/svm/migrations/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmMigrationModifyReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmMigrationModifyAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmMigrationModifyDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmMigrationVolumeCollectionGet Retrieves the transfer status of the volumes in the SVM. ### Related ONTAP commands * `vserver migrate show-volume` */ func (a *Client) SvmMigrationVolumeCollectionGet(params *SvmMigrationVolumeCollectionGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationVolumeCollectionGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmMigrationVolumeCollectionGetParams() } op := &runtime.ClientOperation{ ID: "svm_migration_volume_collection_get", Method: "GET", PathPattern: "/svm/migrations/{svm_migration.uuid}/volumes", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SvmMigrationVolumeCollectionGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SvmMigrationVolumeCollectionGetOK) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SvmMigrationVolumeCollectionGetDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SvmMigrationVolumeGet Retrieves the volume transfer status of the specified volume.uuid. ### Related ONTAP commands * `vserver migrate show-volume` */ func (a *Client) SvmMigrationVolumeGet(params *SvmMigrationVolumeGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SvmMigrationVolumeGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewSvmMigrationVolumeGetParams() } op := &runtime.ClientOperation{ ID: "svm_migration_volume_get", Method: "GET",
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_collection_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_peer_permission_collection_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSvmPeerPermissionCollectionGetParams creates a new SvmPeerPermissionCollectionGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSvmPeerPermissionCollectionGetParams() *SvmPeerPermissionCollectionGetParams { return &SvmPeerPermissionCollectionGetParams{ timeout: cr.DefaultTimeout, } } // NewSvmPeerPermissionCollectionGetParamsWithTimeout creates a new SvmPeerPermissionCollectionGetParams object // with the ability to set a timeout on a request. func NewSvmPeerPermissionCollectionGetParamsWithTimeout(timeout time.Duration) *SvmPeerPermissionCollectionGetParams { return &SvmPeerPermissionCollectionGetParams{ timeout: timeout, } } // NewSvmPeerPermissionCollectionGetParamsWithContext creates a new SvmPeerPermissionCollectionGetParams object // with the ability to set a context for a request. func NewSvmPeerPermissionCollectionGetParamsWithContext(ctx context.Context) *SvmPeerPermissionCollectionGetParams { return &SvmPeerPermissionCollectionGetParams{ Context: ctx, } } // NewSvmPeerPermissionCollectionGetParamsWithHTTPClient creates a new SvmPeerPermissionCollectionGetParams object // with the ability to set a custom HTTPClient for a request. func NewSvmPeerPermissionCollectionGetParamsWithHTTPClient(client *http.Client) *SvmPeerPermissionCollectionGetParams { return &SvmPeerPermissionCollectionGetParams{ HTTPClient: client, } } /* SvmPeerPermissionCollectionGetParams contains all the parameters to send to the API endpoint for the svm peer permission collection get operation. Typically these are written to a http.Request. */ type SvmPeerPermissionCollectionGetParams struct { /* Applications. Filter by applications */ Applications *string /* ClusterPeerName. Filter by cluster_peer.name */ ClusterPeerName *string /* ClusterPeerUUID. Filter by cluster_peer.uuid */ ClusterPeerUUID *string /* Fields. Specify the fields to return. */ Fields []string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SvmName. Filter by svm.name */ SvmName *string /* SvmUUID. Filter by svm.uuid */ SvmUUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the svm peer permission collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionCollectionGetParams) WithDefaults() *SvmPeerPermissionCollectionGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the svm peer permission collection get params (not the query body). // // All values with no default are reset to their zero value. func (o *SvmPeerPermissionCollectionGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SvmPeerPermissionCollectionGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithTimeout(timeout time.Duration) *SvmPeerPermissionCollectionGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithContext(ctx context.Context) *SvmPeerPermissionCollectionGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithHTTPClient(client *http.Client) *SvmPeerPermissionCollectionGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithApplications adds the applications to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithApplications(applications *string) *SvmPeerPermissionCollectionGetParams { o.SetApplications(applications) return o } // SetApplications adds the applications to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetApplications(applications *string) { o.Applications = applications } // WithClusterPeerName adds the clusterPeerName to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithClusterPeerName(clusterPeerName *string) *SvmPeerPermissionCollectionGetParams { o.SetClusterPeerName(clusterPeerName) return o } // SetClusterPeerName adds the clusterPeerName to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetClusterPeerName(clusterPeerName *string) { o.ClusterPeerName = clusterPeerName } // WithClusterPeerUUID adds the clusterPeerUUID to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithClusterPeerUUID(clusterPeerUUID *string) *SvmPeerPermissionCollectionGetParams { o.SetClusterPeerUUID(clusterPeerUUID) return o } // SetClusterPeerUUID adds the clusterPeerUuid to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetClusterPeerUUID(clusterPeerUUID *string) { o.ClusterPeerUUID = clusterPeerUUID } // WithFields adds the fields to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithFields(fields []string) *SvmPeerPermissionCollectionGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetFields(fields []string) { o.Fields = fields } // WithMaxRecords adds the maxRecords to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithMaxRecords(maxRecords *int64) *SvmPeerPermissionCollectionGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithOrderBy adds the orderBy to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithOrderBy(orderBy []string) *SvmPeerPermissionCollectionGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithReturnRecords adds the returnRecords to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithReturnRecords(returnRecords *bool) *SvmPeerPermissionCollectionGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithReturnTimeout(returnTimeout *int64) *SvmPeerPermissionCollectionGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSvmName adds the svmName to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithSvmName(svmName *string) *SvmPeerPermissionCollectionGetParams { o.SetSvmName(svmName) return o } // SetSvmName adds the svmName to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetSvmName(svmName *string) { o.SvmName = svmName } // WithSvmUUID adds the svmUUID to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) WithSvmUUID(svmUUID *string) *SvmPeerPermissionCollectionGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the svm peer permission collection get params func (o *SvmPeerPermissionCollectionGetParams) SetSvmUUID(svmUUID *string) { o.SvmUUID = svmUUID } // WriteToRequest writes these params to a swagger request func (o *SvmPeerPermissionCollectionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Applications != nil { // query param applications var qrApplications string if o.Applications != nil { qrApplications = *o.Applications } qApplications := qrApplications if qApplications != "" { if err := r.SetQueryParam("applications", qApplications); err != nil { return err } } } if o.ClusterPeerName != nil { // query param cluster_peer.name var qrClusterPeerName string if o.ClusterPeerName != nil { qrClusterPeerName = *o.ClusterPeerName } qClusterPeerName := qrClusterPeerName if qClusterPeerName != "" { if err := r.SetQueryParam("cluster_peer.name", qClusterPeerName); err != nil { return err } } } if o.ClusterPeerUUID != nil { // query param cluster_peer.uuid var qrClusterPeerUUID string if o.ClusterPeerUUID != nil { qrClusterPeerUUID = *o.ClusterPeerUUID } qClusterPeerUUID := qrClusterPeerUUID if qClusterPeerUUID != "" { if err := r.SetQueryParam("cluster_peer.uuid", qClusterPeerUUID); err != nil { return err } } } if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.SvmName != nil { // query param svm.name var qrSvmName string if o.SvmName != nil { qrSvmName = *o.SvmName } qSvmName := qrSvmName if qSvmName != "" { if err := r.SetQueryParam("svm.name", qSvmName); err != nil { return err } } } if o.SvmUUID != nil { // query param svm.uuid var qrSvmUUID string if o.SvmUUID != nil { qrSvmUUID = *o.SvmUUID } qSvmUUID := qrSvmUUID if qSvmUUID != "" { if err := r.SetQueryParam("svm.uuid", qSvmUUID); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSvmPeerPermissionCollectionGet binds the parameter fields func (o *SvmPeerPermissionCollectionGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamSvmPeerPermissionCollectionGet binds the parameter order_by func (o *SvmPeerPermissionCollectionGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_client_collection_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/top_metrics_svm_client_collection_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // TopMetricsSvmClientCollectionGetReader is a Reader for the TopMetricsSvmClientCollectionGet structure. type TopMetricsSvmClientCollectionGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *TopMetricsSvmClientCollectionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewTopMetricsSvmClientCollectionGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewTopMetricsSvmClientCollectionGetDefault(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 } } // NewTopMetricsSvmClientCollectionGetOK creates a TopMetricsSvmClientCollectionGetOK with default headers values func NewTopMetricsSvmClientCollectionGetOK() *TopMetricsSvmClientCollectionGetOK { return &TopMetricsSvmClientCollectionGetOK{} } /* TopMetricsSvmClientCollectionGetOK describes a response with status code 200, with default header values. OK */ type TopMetricsSvmClientCollectionGetOK struct { Payload *models.TopMetricsSvmClientResponse } // IsSuccess returns true when this top metrics svm client collection get o k response has a 2xx status code func (o *TopMetricsSvmClientCollectionGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this top metrics svm client collection get o k response has a 3xx status code func (o *TopMetricsSvmClientCollectionGetOK) IsRedirect() bool { return false } // IsClientError returns true when this top metrics svm client collection get o k response has a 4xx status code func (o *TopMetricsSvmClientCollectionGetOK) IsClientError() bool { return false } // IsServerError returns true when this top metrics svm client collection get o k response has a 5xx status code func (o *TopMetricsSvmClientCollectionGetOK) IsServerError() bool { return false } // IsCode returns true when this top metrics svm client collection get o k response a status code equal to that given func (o *TopMetricsSvmClientCollectionGetOK) IsCode(code int) bool { return code == 200 } func (o *TopMetricsSvmClientCollectionGetOK) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/clients][%d] topMetricsSvmClientCollectionGetOK %+v", 200, o.Payload) } func (o *TopMetricsSvmClientCollectionGetOK) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/clients][%d] topMetricsSvmClientCollectionGetOK %+v", 200, o.Payload) } func (o *TopMetricsSvmClientCollectionGetOK) GetPayload() *models.TopMetricsSvmClientResponse { return o.Payload } func (o *TopMetricsSvmClientCollectionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.TopMetricsSvmClientResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewTopMetricsSvmClientCollectionGetDefault creates a TopMetricsSvmClientCollectionGetDefault with default headers values func NewTopMetricsSvmClientCollectionGetDefault(code int) *TopMetricsSvmClientCollectionGetDefault { return &TopMetricsSvmClientCollectionGetDefault{ _statusCode: code, } } /* TopMetricsSvmClientCollectionGetDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 124519405 | The activity tracking report for SVM svm.name returned zero records. Check whether the volumes belonging to the SVM have read/write traffic. Refer to the REST API documentation for more information on why there might be no records. | | 124519406 | Failed to get the activity tracking report for SVM svm.name. Reason:<Reason for failure>. | | 124519407 | SVM wildcard queries are not supported for activity tracking reports. | | 124519408 | Activity tracking is not supported on SVM svm.name, because it is configured as a destination for SVM DR. | | 124519409 | Activity tracking is not supported on SVM svm.name, because it is configured as a destination of a MetroCluster SVM relationship and the SVM admin state is stopped. | */ type TopMetricsSvmClientCollectionGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the top metrics svm client collection get default response func (o *TopMetricsSvmClientCollectionGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this top metrics svm client collection get default response has a 2xx status code func (o *TopMetricsSvmClientCollectionGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this top metrics svm client collection get default response has a 3xx status code func (o *TopMetricsSvmClientCollectionGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this top metrics svm client collection get default response has a 4xx status code func (o *TopMetricsSvmClientCollectionGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this top metrics svm client collection get default response has a 5xx status code func (o *TopMetricsSvmClientCollectionGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this top metrics svm client collection get default response a status code equal to that given func (o *TopMetricsSvmClientCollectionGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *TopMetricsSvmClientCollectionGetDefault) Error() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/clients][%d] top_metrics_svm_client_collection_get default %+v", o._statusCode, o.Payload) } func (o *TopMetricsSvmClientCollectionGetDefault) String() string { return fmt.Sprintf("[GET /svm/svms/{svm.uuid}/top-metrics/clients][%d] top_metrics_svm_client_collection_get default %+v", o._statusCode, o.Payload) } func (o *TopMetricsSvmClientCollectionGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *TopMetricsSvmClientCollectionGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmMigrationGetReader is a Reader for the SvmMigrationGet structure. type SvmMigrationGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmMigrationGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSvmMigrationGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmMigrationGetDefault(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 } } // NewSvmMigrationGetOK creates a SvmMigrationGetOK with default headers values func NewSvmMigrationGetOK() *SvmMigrationGetOK { return &SvmMigrationGetOK{} } /* SvmMigrationGetOK describes a response with status code 200, with default header values. OK */ type SvmMigrationGetOK struct { Payload *models.SvmMigration } // IsSuccess returns true when this svm migration get o k response has a 2xx status code func (o *SvmMigrationGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this svm migration get o k response has a 3xx status code func (o *SvmMigrationGetOK) IsRedirect() bool { return false } // IsClientError returns true when this svm migration get o k response has a 4xx status code func (o *SvmMigrationGetOK) IsClientError() bool { return false } // IsServerError returns true when this svm migration get o k response has a 5xx status code func (o *SvmMigrationGetOK) IsServerError() bool { return false } // IsCode returns true when this svm migration get o k response a status code equal to that given func (o *SvmMigrationGetOK) IsCode(code int) bool { return code == 200 } func (o *SvmMigrationGetOK) Error() string { return fmt.Sprintf("[GET /svm/migrations/{uuid}][%d] svmMigrationGetOK %+v", 200, o.Payload) } func (o *SvmMigrationGetOK) String() string { return fmt.Sprintf("[GET /svm/migrations/{uuid}][%d] svmMigrationGetOK %+v", 200, o.Payload) } func (o *SvmMigrationGetOK) GetPayload() *models.SvmMigration { return o.Payload } func (o *SvmMigrationGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SvmMigration) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmMigrationGetDefault creates a SvmMigrationGetDefault with default headers values func NewSvmMigrationGetDefault(code int) *SvmMigrationGetDefault { return &SvmMigrationGetDefault{ _statusCode: code, } } /* SvmMigrationGetDefault describes a response with status code -1, with default header values. Error */ type SvmMigrationGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm migration get default response func (o *SvmMigrationGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm migration get default response has a 2xx status code func (o *SvmMigrationGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm migration get default response has a 3xx status code func (o *SvmMigrationGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm migration get default response has a 4xx status code func (o *SvmMigrationGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm migration get default response has a 5xx status code func (o *SvmMigrationGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm migration get default response a status code equal to that given func (o *SvmMigrationGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmMigrationGetDefault) Error() string { return fmt.Sprintf("[GET /svm/migrations/{uuid}][%d] svm_migration_get default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationGetDefault) String() string { return fmt.Sprintf("[GET /svm/migrations/{uuid}][%d] svm_migration_get default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmMigrationGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_modify_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_migration_modify_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmMigrationModifyReader is a Reader for the SvmMigrationModify structure. type SvmMigrationModifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmMigrationModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmMigrationModifyAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmMigrationModifyDefault(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 } } // NewSvmMigrationModifyAccepted creates a SvmMigrationModifyAccepted with default headers values func NewSvmMigrationModifyAccepted() *SvmMigrationModifyAccepted { return &SvmMigrationModifyAccepted{} } /* SvmMigrationModifyAccepted describes a response with status code 202, with default header values. Accepted */ type SvmMigrationModifyAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this svm migration modify accepted response has a 2xx status code func (o *SvmMigrationModifyAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm migration modify accepted response has a 3xx status code func (o *SvmMigrationModifyAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm migration modify accepted response has a 4xx status code func (o *SvmMigrationModifyAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm migration modify accepted response has a 5xx status code func (o *SvmMigrationModifyAccepted) IsServerError() bool { return false } // IsCode returns true when this svm migration modify accepted response a status code equal to that given func (o *SvmMigrationModifyAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmMigrationModifyAccepted) Error() string { return fmt.Sprintf("[PATCH /svm/migrations/{uuid}][%d] svmMigrationModifyAccepted %+v", 202, o.Payload) } func (o *SvmMigrationModifyAccepted) String() string { return fmt.Sprintf("[PATCH /svm/migrations/{uuid}][%d] svmMigrationModifyAccepted %+v", 202, o.Payload) } func (o *SvmMigrationModifyAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SvmMigrationModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmMigrationModifyDefault creates a SvmMigrationModifyDefault with default headers values func NewSvmMigrationModifyDefault(code int) *SvmMigrationModifyDefault { return &SvmMigrationModifyDefault{ _statusCode: code, } } /* SvmMigrationModifyDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 13172783 | Migrate RDB lookup failed | */ type SvmMigrationModifyDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm migration modify default response func (o *SvmMigrationModifyDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm migration modify default response has a 2xx status code func (o *SvmMigrationModifyDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm migration modify default response has a 3xx status code func (o *SvmMigrationModifyDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm migration modify default response has a 4xx status code func (o *SvmMigrationModifyDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm migration modify default response has a 5xx status code func (o *SvmMigrationModifyDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm migration modify default response a status code equal to that given func (o *SvmMigrationModifyDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmMigrationModifyDefault) Error() string { return fmt.Sprintf("[PATCH /svm/migrations/{uuid}][%d] svm_migration_modify default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationModifyDefault) String() string { return fmt.Sprintf("[PATCH /svm/migrations/{uuid}][%d] svm_migration_modify default %+v", o._statusCode, o.Payload) } func (o *SvmMigrationModifyDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmMigrationModifyDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_create_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/svm/svm_create_responses.go
// Code generated by go-swagger; DO NOT EDIT. package svm // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SvmCreateReader is a Reader for the SvmCreate structure. type SvmCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SvmCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSvmCreateAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSvmCreateDefault(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 } } // NewSvmCreateAccepted creates a SvmCreateAccepted with default headers values func NewSvmCreateAccepted() *SvmCreateAccepted { return &SvmCreateAccepted{} } /* SvmCreateAccepted describes a response with status code 202, with default header values. Accepted */ type SvmCreateAccepted struct { /* Useful for tracking the resource location */ Location string Payload *models.JobLinkResponse } // IsSuccess returns true when this svm create accepted response has a 2xx status code func (o *SvmCreateAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this svm create accepted response has a 3xx status code func (o *SvmCreateAccepted) IsRedirect() bool { return false } // IsClientError returns true when this svm create accepted response has a 4xx status code func (o *SvmCreateAccepted) IsClientError() bool { return false } // IsServerError returns true when this svm create accepted response has a 5xx status code func (o *SvmCreateAccepted) IsServerError() bool { return false } // IsCode returns true when this svm create accepted response a status code equal to that given func (o *SvmCreateAccepted) IsCode(code int) bool { return code == 202 } func (o *SvmCreateAccepted) Error() string { return fmt.Sprintf("[POST /svm/svms][%d] svmCreateAccepted %+v", 202, o.Payload) } func (o *SvmCreateAccepted) String() string { return fmt.Sprintf("[POST /svm/svms][%d] svmCreateAccepted %+v", 202, o.Payload) } func (o *SvmCreateAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SvmCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Location hdrLocation := response.GetHeader("Location") if hdrLocation != "" { o.Location = hdrLocation } o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSvmCreateDefault creates a SvmCreateDefault with default headers values func NewSvmCreateDefault(code int) *SvmCreateDefault { return &SvmCreateDefault{ _statusCode: code, } } /* SvmCreateDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes <br/> ``` | Error codes | Description | | ----------- | ----------- | | 2621580 | Cannot specify options other than SVM name, comment and ipspace for a Vserver that is being configured as the destination for SVM DR. | | 2621634 | \"sync-source\" SVM can only be created in a MetroCluster configuration. | | 2621657 | \"sync-destination\" SVM can only be created by the system. | | 13434884 | Cannot create an SVM because of incorrect fields. | | 13434885 | Non-UTF8 language(s) not supported. | | 13434888 | IPspace UUID and IPspace name mismatch. | | 13434889 | Internal Error. Wait and retry. | | 13434894 | Maximum allowed SVM jobs exceeded. Wait for the existing SVM jobs to complete and try again. | | 13434908 | Invalid SVM name. The name is already in use by another SVM, IPSpace or cluster. | | 13434909 | Internal Error. Failed to identify the aggregate to host SVM root volume. | | 13434910 | Internal Error. Failed to allocate new SVM ID. | | 13434911 | Invalid SVM name. Maximum supported length is 41 if SVM is of type \\\"sync-source\\\", otherwise 47. | | 13434912 | Failed to find IPspace. | | 13434913 | Internal error: Failed to check if an SVM create operation is in progress. Contact technical support for assistance. | | 13434914 | Request to create the root volume of the SVM failed because there is not enough space in specified aggregate. | | 13434915 | Failed to unlock the SVM because SVM create or delete job is in progress. Wait a few minutes, and then try the command again. | | 13434916 | SVM is in the process of being created. Wait a few minutes, and then try the command again. | | 13434917 | SVM creation successful. | | 13434918 | IPspace name not provided for creating an SVM. | ``` <br/> */ type SvmCreateDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the svm create default response func (o *SvmCreateDefault) Code() int { return o._statusCode } // IsSuccess returns true when this svm create default response has a 2xx status code func (o *SvmCreateDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this svm create default response has a 3xx status code func (o *SvmCreateDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this svm create default response has a 4xx status code func (o *SvmCreateDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this svm create default response has a 5xx status code func (o *SvmCreateDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this svm create default response a status code equal to that given func (o *SvmCreateDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SvmCreateDefault) Error() string { return fmt.Sprintf("[POST /svm/svms][%d] svm_create default %+v", o._statusCode, o.Payload) } func (o *SvmCreateDefault) String() string { return fmt.Sprintf("[POST /svm/svms][%d] svm_create default %+v", o._statusCode, o.Payload) } func (o *SvmCreateDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SvmCreateDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_modify_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_modify_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSnapmirrorRelationshipTransferModifyParams creates a new SnapmirrorRelationshipTransferModifyParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipTransferModifyParams() *SnapmirrorRelationshipTransferModifyParams { return &SnapmirrorRelationshipTransferModifyParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipTransferModifyParamsWithTimeout creates a new SnapmirrorRelationshipTransferModifyParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipTransferModifyParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipTransferModifyParams { return &SnapmirrorRelationshipTransferModifyParams{ timeout: timeout, } } // NewSnapmirrorRelationshipTransferModifyParamsWithContext creates a new SnapmirrorRelationshipTransferModifyParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipTransferModifyParamsWithContext(ctx context.Context) *SnapmirrorRelationshipTransferModifyParams { return &SnapmirrorRelationshipTransferModifyParams{ Context: ctx, } } // NewSnapmirrorRelationshipTransferModifyParamsWithHTTPClient creates a new SnapmirrorRelationshipTransferModifyParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipTransferModifyParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipTransferModifyParams { return &SnapmirrorRelationshipTransferModifyParams{ HTTPClient: client, } } /* SnapmirrorRelationshipTransferModifyParams contains all the parameters to send to the API endpoint for the snapmirror relationship transfer modify operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipTransferModifyParams struct { /* Info. Information on the SnapMirror transfer */ Info *models.SnapmirrorTransfer /* RelationshipUUID. Relationship UUID */ RelationshipUUID string /* UUID. Transfer UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationship transfer modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipTransferModifyParams) WithDefaults() *SnapmirrorRelationshipTransferModifyParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationship transfer modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipTransferModifyParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipTransferModifyParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) WithContext(ctx context.Context) *SnapmirrorRelationshipTransferModifyParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipTransferModifyParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) WithInfo(info *models.SnapmirrorTransfer) *SnapmirrorRelationshipTransferModifyParams { o.SetInfo(info) return o } // SetInfo adds the info to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) SetInfo(info *models.SnapmirrorTransfer) { o.Info = info } // WithRelationshipUUID adds the relationshipUUID to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) WithRelationshipUUID(relationshipUUID string) *SnapmirrorRelationshipTransferModifyParams { o.SetRelationshipUUID(relationshipUUID) return o } // SetRelationshipUUID adds the relationshipUuid to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) SetRelationshipUUID(relationshipUUID string) { o.RelationshipUUID = relationshipUUID } // WithUUID adds the uuid to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) WithUUID(uuid string) *SnapmirrorRelationshipTransferModifyParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror relationship transfer modify params func (o *SnapmirrorRelationshipTransferModifyParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorRelationshipTransferModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } // path param relationship.uuid if err := r.SetPathParam("relationship.uuid", o.RelationshipUUID); err != nil { return err } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfers_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfers_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSnapmirrorRelationshipTransfersGetParams creates a new SnapmirrorRelationshipTransfersGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipTransfersGetParams() *SnapmirrorRelationshipTransfersGetParams { return &SnapmirrorRelationshipTransfersGetParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipTransfersGetParamsWithTimeout creates a new SnapmirrorRelationshipTransfersGetParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipTransfersGetParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipTransfersGetParams { return &SnapmirrorRelationshipTransfersGetParams{ timeout: timeout, } } // NewSnapmirrorRelationshipTransfersGetParamsWithContext creates a new SnapmirrorRelationshipTransfersGetParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipTransfersGetParamsWithContext(ctx context.Context) *SnapmirrorRelationshipTransfersGetParams { return &SnapmirrorRelationshipTransfersGetParams{ Context: ctx, } } // NewSnapmirrorRelationshipTransfersGetParamsWithHTTPClient creates a new SnapmirrorRelationshipTransfersGetParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipTransfersGetParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipTransfersGetParams { return &SnapmirrorRelationshipTransfersGetParams{ HTTPClient: client, } } /* SnapmirrorRelationshipTransfersGetParams contains all the parameters to send to the API endpoint for the snapmirror relationship transfers get operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipTransfersGetParams struct { /* BytesTransferred. Filter by bytes_transferred */ BytesTransferred *int64 /* CheckpointSize. Filter by checkpoint_size */ CheckpointSize *int64 /* EndTime. Filter by end_time */ EndTime *string /* ErrorInfoCode. Filter by error_info.code */ ErrorInfoCode *int64 /* ErrorInfoMessage. Filter by error_info.message */ ErrorInfoMessage *string /* Fields. Specify the fields to return. */ Fields []string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* RelationshipDestinationClusterName. Filter by relationship.destination.cluster.name */ RelationshipDestinationClusterName *string /* RelationshipDestinationClusterUUID. Filter by relationship.destination.cluster.uuid */ RelationshipDestinationClusterUUID *string /* RelationshipDestinationConsistencyGroupVolumesName. Filter by relationship.destination.consistency_group_volumes.name */ RelationshipDestinationConsistencyGroupVolumesName *string /* RelationshipDestinationPath. Filter by relationship.destination.path */ RelationshipDestinationPath *string /* RelationshipDestinationSvmName. Filter by relationship.destination.svm.name */ RelationshipDestinationSvmName *string /* RelationshipDestinationSvmUUID. Filter by relationship.destination.svm.uuid */ RelationshipDestinationSvmUUID *string /* RelationshipDestinationUUID. Filter by relationship.destination.uuid */ RelationshipDestinationUUID *string /* RelationshipRestore. Filter by relationship.restore */ RelationshipRestore *bool /* RelationshipUUID. Relationship UUID */ RelationshipUUID string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* Snapshot. Filter by snapshot */ Snapshot *string /* State. Filter by state */ State *string /* Throttle. Filter by throttle */ Throttle *int64 /* TotalDuration. Filter by total_duration */ TotalDuration *string /* UUID. Filter by uuid */ UUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationship transfers get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipTransfersGetParams) WithDefaults() *SnapmirrorRelationshipTransfersGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationship transfers get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipTransfersGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SnapmirrorRelationshipTransfersGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipTransfersGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithContext(ctx context.Context) *SnapmirrorRelationshipTransfersGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipTransfersGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithBytesTransferred adds the bytesTransferred to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithBytesTransferred(bytesTransferred *int64) *SnapmirrorRelationshipTransfersGetParams { o.SetBytesTransferred(bytesTransferred) return o } // SetBytesTransferred adds the bytesTransferred to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetBytesTransferred(bytesTransferred *int64) { o.BytesTransferred = bytesTransferred } // WithCheckpointSize adds the checkpointSize to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithCheckpointSize(checkpointSize *int64) *SnapmirrorRelationshipTransfersGetParams { o.SetCheckpointSize(checkpointSize) return o } // SetCheckpointSize adds the checkpointSize to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetCheckpointSize(checkpointSize *int64) { o.CheckpointSize = checkpointSize } // WithEndTime adds the endTime to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithEndTime(endTime *string) *SnapmirrorRelationshipTransfersGetParams { o.SetEndTime(endTime) return o } // SetEndTime adds the endTime to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetEndTime(endTime *string) { o.EndTime = endTime } // WithErrorInfoCode adds the errorInfoCode to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithErrorInfoCode(errorInfoCode *int64) *SnapmirrorRelationshipTransfersGetParams { o.SetErrorInfoCode(errorInfoCode) return o } // SetErrorInfoCode adds the errorInfoCode to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetErrorInfoCode(errorInfoCode *int64) { o.ErrorInfoCode = errorInfoCode } // WithErrorInfoMessage adds the errorInfoMessage to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithErrorInfoMessage(errorInfoMessage *string) *SnapmirrorRelationshipTransfersGetParams { o.SetErrorInfoMessage(errorInfoMessage) return o } // SetErrorInfoMessage adds the errorInfoMessage to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetErrorInfoMessage(errorInfoMessage *string) { o.ErrorInfoMessage = errorInfoMessage } // WithFields adds the fields to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithFields(fields []string) *SnapmirrorRelationshipTransfersGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetFields(fields []string) { o.Fields = fields } // WithMaxRecords adds the maxRecords to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithMaxRecords(maxRecords *int64) *SnapmirrorRelationshipTransfersGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithOrderBy adds the orderBy to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithOrderBy(orderBy []string) *SnapmirrorRelationshipTransfersGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithRelationshipDestinationClusterName adds the relationshipDestinationClusterName to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipDestinationClusterName(relationshipDestinationClusterName *string) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipDestinationClusterName(relationshipDestinationClusterName) return o } // SetRelationshipDestinationClusterName adds the relationshipDestinationClusterName to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipDestinationClusterName(relationshipDestinationClusterName *string) { o.RelationshipDestinationClusterName = relationshipDestinationClusterName } // WithRelationshipDestinationClusterUUID adds the relationshipDestinationClusterUUID to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipDestinationClusterUUID(relationshipDestinationClusterUUID *string) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipDestinationClusterUUID(relationshipDestinationClusterUUID) return o } // SetRelationshipDestinationClusterUUID adds the relationshipDestinationClusterUuid to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipDestinationClusterUUID(relationshipDestinationClusterUUID *string) { o.RelationshipDestinationClusterUUID = relationshipDestinationClusterUUID } // WithRelationshipDestinationConsistencyGroupVolumesName adds the relationshipDestinationConsistencyGroupVolumesName to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipDestinationConsistencyGroupVolumesName(relationshipDestinationConsistencyGroupVolumesName *string) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipDestinationConsistencyGroupVolumesName(relationshipDestinationConsistencyGroupVolumesName) return o } // SetRelationshipDestinationConsistencyGroupVolumesName adds the relationshipDestinationConsistencyGroupVolumesName to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipDestinationConsistencyGroupVolumesName(relationshipDestinationConsistencyGroupVolumesName *string) { o.RelationshipDestinationConsistencyGroupVolumesName = relationshipDestinationConsistencyGroupVolumesName } // WithRelationshipDestinationPath adds the relationshipDestinationPath to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipDestinationPath(relationshipDestinationPath *string) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipDestinationPath(relationshipDestinationPath) return o } // SetRelationshipDestinationPath adds the relationshipDestinationPath to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipDestinationPath(relationshipDestinationPath *string) { o.RelationshipDestinationPath = relationshipDestinationPath } // WithRelationshipDestinationSvmName adds the relationshipDestinationSvmName to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipDestinationSvmName(relationshipDestinationSvmName *string) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipDestinationSvmName(relationshipDestinationSvmName) return o } // SetRelationshipDestinationSvmName adds the relationshipDestinationSvmName to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipDestinationSvmName(relationshipDestinationSvmName *string) { o.RelationshipDestinationSvmName = relationshipDestinationSvmName } // WithRelationshipDestinationSvmUUID adds the relationshipDestinationSvmUUID to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipDestinationSvmUUID(relationshipDestinationSvmUUID *string) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipDestinationSvmUUID(relationshipDestinationSvmUUID) return o } // SetRelationshipDestinationSvmUUID adds the relationshipDestinationSvmUuid to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipDestinationSvmUUID(relationshipDestinationSvmUUID *string) { o.RelationshipDestinationSvmUUID = relationshipDestinationSvmUUID } // WithRelationshipDestinationUUID adds the relationshipDestinationUUID to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipDestinationUUID(relationshipDestinationUUID *string) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipDestinationUUID(relationshipDestinationUUID) return o } // SetRelationshipDestinationUUID adds the relationshipDestinationUuid to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipDestinationUUID(relationshipDestinationUUID *string) { o.RelationshipDestinationUUID = relationshipDestinationUUID } // WithRelationshipRestore adds the relationshipRestore to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipRestore(relationshipRestore *bool) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipRestore(relationshipRestore) return o } // SetRelationshipRestore adds the relationshipRestore to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipRestore(relationshipRestore *bool) { o.RelationshipRestore = relationshipRestore } // WithRelationshipUUID adds the relationshipUUID to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithRelationshipUUID(relationshipUUID string) *SnapmirrorRelationshipTransfersGetParams { o.SetRelationshipUUID(relationshipUUID) return o } // SetRelationshipUUID adds the relationshipUuid to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetRelationshipUUID(relationshipUUID string) { o.RelationshipUUID = relationshipUUID } // WithReturnRecords adds the returnRecords to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithReturnRecords(returnRecords *bool) *SnapmirrorRelationshipTransfersGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorRelationshipTransfersGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSnapshot adds the snapshot to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithSnapshot(snapshot *string) *SnapmirrorRelationshipTransfersGetParams { o.SetSnapshot(snapshot) return o } // SetSnapshot adds the snapshot to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetSnapshot(snapshot *string) { o.Snapshot = snapshot } // WithState adds the state to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithState(state *string) *SnapmirrorRelationshipTransfersGetParams { o.SetState(state) return o } // SetState adds the state to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetState(state *string) { o.State = state } // WithThrottle adds the throttle to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithThrottle(throttle *int64) *SnapmirrorRelationshipTransfersGetParams { o.SetThrottle(throttle) return o } // SetThrottle adds the throttle to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetThrottle(throttle *int64) { o.Throttle = throttle } // WithTotalDuration adds the totalDuration to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithTotalDuration(totalDuration *string) *SnapmirrorRelationshipTransfersGetParams { o.SetTotalDuration(totalDuration) return o } // SetTotalDuration adds the totalDuration to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetTotalDuration(totalDuration *string) { o.TotalDuration = totalDuration } // WithUUID adds the uuid to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) WithUUID(uuid *string) *SnapmirrorRelationshipTransfersGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror relationship transfers get params func (o *SnapmirrorRelationshipTransfersGetParams) SetUUID(uuid *string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorRelationshipTransfersGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.BytesTransferred != nil { // query param bytes_transferred var qrBytesTransferred int64 if o.BytesTransferred != nil { qrBytesTransferred = *o.BytesTransferred } qBytesTransferred := swag.FormatInt64(qrBytesTransferred) if qBytesTransferred != "" { if err := r.SetQueryParam("bytes_transferred", qBytesTransferred); err != nil { return err } } } if o.CheckpointSize != nil { // query param checkpoint_size var qrCheckpointSize int64 if o.CheckpointSize != nil { qrCheckpointSize = *o.CheckpointSize } qCheckpointSize := swag.FormatInt64(qrCheckpointSize) if qCheckpointSize != "" { if err := r.SetQueryParam("checkpoint_size", qCheckpointSize); err != nil { return err } } } if o.EndTime != nil { // query param end_time var qrEndTime string if o.EndTime != nil { qrEndTime = *o.EndTime } qEndTime := qrEndTime if qEndTime != "" { if err := r.SetQueryParam("end_time", qEndTime); err != nil { return err } } } if o.ErrorInfoCode != nil { // query param error_info.code var qrErrorInfoCode int64 if o.ErrorInfoCode != nil { qrErrorInfoCode = *o.ErrorInfoCode } qErrorInfoCode := swag.FormatInt64(qrErrorInfoCode) if qErrorInfoCode != "" { if err := r.SetQueryParam("error_info.code", qErrorInfoCode); err != nil { return err } } } if o.ErrorInfoMessage != nil { // query param error_info.message var qrErrorInfoMessage string if o.ErrorInfoMessage != nil { qrErrorInfoMessage = *o.ErrorInfoMessage } qErrorInfoMessage := qrErrorInfoMessage if qErrorInfoMessage != "" { if err := r.SetQueryParam("error_info.message", qErrorInfoMessage); err != nil { return err } } } if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.RelationshipDestinationClusterName != nil { // query param relationship.destination.cluster.name var qrRelationshipDestinationClusterName string if o.RelationshipDestinationClusterName != nil { qrRelationshipDestinationClusterName = *o.RelationshipDestinationClusterName } qRelationshipDestinationClusterName := qrRelationshipDestinationClusterName if qRelationshipDestinationClusterName != "" { if err := r.SetQueryParam("relationship.destination.cluster.name", qRelationshipDestinationClusterName); err != nil { return err } } } if o.RelationshipDestinationClusterUUID != nil { // query param relationship.destination.cluster.uuid var qrRelationshipDestinationClusterUUID string if o.RelationshipDestinationClusterUUID != nil { qrRelationshipDestinationClusterUUID = *o.RelationshipDestinationClusterUUID } qRelationshipDestinationClusterUUID := qrRelationshipDestinationClusterUUID if qRelationshipDestinationClusterUUID != "" { if err := r.SetQueryParam("relationship.destination.cluster.uuid", qRelationshipDestinationClusterUUID); err != nil { return err } } } if o.RelationshipDestinationConsistencyGroupVolumesName != nil { // query param relationship.destination.consistency_group_volumes.name var qrRelationshipDestinationConsistencyGroupVolumesName string if o.RelationshipDestinationConsistencyGroupVolumesName != nil { qrRelationshipDestinationConsistencyGroupVolumesName = *o.RelationshipDestinationConsistencyGroupVolumesName } qRelationshipDestinationConsistencyGroupVolumesName := qrRelationshipDestinationConsistencyGroupVolumesName if qRelationshipDestinationConsistencyGroupVolumesName != "" { if err := r.SetQueryParam("relationship.destination.consistency_group_volumes.name", qRelationshipDestinationConsistencyGroupVolumesName); err != nil { return err } } } if o.RelationshipDestinationPath != nil { // query param relationship.destination.path var qrRelationshipDestinationPath string if o.RelationshipDestinationPath != nil { qrRelationshipDestinationPath = *o.RelationshipDestinationPath } qRelationshipDestinationPath := qrRelationshipDestinationPath if qRelationshipDestinationPath != "" { if err := r.SetQueryParam("relationship.destination.path", qRelationshipDestinationPath); err != nil { return err } } } if o.RelationshipDestinationSvmName != nil { // query param relationship.destination.svm.name var qrRelationshipDestinationSvmName string if o.RelationshipDestinationSvmName != nil { qrRelationshipDestinationSvmName = *o.RelationshipDestinationSvmName } qRelationshipDestinationSvmName := qrRelationshipDestinationSvmName if qRelationshipDestinationSvmName != "" { if err := r.SetQueryParam("relationship.destination.svm.name", qRelationshipDestinationSvmName); err != nil { return err } } } if o.RelationshipDestinationSvmUUID != nil { // query param relationship.destination.svm.uuid var qrRelationshipDestinationSvmUUID string if o.RelationshipDestinationSvmUUID != nil { qrRelationshipDestinationSvmUUID = *o.RelationshipDestinationSvmUUID } qRelationshipDestinationSvmUUID := qrRelationshipDestinationSvmUUID if qRelationshipDestinationSvmUUID != "" { if err := r.SetQueryParam("relationship.destination.svm.uuid", qRelationshipDestinationSvmUUID); err != nil { return err } } } if o.RelationshipDestinationUUID != nil { // query param relationship.destination.uuid var qrRelationshipDestinationUUID string if o.RelationshipDestinationUUID != nil { qrRelationshipDestinationUUID = *o.RelationshipDestinationUUID } qRelationshipDestinationUUID := qrRelationshipDestinationUUID if qRelationshipDestinationUUID != "" { if err := r.SetQueryParam("relationship.destination.uuid", qRelationshipDestinationUUID); err != nil { return err } } } if o.RelationshipRestore != nil { // query param relationship.restore var qrRelationshipRestore bool if o.RelationshipRestore != nil { qrRelationshipRestore = *o.RelationshipRestore } qRelationshipRestore := swag.FormatBool(qrRelationshipRestore) if qRelationshipRestore != "" { if err := r.SetQueryParam("relationship.restore", qRelationshipRestore); err != nil { return err } } } // path param relationship.uuid if err := r.SetPathParam("relationship.uuid", o.RelationshipUUID); err != nil { return err } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.Snapshot != nil { // query param snapshot var qrSnapshot string if o.Snapshot != nil { qrSnapshot = *o.Snapshot } qSnapshot := qrSnapshot if qSnapshot != "" { if err := r.SetQueryParam("snapshot", qSnapshot); err != nil { return err } } } if o.State != nil { // query param state var qrState string if o.State != nil { qrState = *o.State } qState := qrState if qState != "" { if err := r.SetQueryParam("state", qState); err != nil { return err } } } if o.Throttle != nil { // query param throttle var qrThrottle int64 if o.Throttle != nil { qrThrottle = *o.Throttle } qThrottle := swag.FormatInt64(qrThrottle) if qThrottle != "" { if err := r.SetQueryParam("throttle", qThrottle); err != nil { return err } } } if o.TotalDuration != nil { // query param total_duration var qrTotalDuration string if o.TotalDuration != nil { qrTotalDuration = *o.TotalDuration } qTotalDuration := qrTotalDuration if qTotalDuration != "" { if err := r.SetQueryParam("total_duration", qTotalDuration); err != nil { return err } } } if o.UUID != nil { // query param uuid var qrUUID string if o.UUID != nil { qrUUID = *o.UUID } qUUID := qrUUID if qUUID != "" { if err := r.SetQueryParam("uuid", qUUID); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSnapmirrorRelationshipTransfersGet binds the parameter fields func (o *SnapmirrorRelationshipTransfersGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamSnapmirrorRelationshipTransfersGet binds the parameter order_by func (o *SnapmirrorRelationshipTransfersGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_delete_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_delete_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorPolicyDeleteReader is a Reader for the SnapmirrorPolicyDelete structure. type SnapmirrorPolicyDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorPolicyDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSnapmirrorPolicyDeleteAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorPolicyDeleteDefault(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 } } // NewSnapmirrorPolicyDeleteAccepted creates a SnapmirrorPolicyDeleteAccepted with default headers values func NewSnapmirrorPolicyDeleteAccepted() *SnapmirrorPolicyDeleteAccepted { return &SnapmirrorPolicyDeleteAccepted{} } /* SnapmirrorPolicyDeleteAccepted describes a response with status code 202, with default header values. Accepted */ type SnapmirrorPolicyDeleteAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this snapmirror policy delete accepted response has a 2xx status code func (o *SnapmirrorPolicyDeleteAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror policy delete accepted response has a 3xx status code func (o *SnapmirrorPolicyDeleteAccepted) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror policy delete accepted response has a 4xx status code func (o *SnapmirrorPolicyDeleteAccepted) IsClientError() bool { return false } // IsServerError returns true when this snapmirror policy delete accepted response has a 5xx status code func (o *SnapmirrorPolicyDeleteAccepted) IsServerError() bool { return false } // IsCode returns true when this snapmirror policy delete accepted response a status code equal to that given func (o *SnapmirrorPolicyDeleteAccepted) IsCode(code int) bool { return code == 202 } func (o *SnapmirrorPolicyDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /snapmirror/policies/{uuid}][%d] snapmirrorPolicyDeleteAccepted %+v", 202, o.Payload) } func (o *SnapmirrorPolicyDeleteAccepted) String() string { return fmt.Sprintf("[DELETE /snapmirror/policies/{uuid}][%d] snapmirrorPolicyDeleteAccepted %+v", 202, o.Payload) } func (o *SnapmirrorPolicyDeleteAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SnapmirrorPolicyDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorPolicyDeleteDefault creates a SnapmirrorPolicyDeleteDefault with default headers values func NewSnapmirrorPolicyDeleteDefault(code int) *SnapmirrorPolicyDeleteDefault { return &SnapmirrorPolicyDeleteDefault{ _statusCode: code, } } /* SnapmirrorPolicyDeleteDefault describes a response with status code -1, with default header values. Error */ type SnapmirrorPolicyDeleteDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror policy delete default response func (o *SnapmirrorPolicyDeleteDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror policy delete default response has a 2xx status code func (o *SnapmirrorPolicyDeleteDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror policy delete default response has a 3xx status code func (o *SnapmirrorPolicyDeleteDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror policy delete default response has a 4xx status code func (o *SnapmirrorPolicyDeleteDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror policy delete default response has a 5xx status code func (o *SnapmirrorPolicyDeleteDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror policy delete default response a status code equal to that given func (o *SnapmirrorPolicyDeleteDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorPolicyDeleteDefault) Error() string { return fmt.Sprintf("[DELETE /snapmirror/policies/{uuid}][%d] snapmirror_policy_delete default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPolicyDeleteDefault) String() string { return fmt.Sprintf("[DELETE /snapmirror/policies/{uuid}][%d] snapmirror_policy_delete default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPolicyDeleteDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorPolicyDeleteDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_modify_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_modify_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipTransferModifyReader is a Reader for the SnapmirrorRelationshipTransferModify structure. type SnapmirrorRelationshipTransferModifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipTransferModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSnapmirrorRelationshipTransferModifyOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipTransferModifyDefault(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 } } // NewSnapmirrorRelationshipTransferModifyOK creates a SnapmirrorRelationshipTransferModifyOK with default headers values func NewSnapmirrorRelationshipTransferModifyOK() *SnapmirrorRelationshipTransferModifyOK { return &SnapmirrorRelationshipTransferModifyOK{} } /* SnapmirrorRelationshipTransferModifyOK describes a response with status code 200, with default header values. OK */ type SnapmirrorRelationshipTransferModifyOK struct { } // IsSuccess returns true when this snapmirror relationship transfer modify o k response has a 2xx status code func (o *SnapmirrorRelationshipTransferModifyOK) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationship transfer modify o k response has a 3xx status code func (o *SnapmirrorRelationshipTransferModifyOK) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationship transfer modify o k response has a 4xx status code func (o *SnapmirrorRelationshipTransferModifyOK) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationship transfer modify o k response has a 5xx status code func (o *SnapmirrorRelationshipTransferModifyOK) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationship transfer modify o k response a status code equal to that given func (o *SnapmirrorRelationshipTransferModifyOK) IsCode(code int) bool { return code == 200 } func (o *SnapmirrorRelationshipTransferModifyOK) Error() string { return fmt.Sprintf("[PATCH /snapmirror/relationships/{relationship.uuid}/transfers/{uuid}][%d] snapmirrorRelationshipTransferModifyOK ", 200) } func (o *SnapmirrorRelationshipTransferModifyOK) String() string { return fmt.Sprintf("[PATCH /snapmirror/relationships/{relationship.uuid}/transfers/{uuid}][%d] snapmirrorRelationshipTransferModifyOK ", 200) } func (o *SnapmirrorRelationshipTransferModifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { return nil } // NewSnapmirrorRelationshipTransferModifyDefault creates a SnapmirrorRelationshipTransferModifyDefault with default headers values func NewSnapmirrorRelationshipTransferModifyDefault(code int) *SnapmirrorRelationshipTransferModifyDefault { return &SnapmirrorRelationshipTransferModifyDefault{ _statusCode: code, } } /* SnapmirrorRelationshipTransferModifyDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 13303848 | Abort of sync SnapMirror is not allowed | | 13303849 | SnapMirror transfer state is invalid | */ type SnapmirrorRelationshipTransferModifyDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationship transfer modify default response func (o *SnapmirrorRelationshipTransferModifyDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationship transfer modify default response has a 2xx status code func (o *SnapmirrorRelationshipTransferModifyDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationship transfer modify default response has a 3xx status code func (o *SnapmirrorRelationshipTransferModifyDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationship transfer modify default response has a 4xx status code func (o *SnapmirrorRelationshipTransferModifyDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationship transfer modify default response has a 5xx status code func (o *SnapmirrorRelationshipTransferModifyDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationship transfer modify default response a status code equal to that given func (o *SnapmirrorRelationshipTransferModifyDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipTransferModifyDefault) Error() string { return fmt.Sprintf("[PATCH /snapmirror/relationships/{relationship.uuid}/transfers/{uuid}][%d] snapmirror_relationship_transfer_modify default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipTransferModifyDefault) String() string { return fmt.Sprintf("[PATCH /snapmirror/relationships/{relationship.uuid}/transfers/{uuid}][%d] snapmirror_relationship_transfer_modify default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipTransferModifyDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipTransferModifyDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSnapmirrorRelationshipTransferGetParams creates a new SnapmirrorRelationshipTransferGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipTransferGetParams() *SnapmirrorRelationshipTransferGetParams { return &SnapmirrorRelationshipTransferGetParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipTransferGetParamsWithTimeout creates a new SnapmirrorRelationshipTransferGetParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipTransferGetParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipTransferGetParams { return &SnapmirrorRelationshipTransferGetParams{ timeout: timeout, } } // NewSnapmirrorRelationshipTransferGetParamsWithContext creates a new SnapmirrorRelationshipTransferGetParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipTransferGetParamsWithContext(ctx context.Context) *SnapmirrorRelationshipTransferGetParams { return &SnapmirrorRelationshipTransferGetParams{ Context: ctx, } } // NewSnapmirrorRelationshipTransferGetParamsWithHTTPClient creates a new SnapmirrorRelationshipTransferGetParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipTransferGetParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipTransferGetParams { return &SnapmirrorRelationshipTransferGetParams{ HTTPClient: client, } } /* SnapmirrorRelationshipTransferGetParams contains all the parameters to send to the API endpoint for the snapmirror relationship transfer get operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipTransferGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* RelationshipUUID. Relationship UUID */ RelationshipUUID string /* UUID. Transfer UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationship transfer get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipTransferGetParams) WithDefaults() *SnapmirrorRelationshipTransferGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationship transfer get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipTransferGetParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipTransferGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) WithContext(ctx context.Context) *SnapmirrorRelationshipTransferGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipTransferGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) WithFields(fields []string) *SnapmirrorRelationshipTransferGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) SetFields(fields []string) { o.Fields = fields } // WithRelationshipUUID adds the relationshipUUID to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) WithRelationshipUUID(relationshipUUID string) *SnapmirrorRelationshipTransferGetParams { o.SetRelationshipUUID(relationshipUUID) return o } // SetRelationshipUUID adds the relationshipUuid to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) SetRelationshipUUID(relationshipUUID string) { o.RelationshipUUID = relationshipUUID } // WithUUID adds the uuid to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) WithUUID(uuid string) *SnapmirrorRelationshipTransferGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror relationship transfer get params func (o *SnapmirrorRelationshipTransferGetParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorRelationshipTransferGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } // path param relationship.uuid if err := r.SetPathParam("relationship.uuid", o.RelationshipUUID); err != nil { return err } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSnapmirrorRelationshipTransferGet binds the parameter fields func (o *SnapmirrorRelationshipTransferGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_create_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_create_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorPolicyCreateReader is a Reader for the SnapmirrorPolicyCreate structure. type SnapmirrorPolicyCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorPolicyCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSnapmirrorPolicyCreateAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorPolicyCreateDefault(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 } } // NewSnapmirrorPolicyCreateAccepted creates a SnapmirrorPolicyCreateAccepted with default headers values func NewSnapmirrorPolicyCreateAccepted() *SnapmirrorPolicyCreateAccepted { return &SnapmirrorPolicyCreateAccepted{} } /* SnapmirrorPolicyCreateAccepted describes a response with status code 202, with default header values. Accepted */ type SnapmirrorPolicyCreateAccepted struct { /* Useful for tracking the resource location */ Location string Payload *models.JobLinkResponse } // IsSuccess returns true when this snapmirror policy create accepted response has a 2xx status code func (o *SnapmirrorPolicyCreateAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror policy create accepted response has a 3xx status code func (o *SnapmirrorPolicyCreateAccepted) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror policy create accepted response has a 4xx status code func (o *SnapmirrorPolicyCreateAccepted) IsClientError() bool { return false } // IsServerError returns true when this snapmirror policy create accepted response has a 5xx status code func (o *SnapmirrorPolicyCreateAccepted) IsServerError() bool { return false } // IsCode returns true when this snapmirror policy create accepted response a status code equal to that given func (o *SnapmirrorPolicyCreateAccepted) IsCode(code int) bool { return code == 202 } func (o *SnapmirrorPolicyCreateAccepted) Error() string { return fmt.Sprintf("[POST /snapmirror/policies][%d] snapmirrorPolicyCreateAccepted %+v", 202, o.Payload) } func (o *SnapmirrorPolicyCreateAccepted) String() string { return fmt.Sprintf("[POST /snapmirror/policies][%d] snapmirrorPolicyCreateAccepted %+v", 202, o.Payload) } func (o *SnapmirrorPolicyCreateAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SnapmirrorPolicyCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Location hdrLocation := response.GetHeader("Location") if hdrLocation != "" { o.Location = hdrLocation } o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorPolicyCreateDefault creates a SnapmirrorPolicyCreateDefault with default headers values func NewSnapmirrorPolicyCreateDefault(code int) *SnapmirrorPolicyCreateDefault { return &SnapmirrorPolicyCreateDefault{ _statusCode: code, } } /* SnapmirrorPolicyCreateDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 6619714 | Schedule specified is an interval schedule. SnapMirror does not support interval schedules. | | 13303850 | Invalid input parameter| | 13303887 | Failed to create SnapMirror policy. Reason: Maximum number of allowed retention rules reached | | 13304083 | The specified property is not supported because all nodes in the cluster are not capable of supporting this property. | | 13304084 | Properties specified are mutually exclusive. Provide only one property. | | 13304085 | The specified property does not support the specified value. | | 13304092 | Input value of the retention period property is invalid. For relationships with FlexVol volume or FlexGroup volume destinations, the duration must be in ISO 6801 format or can be infinite. For relationships with object store destinations, only duration values with Y, M or D and supported and must be in the specified range. | */ type SnapmirrorPolicyCreateDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror policy create default response func (o *SnapmirrorPolicyCreateDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror policy create default response has a 2xx status code func (o *SnapmirrorPolicyCreateDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror policy create default response has a 3xx status code func (o *SnapmirrorPolicyCreateDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror policy create default response has a 4xx status code func (o *SnapmirrorPolicyCreateDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror policy create default response has a 5xx status code func (o *SnapmirrorPolicyCreateDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror policy create default response a status code equal to that given func (o *SnapmirrorPolicyCreateDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorPolicyCreateDefault) Error() string { return fmt.Sprintf("[POST /snapmirror/policies][%d] snapmirror_policy_create default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPolicyCreateDefault) String() string { return fmt.Sprintf("[POST /snapmirror/policies][%d] snapmirror_policy_create default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPolicyCreateDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorPolicyCreateDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_create_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_create_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSnapmirrorRelationshipCreateParams creates a new SnapmirrorRelationshipCreateParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipCreateParams() *SnapmirrorRelationshipCreateParams { return &SnapmirrorRelationshipCreateParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipCreateParamsWithTimeout creates a new SnapmirrorRelationshipCreateParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipCreateParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipCreateParams { return &SnapmirrorRelationshipCreateParams{ timeout: timeout, } } // NewSnapmirrorRelationshipCreateParamsWithContext creates a new SnapmirrorRelationshipCreateParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipCreateParamsWithContext(ctx context.Context) *SnapmirrorRelationshipCreateParams { return &SnapmirrorRelationshipCreateParams{ Context: ctx, } } // NewSnapmirrorRelationshipCreateParamsWithHTTPClient creates a new SnapmirrorRelationshipCreateParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipCreateParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipCreateParams { return &SnapmirrorRelationshipCreateParams{ HTTPClient: client, } } /* SnapmirrorRelationshipCreateParams contains all the parameters to send to the API endpoint for the snapmirror relationship create operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipCreateParams struct { /* Info. Information on the SnapMirror relationship */ Info *models.SnapmirrorRelationship /* ReturnRecords. The default is false. If set to true, the records are returned. */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* ValidateOnly. Validate the operation and its parameters, without actually performing the operation. */ ValidateOnly *bool timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationship create params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipCreateParams) WithDefaults() *SnapmirrorRelationshipCreateParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationship create params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipCreateParams) SetDefaults() { var ( returnRecordsDefault = bool(false) returnTimeoutDefault = int64(0) ) val := SnapmirrorRelationshipCreateParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) WithContext(ctx context.Context) *SnapmirrorRelationshipCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) WithInfo(info *models.SnapmirrorRelationship) *SnapmirrorRelationshipCreateParams { o.SetInfo(info) return o } // SetInfo adds the info to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) SetInfo(info *models.SnapmirrorRelationship) { o.Info = info } // WithReturnRecords adds the returnRecords to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) WithReturnRecords(returnRecords *bool) *SnapmirrorRelationshipCreateParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorRelationshipCreateParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithValidateOnly adds the validateOnly to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) WithValidateOnly(validateOnly *bool) *SnapmirrorRelationshipCreateParams { o.SetValidateOnly(validateOnly) return o } // SetValidateOnly adds the validateOnly to the snapmirror relationship create params func (o *SnapmirrorRelationshipCreateParams) SetValidateOnly(validateOnly *bool) { o.ValidateOnly = validateOnly } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorRelationshipCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.ValidateOnly != nil { // query param validate_only var qrValidateOnly bool if o.ValidateOnly != nil { qrValidateOnly = *o.ValidateOnly } qValidateOnly := swag.FormatBool(qrValidateOnly) if qValidateOnly != "" { if err := r.SetQueryParam("validate_only", qValidateOnly); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_client.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_client.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // 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" "github.com/go-openapi/strfmt" ) // New creates a new snapmirror API client. func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { return &Client{transport: transport, formats: formats} } /* Client for snapmirror API */ type Client struct { transport runtime.ClientTransport formats strfmt.Registry } // ClientOption is the option for Client methods type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { SnapmirrorPoliciesGet(params *SnapmirrorPoliciesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPoliciesGetOK, error) SnapmirrorPolicyCreate(params *SnapmirrorPolicyCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPolicyCreateAccepted, error) SnapmirrorPolicyDelete(params *SnapmirrorPolicyDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPolicyDeleteAccepted, error) SnapmirrorPolicyGet(params *SnapmirrorPolicyGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPolicyGetOK, error) SnapmirrorPolicyModify(params *SnapmirrorPolicyModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPolicyModifyAccepted, error) SnapmirrorRelationshipCreate(params *SnapmirrorRelationshipCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipCreateAccepted, error) SnapmirrorRelationshipDelete(params *SnapmirrorRelationshipDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipDeleteAccepted, error) SnapmirrorRelationshipGet(params *SnapmirrorRelationshipGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipGetOK, error) SnapmirrorRelationshipModify(params *SnapmirrorRelationshipModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipModifyAccepted, error) SnapmirrorRelationshipTransferCreate(params *SnapmirrorRelationshipTransferCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipTransferCreateCreated, error) SnapmirrorRelationshipTransferGet(params *SnapmirrorRelationshipTransferGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipTransferGetOK, error) SnapmirrorRelationshipTransferModify(params *SnapmirrorRelationshipTransferModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipTransferModifyOK, error) SnapmirrorRelationshipTransfersGet(params *SnapmirrorRelationshipTransfersGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipTransfersGetOK, error) SnapmirrorRelationshipsGet(params *SnapmirrorRelationshipsGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipsGetOK, error) SetTransport(transport runtime.ClientTransport) } /* SnapmirrorPoliciesGet Retrieves SnapMirror policies of type "async" and "sync". ### Related ONTAP commands * `snapmirror policy show` ### Example The following example shows how to retrieve a collection of SnapMirror policies. <br/> ``` GET "/api/snapmirror/policies" ``` <br/> ### Learn more * [`DOC /snapmirror/policies`](#docs-snapmirror-snapmirror_policies) */ func (a *Client) SnapmirrorPoliciesGet(params *SnapmirrorPoliciesGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPoliciesGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewSnapmirrorPoliciesGetParams() } op := &runtime.ClientOperation{ ID: "snapmirror_policies_get", Method: "GET", PathPattern: "/snapmirror/policies", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SnapmirrorPoliciesGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SnapmirrorPoliciesGetOK) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SnapmirrorPoliciesGetDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SnapmirrorPolicyCreate Creates a SnapMirror policy. The property "identity_preservation" is applicable to only SnapMirror relationships with SVM endpoints and it indicates which configuration of the source SVM is replicated to the destination SVM.</br> It takes the following values: - `full` - indicates that the source SVM configuration is replicated to the destination SVM endpoint. - `exclude_network_config` - indicates that the source SVM configuration other than network configuration is replicated to the destination SVM endpoint. - `exclude_network_and_protocol_config` - indicates that the source SVM configuration is not replicated to the destination SVM endpoint.<br/> ### Important notes - The property "identity_preservation" is applicable to only SnapMirror relationships with SVM endpoints and it indicates which configuration of the source SVM is replicated to the destination SVM. - The properties "identity_preservation" and "transfer_schedule" are not applicable for "sync" type policies. - The properties "copy_all_source_snapshots", "copy_latest_source_snapshot", and "create_snapshot_on_source" are mutually exclusive. - The properties "copy_all_source_snapshots", "copy_latest_source_snapshot", and "create_snapshot_on_source" are not applicable for "sync" type policies. - No "retention" properties can be specified if "copy_all_source_snapshots" or 'copy_latest_source_snapshot' is specified. - The properties "retention.creation_schedule" and "retention.prefix" are not applicable for "sync" type policies. - The property "retention.creation_schedule" is not applicable for "async" policies with "create_snapshot_on_source" set to "false". - The property "sync_common_snapshot_schedule" is not applicable for an "async" type policy. - The property "retention.count" specifies the maximum number of Snapshot copies that are retained on the SnapMirror destination volume. - When the property "retention.label" is specified, the Snapshot copies that have a SnapMirror label matching this property is transferred to the SnapMirror destination. - When the property "retention.creation_schedule" is specified, Snapshot copies are directly created on the SnapMirror destination. The Snapshot copies created have the same content as the latest Snapshot copy already present on the SnapMirror destination. - The property "transfer_schedule" cannot be set to null (no-quotes) during SnapMirror policy POST. - The properties "retention.label" and "retention.count" must be specified for "async" policies with "create_snapshot_on_source" set to "false". ### Required properties * `name` - Name of the new SnapMirror policy. ### Recommended optional properties * `svm.name` or `svm.uuid` - Name or UUID of the SVM that owns the SnapMirror policy. ### Default property values If not specified in POST, the following default property values are assigned: * `type` - _async_ * `sync_type` - _sync_ (when `type` is _sync_) * `network_compression_enabled` - _false_ * `throttle` - _0_ * `identity_preservation` - `_exclude_network_and_protocol_config_` ### Related ONTAP commands * `snapmirror policy create` ### Examples Creating a SnapMirror policy of type "sync" <br/> ``` POST "/api/snapmirror/policies/" '{"name": "policy1", "svm.name": "VS0", "type": "sync", "sync_type": "sync"}' ``` <br/> Creating a SnapMirror policy of type "async" with two sets of retention values, one with a creation_schedule <br/> ``` POST "/api/snapmirror/policies" '{"name": "policy_ret", "svm": {"name": "vs1"}, "retention": [{"label": "weekly", "count": "2", "creation_schedule": {"name": "weekly"}}, {"label":"daily", "count":"7"}]}' ``` <br/> Creating a SnapMirror policy of type "async" ``` POST "/api/snapmirror/policies" '{"name": "newPolicy", "svm":{"name" : "vs1"}, "type": "async"}' ``` <br/> Creating a SnapMirror policy of type "async" which replicates all Snapshot copies ``` POST "/api/snapmirror/policies" '{"name": "newPolicy", "svm":{"name" : "vs1"}, "type": "async", "copy_all_source_snapshots": "true"}' ``` <br/> Creating a SnapMirror policy of type "async" which replicates latest Snapshot copy ``` POST "/api/snapmirror/policies" '{"name": "newPolicy2", "svm":{"name" : "vs1"}, "type": "async", "copy_latest_source_snapshot": "true"}' ``` <br/> Creating a SnapMirror policy of type "async" which does not create Snapshot copies on source ``` POST "/api/snapmirror/policies" '{"name": "newPolicy", "svm":{"name" : "vs1"}, "type": "async", "create_snapshot_on_source": "false", "retention": [{"label": "daily", "count": 7}]}' ``` <br/> Creating a SnapMirror policy of type "sync" with sync_type as "automated_failover" <br/> ``` POST "/api/snapmirror/policies/" '{"name": "policy1", "svm.name": "VS0", "type": "sync", "sync_type": "automated_failover" }' ``` <br/> Creating a SnapMirror policy of type "async" with two sets of retention values and retention periods ``` POST "/api/snapmirror/policies" '{"name": "policy_ret", "svm": {"name": "vs1"}, "retention": [{"label": "weekly", "count": "2", "period": "P7D"}, {"label":"daily", "count":"7", "period": "PT3H"}]}' ``` <br/> Creating a SnapMirror policy of type "async" with retention value as "inifnite" ``` POST "/api/snapmirror/policies" '{"name": "policy_ret", "svm": {"name": "vs1"}, "retention": [{"label": "weekly", "count": "5", "period": "infinite"}]}' ``` <br/> ### Learn more * [`DOC /snapmirror/policies`](#docs-snapmirror-snapmirror_policies) */ func (a *Client) SnapmirrorPolicyCreate(params *SnapmirrorPolicyCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPolicyCreateAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSnapmirrorPolicyCreateParams() } op := &runtime.ClientOperation{ ID: "snapmirror_policy_create", Method: "POST", PathPattern: "/snapmirror/policies", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SnapmirrorPolicyCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SnapmirrorPolicyCreateAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SnapmirrorPolicyCreateDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SnapmirrorPolicyDelete Deletes a SnapMirror policy. ### Related ONTAP commands * `snapmirror policy delete` ### Example <br/> ``` DELETE "/api/snapmirror/policies/510c15d4-f9e6-11e8-bdb5-0050568e12c2" ``` <br/> ### Learn more * [`DOC /snapmirror/policies`](#docs-snapmirror-snapmirror_policies) */ func (a *Client) SnapmirrorPolicyDelete(params *SnapmirrorPolicyDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPolicyDeleteAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSnapmirrorPolicyDeleteParams() } op := &runtime.ClientOperation{ ID: "snapmirror_policy_delete", Method: "DELETE", PathPattern: "/snapmirror/policies/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SnapmirrorPolicyDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SnapmirrorPolicyDeleteAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SnapmirrorPolicyDeleteDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SnapmirrorPolicyGet Retrieves a specific SnapMirror policy. ### Example <br/> ``` GET "/api/snapmirror/policies/567aaac0-f863-11e8-a666-0050568e12c2" ``` <br/> ### Learn more * [`DOC /snapmirror/policies`](#docs-snapmirror-snapmirror_policies) */ func (a *Client) SnapmirrorPolicyGet(params *SnapmirrorPolicyGetParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPolicyGetOK, error) { // TODO: Validate the params before sending if params == nil { params = NewSnapmirrorPolicyGetParams() } op := &runtime.ClientOperation{ ID: "snapmirror_policy_get", Method: "GET", PathPattern: "/snapmirror/policies/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SnapmirrorPolicyGetReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SnapmirrorPolicyGetOK) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SnapmirrorPolicyGetDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SnapmirrorPolicyModify Updates the SnapMirror policy. ### Important notes * The properties "retention.label" and "retention.count" are mandatory if "retention" is provided in the input. The provided "retention.label" is the final list and it replaces the existing values. * The value of the "identity_preservation" property cannot be changed if the SnapMirror relationships associated with the policy have different identity_preservation configurations. * If the SnapMirror policy "identity_preservation" value matches the "identity_preservation" value of the associated SnapMirror relationships, then the "identity_preservation" value can be changed from a higher "identity_preservation" threshold value to a lower "identity_preservation" threshold value but not vice-versa. For example, the threshold value of the "identity_preservation" property can be changed from "full" to "exclude_network_config", but cannot be increased from "exclude_network_and_protocol_config" to "exclude_network_config" to "full". The threshold value of the "identity_preservation" cannot be changed to "exclude_network_and_protocol_config" for IDP SVMDR.<br/> * The policy properties "copy_all_source_snapshots", "copy_latest_source_snapshot", and "create_snapshot_on_source" cannot be modified. * No "retention" properties can be modified if the "copy_all_source_snapshots" or "copy_latest_source_snapshot" property is present in the policy. * Replacing or deleting all retention rules of a policy that has the "create_snapshot_on_source" property set to false in a single API call is not supported. * Modifying the property "retention.label" for all retention rules of a policy that has the "create_snapshot_on_source" property set to false in a single API call is not supported. * To remove a transfer_schedule on a SnapMirror policy set the "transfer_schedule" to null (no-quotes) during SnapMirror policy PATCH. ### Related ONTAP commands * `snapmirror policy modify` ### Example Updating the "retention" property to add rules to a policy without any rules. <br/> ``` PATCH "/api/snapmirror/policies/fe65686d-00dc-11e9-b5fb-0050568e3f83" '{"retention": [{"label": "newlabel", "count": 2}, {"label": "weekly", "count": 2, "creation_schedule": {"name": "weekly"}}, {"label": "daily", "count": 14}]}' ``` <br/> Updating the "retention" property to add rules to a policy with existing rules {"retention": [{"label": "oldLabel1", "count": 2}, {"label": "oldLabel2", "count": 5}] <br/> ``` PATCH "/api/snapmirror/policies/fe65686d-00dc-11e9-b5fb-0050568e3f83" '{"retention": [{"label": "oldLabel1", "count": 2}, {"label": "oldLabel2", "count": 5}, {"label": "newlabel", "count": 3}, {"label": "weekly", "count": 1}]}' ``` <br/> Updating the "retention" property to remove a rule (oldLabel1) and add new rule to a policy with existing rules {"retention": [{"label": "oldLabel1", "count": 2}, {"label": "oldLabel2", "count": 3}] <br/> ``` PATCH "/api/snapmirror/policies/fe65686d-00dc-11e9-b5fb-0050568e3f83" '{"retention": [{"label": "oldLabel2", "count": 3}, {"label": "newlabel", "count": 2}]}' ``` <br/> Updating "transfer_schedule", "throttle", and "identity_preservation" properties <br/> ``` PATCH "/api/snapmirror/policies/8aef950b-3bef-11e9-80ac-0050568ea591" '{"transfer_schedule.name" : "weekly", "throttle" : "100", "identity_preservation":"exclude_network_and_protocol_config"}' ``` <br/> Removing the SnapMirror transfer_schedule for a SnapMirror policy. Transfer_schedule can be specified as UUID or name or both with the value set to null (no-quotes). <br/> ``` PATCH "/api/snapmirror/policies/98bb2608-fc60-11e8-aa13-005056a707ff/" '{"transfer_schedule":{"uuid":null, "name":null}}' ``` <br/> ### Learn more * [`DOC /snapmirror/policies`](#docs-snapmirror-snapmirror_policies) */ func (a *Client) SnapmirrorPolicyModify(params *SnapmirrorPolicyModifyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorPolicyModifyAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSnapmirrorPolicyModifyParams() } op := &runtime.ClientOperation{ ID: "snapmirror_policy_modify", Method: "PATCH", PathPattern: "/snapmirror/policies/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SnapmirrorPolicyModifyReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SnapmirrorPolicyModifyAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SnapmirrorPolicyModifyDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SnapmirrorRelationshipCreate Creates a SnapMirror relationship. This API can optionally provision the destination endpoint when it does not exist. This API must be executed on the cluster containing the destination endpoint unless the destination endpoint is being provisioned. When the destination endpoint is being provisioned, this API can also be executed from the cluster containing the source endpoint. Provisioning of the destination endpoint from the source cluster is supported for the FlexVol volume, FlexGroup volume and Consistency Group endpoints. For SVM endpoint, provisioning of the destination SVM endpoint is not supported from the source cluster.<br>When the destination endpoint exists the source SVM and the destination SVM must be in an SVM peer relationship. When provisioning the destination endpoint, the SVM peer relationship between the source SVM and the destination SVM is established as part of the destination, provision provided the source SVM has SVM peering permission for the destination cluster. ### Required properties * `source.path` - Path to the source endpoint of the SnapMirror relationship. * `destination.path` - Path to the destination endpoint of the SnapMirror relationship. * `destination.consistency_group_volumes` - List of FlexVol volumes of type "RW" that are constituents of a Consistency Group. * `destination.consistency_group_volumes` - List of FlexVol volumes of type "DP" that are constituents of a Consistency Group. ### Recommended optional properties * `policy.name` or `policy.uuid` - Policy governing the SnapMirror relationship. * `state` - Set the state to "snapmirrored" to automatically initialize the relationship. * `create_destination.enabled` - Enable this property to provision the destination endpoint. ### Default property values If not specified in POST, the following default property values are assigned: * `policy.name` - _Asynchronous_ * `restore` - _false_ * `create_destination.tiering.policy` - `_snapshot_only_` (when `create_destination.tiering.supported` is _true_ for FlexVol volume) * `create_destination.tiering.policy` - `_none_` (when `create_destination.tiering.supported` is _true_ for FlexGroup volume) * `create_destination.storage_service.enforce_performance` - `_false_` * `source.ipspace` - `_Default_` * `destination.ipspace` - `_Default_` * `throttle` - _0_ ### Related ONTAP commands * `snapmirror create` * `snapmirror protect` ### Important notes * The property "transfer_schedule" if set on a SnapMirror relationship overrides the "transfer_schedule" set on the policy being used with the SnapMirror relationship. * The property "throttle" if set on a SnapMirror relationship overrides the "throttle" set on the policy being used with the SnapMirror relationship. * The properties "transfer_schedule" and "throttle" are not supported when "restore" is set to "true". * The property "transfer_schedule" cannot be set to null (no-quotes) during SnapMirror relationship POST. * The property "throttle" is not supported when "create_destination.enabled" is set to "true". * The property "identity_preservation" is applicable to only SnapMirror relationships with SVM endpoints and it indicates which configuration of the source SVM is replicated to the destination SVM. ### Examples The following examples show how to create FlexVol, FlexGroup, SVM and Consistency Group SnapMirror relationships. Note that the source SVM name should be the local name of the peer SVM.</br> Creating a FlexVol SnapMirror relationship of type XDP. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:src_vol"}, "destination": { "path": "dst_svm:dst_vol"}}' ``` <br/> Creating a FlexGroup SnapMirror relationship of type XDP. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:source_flexgrp"}, "destination": { "path": "dst_svm:dest_flexgrp"}}' ``` <br/> Creating a SVM SnapMirror relationship of type XDP. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": { "path": "src_svm:"}, "destination": { "path": "dst_svm:"}}' ``` <br/> Creating a SnapMirror relationship in order to restore from a destination. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:src_vol"}, "destination": { "path": "dst_svm:dst_vol"}, "restore": "true"}' ``` <br/> Provision the destination FlexVol volume endpoint and create a SnapMirror relationship of type XDP. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:src_vol"}, "destination": { "path": "dst_svm:dst_vol"}, "create_destination": { "enabled": "true" }}' ``` Provision the destination FlexVol volume endpoint on a Fabricpool with a tiering policy and create a SnapMirror relationship of type XDP. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:src_vol"}, "destination": { "path": "dst_svm:dst_vol"}, "create_destination": { "enabled": "true", "tiering": { "supported": "true", "policy": "auto" } } }' ``` Provision the destination FlexVol volume endpoint using storage service and create a SnapMirror relationship of type XDP. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:src_vol"}, "destination": { "path": "dst_svm:dst_vol"}, "create_destination": { "enabled": "true", "storage_service": { "enabled": "true", "name": "extreme", "enforce_performance": "true" } } }' ``` Provision the destination SVM endpoint and create a SnapMirror relationship of type XDP. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:", "cluster": { "name": "cluster_src" }}, "destination": { "path": "dst_svm:"}, "create_destination": { "enabled: "true" }}' ``` Create a SnapMirror relationship with Consistency Group endpoint. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": { "path": "src_svm:/cg/cg_src_vol", "consistency_group_volumes": "src_vol_1, src_vol_2"}, "destination": { "path": "dst_svm:/cg/cg_dst_vol", "consistency_group_volumes": "dst_vol_1, dst_vol_2"}, "policy": "AutomatedFailOver" }' ``` Provision the destination Consistency Group endpoint on a Fabricpool with a tiering policy, create a SnapMirror relationship with a SnapMirror policy of type "sync" and sync_type of "automated_failover", and initialize the SnapMirror relationship with state as "in_sync". <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:/cg/cg_src_vol", "consistency_group_volumes": "src_vol_1, src_vol_2"}, "destination": { "path": "dst_svm:/cg/cg_dst_vol", "consistency_group_volumes": "dst_vol_1, dst_vol_2"}, "create_destination": { "enabled": "true", "tiering": { "supported": "true" } }, "policy": "AutomatedFailOver", "state": "in_sync" }' ``` Provision the destination Consistency Group endpoint with storage service, create a SnapMirror relationship with a SnapMirror policy of type "sync" and sync_type of "automated_failover", and initialize the SnapMirror relationship with state as "in_sync". <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:/cg/cg_src_vol", "consistency_group_volumes": "src_vol_1, src_vol_2"}, "destination": { "path": "dst_svm:/cg/cg_dst_vol", "consistency_group_volumes": "dst_vol_1, dst_vol_2"}, "create_destination": { "enabled": "true", "storage_service": { "enabled": "true", "name": "extreme", "enforce_performance": "true" } }, "policy": "AutomatedFailOver", "state": "in_sync" }' ``` <br/> Creating a FlexVol volume SnapMirror relationship of type XDP with transfer_schedule and throttle. <br/> ``` POST "/api/snapmirror/relationships/" '{"source": {"path": "src_svm:src_vol"}, "destination": { "path": "dst_svm:dst_vol"}, "transfer_schedule":{"uuid":"817500fa-092d-44c5-9c10-7b54f7b2f20a", "name":"5min"}, "throttle":100}' ``` <br/> ### Learn more * [`DOC /snapmirror/relationships`](#docs-snapmirror-snapmirror_relationships) */ func (a *Client) SnapmirrorRelationshipCreate(params *SnapmirrorRelationshipCreateParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipCreateAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSnapmirrorRelationshipCreateParams() } op := &runtime.ClientOperation{ ID: "snapmirror_relationship_create", Method: "POST", PathPattern: "/snapmirror/relationships", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SnapmirrorRelationshipCreateReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context, Client: params.HTTPClient, } for _, opt := range opts { opt(op) } result, err := a.transport.Submit(op) if err != nil { return nil, err } success, ok := result.(*SnapmirrorRelationshipCreateAccepted) if ok { return success, nil } // unexpected success response unexpectedSuccess := result.(*SnapmirrorRelationshipCreateDefault) return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } /* SnapmirrorRelationshipDelete Deletes a SnapMirror relationship. ### Important notes * The "destination_only", "source_only", and "source_info_only" flags are mutually exclusive. If no flag is specified, the relationship is deleted from both the source and destination and all common Snapshot copies between the source and destination are also deleted. * For a restore relationship, the call must be executed on the cluster containing the destination endpoint without specifying the destination_only, source_only, or source_info_only parameters. * Additionally, ensure that there are no ongoing transfers on a restore relationship before calling this API. * The "failover", "force-failover" and "failback" query parameters are only applicable for SVM-DR SnapMirror relationships. * When a SnapMirror relationship associated with a pair of source and destination Consistency Groups is deleted, the corresponding Consistency Groups on the source and destination clusters are not automatically deleted and remain in place. ### Related ONTAP commands * `snapmirror delete` * `snapmirror release` ### Examples The following examples show how to delete the relationship from both the source and destination, the destination only, and the source only. <br/> Deleting the relationship from both the source and destination. This API must be run on the cluster containing the destination endpoint. <br/> ``` DELETE "/api/snapmirror/relationships/4512b2d2-fd60-11e8-8929-005056bbfe52" ``` <br/> Deleting the relationship on the destination only. This API must be run on the cluster containing the destination endpoint. <br/> ``` DELETE "/api/snapmirror/relationships/fd1e0697-02ba-11e9-acc7-005056a7697f/?destination_only=true" ``` <br/> Deleting the relationship on the source only. This API must be run on the cluster containing the source endpoint. <br/> ``` DELETE "/api/snapmirror/relationships/93e828ba-02bc-11e9-acc7-005056a7697f/?source_only=true" ``` <br/> Deleting the source information only. This API must be run on the cluster containing the source endpoint. This does not delete the common Snapshot copies between the source and destination. <br/> ``` DELETE "/api/snapmirror/relationships/caf545a2-fc60-11e8-aa13-005056a707ff/?source_info_only=true" ``` <br/> ### Learn more * [`DOC /snapmirror/relationships`](#docs-snapmirror-snapmirror_relationships) */ func (a *Client) SnapmirrorRelationshipDelete(params *SnapmirrorRelationshipDeleteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SnapmirrorRelationshipDeleteAccepted, error) { // TODO: Validate the params before sending if params == nil { params = NewSnapmirrorRelationshipDeleteParams() } op := &runtime.ClientOperation{ ID: "snapmirror_relationship_delete", Method: "DELETE", PathPattern: "/snapmirror/relationships/{uuid}", ProducesMediaTypes: []string{"application/hal+json", "application/json"}, ConsumesMediaTypes: []string{"application/hal+json", "application/json"}, Schemes: []string{"https"}, Params: params, Reader: &SnapmirrorRelationshipDeleteReader{formats: a.formats}, AuthInfo: authInfo, Context: params.Context,
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_create_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_create_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipCreateReader is a Reader for the SnapmirrorRelationshipCreate structure. type SnapmirrorRelationshipCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSnapmirrorRelationshipCreateAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipCreateDefault(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 } } // NewSnapmirrorRelationshipCreateAccepted creates a SnapmirrorRelationshipCreateAccepted with default headers values func NewSnapmirrorRelationshipCreateAccepted() *SnapmirrorRelationshipCreateAccepted { return &SnapmirrorRelationshipCreateAccepted{} } /* SnapmirrorRelationshipCreateAccepted describes a response with status code 202, with default header values. Accepted */ type SnapmirrorRelationshipCreateAccepted struct { /* Useful for tracking the resource location */ Location string Payload *models.JobLinkResponse } // IsSuccess returns true when this snapmirror relationship create accepted response has a 2xx status code func (o *SnapmirrorRelationshipCreateAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationship create accepted response has a 3xx status code func (o *SnapmirrorRelationshipCreateAccepted) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationship create accepted response has a 4xx status code func (o *SnapmirrorRelationshipCreateAccepted) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationship create accepted response has a 5xx status code func (o *SnapmirrorRelationshipCreateAccepted) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationship create accepted response a status code equal to that given func (o *SnapmirrorRelationshipCreateAccepted) IsCode(code int) bool { return code == 202 } func (o *SnapmirrorRelationshipCreateAccepted) Error() string { return fmt.Sprintf("[POST /snapmirror/relationships][%d] snapmirrorRelationshipCreateAccepted %+v", 202, o.Payload) } func (o *SnapmirrorRelationshipCreateAccepted) String() string { return fmt.Sprintf("[POST /snapmirror/relationships][%d] snapmirrorRelationshipCreateAccepted %+v", 202, o.Payload) } func (o *SnapmirrorRelationshipCreateAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SnapmirrorRelationshipCreateAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Location hdrLocation := response.GetHeader("Location") if hdrLocation != "" { o.Location = hdrLocation } o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorRelationshipCreateDefault creates a SnapmirrorRelationshipCreateDefault with default headers values func NewSnapmirrorRelationshipCreateDefault(code int) *SnapmirrorRelationshipCreateDefault { return &SnapmirrorRelationshipCreateDefault{ _statusCode: code, } } /* SnapmirrorRelationshipCreateDefault describes a response with status code -1, with default header values. ONTAP Error Response Codes | Error Code | Description | | ---------- | ----------- | | 1115545 | Access token has an invalid signature. | | 1115546 | Access token expired at a time. | | 1115547 | Access token not valid until a time. | | 1115548 | Access token is malformed. | | 1115549 | Internal error. Failed to validate access token. | | 6619637 | Relationship with specified destination volume already exists. | | 6619699 | Schedule not found. | | 6620374 | Internal error. Failed to get SVM information. | | 6620478 | Internal error. Failed to check SnapMirror capability. | | 6621834 | Object store configuration does not exist for specified vserver. | | 13303819 | Could not retrieve SnapMirror policy information. | | 13303821 | Invalid SnapMirror policy UUID. | | 13303841 | This operation is not supported for SnapMirror relationships between these endpoints. | | 13303852 | destination.path provided does not contain \\\":\\\". | | 13303853 | Restore relationships are not supported for SVM-DR endpoints. | | 13303868 | Create of destination endpoint and SnapMirror relationship failed. | | 13303869 | Creating a destination endpoint is not supported for restore relationships. | | 13303870 | A tiering policy cannot be specified if tiering is not being set to supported. | | 13303871 | Storage service properties cannot be specified if the storage service is not being enabled. | | 13303872 | Specified property requires a later effective cluster version. | | 13303873 | Specifying a state when creating a relationship is only supported when creating a destination endpoint. | | 13303874 | Specified state is not supported when creating this relationship. | | 13303875 | Destination aggregates do not have sufficient space for hosting copies of source volumes. | | 13303876 | Destination cluster does not have composite aggregates. | | 13303877 | Source or destination cluster must be specified. | | 13303878 | The specified fields do not match. | | 13303879 | Source cluster name or UUID is needed to provision a destination SVM on the local cluster. | | 13303880 | Source cluster must be remote for provisioning a destination SVM on the local cluster. | | 13303881 | Network validation failed. | | 13303882 | SVM validation failed. | | 13303883 | Encryption is not enabled on the destination cluster. | | 13303887 | Synchronous SnapMirror relationships between FlexGroup volumes are not supported. | | 13303888 | Synchronous SnapMirror relationships require an effective cluster version of 9.5 or later on both the source and destination clusters. | | 13303889 | Asynchronous SnapMirror relationships between FlexGroup volumes require an effective cluster version of 9.5 or later on both the source and destination clusters. | | 13303890 | Asynchronous SnapMirror relationships between FlexVol volumes require an effective cluster version of 9.3, 9.5, or later on both the source and destination clusters. | | 13303891 | Creating a destination endpoint with storage service requires an effective cluster version of 9.7 or later. | | 13303892 | Fetching remote information from the destination cluster failed. | | 13303893 | Updating job description failed. | | 13303894 | Destination volume name is invalid. It must contain the source volume name and have a suffix when creating a destination endpoint on a cluster with an effective cluster version of 9.6 or earlier. | | 13303895 | Operation on the remote destination cluster is not supported. | | 13303897 | Specifying transfer_schedule is only supported for an asynchronous SnapMirror relationship with a remote destination cluster that has an effective cluster version of 9.6 or earlier. | | 13303916 | FlexGroup volumes are not supported on SnapLock aggregates. | | 13303918 | No suitable destination aggregate type is available. | | 13303919 | Only FabricPool enabled aggregates are available on the destination. | | 13303920 | Only SnapLock aggregates are available on the destination. FlexGroup volumes are not supported on SnapLock aggregates. | | 13303921 | Unable to retrieve the SnapMirror capabilities of the destination cluster. | | 13303922 | Specified source SVM is not a data SVM. | | 13303923 | Specified destination SVM is not a data SVM. | | 13303924 | Source SVM has an invalid Snapshot copy policy. | | 13303925 | SnapMirror validation has failed. | | 13303930 | The specified tiering policy is not supported for destination volumes of Synchronous relationships. | | 13303938 | Fetching information from the local cluster failed. | | 13303939 | Could not create an SVM peer relationship. | | 13303944 | An SVM-DR relationship is not supported because the source SVM has CIFS configured and the associated SnapMirror policy has either the "identity_preservation" property not set or set to "exclude_network_and_protocol_config". | | 13303945 | Schedule specified cannot be associated with the relationship because the policy used for the relationship has a schedule. | | 13303953 | SnapMirror relationships between FlexGroup volumes and object store endpoints are not supported. | | 13303957 | Restore to the specified destination endpoint is not supported. | | 13303958 | The \\\"source.uuid\\\" property must be specified. | | 13303959 | The \\\"source.uuid\\\" property can only be specified when using the \\\"restore\\\" property to create a SnapMirror relationship from an object store endpoint. | | 13303960 | The \\\"destination.uuid\\\" property cannot be specified for these endpoints. | | 13303961 | Creating a destination endpoint is not supported with the \\\"source.uuid\\\" property. | | 13303962 | Creating a destination endpoint is not supported with the \\\"destination.uuid\\\" property. | | 13303964 | Specified property is not supported for object store relationships. | | 13303965 | Specified endpoint not found. | | 13303966 | Consistency Group relationships require a policy of type \"sync\" with a sync_type of \"automated_failover\". | | 13303967 | Consistency Group volume is not a FlexVol volume. | | 13303968 | Unsupported volume type for the Consistency Group. | | 13303969 | SnapMirror relationships between SVM endpoints and object store endpoints are not supported. | | 13303970 | Unsupported policy type for the Consistency Group. | | 13303971 | SnapMirror relationships between Consistency Group endpoints and object store endpoints are not supported. | | 13303976 | Source or destination SVM is already part of an SVM-DR relation. | | 13303977 | Destination Consistency Group volume UUIDs are not expected while provisioning the destination volumes. | | 13303978 | Number of Consistency Group volume names and UUIDs does not match. | | 13303979 | Number of Consistency Group volumes exceeds the allowed limit. | | 13303980 | Number of source and destination Consistency Group volumes do not match. | | 13303981 | ISCSI or FCP protocol is not configured. | | 13303982 | SAN data interface is not configured on the SVM. | | 13304021 | No suitable storage can be found meeting the specified requirements. No FabricPool enabled aggregates are available on the destination. | | 13304022 | No suitable storage can be found meeting the specified requirements. No non-root, non-taken-over, non-SnapLock, non-composite aggregates are available on the destination. | | 13304026 | API license token is required for this operation. | | 13304027 | Invalid API license token specified. | | 13304032 | In an "All SAN Array", an SVM-DR relationship is not supported when the associated SnapMirror policy does not have the "identity_preservation" property set to "exclude_network_and_protocol_config". | | 13304034 | SnapMirror Cloud license must be installed to use this feature. | | 13304035 | SnapMirror Cloud license capacity limit has been exceeded. | | 13304036 | SnapmMirror Cloud license term has expired. | | 13304038 | SnapMirror Cloud License capacity limit would be exceeded with this SnapMirror operation. | | 13304042 | The specified destination or source cluster for relationships with an object store destination must be local. | | 13304043 | The property must be specified for a restore from an object store endpoint. | | 13304044 | File restore from object store endpoints is not supported for relationship restore. | | 13304045 | Incremental restore from an object store endpoint is not supported. | | 13304077 | Specified property is only supported for creating a destination endpoint for FabricLink SnapMirror relationships.</private> | | 13304080 | Specified UUID and name do not match. | | 13304082 | Specified properties are mutually exclusive. | | 13304083 | The specified property is not supported because all nodes in the cluster are not capable of supporting the property.<private> | | 13304098 | This SnapMirror policy is not supported for SnapMirror relationhips with SnapLock volumes. | | 13304099 | SnapLock Compliance Clock is not running on all nodes in the destination cluster. | | 13304108 | Schedule not found in the Administrative SVM or the SVM for the relationship. | */ type SnapmirrorRelationshipCreateDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationship create default response func (o *SnapmirrorRelationshipCreateDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationship create default response has a 2xx status code func (o *SnapmirrorRelationshipCreateDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationship create default response has a 3xx status code func (o *SnapmirrorRelationshipCreateDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationship create default response has a 4xx status code func (o *SnapmirrorRelationshipCreateDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationship create default response has a 5xx status code func (o *SnapmirrorRelationshipCreateDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationship create default response a status code equal to that given func (o *SnapmirrorRelationshipCreateDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipCreateDefault) Error() string { return fmt.Sprintf("[POST /snapmirror/relationships][%d] snapmirror_relationship_create default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipCreateDefault) String() string { return fmt.Sprintf("[POST /snapmirror/relationships][%d] snapmirror_relationship_create default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipCreateDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipCreateDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_delete_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_delete_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSnapmirrorPolicyDeleteParams creates a new SnapmirrorPolicyDeleteParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorPolicyDeleteParams() *SnapmirrorPolicyDeleteParams { return &SnapmirrorPolicyDeleteParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorPolicyDeleteParamsWithTimeout creates a new SnapmirrorPolicyDeleteParams object // with the ability to set a timeout on a request. func NewSnapmirrorPolicyDeleteParamsWithTimeout(timeout time.Duration) *SnapmirrorPolicyDeleteParams { return &SnapmirrorPolicyDeleteParams{ timeout: timeout, } } // NewSnapmirrorPolicyDeleteParamsWithContext creates a new SnapmirrorPolicyDeleteParams object // with the ability to set a context for a request. func NewSnapmirrorPolicyDeleteParamsWithContext(ctx context.Context) *SnapmirrorPolicyDeleteParams { return &SnapmirrorPolicyDeleteParams{ Context: ctx, } } // NewSnapmirrorPolicyDeleteParamsWithHTTPClient creates a new SnapmirrorPolicyDeleteParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorPolicyDeleteParamsWithHTTPClient(client *http.Client) *SnapmirrorPolicyDeleteParams { return &SnapmirrorPolicyDeleteParams{ HTTPClient: client, } } /* SnapmirrorPolicyDeleteParams contains all the parameters to send to the API endpoint for the snapmirror policy delete operation. Typically these are written to a http.Request. */ type SnapmirrorPolicyDeleteParams struct { /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. Policy UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror policy delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPolicyDeleteParams) WithDefaults() *SnapmirrorPolicyDeleteParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror policy delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPolicyDeleteParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := SnapmirrorPolicyDeleteParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) WithTimeout(timeout time.Duration) *SnapmirrorPolicyDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) WithContext(ctx context.Context) *SnapmirrorPolicyDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) WithHTTPClient(client *http.Client) *SnapmirrorPolicyDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithReturnTimeout adds the returnTimeout to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorPolicyDeleteParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) WithUUID(uuid string) *SnapmirrorPolicyDeleteParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror policy delete params func (o *SnapmirrorPolicyDeleteParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorPolicyDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipTransferGetReader is a Reader for the SnapmirrorRelationshipTransferGet structure. type SnapmirrorRelationshipTransferGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipTransferGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSnapmirrorRelationshipTransferGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipTransferGetDefault(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 } } // NewSnapmirrorRelationshipTransferGetOK creates a SnapmirrorRelationshipTransferGetOK with default headers values func NewSnapmirrorRelationshipTransferGetOK() *SnapmirrorRelationshipTransferGetOK { return &SnapmirrorRelationshipTransferGetOK{} } /* SnapmirrorRelationshipTransferGetOK describes a response with status code 200, with default header values. OK */ type SnapmirrorRelationshipTransferGetOK struct { Payload *models.SnapmirrorTransfer } // IsSuccess returns true when this snapmirror relationship transfer get o k response has a 2xx status code func (o *SnapmirrorRelationshipTransferGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationship transfer get o k response has a 3xx status code func (o *SnapmirrorRelationshipTransferGetOK) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationship transfer get o k response has a 4xx status code func (o *SnapmirrorRelationshipTransferGetOK) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationship transfer get o k response has a 5xx status code func (o *SnapmirrorRelationshipTransferGetOK) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationship transfer get o k response a status code equal to that given func (o *SnapmirrorRelationshipTransferGetOK) IsCode(code int) bool { return code == 200 } func (o *SnapmirrorRelationshipTransferGetOK) Error() string { return fmt.Sprintf("[GET /snapmirror/relationships/{relationship.uuid}/transfers/{uuid}][%d] snapmirrorRelationshipTransferGetOK %+v", 200, o.Payload) } func (o *SnapmirrorRelationshipTransferGetOK) String() string { return fmt.Sprintf("[GET /snapmirror/relationships/{relationship.uuid}/transfers/{uuid}][%d] snapmirrorRelationshipTransferGetOK %+v", 200, o.Payload) } func (o *SnapmirrorRelationshipTransferGetOK) GetPayload() *models.SnapmirrorTransfer { return o.Payload } func (o *SnapmirrorRelationshipTransferGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SnapmirrorTransfer) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorRelationshipTransferGetDefault creates a SnapmirrorRelationshipTransferGetDefault with default headers values func NewSnapmirrorRelationshipTransferGetDefault(code int) *SnapmirrorRelationshipTransferGetDefault { return &SnapmirrorRelationshipTransferGetDefault{ _statusCode: code, } } /* SnapmirrorRelationshipTransferGetDefault describes a response with status code -1, with default header values. Error */ type SnapmirrorRelationshipTransferGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationship transfer get default response func (o *SnapmirrorRelationshipTransferGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationship transfer get default response has a 2xx status code func (o *SnapmirrorRelationshipTransferGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationship transfer get default response has a 3xx status code func (o *SnapmirrorRelationshipTransferGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationship transfer get default response has a 4xx status code func (o *SnapmirrorRelationshipTransferGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationship transfer get default response has a 5xx status code func (o *SnapmirrorRelationshipTransferGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationship transfer get default response a status code equal to that given func (o *SnapmirrorRelationshipTransferGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipTransferGetDefault) Error() string { return fmt.Sprintf("[GET /snapmirror/relationships/{relationship.uuid}/transfers/{uuid}][%d] snapmirror_relationship_transfer_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipTransferGetDefault) String() string { return fmt.Sprintf("[GET /snapmirror/relationships/{relationship.uuid}/transfers/{uuid}][%d] snapmirror_relationship_transfer_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipTransferGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipTransferGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_modify_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_modify_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSnapmirrorRelationshipModifyParams creates a new SnapmirrorRelationshipModifyParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipModifyParams() *SnapmirrorRelationshipModifyParams { return &SnapmirrorRelationshipModifyParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipModifyParamsWithTimeout creates a new SnapmirrorRelationshipModifyParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipModifyParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipModifyParams { return &SnapmirrorRelationshipModifyParams{ timeout: timeout, } } // NewSnapmirrorRelationshipModifyParamsWithContext creates a new SnapmirrorRelationshipModifyParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipModifyParamsWithContext(ctx context.Context) *SnapmirrorRelationshipModifyParams { return &SnapmirrorRelationshipModifyParams{ Context: ctx, } } // NewSnapmirrorRelationshipModifyParamsWithHTTPClient creates a new SnapmirrorRelationshipModifyParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipModifyParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipModifyParams { return &SnapmirrorRelationshipModifyParams{ HTTPClient: client, } } /* SnapmirrorRelationshipModifyParams contains all the parameters to send to the API endpoint for the snapmirror relationship modify operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipModifyParams struct { /* Failback. If this parameter is set while specifying the state as "snapmirrored", indicates recovery of the failed over SnapMirror relationship by preserving the data written on the destination endpoint when the SnapMirror relationship was in failed over state. This flag is only applicable to SVM-DR SnapMirror relationships. */ Failback *bool /* Failover. If this parameter is set, validation and failover will occur to the SVM-DR SnapMirror relationship destination endpoint. Any other fields specified with this parameter will be ignored. This parameter is supported only for SVM-DR SnapMirror relationships. */ Failover *bool /* Force. If this parameter is set while specifying the state as "broken_off", indicates a forced failover overriding the validation errors. */ Force *bool /* ForceFailover. If this parameter is set, failover will occur to the SVM-DR SnapMirror relationship destination endpoint, overriding the validation errors. Any other fields specified with this parameter will be ignored. This parameter is supported only for SVM-DR SnapMirror relationships. */ ForceFailover *bool /* Info. Information on the SnapMirror relationship. */ Info *models.SnapmirrorRelationship /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. Relationship UUID */ UUID string /* ValidateOnly. Validate the operation and its parameters, without actually performing the operation. */ ValidateOnly *bool timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationship modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipModifyParams) WithDefaults() *SnapmirrorRelationshipModifyParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationship modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipModifyParams) SetDefaults() { var ( failbackDefault = bool(false) failoverDefault = bool(false) forceDefault = bool(false) forceFailoverDefault = bool(false) returnTimeoutDefault = int64(0) ) val := SnapmirrorRelationshipModifyParams{ Failback: &failbackDefault, Failover: &failoverDefault, Force: &forceDefault, ForceFailover: &forceFailoverDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipModifyParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithContext(ctx context.Context) *SnapmirrorRelationshipModifyParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipModifyParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFailback adds the failback to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithFailback(failback *bool) *SnapmirrorRelationshipModifyParams { o.SetFailback(failback) return o } // SetFailback adds the failback to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetFailback(failback *bool) { o.Failback = failback } // WithFailover adds the failover to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithFailover(failover *bool) *SnapmirrorRelationshipModifyParams { o.SetFailover(failover) return o } // SetFailover adds the failover to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetFailover(failover *bool) { o.Failover = failover } // WithForce adds the force to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithForce(force *bool) *SnapmirrorRelationshipModifyParams { o.SetForce(force) return o } // SetForce adds the force to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetForce(force *bool) { o.Force = force } // WithForceFailover adds the forceFailover to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithForceFailover(forceFailover *bool) *SnapmirrorRelationshipModifyParams { o.SetForceFailover(forceFailover) return o } // SetForceFailover adds the forceFailover to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetForceFailover(forceFailover *bool) { o.ForceFailover = forceFailover } // WithInfo adds the info to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithInfo(info *models.SnapmirrorRelationship) *SnapmirrorRelationshipModifyParams { o.SetInfo(info) return o } // SetInfo adds the info to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetInfo(info *models.SnapmirrorRelationship) { o.Info = info } // WithReturnTimeout adds the returnTimeout to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorRelationshipModifyParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithUUID(uuid string) *SnapmirrorRelationshipModifyParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetUUID(uuid string) { o.UUID = uuid } // WithValidateOnly adds the validateOnly to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) WithValidateOnly(validateOnly *bool) *SnapmirrorRelationshipModifyParams { o.SetValidateOnly(validateOnly) return o } // SetValidateOnly adds the validateOnly to the snapmirror relationship modify params func (o *SnapmirrorRelationshipModifyParams) SetValidateOnly(validateOnly *bool) { o.ValidateOnly = validateOnly } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorRelationshipModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Failback != nil { // query param failback var qrFailback bool if o.Failback != nil { qrFailback = *o.Failback } qFailback := swag.FormatBool(qrFailback) if qFailback != "" { if err := r.SetQueryParam("failback", qFailback); err != nil { return err } } } if o.Failover != nil { // query param failover var qrFailover bool if o.Failover != nil { qrFailover = *o.Failover } qFailover := swag.FormatBool(qrFailover) if qFailover != "" { if err := r.SetQueryParam("failover", qFailover); err != nil { return err } } } if o.Force != nil { // query param force var qrForce bool if o.Force != nil { qrForce = *o.Force } qForce := swag.FormatBool(qrForce) if qForce != "" { if err := r.SetQueryParam("force", qForce); err != nil { return err } } } if o.ForceFailover != nil { // query param force-failover var qrForceFailover bool if o.ForceFailover != nil { qrForceFailover = *o.ForceFailover } qForceFailover := swag.FormatBool(qrForceFailover) if qForceFailover != "" { if err := r.SetQueryParam("force-failover", qForceFailover); err != nil { return err } } } if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if o.ValidateOnly != nil { // query param validate_only var qrValidateOnly bool if o.ValidateOnly != nil { qrValidateOnly = *o.ValidateOnly } qValidateOnly := swag.FormatBool(qrValidateOnly) if qValidateOnly != "" { if err := r.SetQueryParam("validate_only", qValidateOnly); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_delete_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_delete_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSnapmirrorRelationshipDeleteParams creates a new SnapmirrorRelationshipDeleteParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipDeleteParams() *SnapmirrorRelationshipDeleteParams { return &SnapmirrorRelationshipDeleteParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipDeleteParamsWithTimeout creates a new SnapmirrorRelationshipDeleteParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipDeleteParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipDeleteParams { return &SnapmirrorRelationshipDeleteParams{ timeout: timeout, } } // NewSnapmirrorRelationshipDeleteParamsWithContext creates a new SnapmirrorRelationshipDeleteParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipDeleteParamsWithContext(ctx context.Context) *SnapmirrorRelationshipDeleteParams { return &SnapmirrorRelationshipDeleteParams{ Context: ctx, } } // NewSnapmirrorRelationshipDeleteParamsWithHTTPClient creates a new SnapmirrorRelationshipDeleteParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipDeleteParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipDeleteParams { return &SnapmirrorRelationshipDeleteParams{ HTTPClient: client, } } /* SnapmirrorRelationshipDeleteParams contains all the parameters to send to the API endpoint for the snapmirror relationship delete operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipDeleteParams struct { /* DestinationOnly. Deletes a relationship on the destination only. This parameter is applicable only when the call is executed on the cluster that contains the destination endpoint. */ DestinationOnly *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* SourceInfoOnly. Deletes relationship information on the source only. This parameter is applicable only when the call is executed on the cluster that contains the source endpoint. */ SourceInfoOnly *bool /* SourceOnly. Deletes a relationship on the source only. This parameter is applicable only when the call is executed on the cluster that contains the source endpoint. In the case of a relationship that uses SnapMirror policy of type 'continuous', this parameter is used to delete the source end of the relationship while ignoring errors when the destination endpoint is not reachable. */ SourceOnly *bool /* UUID. Relationship UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationship delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipDeleteParams) WithDefaults() *SnapmirrorRelationshipDeleteParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationship delete params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipDeleteParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := SnapmirrorRelationshipDeleteParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipDeleteParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) WithContext(ctx context.Context) *SnapmirrorRelationshipDeleteParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipDeleteParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithDestinationOnly adds the destinationOnly to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) WithDestinationOnly(destinationOnly *bool) *SnapmirrorRelationshipDeleteParams { o.SetDestinationOnly(destinationOnly) return o } // SetDestinationOnly adds the destinationOnly to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) SetDestinationOnly(destinationOnly *bool) { o.DestinationOnly = destinationOnly } // WithReturnTimeout adds the returnTimeout to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorRelationshipDeleteParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSourceInfoOnly adds the sourceInfoOnly to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) WithSourceInfoOnly(sourceInfoOnly *bool) *SnapmirrorRelationshipDeleteParams { o.SetSourceInfoOnly(sourceInfoOnly) return o } // SetSourceInfoOnly adds the sourceInfoOnly to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) SetSourceInfoOnly(sourceInfoOnly *bool) { o.SourceInfoOnly = sourceInfoOnly } // WithSourceOnly adds the sourceOnly to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) WithSourceOnly(sourceOnly *bool) *SnapmirrorRelationshipDeleteParams { o.SetSourceOnly(sourceOnly) return o } // SetSourceOnly adds the sourceOnly to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) SetSourceOnly(sourceOnly *bool) { o.SourceOnly = sourceOnly } // WithUUID adds the uuid to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) WithUUID(uuid string) *SnapmirrorRelationshipDeleteParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror relationship delete params func (o *SnapmirrorRelationshipDeleteParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorRelationshipDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.DestinationOnly != nil { // query param destination_only var qrDestinationOnly bool if o.DestinationOnly != nil { qrDestinationOnly = *o.DestinationOnly } qDestinationOnly := swag.FormatBool(qrDestinationOnly) if qDestinationOnly != "" { if err := r.SetQueryParam("destination_only", qDestinationOnly); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.SourceInfoOnly != nil { // query param source_info_only var qrSourceInfoOnly bool if o.SourceInfoOnly != nil { qrSourceInfoOnly = *o.SourceInfoOnly } qSourceInfoOnly := swag.FormatBool(qrSourceInfoOnly) if qSourceInfoOnly != "" { if err := r.SetQueryParam("source_info_only", qSourceInfoOnly); err != nil { return err } } } if o.SourceOnly != nil { // query param source_only var qrSourceOnly bool if o.SourceOnly != nil { qrSourceOnly = *o.SourceOnly } qSourceOnly := swag.FormatBool(qrSourceOnly) if qSourceOnly != "" { if err := r.SetQueryParam("source_only", qSourceOnly); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_modify_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_modify_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipModifyReader is a Reader for the SnapmirrorRelationshipModify structure. type SnapmirrorRelationshipModifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSnapmirrorRelationshipModifyAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipModifyDefault(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 } } // NewSnapmirrorRelationshipModifyAccepted creates a SnapmirrorRelationshipModifyAccepted with default headers values func NewSnapmirrorRelationshipModifyAccepted() *SnapmirrorRelationshipModifyAccepted { return &SnapmirrorRelationshipModifyAccepted{} } /* SnapmirrorRelationshipModifyAccepted describes a response with status code 202, with default header values. Accepted */ type SnapmirrorRelationshipModifyAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this snapmirror relationship modify accepted response has a 2xx status code func (o *SnapmirrorRelationshipModifyAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationship modify accepted response has a 3xx status code func (o *SnapmirrorRelationshipModifyAccepted) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationship modify accepted response has a 4xx status code func (o *SnapmirrorRelationshipModifyAccepted) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationship modify accepted response has a 5xx status code func (o *SnapmirrorRelationshipModifyAccepted) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationship modify accepted response a status code equal to that given func (o *SnapmirrorRelationshipModifyAccepted) IsCode(code int) bool { return code == 202 } func (o *SnapmirrorRelationshipModifyAccepted) Error() string { return fmt.Sprintf("[PATCH /snapmirror/relationships/{uuid}][%d] snapmirrorRelationshipModifyAccepted %+v", 202, o.Payload) } func (o *SnapmirrorRelationshipModifyAccepted) String() string { return fmt.Sprintf("[PATCH /snapmirror/relationships/{uuid}][%d] snapmirrorRelationshipModifyAccepted %+v", 202, o.Payload) } func (o *SnapmirrorRelationshipModifyAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SnapmirrorRelationshipModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorRelationshipModifyDefault creates a SnapmirrorRelationshipModifyDefault with default headers values func NewSnapmirrorRelationshipModifyDefault(code int) *SnapmirrorRelationshipModifyDefault { return &SnapmirrorRelationshipModifyDefault{ _statusCode: code, } } /* SnapmirrorRelationshipModifyDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 13303825 | Could not retrieve information for the SnapMirror policy type | | 13303817 | Unknown value for the SnapMirror state | | 13303829 | Invalid state | | 13303830 | Transient state | | 13303831 | Invalid state for async SnapMirror relationship | | 13303834 | Given input valid only for FlexGroup SnapMirror relationship | | 13303835 | Given flag is valid only when PATCH state is broken_off | | 13303836 | Given flag is valid only when PATCH state is snapmirrored or in_sync | | 13303818 | Invalid state transition requested | | 13303828 | Given state change is not possible for SVM SnapMirror relationship | | 13303833 | Requested state change is not possible | | 13303832 | SnapMirror relationship is already initialized | | 13303824 | Quiescing the SnapMirror relationship has failed | | 13303826 | Required environment variables are not set | | 13303827 | Internal Error | | 13303823 | Quiesce operation timed out | | 13303821 | Invalid SnapMirror policy name/UUID | | 13303819 | Could not retrieve SnapMirror policy information | | 13303851 | Cannot modify attributes of SnapMirror restore relationship | | 13303816 | Could not retrieve state or status values | | 13303837 | Given flags are valid only if SnapMirror state change is requested | | 6619546 | Destination must be a dp volume | | 13303808 | Transition to broken_off state failed | | 13303809 | Transition to paused state failed | | 13303810 | Transition to snapmirrored state failed | | 13303811 | Transition from paused state failed | | 13303820 | SnapMirror policy, transfer_schedule, and throttle, if specified were successfully updated, state transition failed | | 13303856 | SVM is not configured with any data protocol | | 13303857 | SVM is not configured with any network interface | | 13303858 | Internal error. Failed to check LIF and protocols details for SVM | | 13303859 | Internal error. SVM Failover operation failed. SVM operational state is unavailable. | | 13303865 | Modifying the specified SnapMirror policy is not supported. | | 13303866 | Cannot use the specified policy to modify the policy of the relationship. | | 13303867 | Modifying the policy of an async-mirror or a vault relationship is not supported. | | 13303884 | LIF and protocols details are configured incorrectly for SVM. | | 13303996 | The source and destination clusters both have a policy with the same name, but they have different properties. | | 13304062 | Cannot reverse the direction of a SnapMirror DP relationship when the source cluster version is earlier than the destination cluster version. | | 13304070 | Remote peer cluster requires the dp_rest_support capability to support reversing the direction of a DP relationship. | | 13304071 | Failed to access capabilities on remote cluster. | | 13304080 | Specified uuid and name do not match. | | 13304081 | Modifying a property during the opertaion is not supported. | | 13304082 | The specified properties are mutually exclusive. | | 13304083 | The specified property is not supported because all nodes in the cluster are not capable of supporting the property. | | 13304086 | Reversing the direction of a SnapMirror relationship associated with a policy containing the property create_snapshot_on_source set to false is not supported. | | 6619715 | Modification of relationship is in progress. Retry the command after a few minutes. | | 6619699 | Schedule not found. | | 13304108 | Schedule not found in the Administrative SVM or the SVM for the relationship. | */ type SnapmirrorRelationshipModifyDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationship modify default response func (o *SnapmirrorRelationshipModifyDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationship modify default response has a 2xx status code func (o *SnapmirrorRelationshipModifyDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationship modify default response has a 3xx status code func (o *SnapmirrorRelationshipModifyDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationship modify default response has a 4xx status code func (o *SnapmirrorRelationshipModifyDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationship modify default response has a 5xx status code func (o *SnapmirrorRelationshipModifyDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationship modify default response a status code equal to that given func (o *SnapmirrorRelationshipModifyDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipModifyDefault) Error() string { return fmt.Sprintf("[PATCH /snapmirror/relationships/{uuid}][%d] snapmirror_relationship_modify default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipModifyDefault) String() string { return fmt.Sprintf("[PATCH /snapmirror/relationships/{uuid}][%d] snapmirror_relationship_modify default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipModifyDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipModifyDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSnapmirrorRelationshipGetParams creates a new SnapmirrorRelationshipGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipGetParams() *SnapmirrorRelationshipGetParams { return &SnapmirrorRelationshipGetParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipGetParamsWithTimeout creates a new SnapmirrorRelationshipGetParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipGetParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipGetParams { return &SnapmirrorRelationshipGetParams{ timeout: timeout, } } // NewSnapmirrorRelationshipGetParamsWithContext creates a new SnapmirrorRelationshipGetParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipGetParamsWithContext(ctx context.Context) *SnapmirrorRelationshipGetParams { return &SnapmirrorRelationshipGetParams{ Context: ctx, } } // NewSnapmirrorRelationshipGetParamsWithHTTPClient creates a new SnapmirrorRelationshipGetParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipGetParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipGetParams { return &SnapmirrorRelationshipGetParams{ HTTPClient: client, } } /* SnapmirrorRelationshipGetParams contains all the parameters to send to the API endpoint for the snapmirror relationship get operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* ListDestinationsOnly. Set to true to show relationships from the source only. */ ListDestinationsOnly *bool /* UUID. Relationship UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationship get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipGetParams) WithDefaults() *SnapmirrorRelationshipGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationship get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipGetParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) WithContext(ctx context.Context) *SnapmirrorRelationshipGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) WithFields(fields []string) *SnapmirrorRelationshipGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) SetFields(fields []string) { o.Fields = fields } // WithListDestinationsOnly adds the listDestinationsOnly to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) WithListDestinationsOnly(listDestinationsOnly *bool) *SnapmirrorRelationshipGetParams { o.SetListDestinationsOnly(listDestinationsOnly) return o } // SetListDestinationsOnly adds the listDestinationsOnly to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) SetListDestinationsOnly(listDestinationsOnly *bool) { o.ListDestinationsOnly = listDestinationsOnly } // WithUUID adds the uuid to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) WithUUID(uuid string) *SnapmirrorRelationshipGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror relationship get params func (o *SnapmirrorRelationshipGetParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorRelationshipGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.ListDestinationsOnly != nil { // query param list_destinations_only var qrListDestinationsOnly bool if o.ListDestinationsOnly != nil { qrListDestinationsOnly = *o.ListDestinationsOnly } qListDestinationsOnly := swag.FormatBool(qrListDestinationsOnly) if qListDestinationsOnly != "" { if err := r.SetQueryParam("list_destinations_only", qListDestinationsOnly); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSnapmirrorRelationshipGet binds the parameter fields func (o *SnapmirrorRelationshipGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policies_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policies_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSnapmirrorPoliciesGetParams creates a new SnapmirrorPoliciesGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorPoliciesGetParams() *SnapmirrorPoliciesGetParams { return &SnapmirrorPoliciesGetParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorPoliciesGetParamsWithTimeout creates a new SnapmirrorPoliciesGetParams object // with the ability to set a timeout on a request. func NewSnapmirrorPoliciesGetParamsWithTimeout(timeout time.Duration) *SnapmirrorPoliciesGetParams { return &SnapmirrorPoliciesGetParams{ timeout: timeout, } } // NewSnapmirrorPoliciesGetParamsWithContext creates a new SnapmirrorPoliciesGetParams object // with the ability to set a context for a request. func NewSnapmirrorPoliciesGetParamsWithContext(ctx context.Context) *SnapmirrorPoliciesGetParams { return &SnapmirrorPoliciesGetParams{ Context: ctx, } } // NewSnapmirrorPoliciesGetParamsWithHTTPClient creates a new SnapmirrorPoliciesGetParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorPoliciesGetParamsWithHTTPClient(client *http.Client) *SnapmirrorPoliciesGetParams { return &SnapmirrorPoliciesGetParams{ HTTPClient: client, } } /* SnapmirrorPoliciesGetParams contains all the parameters to send to the API endpoint for the snapmirror policies get operation. Typically these are written to a http.Request. */ type SnapmirrorPoliciesGetParams struct { /* Comment. Filter by comment */ Comment *string /* CopyAllSourceSnapshots. Filter by copy_all_source_snapshots */ CopyAllSourceSnapshots *bool /* CopyLatestSourceSnapshot. Filter by copy_latest_source_snapshot */ CopyLatestSourceSnapshot *bool /* CreateSnapshotOnSource. Filter by create_snapshot_on_source */ CreateSnapshotOnSource *bool /* Fields. Specify the fields to return. */ Fields []string /* IdentityPreservation. Filter by identity_preservation */ IdentityPreservation *string /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* Name. Filter by name */ Name *string /* NetworkCompressionEnabled. Filter by network_compression_enabled */ NetworkCompressionEnabled *bool /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* RetentionCount. Filter by retention.count */ RetentionCount *int64 /* RetentionCreationScheduleName. Filter by retention.creation_schedule.name */ RetentionCreationScheduleName *string /* RetentionCreationScheduleUUID. Filter by retention.creation_schedule.uuid */ RetentionCreationScheduleUUID *string /* RetentionLabel. Filter by retention.label */ RetentionLabel *string /* RetentionPeriod. Filter by retention.period */ RetentionPeriod *string /* RetentionPrefix. Filter by retention.prefix */ RetentionPrefix *string /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* Rpo. Filter by rpo */ Rpo *int64 /* Scope. Filter by scope */ Scope *string /* SvmName. Filter by svm.name */ SvmName *string /* SvmUUID. Filter by svm.uuid */ SvmUUID *string /* SyncCommonSnapshotScheduleName. Filter by sync_common_snapshot_schedule.name */ SyncCommonSnapshotScheduleName *string /* SyncCommonSnapshotScheduleUUID. Filter by sync_common_snapshot_schedule.uuid */ SyncCommonSnapshotScheduleUUID *string /* SyncType. Filter by sync_type */ SyncType *string /* Throttle. Filter by throttle */ Throttle *int64 /* TransferScheduleName. Filter by transfer_schedule.name */ TransferScheduleName *string /* TransferScheduleUUID. Filter by transfer_schedule.uuid */ TransferScheduleUUID *string /* Type. Filter by type */ Type *string /* UUID. Filter by uuid */ UUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror policies get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPoliciesGetParams) WithDefaults() *SnapmirrorPoliciesGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror policies get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPoliciesGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SnapmirrorPoliciesGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithTimeout(timeout time.Duration) *SnapmirrorPoliciesGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithContext(ctx context.Context) *SnapmirrorPoliciesGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithHTTPClient(client *http.Client) *SnapmirrorPoliciesGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithComment adds the comment to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithComment(comment *string) *SnapmirrorPoliciesGetParams { o.SetComment(comment) return o } // SetComment adds the comment to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetComment(comment *string) { o.Comment = comment } // WithCopyAllSourceSnapshots adds the copyAllSourceSnapshots to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithCopyAllSourceSnapshots(copyAllSourceSnapshots *bool) *SnapmirrorPoliciesGetParams { o.SetCopyAllSourceSnapshots(copyAllSourceSnapshots) return o } // SetCopyAllSourceSnapshots adds the copyAllSourceSnapshots to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetCopyAllSourceSnapshots(copyAllSourceSnapshots *bool) { o.CopyAllSourceSnapshots = copyAllSourceSnapshots } // WithCopyLatestSourceSnapshot adds the copyLatestSourceSnapshot to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithCopyLatestSourceSnapshot(copyLatestSourceSnapshot *bool) *SnapmirrorPoliciesGetParams { o.SetCopyLatestSourceSnapshot(copyLatestSourceSnapshot) return o } // SetCopyLatestSourceSnapshot adds the copyLatestSourceSnapshot to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetCopyLatestSourceSnapshot(copyLatestSourceSnapshot *bool) { o.CopyLatestSourceSnapshot = copyLatestSourceSnapshot } // WithCreateSnapshotOnSource adds the createSnapshotOnSource to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithCreateSnapshotOnSource(createSnapshotOnSource *bool) *SnapmirrorPoliciesGetParams { o.SetCreateSnapshotOnSource(createSnapshotOnSource) return o } // SetCreateSnapshotOnSource adds the createSnapshotOnSource to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetCreateSnapshotOnSource(createSnapshotOnSource *bool) { o.CreateSnapshotOnSource = createSnapshotOnSource } // WithFields adds the fields to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithFields(fields []string) *SnapmirrorPoliciesGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetFields(fields []string) { o.Fields = fields } // WithIdentityPreservation adds the identityPreservation to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithIdentityPreservation(identityPreservation *string) *SnapmirrorPoliciesGetParams { o.SetIdentityPreservation(identityPreservation) return o } // SetIdentityPreservation adds the identityPreservation to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetIdentityPreservation(identityPreservation *string) { o.IdentityPreservation = identityPreservation } // WithMaxRecords adds the maxRecords to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithMaxRecords(maxRecords *int64) *SnapmirrorPoliciesGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithName adds the name to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithName(name *string) *SnapmirrorPoliciesGetParams { o.SetName(name) return o } // SetName adds the name to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetName(name *string) { o.Name = name } // WithNetworkCompressionEnabled adds the networkCompressionEnabled to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithNetworkCompressionEnabled(networkCompressionEnabled *bool) *SnapmirrorPoliciesGetParams { o.SetNetworkCompressionEnabled(networkCompressionEnabled) return o } // SetNetworkCompressionEnabled adds the networkCompressionEnabled to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetNetworkCompressionEnabled(networkCompressionEnabled *bool) { o.NetworkCompressionEnabled = networkCompressionEnabled } // WithOrderBy adds the orderBy to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithOrderBy(orderBy []string) *SnapmirrorPoliciesGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithRetentionCount adds the retentionCount to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithRetentionCount(retentionCount *int64) *SnapmirrorPoliciesGetParams { o.SetRetentionCount(retentionCount) return o } // SetRetentionCount adds the retentionCount to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetRetentionCount(retentionCount *int64) { o.RetentionCount = retentionCount } // WithRetentionCreationScheduleName adds the retentionCreationScheduleName to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithRetentionCreationScheduleName(retentionCreationScheduleName *string) *SnapmirrorPoliciesGetParams { o.SetRetentionCreationScheduleName(retentionCreationScheduleName) return o } // SetRetentionCreationScheduleName adds the retentionCreationScheduleName to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetRetentionCreationScheduleName(retentionCreationScheduleName *string) { o.RetentionCreationScheduleName = retentionCreationScheduleName } // WithRetentionCreationScheduleUUID adds the retentionCreationScheduleUUID to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithRetentionCreationScheduleUUID(retentionCreationScheduleUUID *string) *SnapmirrorPoliciesGetParams { o.SetRetentionCreationScheduleUUID(retentionCreationScheduleUUID) return o } // SetRetentionCreationScheduleUUID adds the retentionCreationScheduleUuid to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetRetentionCreationScheduleUUID(retentionCreationScheduleUUID *string) { o.RetentionCreationScheduleUUID = retentionCreationScheduleUUID } // WithRetentionLabel adds the retentionLabel to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithRetentionLabel(retentionLabel *string) *SnapmirrorPoliciesGetParams { o.SetRetentionLabel(retentionLabel) return o } // SetRetentionLabel adds the retentionLabel to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetRetentionLabel(retentionLabel *string) { o.RetentionLabel = retentionLabel } // WithRetentionPeriod adds the retentionPeriod to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithRetentionPeriod(retentionPeriod *string) *SnapmirrorPoliciesGetParams { o.SetRetentionPeriod(retentionPeriod) return o } // SetRetentionPeriod adds the retentionPeriod to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetRetentionPeriod(retentionPeriod *string) { o.RetentionPeriod = retentionPeriod } // WithRetentionPrefix adds the retentionPrefix to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithRetentionPrefix(retentionPrefix *string) *SnapmirrorPoliciesGetParams { o.SetRetentionPrefix(retentionPrefix) return o } // SetRetentionPrefix adds the retentionPrefix to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetRetentionPrefix(retentionPrefix *string) { o.RetentionPrefix = retentionPrefix } // WithReturnRecords adds the returnRecords to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithReturnRecords(returnRecords *bool) *SnapmirrorPoliciesGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorPoliciesGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithRpo adds the rpo to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithRpo(rpo *int64) *SnapmirrorPoliciesGetParams { o.SetRpo(rpo) return o } // SetRpo adds the rpo to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetRpo(rpo *int64) { o.Rpo = rpo } // WithScope adds the scope to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithScope(scope *string) *SnapmirrorPoliciesGetParams { o.SetScope(scope) return o } // SetScope adds the scope to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetScope(scope *string) { o.Scope = scope } // WithSvmName adds the svmName to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithSvmName(svmName *string) *SnapmirrorPoliciesGetParams { o.SetSvmName(svmName) return o } // SetSvmName adds the svmName to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetSvmName(svmName *string) { o.SvmName = svmName } // WithSvmUUID adds the svmUUID to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithSvmUUID(svmUUID *string) *SnapmirrorPoliciesGetParams { o.SetSvmUUID(svmUUID) return o } // SetSvmUUID adds the svmUuid to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetSvmUUID(svmUUID *string) { o.SvmUUID = svmUUID } // WithSyncCommonSnapshotScheduleName adds the syncCommonSnapshotScheduleName to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithSyncCommonSnapshotScheduleName(syncCommonSnapshotScheduleName *string) *SnapmirrorPoliciesGetParams { o.SetSyncCommonSnapshotScheduleName(syncCommonSnapshotScheduleName) return o } // SetSyncCommonSnapshotScheduleName adds the syncCommonSnapshotScheduleName to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetSyncCommonSnapshotScheduleName(syncCommonSnapshotScheduleName *string) { o.SyncCommonSnapshotScheduleName = syncCommonSnapshotScheduleName } // WithSyncCommonSnapshotScheduleUUID adds the syncCommonSnapshotScheduleUUID to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithSyncCommonSnapshotScheduleUUID(syncCommonSnapshotScheduleUUID *string) *SnapmirrorPoliciesGetParams { o.SetSyncCommonSnapshotScheduleUUID(syncCommonSnapshotScheduleUUID) return o } // SetSyncCommonSnapshotScheduleUUID adds the syncCommonSnapshotScheduleUuid to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetSyncCommonSnapshotScheduleUUID(syncCommonSnapshotScheduleUUID *string) { o.SyncCommonSnapshotScheduleUUID = syncCommonSnapshotScheduleUUID } // WithSyncType adds the syncType to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithSyncType(syncType *string) *SnapmirrorPoliciesGetParams { o.SetSyncType(syncType) return o } // SetSyncType adds the syncType to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetSyncType(syncType *string) { o.SyncType = syncType } // WithThrottle adds the throttle to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithThrottle(throttle *int64) *SnapmirrorPoliciesGetParams { o.SetThrottle(throttle) return o } // SetThrottle adds the throttle to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetThrottle(throttle *int64) { o.Throttle = throttle } // WithTransferScheduleName adds the transferScheduleName to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithTransferScheduleName(transferScheduleName *string) *SnapmirrorPoliciesGetParams { o.SetTransferScheduleName(transferScheduleName) return o } // SetTransferScheduleName adds the transferScheduleName to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetTransferScheduleName(transferScheduleName *string) { o.TransferScheduleName = transferScheduleName } // WithTransferScheduleUUID adds the transferScheduleUUID to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithTransferScheduleUUID(transferScheduleUUID *string) *SnapmirrorPoliciesGetParams { o.SetTransferScheduleUUID(transferScheduleUUID) return o } // SetTransferScheduleUUID adds the transferScheduleUuid to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetTransferScheduleUUID(transferScheduleUUID *string) { o.TransferScheduleUUID = transferScheduleUUID } // WithType adds the typeVar to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithType(typeVar *string) *SnapmirrorPoliciesGetParams { o.SetType(typeVar) return o } // SetType adds the type to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetType(typeVar *string) { o.Type = typeVar } // WithUUID adds the uuid to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) WithUUID(uuid *string) *SnapmirrorPoliciesGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror policies get params func (o *SnapmirrorPoliciesGetParams) SetUUID(uuid *string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorPoliciesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Comment != nil { // query param comment var qrComment string if o.Comment != nil { qrComment = *o.Comment } qComment := qrComment if qComment != "" { if err := r.SetQueryParam("comment", qComment); err != nil { return err } } } if o.CopyAllSourceSnapshots != nil { // query param copy_all_source_snapshots var qrCopyAllSourceSnapshots bool if o.CopyAllSourceSnapshots != nil { qrCopyAllSourceSnapshots = *o.CopyAllSourceSnapshots } qCopyAllSourceSnapshots := swag.FormatBool(qrCopyAllSourceSnapshots) if qCopyAllSourceSnapshots != "" { if err := r.SetQueryParam("copy_all_source_snapshots", qCopyAllSourceSnapshots); err != nil { return err } } } if o.CopyLatestSourceSnapshot != nil { // query param copy_latest_source_snapshot var qrCopyLatestSourceSnapshot bool if o.CopyLatestSourceSnapshot != nil { qrCopyLatestSourceSnapshot = *o.CopyLatestSourceSnapshot } qCopyLatestSourceSnapshot := swag.FormatBool(qrCopyLatestSourceSnapshot) if qCopyLatestSourceSnapshot != "" { if err := r.SetQueryParam("copy_latest_source_snapshot", qCopyLatestSourceSnapshot); err != nil { return err } } } if o.CreateSnapshotOnSource != nil { // query param create_snapshot_on_source var qrCreateSnapshotOnSource bool if o.CreateSnapshotOnSource != nil { qrCreateSnapshotOnSource = *o.CreateSnapshotOnSource } qCreateSnapshotOnSource := swag.FormatBool(qrCreateSnapshotOnSource) if qCreateSnapshotOnSource != "" { if err := r.SetQueryParam("create_snapshot_on_source", qCreateSnapshotOnSource); err != nil { return err } } } if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } if o.IdentityPreservation != nil { // query param identity_preservation var qrIdentityPreservation string if o.IdentityPreservation != nil { qrIdentityPreservation = *o.IdentityPreservation } qIdentityPreservation := qrIdentityPreservation if qIdentityPreservation != "" { if err := r.SetQueryParam("identity_preservation", qIdentityPreservation); err != nil { return err } } } if o.MaxRecords != nil { // query param max_records var qrMaxRecords int64 if o.MaxRecords != nil { qrMaxRecords = *o.MaxRecords } qMaxRecords := swag.FormatInt64(qrMaxRecords) if qMaxRecords != "" { if err := r.SetQueryParam("max_records", qMaxRecords); err != nil { return err } } } if o.Name != nil { // query param name var qrName string if o.Name != nil { qrName = *o.Name } qName := qrName if qName != "" { if err := r.SetQueryParam("name", qName); err != nil { return err } } } if o.NetworkCompressionEnabled != nil { // query param network_compression_enabled var qrNetworkCompressionEnabled bool if o.NetworkCompressionEnabled != nil { qrNetworkCompressionEnabled = *o.NetworkCompressionEnabled } qNetworkCompressionEnabled := swag.FormatBool(qrNetworkCompressionEnabled) if qNetworkCompressionEnabled != "" { if err := r.SetQueryParam("network_compression_enabled", qNetworkCompressionEnabled); err != nil { return err } } } if o.OrderBy != nil { // binding items for order_by joinedOrderBy := o.bindParamOrderBy(reg) // query array param order_by if err := r.SetQueryParam("order_by", joinedOrderBy...); err != nil { return err } } if o.RetentionCount != nil { // query param retention.count var qrRetentionCount int64 if o.RetentionCount != nil { qrRetentionCount = *o.RetentionCount } qRetentionCount := swag.FormatInt64(qrRetentionCount) if qRetentionCount != "" { if err := r.SetQueryParam("retention.count", qRetentionCount); err != nil { return err } } } if o.RetentionCreationScheduleName != nil { // query param retention.creation_schedule.name var qrRetentionCreationScheduleName string if o.RetentionCreationScheduleName != nil { qrRetentionCreationScheduleName = *o.RetentionCreationScheduleName } qRetentionCreationScheduleName := qrRetentionCreationScheduleName if qRetentionCreationScheduleName != "" { if err := r.SetQueryParam("retention.creation_schedule.name", qRetentionCreationScheduleName); err != nil { return err } } } if o.RetentionCreationScheduleUUID != nil { // query param retention.creation_schedule.uuid var qrRetentionCreationScheduleUUID string if o.RetentionCreationScheduleUUID != nil { qrRetentionCreationScheduleUUID = *o.RetentionCreationScheduleUUID } qRetentionCreationScheduleUUID := qrRetentionCreationScheduleUUID if qRetentionCreationScheduleUUID != "" { if err := r.SetQueryParam("retention.creation_schedule.uuid", qRetentionCreationScheduleUUID); err != nil { return err } } } if o.RetentionLabel != nil { // query param retention.label var qrRetentionLabel string if o.RetentionLabel != nil { qrRetentionLabel = *o.RetentionLabel } qRetentionLabel := qrRetentionLabel if qRetentionLabel != "" { if err := r.SetQueryParam("retention.label", qRetentionLabel); err != nil { return err } } } if o.RetentionPeriod != nil { // query param retention.period var qrRetentionPeriod string if o.RetentionPeriod != nil { qrRetentionPeriod = *o.RetentionPeriod } qRetentionPeriod := qrRetentionPeriod if qRetentionPeriod != "" { if err := r.SetQueryParam("retention.period", qRetentionPeriod); err != nil { return err } } } if o.RetentionPrefix != nil { // query param retention.prefix var qrRetentionPrefix string if o.RetentionPrefix != nil { qrRetentionPrefix = *o.RetentionPrefix } qRetentionPrefix := qrRetentionPrefix if qRetentionPrefix != "" { if err := r.SetQueryParam("retention.prefix", qRetentionPrefix); err != nil { return err } } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if o.Rpo != nil { // query param rpo var qrRpo int64 if o.Rpo != nil { qrRpo = *o.Rpo } qRpo := swag.FormatInt64(qrRpo) if qRpo != "" { if err := r.SetQueryParam("rpo", qRpo); err != nil { return err } } } if o.Scope != nil { // query param scope var qrScope string if o.Scope != nil { qrScope = *o.Scope } qScope := qrScope if qScope != "" { if err := r.SetQueryParam("scope", qScope); err != nil { return err } } } if o.SvmName != nil { // query param svm.name var qrSvmName string if o.SvmName != nil { qrSvmName = *o.SvmName } qSvmName := qrSvmName if qSvmName != "" { if err := r.SetQueryParam("svm.name", qSvmName); err != nil { return err } } } if o.SvmUUID != nil { // query param svm.uuid var qrSvmUUID string if o.SvmUUID != nil { qrSvmUUID = *o.SvmUUID } qSvmUUID := qrSvmUUID if qSvmUUID != "" { if err := r.SetQueryParam("svm.uuid", qSvmUUID); err != nil { return err } } } if o.SyncCommonSnapshotScheduleName != nil { // query param sync_common_snapshot_schedule.name var qrSyncCommonSnapshotScheduleName string if o.SyncCommonSnapshotScheduleName != nil { qrSyncCommonSnapshotScheduleName = *o.SyncCommonSnapshotScheduleName } qSyncCommonSnapshotScheduleName := qrSyncCommonSnapshotScheduleName if qSyncCommonSnapshotScheduleName != "" { if err := r.SetQueryParam("sync_common_snapshot_schedule.name", qSyncCommonSnapshotScheduleName); err != nil { return err } } } if o.SyncCommonSnapshotScheduleUUID != nil { // query param sync_common_snapshot_schedule.uuid var qrSyncCommonSnapshotScheduleUUID string if o.SyncCommonSnapshotScheduleUUID != nil { qrSyncCommonSnapshotScheduleUUID = *o.SyncCommonSnapshotScheduleUUID } qSyncCommonSnapshotScheduleUUID := qrSyncCommonSnapshotScheduleUUID if qSyncCommonSnapshotScheduleUUID != "" { if err := r.SetQueryParam("sync_common_snapshot_schedule.uuid", qSyncCommonSnapshotScheduleUUID); err != nil { return err } } } if o.SyncType != nil { // query param sync_type var qrSyncType string if o.SyncType != nil { qrSyncType = *o.SyncType } qSyncType := qrSyncType if qSyncType != "" { if err := r.SetQueryParam("sync_type", qSyncType); err != nil { return err } } } if o.Throttle != nil { // query param throttle var qrThrottle int64 if o.Throttle != nil { qrThrottle = *o.Throttle } qThrottle := swag.FormatInt64(qrThrottle) if qThrottle != "" { if err := r.SetQueryParam("throttle", qThrottle); err != nil { return err } } } if o.TransferScheduleName != nil { // query param transfer_schedule.name var qrTransferScheduleName string if o.TransferScheduleName != nil { qrTransferScheduleName = *o.TransferScheduleName } qTransferScheduleName := qrTransferScheduleName if qTransferScheduleName != "" { if err := r.SetQueryParam("transfer_schedule.name", qTransferScheduleName); err != nil { return err } } } if o.TransferScheduleUUID != nil { // query param transfer_schedule.uuid var qrTransferScheduleUUID string if o.TransferScheduleUUID != nil { qrTransferScheduleUUID = *o.TransferScheduleUUID } qTransferScheduleUUID := qrTransferScheduleUUID if qTransferScheduleUUID != "" { if err := r.SetQueryParam("transfer_schedule.uuid", qTransferScheduleUUID); 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 o.UUID != nil { // query param uuid var qrUUID string if o.UUID != nil { qrUUID = *o.UUID } qUUID := qrUUID if qUUID != "" { if err := r.SetQueryParam("uuid", qUUID); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSnapmirrorPoliciesGet binds the parameter fields func (o *SnapmirrorPoliciesGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS } // bindParamSnapmirrorPoliciesGet binds the parameter order_by func (o *SnapmirrorPoliciesGetParams) bindParamOrderBy(formats strfmt.Registry) []string { orderByIR := o.OrderBy var orderByIC []string for _, orderByIIR := range orderByIR { // explode []string orderByIIV := orderByIIR // string as string orderByIC = append(orderByIC, orderByIIV) } // items.CollectionFormat: "csv" orderByIS := swag.JoinByFormat(orderByIC, "csv") return orderByIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSnapmirrorPolicyGetParams creates a new SnapmirrorPolicyGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorPolicyGetParams() *SnapmirrorPolicyGetParams { return &SnapmirrorPolicyGetParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorPolicyGetParamsWithTimeout creates a new SnapmirrorPolicyGetParams object // with the ability to set a timeout on a request. func NewSnapmirrorPolicyGetParamsWithTimeout(timeout time.Duration) *SnapmirrorPolicyGetParams { return &SnapmirrorPolicyGetParams{ timeout: timeout, } } // NewSnapmirrorPolicyGetParamsWithContext creates a new SnapmirrorPolicyGetParams object // with the ability to set a context for a request. func NewSnapmirrorPolicyGetParamsWithContext(ctx context.Context) *SnapmirrorPolicyGetParams { return &SnapmirrorPolicyGetParams{ Context: ctx, } } // NewSnapmirrorPolicyGetParamsWithHTTPClient creates a new SnapmirrorPolicyGetParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorPolicyGetParamsWithHTTPClient(client *http.Client) *SnapmirrorPolicyGetParams { return &SnapmirrorPolicyGetParams{ HTTPClient: client, } } /* SnapmirrorPolicyGetParams contains all the parameters to send to the API endpoint for the snapmirror policy get operation. Typically these are written to a http.Request. */ type SnapmirrorPolicyGetParams struct { /* Fields. Specify the fields to return. */ Fields []string /* UUID. Policy UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror policy get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPolicyGetParams) WithDefaults() *SnapmirrorPolicyGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror policy get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPolicyGetParams) SetDefaults() { // no default values defined for this parameter } // WithTimeout adds the timeout to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) WithTimeout(timeout time.Duration) *SnapmirrorPolicyGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) WithContext(ctx context.Context) *SnapmirrorPolicyGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) WithHTTPClient(client *http.Client) *SnapmirrorPolicyGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithFields adds the fields to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) WithFields(fields []string) *SnapmirrorPolicyGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) SetFields(fields []string) { o.Fields = fields } // WithUUID adds the uuid to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) WithUUID(uuid string) *SnapmirrorPolicyGetParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror policy get params func (o *SnapmirrorPolicyGetParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorPolicyGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Fields != nil { // binding items for fields joinedFields := o.bindParamFields(reg) // query array param fields if err := r.SetQueryParam("fields", joinedFields...); err != nil { return err } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } // bindParamSnapmirrorPolicyGet binds the parameter fields func (o *SnapmirrorPolicyGetParams) bindParamFields(formats strfmt.Registry) []string { fieldsIR := o.Fields var fieldsIC []string for _, fieldsIIR := range fieldsIR { // explode []string fieldsIIV := fieldsIIR // string as string fieldsIC = append(fieldsIC, fieldsIIV) } // items.CollectionFormat: "csv" fieldsIS := swag.JoinByFormat(fieldsIC, "csv") return fieldsIS }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_modify_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_modify_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSnapmirrorPolicyModifyParams creates a new SnapmirrorPolicyModifyParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorPolicyModifyParams() *SnapmirrorPolicyModifyParams { return &SnapmirrorPolicyModifyParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorPolicyModifyParamsWithTimeout creates a new SnapmirrorPolicyModifyParams object // with the ability to set a timeout on a request. func NewSnapmirrorPolicyModifyParamsWithTimeout(timeout time.Duration) *SnapmirrorPolicyModifyParams { return &SnapmirrorPolicyModifyParams{ timeout: timeout, } } // NewSnapmirrorPolicyModifyParamsWithContext creates a new SnapmirrorPolicyModifyParams object // with the ability to set a context for a request. func NewSnapmirrorPolicyModifyParamsWithContext(ctx context.Context) *SnapmirrorPolicyModifyParams { return &SnapmirrorPolicyModifyParams{ Context: ctx, } } // NewSnapmirrorPolicyModifyParamsWithHTTPClient creates a new SnapmirrorPolicyModifyParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorPolicyModifyParamsWithHTTPClient(client *http.Client) *SnapmirrorPolicyModifyParams { return &SnapmirrorPolicyModifyParams{ HTTPClient: client, } } /* SnapmirrorPolicyModifyParams contains all the parameters to send to the API endpoint for the snapmirror policy modify operation. Typically these are written to a http.Request. */ type SnapmirrorPolicyModifyParams struct { /* Info. Information on the SnapMirror policy */ Info *models.SnapmirrorPolicy /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 /* UUID. Policy UUID */ UUID string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror policy modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPolicyModifyParams) WithDefaults() *SnapmirrorPolicyModifyParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror policy modify params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPolicyModifyParams) SetDefaults() { var ( returnTimeoutDefault = int64(0) ) val := SnapmirrorPolicyModifyParams{ ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) WithTimeout(timeout time.Duration) *SnapmirrorPolicyModifyParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) WithContext(ctx context.Context) *SnapmirrorPolicyModifyParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) WithHTTPClient(client *http.Client) *SnapmirrorPolicyModifyParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) WithInfo(info *models.SnapmirrorPolicy) *SnapmirrorPolicyModifyParams { o.SetInfo(info) return o } // SetInfo adds the info to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) SetInfo(info *models.SnapmirrorPolicy) { o.Info = info } // WithReturnTimeout adds the returnTimeout to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorPolicyModifyParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithUUID adds the uuid to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) WithUUID(uuid string) *SnapmirrorPolicyModifyParams { o.SetUUID(uuid) return o } // SetUUID adds the uuid to the snapmirror policy modify params func (o *SnapmirrorPolicyModifyParams) SetUUID(uuid string) { o.UUID = uuid } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorPolicyModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } // path param uuid if err := r.SetPathParam("uuid", o.UUID); err != nil { return err } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_create_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_create_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSnapmirrorRelationshipTransferCreateParams creates a new SnapmirrorRelationshipTransferCreateParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipTransferCreateParams() *SnapmirrorRelationshipTransferCreateParams { return &SnapmirrorRelationshipTransferCreateParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipTransferCreateParamsWithTimeout creates a new SnapmirrorRelationshipTransferCreateParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipTransferCreateParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipTransferCreateParams { return &SnapmirrorRelationshipTransferCreateParams{ timeout: timeout, } } // NewSnapmirrorRelationshipTransferCreateParamsWithContext creates a new SnapmirrorRelationshipTransferCreateParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipTransferCreateParamsWithContext(ctx context.Context) *SnapmirrorRelationshipTransferCreateParams { return &SnapmirrorRelationshipTransferCreateParams{ Context: ctx, } } // NewSnapmirrorRelationshipTransferCreateParamsWithHTTPClient creates a new SnapmirrorRelationshipTransferCreateParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipTransferCreateParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipTransferCreateParams { return &SnapmirrorRelationshipTransferCreateParams{ HTTPClient: client, } } /* SnapmirrorRelationshipTransferCreateParams contains all the parameters to send to the API endpoint for the snapmirror relationship transfer create operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipTransferCreateParams struct { /* Info. Information on the SnapMirror transfer */ Info *models.SnapmirrorTransfer /* RelationshipUUID. Relationship UUID */ RelationshipUUID string /* ReturnRecords. The default is false. If set to true, the records are returned. */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationship transfer create params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipTransferCreateParams) WithDefaults() *SnapmirrorRelationshipTransferCreateParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationship transfer create params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipTransferCreateParams) SetDefaults() { var ( returnRecordsDefault = bool(false) returnTimeoutDefault = int64(0) ) val := SnapmirrorRelationshipTransferCreateParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipTransferCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) WithContext(ctx context.Context) *SnapmirrorRelationshipTransferCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipTransferCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) WithInfo(info *models.SnapmirrorTransfer) *SnapmirrorRelationshipTransferCreateParams { o.SetInfo(info) return o } // SetInfo adds the info to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) SetInfo(info *models.SnapmirrorTransfer) { o.Info = info } // WithRelationshipUUID adds the relationshipUUID to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) WithRelationshipUUID(relationshipUUID string) *SnapmirrorRelationshipTransferCreateParams { o.SetRelationshipUUID(relationshipUUID) return o } // SetRelationshipUUID adds the relationshipUuid to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) SetRelationshipUUID(relationshipUUID string) { o.RelationshipUUID = relationshipUUID } // WithReturnRecords adds the returnRecords to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) WithReturnRecords(returnRecords *bool) *SnapmirrorRelationshipTransferCreateParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorRelationshipTransferCreateParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror relationship transfer create params func (o *SnapmirrorRelationshipTransferCreateParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorRelationshipTransferCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } // path param relationship.uuid if err := r.SetPathParam("relationship.uuid", o.RelationshipUUID); err != nil { return err } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipGetReader is a Reader for the SnapmirrorRelationshipGet structure. type SnapmirrorRelationshipGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSnapmirrorRelationshipGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipGetDefault(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 } } // NewSnapmirrorRelationshipGetOK creates a SnapmirrorRelationshipGetOK with default headers values func NewSnapmirrorRelationshipGetOK() *SnapmirrorRelationshipGetOK { return &SnapmirrorRelationshipGetOK{} } /* SnapmirrorRelationshipGetOK describes a response with status code 200, with default header values. OK */ type SnapmirrorRelationshipGetOK struct { Payload *models.SnapmirrorRelationship } // IsSuccess returns true when this snapmirror relationship get o k response has a 2xx status code func (o *SnapmirrorRelationshipGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationship get o k response has a 3xx status code func (o *SnapmirrorRelationshipGetOK) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationship get o k response has a 4xx status code func (o *SnapmirrorRelationshipGetOK) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationship get o k response has a 5xx status code func (o *SnapmirrorRelationshipGetOK) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationship get o k response a status code equal to that given func (o *SnapmirrorRelationshipGetOK) IsCode(code int) bool { return code == 200 } func (o *SnapmirrorRelationshipGetOK) Error() string { return fmt.Sprintf("[GET /snapmirror/relationships/{uuid}][%d] snapmirrorRelationshipGetOK %+v", 200, o.Payload) } func (o *SnapmirrorRelationshipGetOK) String() string { return fmt.Sprintf("[GET /snapmirror/relationships/{uuid}][%d] snapmirrorRelationshipGetOK %+v", 200, o.Payload) } func (o *SnapmirrorRelationshipGetOK) GetPayload() *models.SnapmirrorRelationship { return o.Payload } func (o *SnapmirrorRelationshipGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SnapmirrorRelationship) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorRelationshipGetDefault creates a SnapmirrorRelationshipGetDefault with default headers values func NewSnapmirrorRelationshipGetDefault(code int) *SnapmirrorRelationshipGetDefault { return &SnapmirrorRelationshipGetDefault{ _statusCode: code, } } /* SnapmirrorRelationshipGetDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 13303825 | Could not retrieve information for the SnapMirror policy type | | 13303817 | Unknown value for the Snapmirror State | */ type SnapmirrorRelationshipGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationship get default response func (o *SnapmirrorRelationshipGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationship get default response has a 2xx status code func (o *SnapmirrorRelationshipGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationship get default response has a 3xx status code func (o *SnapmirrorRelationshipGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationship get default response has a 4xx status code func (o *SnapmirrorRelationshipGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationship get default response has a 5xx status code func (o *SnapmirrorRelationshipGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationship get default response a status code equal to that given func (o *SnapmirrorRelationshipGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipGetDefault) Error() string { return fmt.Sprintf("[GET /snapmirror/relationships/{uuid}][%d] snapmirror_relationship_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipGetDefault) String() string { return fmt.Sprintf("[GET /snapmirror/relationships/{uuid}][%d] snapmirror_relationship_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfers_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfers_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipTransfersGetReader is a Reader for the SnapmirrorRelationshipTransfersGet structure. type SnapmirrorRelationshipTransfersGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipTransfersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSnapmirrorRelationshipTransfersGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipTransfersGetDefault(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 } } // NewSnapmirrorRelationshipTransfersGetOK creates a SnapmirrorRelationshipTransfersGetOK with default headers values func NewSnapmirrorRelationshipTransfersGetOK() *SnapmirrorRelationshipTransfersGetOK { return &SnapmirrorRelationshipTransfersGetOK{} } /* SnapmirrorRelationshipTransfersGetOK describes a response with status code 200, with default header values. OK */ type SnapmirrorRelationshipTransfersGetOK struct { Payload *models.SnapmirrorTransferResponse } // IsSuccess returns true when this snapmirror relationship transfers get o k response has a 2xx status code func (o *SnapmirrorRelationshipTransfersGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationship transfers get o k response has a 3xx status code func (o *SnapmirrorRelationshipTransfersGetOK) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationship transfers get o k response has a 4xx status code func (o *SnapmirrorRelationshipTransfersGetOK) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationship transfers get o k response has a 5xx status code func (o *SnapmirrorRelationshipTransfersGetOK) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationship transfers get o k response a status code equal to that given func (o *SnapmirrorRelationshipTransfersGetOK) IsCode(code int) bool { return code == 200 } func (o *SnapmirrorRelationshipTransfersGetOK) Error() string { return fmt.Sprintf("[GET /snapmirror/relationships/{relationship.uuid}/transfers][%d] snapmirrorRelationshipTransfersGetOK %+v", 200, o.Payload) } func (o *SnapmirrorRelationshipTransfersGetOK) String() string { return fmt.Sprintf("[GET /snapmirror/relationships/{relationship.uuid}/transfers][%d] snapmirrorRelationshipTransfersGetOK %+v", 200, o.Payload) } func (o *SnapmirrorRelationshipTransfersGetOK) GetPayload() *models.SnapmirrorTransferResponse { return o.Payload } func (o *SnapmirrorRelationshipTransfersGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SnapmirrorTransferResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorRelationshipTransfersGetDefault creates a SnapmirrorRelationshipTransfersGetDefault with default headers values func NewSnapmirrorRelationshipTransfersGetDefault(code int) *SnapmirrorRelationshipTransfersGetDefault { return &SnapmirrorRelationshipTransfersGetDefault{ _statusCode: code, } } /* SnapmirrorRelationshipTransfersGetDefault describes a response with status code -1, with default header values. Error */ type SnapmirrorRelationshipTransfersGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationship transfers get default response func (o *SnapmirrorRelationshipTransfersGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationship transfers get default response has a 2xx status code func (o *SnapmirrorRelationshipTransfersGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationship transfers get default response has a 3xx status code func (o *SnapmirrorRelationshipTransfersGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationship transfers get default response has a 4xx status code func (o *SnapmirrorRelationshipTransfersGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationship transfers get default response has a 5xx status code func (o *SnapmirrorRelationshipTransfersGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationship transfers get default response a status code equal to that given func (o *SnapmirrorRelationshipTransfersGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipTransfersGetDefault) Error() string { return fmt.Sprintf("[GET /snapmirror/relationships/{relationship.uuid}/transfers][%d] snapmirror_relationship_transfers_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipTransfersGetDefault) String() string { return fmt.Sprintf("[GET /snapmirror/relationships/{relationship.uuid}/transfers][%d] snapmirror_relationship_transfers_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipTransfersGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipTransfersGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policies_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policies_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorPoliciesGetReader is a Reader for the SnapmirrorPoliciesGet structure. type SnapmirrorPoliciesGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorPoliciesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSnapmirrorPoliciesGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorPoliciesGetDefault(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 } } // NewSnapmirrorPoliciesGetOK creates a SnapmirrorPoliciesGetOK with default headers values func NewSnapmirrorPoliciesGetOK() *SnapmirrorPoliciesGetOK { return &SnapmirrorPoliciesGetOK{} } /* SnapmirrorPoliciesGetOK describes a response with status code 200, with default header values. OK */ type SnapmirrorPoliciesGetOK struct { Payload *models.SnapmirrorPolicyResponse } // IsSuccess returns true when this snapmirror policies get o k response has a 2xx status code func (o *SnapmirrorPoliciesGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror policies get o k response has a 3xx status code func (o *SnapmirrorPoliciesGetOK) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror policies get o k response has a 4xx status code func (o *SnapmirrorPoliciesGetOK) IsClientError() bool { return false } // IsServerError returns true when this snapmirror policies get o k response has a 5xx status code func (o *SnapmirrorPoliciesGetOK) IsServerError() bool { return false } // IsCode returns true when this snapmirror policies get o k response a status code equal to that given func (o *SnapmirrorPoliciesGetOK) IsCode(code int) bool { return code == 200 } func (o *SnapmirrorPoliciesGetOK) Error() string { return fmt.Sprintf("[GET /snapmirror/policies][%d] snapmirrorPoliciesGetOK %+v", 200, o.Payload) } func (o *SnapmirrorPoliciesGetOK) String() string { return fmt.Sprintf("[GET /snapmirror/policies][%d] snapmirrorPoliciesGetOK %+v", 200, o.Payload) } func (o *SnapmirrorPoliciesGetOK) GetPayload() *models.SnapmirrorPolicyResponse { return o.Payload } func (o *SnapmirrorPoliciesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SnapmirrorPolicyResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorPoliciesGetDefault creates a SnapmirrorPoliciesGetDefault with default headers values func NewSnapmirrorPoliciesGetDefault(code int) *SnapmirrorPoliciesGetDefault { return &SnapmirrorPoliciesGetDefault{ _statusCode: code, } } /* SnapmirrorPoliciesGetDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 13303842 | SnapMirror policy is not supported.| */ type SnapmirrorPoliciesGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror policies get default response func (o *SnapmirrorPoliciesGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror policies get default response has a 2xx status code func (o *SnapmirrorPoliciesGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror policies get default response has a 3xx status code func (o *SnapmirrorPoliciesGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror policies get default response has a 4xx status code func (o *SnapmirrorPoliciesGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror policies get default response has a 5xx status code func (o *SnapmirrorPoliciesGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror policies get default response a status code equal to that given func (o *SnapmirrorPoliciesGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorPoliciesGetDefault) Error() string { return fmt.Sprintf("[GET /snapmirror/policies][%d] snapmirror_policies_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPoliciesGetDefault) String() string { return fmt.Sprintf("[GET /snapmirror/policies][%d] snapmirror_policies_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPoliciesGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorPoliciesGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_modify_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_modify_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorPolicyModifyReader is a Reader for the SnapmirrorPolicyModify structure. type SnapmirrorPolicyModifyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorPolicyModifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSnapmirrorPolicyModifyAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorPolicyModifyDefault(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 } } // NewSnapmirrorPolicyModifyAccepted creates a SnapmirrorPolicyModifyAccepted with default headers values func NewSnapmirrorPolicyModifyAccepted() *SnapmirrorPolicyModifyAccepted { return &SnapmirrorPolicyModifyAccepted{} } /* SnapmirrorPolicyModifyAccepted describes a response with status code 202, with default header values. Accepted */ type SnapmirrorPolicyModifyAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this snapmirror policy modify accepted response has a 2xx status code func (o *SnapmirrorPolicyModifyAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror policy modify accepted response has a 3xx status code func (o *SnapmirrorPolicyModifyAccepted) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror policy modify accepted response has a 4xx status code func (o *SnapmirrorPolicyModifyAccepted) IsClientError() bool { return false } // IsServerError returns true when this snapmirror policy modify accepted response has a 5xx status code func (o *SnapmirrorPolicyModifyAccepted) IsServerError() bool { return false } // IsCode returns true when this snapmirror policy modify accepted response a status code equal to that given func (o *SnapmirrorPolicyModifyAccepted) IsCode(code int) bool { return code == 202 } func (o *SnapmirrorPolicyModifyAccepted) Error() string { return fmt.Sprintf("[PATCH /snapmirror/policies/{uuid}][%d] snapmirrorPolicyModifyAccepted %+v", 202, o.Payload) } func (o *SnapmirrorPolicyModifyAccepted) String() string { return fmt.Sprintf("[PATCH /snapmirror/policies/{uuid}][%d] snapmirrorPolicyModifyAccepted %+v", 202, o.Payload) } func (o *SnapmirrorPolicyModifyAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SnapmirrorPolicyModifyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorPolicyModifyDefault creates a SnapmirrorPolicyModifyDefault with default headers values func NewSnapmirrorPolicyModifyDefault(code int) *SnapmirrorPolicyModifyDefault { return &SnapmirrorPolicyModifyDefault{ _statusCode: code, } } /* SnapmirrorPolicyModifyDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 6619714 | Schedule specified is an interval schedule. SnapMirror does not support interval schedules. | | 13303842 | SnapMirror policy is not supported.| | 13303843 | Conflicting values between SnapMirror policy and SnapMirror relationships for either 'transfer_schedule, throttle or identity_preservation' properties | | 13303850 | Invalid input parameter | | 13303887 | Failed to create SnapMirror policy. Reason: Maximum number of allowed retention rules reached | | 13304050 | Retention cannot be empty for a SnapMirror policy with 'create_snapshot_on_source' set to false. | | 13304092 | Input value of the retention period property is invalid. For relationships with FlexVol volume or FlexGroup volume destinations, the duration must be in ISO 6801 format or can be infinite. For relationships with object store destinations, only duration values with Y, M or D and supported and must be in the specified range. | */ type SnapmirrorPolicyModifyDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror policy modify default response func (o *SnapmirrorPolicyModifyDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror policy modify default response has a 2xx status code func (o *SnapmirrorPolicyModifyDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror policy modify default response has a 3xx status code func (o *SnapmirrorPolicyModifyDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror policy modify default response has a 4xx status code func (o *SnapmirrorPolicyModifyDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror policy modify default response has a 5xx status code func (o *SnapmirrorPolicyModifyDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror policy modify default response a status code equal to that given func (o *SnapmirrorPolicyModifyDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorPolicyModifyDefault) Error() string { return fmt.Sprintf("[PATCH /snapmirror/policies/{uuid}][%d] snapmirror_policy_modify default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPolicyModifyDefault) String() string { return fmt.Sprintf("[PATCH /snapmirror/policies/{uuid}][%d] snapmirror_policy_modify default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPolicyModifyDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorPolicyModifyDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationships_get_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationships_get_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" ) // NewSnapmirrorRelationshipsGetParams creates a new SnapmirrorRelationshipsGetParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorRelationshipsGetParams() *SnapmirrorRelationshipsGetParams { return &SnapmirrorRelationshipsGetParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorRelationshipsGetParamsWithTimeout creates a new SnapmirrorRelationshipsGetParams object // with the ability to set a timeout on a request. func NewSnapmirrorRelationshipsGetParamsWithTimeout(timeout time.Duration) *SnapmirrorRelationshipsGetParams { return &SnapmirrorRelationshipsGetParams{ timeout: timeout, } } // NewSnapmirrorRelationshipsGetParamsWithContext creates a new SnapmirrorRelationshipsGetParams object // with the ability to set a context for a request. func NewSnapmirrorRelationshipsGetParamsWithContext(ctx context.Context) *SnapmirrorRelationshipsGetParams { return &SnapmirrorRelationshipsGetParams{ Context: ctx, } } // NewSnapmirrorRelationshipsGetParamsWithHTTPClient creates a new SnapmirrorRelationshipsGetParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorRelationshipsGetParamsWithHTTPClient(client *http.Client) *SnapmirrorRelationshipsGetParams { return &SnapmirrorRelationshipsGetParams{ HTTPClient: client, } } /* SnapmirrorRelationshipsGetParams contains all the parameters to send to the API endpoint for the snapmirror relationships get operation. Typically these are written to a http.Request. */ type SnapmirrorRelationshipsGetParams struct { /* ConsistencyGroupFailoverErrorArgumentsCode. Filter by consistency_group_failover.error.arguments.code */ ConsistencyGroupFailoverErrorArgumentsCode *string /* ConsistencyGroupFailoverErrorArgumentsMessage. Filter by consistency_group_failover.error.arguments.message */ ConsistencyGroupFailoverErrorArgumentsMessage *string /* ConsistencyGroupFailoverErrorCode. Filter by consistency_group_failover.error.code */ ConsistencyGroupFailoverErrorCode *string /* ConsistencyGroupFailoverErrorMessage. Filter by consistency_group_failover.error.message */ ConsistencyGroupFailoverErrorMessage *string /* ConsistencyGroupFailoverErrorTarget. Filter by consistency_group_failover.error.target */ ConsistencyGroupFailoverErrorTarget *string /* ConsistencyGroupFailoverStatusCode. Filter by consistency_group_failover.status.code */ ConsistencyGroupFailoverStatusCode *string /* ConsistencyGroupFailoverStatusMessage. Filter by consistency_group_failover.status.message */ ConsistencyGroupFailoverStatusMessage *string /* DestinationClusterName. Filter by destination.cluster.name */ DestinationClusterName *string /* DestinationClusterUUID. Filter by destination.cluster.uuid */ DestinationClusterUUID *string /* DestinationConsistencyGroupVolumesName. Filter by destination.consistency_group_volumes.name */ DestinationConsistencyGroupVolumesName *string /* DestinationPath. Filter by destination.path */ DestinationPath *string /* DestinationSvmName. Filter by destination.svm.name */ DestinationSvmName *string /* DestinationSvmUUID. Filter by destination.svm.uuid */ DestinationSvmUUID *string /* DestinationUUID. Filter by destination.uuid */ DestinationUUID *string /* ExportedSnapshot. Filter by exported_snapshot */ ExportedSnapshot *string /* Fields. Specify the fields to return. */ Fields []string /* GroupType. Filter by group_type */ GroupType *string /* Healthy. Filter by healthy */ Healthy *bool /* IdentityPreservation. Filter by identity_preservation */ IdentityPreservation *string /* LagTime. Filter by lag_time */ LagTime *string /* LastTransferType. Filter by last_transfer_type */ LastTransferType *string /* ListDestinationsOnly. Set to true to show relationships from the source only. */ ListDestinationsOnly *bool /* MaxRecords. Limit the number of records returned. */ MaxRecords *int64 /* OrderBy. Order results by specified fields and optional [asc|desc] direction. Default direction is 'asc' for ascending. */ OrderBy []string /* PolicyName. Filter by policy.name */ PolicyName *string /* PolicyType. Filter by policy.type */ PolicyType *string /* PolicyUUID. Filter by policy.uuid */ PolicyUUID *string /* Restore. Filter by restore */ Restore *bool /* ReturnRecords. The default is true for GET calls. When set to false, only the number of records is returned. Default: true */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached. Default: 15 */ ReturnTimeout *int64 /* SourceClusterName. Filter by source.cluster.name */ SourceClusterName *string /* SourceClusterUUID. Filter by source.cluster.uuid */ SourceClusterUUID *string /* SourceConsistencyGroupVolumesName. Filter by source.consistency_group_volumes.name */ SourceConsistencyGroupVolumesName *string /* SourcePath. Filter by source.path */ SourcePath *string /* SourceSvmName. Filter by source.svm.name */ SourceSvmName *string /* SourceSvmUUID. Filter by source.svm.uuid */ SourceSvmUUID *string /* SourceUUID. Filter by source.uuid */ SourceUUID *string /* State. Filter by state */ State *string /* Throttle. Filter by throttle */ Throttle *int64 /* TransferBytesTransferred. Filter by transfer.bytes_transferred */ TransferBytesTransferred *int64 /* TransferEndTime. Filter by transfer.end_time */ TransferEndTime *string /* TransferState. Filter by transfer.state */ TransferState *string /* TransferTotalDuration. Filter by transfer.total_duration */ TransferTotalDuration *string /* TransferUUID. Filter by transfer.uuid */ TransferUUID *string /* TransferScheduleName. Filter by transfer_schedule.name */ TransferScheduleName *string /* TransferScheduleUUID. Filter by transfer_schedule.uuid */ TransferScheduleUUID *string /* UnhealthyReasonCode. Filter by unhealthy_reason.code */ UnhealthyReasonCode *int64 /* UnhealthyReasonMessage. Filter by unhealthy_reason.message */ UnhealthyReasonMessage *string /* UnhealthyReasonParameters. Filter by unhealthy_reason.parameters */ UnhealthyReasonParameters *string /* UUID. Filter by uuid */ UUID *string timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror relationships get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipsGetParams) WithDefaults() *SnapmirrorRelationshipsGetParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror relationships get params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorRelationshipsGetParams) SetDefaults() { var ( returnRecordsDefault = bool(true) returnTimeoutDefault = int64(15) ) val := SnapmirrorRelationshipsGetParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithTimeout(timeout time.Duration) *SnapmirrorRelationshipsGetParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithContext(ctx context.Context) *SnapmirrorRelationshipsGetParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithHTTPClient(client *http.Client) *SnapmirrorRelationshipsGetParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithConsistencyGroupFailoverErrorArgumentsCode adds the consistencyGroupFailoverErrorArgumentsCode to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithConsistencyGroupFailoverErrorArgumentsCode(consistencyGroupFailoverErrorArgumentsCode *string) *SnapmirrorRelationshipsGetParams { o.SetConsistencyGroupFailoverErrorArgumentsCode(consistencyGroupFailoverErrorArgumentsCode) return o } // SetConsistencyGroupFailoverErrorArgumentsCode adds the consistencyGroupFailoverErrorArgumentsCode to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetConsistencyGroupFailoverErrorArgumentsCode(consistencyGroupFailoverErrorArgumentsCode *string) { o.ConsistencyGroupFailoverErrorArgumentsCode = consistencyGroupFailoverErrorArgumentsCode } // WithConsistencyGroupFailoverErrorArgumentsMessage adds the consistencyGroupFailoverErrorArgumentsMessage to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithConsistencyGroupFailoverErrorArgumentsMessage(consistencyGroupFailoverErrorArgumentsMessage *string) *SnapmirrorRelationshipsGetParams { o.SetConsistencyGroupFailoverErrorArgumentsMessage(consistencyGroupFailoverErrorArgumentsMessage) return o } // SetConsistencyGroupFailoverErrorArgumentsMessage adds the consistencyGroupFailoverErrorArgumentsMessage to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetConsistencyGroupFailoverErrorArgumentsMessage(consistencyGroupFailoverErrorArgumentsMessage *string) { o.ConsistencyGroupFailoverErrorArgumentsMessage = consistencyGroupFailoverErrorArgumentsMessage } // WithConsistencyGroupFailoverErrorCode adds the consistencyGroupFailoverErrorCode to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithConsistencyGroupFailoverErrorCode(consistencyGroupFailoverErrorCode *string) *SnapmirrorRelationshipsGetParams { o.SetConsistencyGroupFailoverErrorCode(consistencyGroupFailoverErrorCode) return o } // SetConsistencyGroupFailoverErrorCode adds the consistencyGroupFailoverErrorCode to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetConsistencyGroupFailoverErrorCode(consistencyGroupFailoverErrorCode *string) { o.ConsistencyGroupFailoverErrorCode = consistencyGroupFailoverErrorCode } // WithConsistencyGroupFailoverErrorMessage adds the consistencyGroupFailoverErrorMessage to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithConsistencyGroupFailoverErrorMessage(consistencyGroupFailoverErrorMessage *string) *SnapmirrorRelationshipsGetParams { o.SetConsistencyGroupFailoverErrorMessage(consistencyGroupFailoverErrorMessage) return o } // SetConsistencyGroupFailoverErrorMessage adds the consistencyGroupFailoverErrorMessage to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetConsistencyGroupFailoverErrorMessage(consistencyGroupFailoverErrorMessage *string) { o.ConsistencyGroupFailoverErrorMessage = consistencyGroupFailoverErrorMessage } // WithConsistencyGroupFailoverErrorTarget adds the consistencyGroupFailoverErrorTarget to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithConsistencyGroupFailoverErrorTarget(consistencyGroupFailoverErrorTarget *string) *SnapmirrorRelationshipsGetParams { o.SetConsistencyGroupFailoverErrorTarget(consistencyGroupFailoverErrorTarget) return o } // SetConsistencyGroupFailoverErrorTarget adds the consistencyGroupFailoverErrorTarget to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetConsistencyGroupFailoverErrorTarget(consistencyGroupFailoverErrorTarget *string) { o.ConsistencyGroupFailoverErrorTarget = consistencyGroupFailoverErrorTarget } // WithConsistencyGroupFailoverStatusCode adds the consistencyGroupFailoverStatusCode to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithConsistencyGroupFailoverStatusCode(consistencyGroupFailoverStatusCode *string) *SnapmirrorRelationshipsGetParams { o.SetConsistencyGroupFailoverStatusCode(consistencyGroupFailoverStatusCode) return o } // SetConsistencyGroupFailoverStatusCode adds the consistencyGroupFailoverStatusCode to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetConsistencyGroupFailoverStatusCode(consistencyGroupFailoverStatusCode *string) { o.ConsistencyGroupFailoverStatusCode = consistencyGroupFailoverStatusCode } // WithConsistencyGroupFailoverStatusMessage adds the consistencyGroupFailoverStatusMessage to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithConsistencyGroupFailoverStatusMessage(consistencyGroupFailoverStatusMessage *string) *SnapmirrorRelationshipsGetParams { o.SetConsistencyGroupFailoverStatusMessage(consistencyGroupFailoverStatusMessage) return o } // SetConsistencyGroupFailoverStatusMessage adds the consistencyGroupFailoverStatusMessage to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetConsistencyGroupFailoverStatusMessage(consistencyGroupFailoverStatusMessage *string) { o.ConsistencyGroupFailoverStatusMessage = consistencyGroupFailoverStatusMessage } // WithDestinationClusterName adds the destinationClusterName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithDestinationClusterName(destinationClusterName *string) *SnapmirrorRelationshipsGetParams { o.SetDestinationClusterName(destinationClusterName) return o } // SetDestinationClusterName adds the destinationClusterName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetDestinationClusterName(destinationClusterName *string) { o.DestinationClusterName = destinationClusterName } // WithDestinationClusterUUID adds the destinationClusterUUID to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithDestinationClusterUUID(destinationClusterUUID *string) *SnapmirrorRelationshipsGetParams { o.SetDestinationClusterUUID(destinationClusterUUID) return o } // SetDestinationClusterUUID adds the destinationClusterUuid to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetDestinationClusterUUID(destinationClusterUUID *string) { o.DestinationClusterUUID = destinationClusterUUID } // WithDestinationConsistencyGroupVolumesName adds the destinationConsistencyGroupVolumesName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithDestinationConsistencyGroupVolumesName(destinationConsistencyGroupVolumesName *string) *SnapmirrorRelationshipsGetParams { o.SetDestinationConsistencyGroupVolumesName(destinationConsistencyGroupVolumesName) return o } // SetDestinationConsistencyGroupVolumesName adds the destinationConsistencyGroupVolumesName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetDestinationConsistencyGroupVolumesName(destinationConsistencyGroupVolumesName *string) { o.DestinationConsistencyGroupVolumesName = destinationConsistencyGroupVolumesName } // WithDestinationPath adds the destinationPath to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithDestinationPath(destinationPath *string) *SnapmirrorRelationshipsGetParams { o.SetDestinationPath(destinationPath) return o } // SetDestinationPath adds the destinationPath to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetDestinationPath(destinationPath *string) { o.DestinationPath = destinationPath } // WithDestinationSvmName adds the destinationSvmName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithDestinationSvmName(destinationSvmName *string) *SnapmirrorRelationshipsGetParams { o.SetDestinationSvmName(destinationSvmName) return o } // SetDestinationSvmName adds the destinationSvmName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetDestinationSvmName(destinationSvmName *string) { o.DestinationSvmName = destinationSvmName } // WithDestinationSvmUUID adds the destinationSvmUUID to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithDestinationSvmUUID(destinationSvmUUID *string) *SnapmirrorRelationshipsGetParams { o.SetDestinationSvmUUID(destinationSvmUUID) return o } // SetDestinationSvmUUID adds the destinationSvmUuid to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetDestinationSvmUUID(destinationSvmUUID *string) { o.DestinationSvmUUID = destinationSvmUUID } // WithDestinationUUID adds the destinationUUID to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithDestinationUUID(destinationUUID *string) *SnapmirrorRelationshipsGetParams { o.SetDestinationUUID(destinationUUID) return o } // SetDestinationUUID adds the destinationUuid to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetDestinationUUID(destinationUUID *string) { o.DestinationUUID = destinationUUID } // WithExportedSnapshot adds the exportedSnapshot to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithExportedSnapshot(exportedSnapshot *string) *SnapmirrorRelationshipsGetParams { o.SetExportedSnapshot(exportedSnapshot) return o } // SetExportedSnapshot adds the exportedSnapshot to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetExportedSnapshot(exportedSnapshot *string) { o.ExportedSnapshot = exportedSnapshot } // WithFields adds the fields to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithFields(fields []string) *SnapmirrorRelationshipsGetParams { o.SetFields(fields) return o } // SetFields adds the fields to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetFields(fields []string) { o.Fields = fields } // WithGroupType adds the groupType to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithGroupType(groupType *string) *SnapmirrorRelationshipsGetParams { o.SetGroupType(groupType) return o } // SetGroupType adds the groupType to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetGroupType(groupType *string) { o.GroupType = groupType } // WithHealthy adds the healthy to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithHealthy(healthy *bool) *SnapmirrorRelationshipsGetParams { o.SetHealthy(healthy) return o } // SetHealthy adds the healthy to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetHealthy(healthy *bool) { o.Healthy = healthy } // WithIdentityPreservation adds the identityPreservation to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithIdentityPreservation(identityPreservation *string) *SnapmirrorRelationshipsGetParams { o.SetIdentityPreservation(identityPreservation) return o } // SetIdentityPreservation adds the identityPreservation to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetIdentityPreservation(identityPreservation *string) { o.IdentityPreservation = identityPreservation } // WithLagTime adds the lagTime to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithLagTime(lagTime *string) *SnapmirrorRelationshipsGetParams { o.SetLagTime(lagTime) return o } // SetLagTime adds the lagTime to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetLagTime(lagTime *string) { o.LagTime = lagTime } // WithLastTransferType adds the lastTransferType to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithLastTransferType(lastTransferType *string) *SnapmirrorRelationshipsGetParams { o.SetLastTransferType(lastTransferType) return o } // SetLastTransferType adds the lastTransferType to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetLastTransferType(lastTransferType *string) { o.LastTransferType = lastTransferType } // WithListDestinationsOnly adds the listDestinationsOnly to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithListDestinationsOnly(listDestinationsOnly *bool) *SnapmirrorRelationshipsGetParams { o.SetListDestinationsOnly(listDestinationsOnly) return o } // SetListDestinationsOnly adds the listDestinationsOnly to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetListDestinationsOnly(listDestinationsOnly *bool) { o.ListDestinationsOnly = listDestinationsOnly } // WithMaxRecords adds the maxRecords to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithMaxRecords(maxRecords *int64) *SnapmirrorRelationshipsGetParams { o.SetMaxRecords(maxRecords) return o } // SetMaxRecords adds the maxRecords to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetMaxRecords(maxRecords *int64) { o.MaxRecords = maxRecords } // WithOrderBy adds the orderBy to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithOrderBy(orderBy []string) *SnapmirrorRelationshipsGetParams { o.SetOrderBy(orderBy) return o } // SetOrderBy adds the orderBy to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetOrderBy(orderBy []string) { o.OrderBy = orderBy } // WithPolicyName adds the policyName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithPolicyName(policyName *string) *SnapmirrorRelationshipsGetParams { o.SetPolicyName(policyName) return o } // SetPolicyName adds the policyName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetPolicyName(policyName *string) { o.PolicyName = policyName } // WithPolicyType adds the policyType to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithPolicyType(policyType *string) *SnapmirrorRelationshipsGetParams { o.SetPolicyType(policyType) return o } // SetPolicyType adds the policyType to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetPolicyType(policyType *string) { o.PolicyType = policyType } // WithPolicyUUID adds the policyUUID to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithPolicyUUID(policyUUID *string) *SnapmirrorRelationshipsGetParams { o.SetPolicyUUID(policyUUID) return o } // SetPolicyUUID adds the policyUuid to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetPolicyUUID(policyUUID *string) { o.PolicyUUID = policyUUID } // WithRestore adds the restore to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithRestore(restore *bool) *SnapmirrorRelationshipsGetParams { o.SetRestore(restore) return o } // SetRestore adds the restore to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetRestore(restore *bool) { o.Restore = restore } // WithReturnRecords adds the returnRecords to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithReturnRecords(returnRecords *bool) *SnapmirrorRelationshipsGetParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorRelationshipsGetParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WithSourceClusterName adds the sourceClusterName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithSourceClusterName(sourceClusterName *string) *SnapmirrorRelationshipsGetParams { o.SetSourceClusterName(sourceClusterName) return o } // SetSourceClusterName adds the sourceClusterName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetSourceClusterName(sourceClusterName *string) { o.SourceClusterName = sourceClusterName } // WithSourceClusterUUID adds the sourceClusterUUID to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithSourceClusterUUID(sourceClusterUUID *string) *SnapmirrorRelationshipsGetParams { o.SetSourceClusterUUID(sourceClusterUUID) return o } // SetSourceClusterUUID adds the sourceClusterUuid to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetSourceClusterUUID(sourceClusterUUID *string) { o.SourceClusterUUID = sourceClusterUUID } // WithSourceConsistencyGroupVolumesName adds the sourceConsistencyGroupVolumesName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithSourceConsistencyGroupVolumesName(sourceConsistencyGroupVolumesName *string) *SnapmirrorRelationshipsGetParams { o.SetSourceConsistencyGroupVolumesName(sourceConsistencyGroupVolumesName) return o } // SetSourceConsistencyGroupVolumesName adds the sourceConsistencyGroupVolumesName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetSourceConsistencyGroupVolumesName(sourceConsistencyGroupVolumesName *string) { o.SourceConsistencyGroupVolumesName = sourceConsistencyGroupVolumesName } // WithSourcePath adds the sourcePath to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithSourcePath(sourcePath *string) *SnapmirrorRelationshipsGetParams { o.SetSourcePath(sourcePath) return o } // SetSourcePath adds the sourcePath to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetSourcePath(sourcePath *string) { o.SourcePath = sourcePath } // WithSourceSvmName adds the sourceSvmName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithSourceSvmName(sourceSvmName *string) *SnapmirrorRelationshipsGetParams { o.SetSourceSvmName(sourceSvmName) return o } // SetSourceSvmName adds the sourceSvmName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetSourceSvmName(sourceSvmName *string) { o.SourceSvmName = sourceSvmName } // WithSourceSvmUUID adds the sourceSvmUUID to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithSourceSvmUUID(sourceSvmUUID *string) *SnapmirrorRelationshipsGetParams { o.SetSourceSvmUUID(sourceSvmUUID) return o } // SetSourceSvmUUID adds the sourceSvmUuid to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetSourceSvmUUID(sourceSvmUUID *string) { o.SourceSvmUUID = sourceSvmUUID } // WithSourceUUID adds the sourceUUID to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithSourceUUID(sourceUUID *string) *SnapmirrorRelationshipsGetParams { o.SetSourceUUID(sourceUUID) return o } // SetSourceUUID adds the sourceUuid to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetSourceUUID(sourceUUID *string) { o.SourceUUID = sourceUUID } // WithState adds the state to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithState(state *string) *SnapmirrorRelationshipsGetParams { o.SetState(state) return o } // SetState adds the state to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetState(state *string) { o.State = state } // WithThrottle adds the throttle to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithThrottle(throttle *int64) *SnapmirrorRelationshipsGetParams { o.SetThrottle(throttle) return o } // SetThrottle adds the throttle to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetThrottle(throttle *int64) { o.Throttle = throttle } // WithTransferBytesTransferred adds the transferBytesTransferred to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithTransferBytesTransferred(transferBytesTransferred *int64) *SnapmirrorRelationshipsGetParams { o.SetTransferBytesTransferred(transferBytesTransferred) return o } // SetTransferBytesTransferred adds the transferBytesTransferred to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetTransferBytesTransferred(transferBytesTransferred *int64) { o.TransferBytesTransferred = transferBytesTransferred } // WithTransferEndTime adds the transferEndTime to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithTransferEndTime(transferEndTime *string) *SnapmirrorRelationshipsGetParams { o.SetTransferEndTime(transferEndTime) return o } // SetTransferEndTime adds the transferEndTime to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetTransferEndTime(transferEndTime *string) { o.TransferEndTime = transferEndTime } // WithTransferState adds the transferState to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithTransferState(transferState *string) *SnapmirrorRelationshipsGetParams { o.SetTransferState(transferState) return o } // SetTransferState adds the transferState to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetTransferState(transferState *string) { o.TransferState = transferState } // WithTransferTotalDuration adds the transferTotalDuration to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithTransferTotalDuration(transferTotalDuration *string) *SnapmirrorRelationshipsGetParams { o.SetTransferTotalDuration(transferTotalDuration) return o } // SetTransferTotalDuration adds the transferTotalDuration to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetTransferTotalDuration(transferTotalDuration *string) { o.TransferTotalDuration = transferTotalDuration } // WithTransferUUID adds the transferUUID to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithTransferUUID(transferUUID *string) *SnapmirrorRelationshipsGetParams { o.SetTransferUUID(transferUUID) return o } // SetTransferUUID adds the transferUuid to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) SetTransferUUID(transferUUID *string) { o.TransferUUID = transferUUID } // WithTransferScheduleName adds the transferScheduleName to the snapmirror relationships get params func (o *SnapmirrorRelationshipsGetParams) WithTransferScheduleName(transferScheduleName *string) *SnapmirrorRelationshipsGetParams { o.SetTransferScheduleName(transferScheduleName) return o }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorPolicyGetReader is a Reader for the SnapmirrorPolicyGet structure. type SnapmirrorPolicyGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorPolicyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSnapmirrorPolicyGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorPolicyGetDefault(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 } } // NewSnapmirrorPolicyGetOK creates a SnapmirrorPolicyGetOK with default headers values func NewSnapmirrorPolicyGetOK() *SnapmirrorPolicyGetOK { return &SnapmirrorPolicyGetOK{} } /* SnapmirrorPolicyGetOK describes a response with status code 200, with default header values. OK */ type SnapmirrorPolicyGetOK struct { Payload *models.SnapmirrorPolicy } // IsSuccess returns true when this snapmirror policy get o k response has a 2xx status code func (o *SnapmirrorPolicyGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror policy get o k response has a 3xx status code func (o *SnapmirrorPolicyGetOK) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror policy get o k response has a 4xx status code func (o *SnapmirrorPolicyGetOK) IsClientError() bool { return false } // IsServerError returns true when this snapmirror policy get o k response has a 5xx status code func (o *SnapmirrorPolicyGetOK) IsServerError() bool { return false } // IsCode returns true when this snapmirror policy get o k response a status code equal to that given func (o *SnapmirrorPolicyGetOK) IsCode(code int) bool { return code == 200 } func (o *SnapmirrorPolicyGetOK) Error() string { return fmt.Sprintf("[GET /snapmirror/policies/{uuid}][%d] snapmirrorPolicyGetOK %+v", 200, o.Payload) } func (o *SnapmirrorPolicyGetOK) String() string { return fmt.Sprintf("[GET /snapmirror/policies/{uuid}][%d] snapmirrorPolicyGetOK %+v", 200, o.Payload) } func (o *SnapmirrorPolicyGetOK) GetPayload() *models.SnapmirrorPolicy { return o.Payload } func (o *SnapmirrorPolicyGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SnapmirrorPolicy) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorPolicyGetDefault creates a SnapmirrorPolicyGetDefault with default headers values func NewSnapmirrorPolicyGetDefault(code int) *SnapmirrorPolicyGetDefault { return &SnapmirrorPolicyGetDefault{ _statusCode: code, } } /* SnapmirrorPolicyGetDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 13303842 | SnapMirror policy is not supported.| */ type SnapmirrorPolicyGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror policy get default response func (o *SnapmirrorPolicyGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror policy get default response has a 2xx status code func (o *SnapmirrorPolicyGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror policy get default response has a 3xx status code func (o *SnapmirrorPolicyGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror policy get default response has a 4xx status code func (o *SnapmirrorPolicyGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror policy get default response has a 5xx status code func (o *SnapmirrorPolicyGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror policy get default response a status code equal to that given func (o *SnapmirrorPolicyGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorPolicyGetDefault) Error() string { return fmt.Sprintf("[GET /snapmirror/policies/{uuid}][%d] snapmirror_policy_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPolicyGetDefault) String() string { return fmt.Sprintf("[GET /snapmirror/policies/{uuid}][%d] snapmirror_policy_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorPolicyGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorPolicyGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_create_parameters.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_policy_create_parameters.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "github.com/go-openapi/errors" "github.com/go-openapi/runtime" cr "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // NewSnapmirrorPolicyCreateParams creates a new SnapmirrorPolicyCreateParams object, // with the default timeout for this client. // // Default values are not hydrated, since defaults are normally applied by the API server side. // // To enforce default values in parameter, use SetDefaults or WithDefaults. func NewSnapmirrorPolicyCreateParams() *SnapmirrorPolicyCreateParams { return &SnapmirrorPolicyCreateParams{ timeout: cr.DefaultTimeout, } } // NewSnapmirrorPolicyCreateParamsWithTimeout creates a new SnapmirrorPolicyCreateParams object // with the ability to set a timeout on a request. func NewSnapmirrorPolicyCreateParamsWithTimeout(timeout time.Duration) *SnapmirrorPolicyCreateParams { return &SnapmirrorPolicyCreateParams{ timeout: timeout, } } // NewSnapmirrorPolicyCreateParamsWithContext creates a new SnapmirrorPolicyCreateParams object // with the ability to set a context for a request. func NewSnapmirrorPolicyCreateParamsWithContext(ctx context.Context) *SnapmirrorPolicyCreateParams { return &SnapmirrorPolicyCreateParams{ Context: ctx, } } // NewSnapmirrorPolicyCreateParamsWithHTTPClient creates a new SnapmirrorPolicyCreateParams object // with the ability to set a custom HTTPClient for a request. func NewSnapmirrorPolicyCreateParamsWithHTTPClient(client *http.Client) *SnapmirrorPolicyCreateParams { return &SnapmirrorPolicyCreateParams{ HTTPClient: client, } } /* SnapmirrorPolicyCreateParams contains all the parameters to send to the API endpoint for the snapmirror policy create operation. Typically these are written to a http.Request. */ type SnapmirrorPolicyCreateParams struct { /* Info. Information on the SnapMirror policy */ Info *models.SnapmirrorPolicy /* ReturnRecords. The default is false. If set to true, the records are returned. */ ReturnRecords *bool /* ReturnTimeout. The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. */ ReturnTimeout *int64 timeout time.Duration Context context.Context HTTPClient *http.Client } // WithDefaults hydrates default values in the snapmirror policy create params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPolicyCreateParams) WithDefaults() *SnapmirrorPolicyCreateParams { o.SetDefaults() return o } // SetDefaults hydrates default values in the snapmirror policy create params (not the query body). // // All values with no default are reset to their zero value. func (o *SnapmirrorPolicyCreateParams) SetDefaults() { var ( returnRecordsDefault = bool(false) returnTimeoutDefault = int64(0) ) val := SnapmirrorPolicyCreateParams{ ReturnRecords: &returnRecordsDefault, ReturnTimeout: &returnTimeoutDefault, } val.timeout = o.timeout val.Context = o.Context val.HTTPClient = o.HTTPClient *o = val } // WithTimeout adds the timeout to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) WithTimeout(timeout time.Duration) *SnapmirrorPolicyCreateParams { o.SetTimeout(timeout) return o } // SetTimeout adds the timeout to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) SetTimeout(timeout time.Duration) { o.timeout = timeout } // WithContext adds the context to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) WithContext(ctx context.Context) *SnapmirrorPolicyCreateParams { o.SetContext(ctx) return o } // SetContext adds the context to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) SetContext(ctx context.Context) { o.Context = ctx } // WithHTTPClient adds the HTTPClient to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) WithHTTPClient(client *http.Client) *SnapmirrorPolicyCreateParams { o.SetHTTPClient(client) return o } // SetHTTPClient adds the HTTPClient to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } // WithInfo adds the info to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) WithInfo(info *models.SnapmirrorPolicy) *SnapmirrorPolicyCreateParams { o.SetInfo(info) return o } // SetInfo adds the info to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) SetInfo(info *models.SnapmirrorPolicy) { o.Info = info } // WithReturnRecords adds the returnRecords to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) WithReturnRecords(returnRecords *bool) *SnapmirrorPolicyCreateParams { o.SetReturnRecords(returnRecords) return o } // SetReturnRecords adds the returnRecords to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) SetReturnRecords(returnRecords *bool) { o.ReturnRecords = returnRecords } // WithReturnTimeout adds the returnTimeout to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) WithReturnTimeout(returnTimeout *int64) *SnapmirrorPolicyCreateParams { o.SetReturnTimeout(returnTimeout) return o } // SetReturnTimeout adds the returnTimeout to the snapmirror policy create params func (o *SnapmirrorPolicyCreateParams) SetReturnTimeout(returnTimeout *int64) { o.ReturnTimeout = returnTimeout } // WriteToRequest writes these params to a swagger request func (o *SnapmirrorPolicyCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { if err := r.SetTimeout(o.timeout); err != nil { return err } var res []error if o.Info != nil { if err := r.SetBodyParam(o.Info); err != nil { return err } } if o.ReturnRecords != nil { // query param return_records var qrReturnRecords bool if o.ReturnRecords != nil { qrReturnRecords = *o.ReturnRecords } qReturnRecords := swag.FormatBool(qrReturnRecords) if qReturnRecords != "" { if err := r.SetQueryParam("return_records", qReturnRecords); err != nil { return err } } } if o.ReturnTimeout != nil { // query param return_timeout var qrReturnTimeout int64 if o.ReturnTimeout != nil { qrReturnTimeout = *o.ReturnTimeout } qReturnTimeout := swag.FormatInt64(qrReturnTimeout) if qReturnTimeout != "" { if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil { return err } } } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_create_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_transfer_create_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipTransferCreateReader is a Reader for the SnapmirrorRelationshipTransferCreate structure. type SnapmirrorRelationshipTransferCreateReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipTransferCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 201: result := NewSnapmirrorRelationshipTransferCreateCreated() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipTransferCreateDefault(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 } } // NewSnapmirrorRelationshipTransferCreateCreated creates a SnapmirrorRelationshipTransferCreateCreated with default headers values func NewSnapmirrorRelationshipTransferCreateCreated() *SnapmirrorRelationshipTransferCreateCreated { return &SnapmirrorRelationshipTransferCreateCreated{} } /* SnapmirrorRelationshipTransferCreateCreated describes a response with status code 201, with default header values. Created */ type SnapmirrorRelationshipTransferCreateCreated struct { /* Useful for tracking the resource location */ Location string } // IsSuccess returns true when this snapmirror relationship transfer create created response has a 2xx status code func (o *SnapmirrorRelationshipTransferCreateCreated) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationship transfer create created response has a 3xx status code func (o *SnapmirrorRelationshipTransferCreateCreated) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationship transfer create created response has a 4xx status code func (o *SnapmirrorRelationshipTransferCreateCreated) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationship transfer create created response has a 5xx status code func (o *SnapmirrorRelationshipTransferCreateCreated) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationship transfer create created response a status code equal to that given func (o *SnapmirrorRelationshipTransferCreateCreated) IsCode(code int) bool { return code == 201 } func (o *SnapmirrorRelationshipTransferCreateCreated) Error() string { return fmt.Sprintf("[POST /snapmirror/relationships/{relationship.uuid}/transfers][%d] snapmirrorRelationshipTransferCreateCreated ", 201) } func (o *SnapmirrorRelationshipTransferCreateCreated) String() string { return fmt.Sprintf("[POST /snapmirror/relationships/{relationship.uuid}/transfers][%d] snapmirrorRelationshipTransferCreateCreated ", 201) } func (o *SnapmirrorRelationshipTransferCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Location hdrLocation := response.GetHeader("Location") if hdrLocation != "" { o.Location = hdrLocation } return nil } // NewSnapmirrorRelationshipTransferCreateDefault creates a SnapmirrorRelationshipTransferCreateDefault with default headers values func NewSnapmirrorRelationshipTransferCreateDefault(code int) *SnapmirrorRelationshipTransferCreateDefault { return &SnapmirrorRelationshipTransferCreateDefault{ _statusCode: code, } } /* SnapmirrorRelationshipTransferCreateDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 13303845 | Restore operation failed | | 13303812 | Initialize operation failed | | 13303844 | Update operation failed | | 13303846 | Empty source path file list | | 13303847 | Invalid arguments | | 13304040 | Throttle not supported for update of Synchronous SnapMirror relationships | | 6620237 | SnapMirror relationship database write failed | | 6620238 | SnapMirror relationship database read failed | */ type SnapmirrorRelationshipTransferCreateDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationship transfer create default response func (o *SnapmirrorRelationshipTransferCreateDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationship transfer create default response has a 2xx status code func (o *SnapmirrorRelationshipTransferCreateDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationship transfer create default response has a 3xx status code func (o *SnapmirrorRelationshipTransferCreateDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationship transfer create default response has a 4xx status code func (o *SnapmirrorRelationshipTransferCreateDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationship transfer create default response has a 5xx status code func (o *SnapmirrorRelationshipTransferCreateDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationship transfer create default response a status code equal to that given func (o *SnapmirrorRelationshipTransferCreateDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipTransferCreateDefault) Error() string { return fmt.Sprintf("[POST /snapmirror/relationships/{relationship.uuid}/transfers][%d] snapmirror_relationship_transfer_create default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipTransferCreateDefault) String() string { return fmt.Sprintf("[POST /snapmirror/relationships/{relationship.uuid}/transfers][%d] snapmirror_relationship_transfer_create default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipTransferCreateDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipTransferCreateDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_delete_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationship_delete_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipDeleteReader is a Reader for the SnapmirrorRelationshipDelete structure. type SnapmirrorRelationshipDeleteReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 202: result := NewSnapmirrorRelationshipDeleteAccepted() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipDeleteDefault(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 } } // NewSnapmirrorRelationshipDeleteAccepted creates a SnapmirrorRelationshipDeleteAccepted with default headers values func NewSnapmirrorRelationshipDeleteAccepted() *SnapmirrorRelationshipDeleteAccepted { return &SnapmirrorRelationshipDeleteAccepted{} } /* SnapmirrorRelationshipDeleteAccepted describes a response with status code 202, with default header values. Accepted */ type SnapmirrorRelationshipDeleteAccepted struct { Payload *models.JobLinkResponse } // IsSuccess returns true when this snapmirror relationship delete accepted response has a 2xx status code func (o *SnapmirrorRelationshipDeleteAccepted) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationship delete accepted response has a 3xx status code func (o *SnapmirrorRelationshipDeleteAccepted) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationship delete accepted response has a 4xx status code func (o *SnapmirrorRelationshipDeleteAccepted) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationship delete accepted response has a 5xx status code func (o *SnapmirrorRelationshipDeleteAccepted) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationship delete accepted response a status code equal to that given func (o *SnapmirrorRelationshipDeleteAccepted) IsCode(code int) bool { return code == 202 } func (o *SnapmirrorRelationshipDeleteAccepted) Error() string { return fmt.Sprintf("[DELETE /snapmirror/relationships/{uuid}][%d] snapmirrorRelationshipDeleteAccepted %+v", 202, o.Payload) } func (o *SnapmirrorRelationshipDeleteAccepted) String() string { return fmt.Sprintf("[DELETE /snapmirror/relationships/{uuid}][%d] snapmirrorRelationshipDeleteAccepted %+v", 202, o.Payload) } func (o *SnapmirrorRelationshipDeleteAccepted) GetPayload() *models.JobLinkResponse { return o.Payload } func (o *SnapmirrorRelationshipDeleteAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.JobLinkResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorRelationshipDeleteDefault creates a SnapmirrorRelationshipDeleteDefault with default headers values func NewSnapmirrorRelationshipDeleteDefault(code int) *SnapmirrorRelationshipDeleteDefault { return &SnapmirrorRelationshipDeleteDefault{ _statusCode: code, } } /* SnapmirrorRelationshipDeleteDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 13303825 | Could not retrieve information for the SnapMirror policy type | | 13303814 | Could not retrieve the source or destination SVM UUID | | 13303815 | Could not retrieve information for the peer cluster | | 13303822 | SnapMirror release has failed | | 13303813 | SnapMirror release was successful but delete has failed | | 13303854 | Cleanup of restore relationship failed | | 13303855 | DELETE call on a restore relationship does not support the given flags | | 13303865 | Deleting the specified SnapMirror policy is not supported. | | 6619715 | Modification of relationship is in progress. Retry the command after a few minutes. | */ type SnapmirrorRelationshipDeleteDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationship delete default response func (o *SnapmirrorRelationshipDeleteDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationship delete default response has a 2xx status code func (o *SnapmirrorRelationshipDeleteDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationship delete default response has a 3xx status code func (o *SnapmirrorRelationshipDeleteDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationship delete default response has a 4xx status code func (o *SnapmirrorRelationshipDeleteDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationship delete default response has a 5xx status code func (o *SnapmirrorRelationshipDeleteDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationship delete default response a status code equal to that given func (o *SnapmirrorRelationshipDeleteDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipDeleteDefault) Error() string { return fmt.Sprintf("[DELETE /snapmirror/relationships/{uuid}][%d] snapmirror_relationship_delete default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipDeleteDefault) String() string { return fmt.Sprintf("[DELETE /snapmirror/relationships/{uuid}][%d] snapmirror_relationship_delete default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipDeleteDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipDeleteDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationships_get_responses.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/ontap/api/rest/client/snapmirror/snapmirror_relationships_get_responses.go
// Code generated by go-swagger; DO NOT EDIT. package snapmirror // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/netapp/trident/storage_drivers/ontap/api/rest/models" ) // SnapmirrorRelationshipsGetReader is a Reader for the SnapmirrorRelationshipsGet structure. type SnapmirrorRelationshipsGetReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *SnapmirrorRelationshipsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewSnapmirrorRelationshipsGetOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil default: result := NewSnapmirrorRelationshipsGetDefault(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 } } // NewSnapmirrorRelationshipsGetOK creates a SnapmirrorRelationshipsGetOK with default headers values func NewSnapmirrorRelationshipsGetOK() *SnapmirrorRelationshipsGetOK { return &SnapmirrorRelationshipsGetOK{} } /* SnapmirrorRelationshipsGetOK describes a response with status code 200, with default header values. OK */ type SnapmirrorRelationshipsGetOK struct { Payload *models.SnapmirrorRelationshipResponse } // IsSuccess returns true when this snapmirror relationships get o k response has a 2xx status code func (o *SnapmirrorRelationshipsGetOK) IsSuccess() bool { return true } // IsRedirect returns true when this snapmirror relationships get o k response has a 3xx status code func (o *SnapmirrorRelationshipsGetOK) IsRedirect() bool { return false } // IsClientError returns true when this snapmirror relationships get o k response has a 4xx status code func (o *SnapmirrorRelationshipsGetOK) IsClientError() bool { return false } // IsServerError returns true when this snapmirror relationships get o k response has a 5xx status code func (o *SnapmirrorRelationshipsGetOK) IsServerError() bool { return false } // IsCode returns true when this snapmirror relationships get o k response a status code equal to that given func (o *SnapmirrorRelationshipsGetOK) IsCode(code int) bool { return code == 200 } func (o *SnapmirrorRelationshipsGetOK) Error() string { return fmt.Sprintf("[GET /snapmirror/relationships][%d] snapmirrorRelationshipsGetOK %+v", 200, o.Payload) } func (o *SnapmirrorRelationshipsGetOK) String() string { return fmt.Sprintf("[GET /snapmirror/relationships][%d] snapmirrorRelationshipsGetOK %+v", 200, o.Payload) } func (o *SnapmirrorRelationshipsGetOK) GetPayload() *models.SnapmirrorRelationshipResponse { return o.Payload } func (o *SnapmirrorRelationshipsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.SnapmirrorRelationshipResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewSnapmirrorRelationshipsGetDefault creates a SnapmirrorRelationshipsGetDefault with default headers values func NewSnapmirrorRelationshipsGetDefault(code int) *SnapmirrorRelationshipsGetDefault { return &SnapmirrorRelationshipsGetDefault{ _statusCode: code, } } /* SnapmirrorRelationshipsGetDefault describes a response with status code -1, with default header values. ONTAP Error Response codes | Error code | Description | |-------------|--------------| | 13303825 | Could not retrieve information for the SnapMirror policy type | | 13303817 | Unknown value for the Snapmirror State | */ type SnapmirrorRelationshipsGetDefault struct { _statusCode int Payload *models.ErrorResponse } // Code gets the status code for the snapmirror relationships get default response func (o *SnapmirrorRelationshipsGetDefault) Code() int { return o._statusCode } // IsSuccess returns true when this snapmirror relationships get default response has a 2xx status code func (o *SnapmirrorRelationshipsGetDefault) IsSuccess() bool { return o._statusCode/100 == 2 } // IsRedirect returns true when this snapmirror relationships get default response has a 3xx status code func (o *SnapmirrorRelationshipsGetDefault) IsRedirect() bool { return o._statusCode/100 == 3 } // IsClientError returns true when this snapmirror relationships get default response has a 4xx status code func (o *SnapmirrorRelationshipsGetDefault) IsClientError() bool { return o._statusCode/100 == 4 } // IsServerError returns true when this snapmirror relationships get default response has a 5xx status code func (o *SnapmirrorRelationshipsGetDefault) IsServerError() bool { return o._statusCode/100 == 5 } // IsCode returns true when this snapmirror relationships get default response a status code equal to that given func (o *SnapmirrorRelationshipsGetDefault) IsCode(code int) bool { return o._statusCode == code } func (o *SnapmirrorRelationshipsGetDefault) Error() string { return fmt.Sprintf("[GET /snapmirror/relationships][%d] snapmirror_relationships_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipsGetDefault) String() string { return fmt.Sprintf("[GET /snapmirror/relationships][%d] snapmirror_relationships_get default %+v", o._statusCode, o.Payload) } func (o *SnapmirrorRelationshipsGetDefault) GetPayload() *models.ErrorResponse { return o.Payload } func (o *SnapmirrorRelationshipsGetDefault) 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 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/volume.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/volume.go
// Copyright 2018 NetApp, Inc. All Rights Reserved. package api import ( "context" "encoding/json" "fmt" "strings" "time" "github.com/cenkalti/backoff/v4" . "github.com/netapp/trident/logging" "github.com/netapp/trident/utils" "github.com/netapp/trident/utils/errors" ) // ListVolumesForAccount tbd func (c *Client) ListVolumesForAccount( ctx context.Context, listReq *ListVolumesForAccountRequest, ) (volumes []Volume, err error) { response, err := c.Request(ctx, "ListVolumesForAccount", listReq, NewReqID()) if err != nil { Logc(ctx).Errorf("Error detected in ListVolumesForAccount API response: %+v", err) return nil, errors.New("device API error") } var result ListVolumesResult if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling ListVolumesForAccount API response: %+v", err) return nil, errors.New("json-decode error") } volumes = result.Result.Volumes return volumes, err } // GetVolumeByID returns the volume with the specified ID. func (c *Client) GetVolumeByID(ctx context.Context, volID int64) (Volume, error) { var limit int64 = 1 listRequest := &ListVolumesRequest{ Accounts: []int64{c.AccountID}, StartVolumeID: &volID, Limit: &limit, } volumes, err := c.ListVolumes(ctx, listRequest) if err != nil { return Volume{}, err } // This API isn't guaranteed to return the volume being sought, so make sure the result matches the request! if len(volumes) == 0 || volumes[0].VolumeID != volID { return Volume{}, fmt.Errorf("volume %d not found", volID) } return volumes[0], nil } // WaitForVolumeByID polls for the volume with specified ID to appear, with backoff retry logic. func (c *Client) WaitForVolumeByID(ctx context.Context, volID int64) (Volume, error) { volume := Volume{} checkVolumeExists := func() error { var err error volume, err = c.GetVolumeByID(ctx, volID) if err != nil { return fmt.Errorf("volume %d does not yet exist; %v", volID, err) } return nil } volumeExistsNotify := func(err error, duration time.Duration) { Logc(ctx).WithField("increment", duration).Debug("Volume not yet present, waiting.") } volumeBackoff := backoff.NewExponentialBackOff() volumeBackoff.InitialInterval = 2 * time.Second volumeBackoff.Multiplier = 1.414 volumeBackoff.RandomizationFactor = 0.1 volumeBackoff.MaxElapsedTime = 30 * time.Second // Run the volume check using an exponential backoff if err := backoff.RetryNotify(checkVolumeExists, volumeBackoff, volumeExistsNotify); err != nil { Logc(ctx).WithField("volumeID", volID).Warnf( "Could not find volume after %3.2f seconds.", volumeBackoff.MaxElapsedTime.Seconds()) return volume, fmt.Errorf("volume %d does not exist", volID) } else { Logc(ctx).WithField("volumeID", volID).Debug("Volume found.") return volume, nil } } // ListVolumes returns all volumes using the specified request object. func (c *Client) ListVolumes(ctx context.Context, listVolReq *ListVolumesRequest) (volumes []Volume, err error) { response, err := c.Request(ctx, "ListVolumes", listVolReq, NewReqID()) if err != nil { Logc(ctx).Errorf("Error response from ListVolumes request: %v ", err) return nil, errors.New("device API error") } var result ListVolumesResult if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling ListVolumes API response: %v", err) return nil, errors.New("json-decode error") } volumes = result.Result.Volumes return volumes, err } // CloneVolume invokes the supplied clone volume request. It waits for the source volume // (which itself may be new in a test scenario) to be ready to be cloned, and it waits for // the clone to exist. func (c *Client) CloneVolume(ctx context.Context, req *CloneVolumeRequest) (Volume, error) { var ( cloneError error response []byte result CloneVolumeResult ) cloneExists := func() error { response, cloneError = c.Request(ctx, "CloneVolume", req, NewReqID()) if cloneError != nil { errorMessage := cloneError.Error() if strings.Contains(errorMessage, "SliceNotRegistered") { return fmt.Errorf("detected SliceNotRegistered on Clone operation") } else if strings.Contains(errorMessage, "xInvalidParameter") { return fmt.Errorf("detected xInvalidParameter on Clone operation") } else if strings.Contains(errorMessage, "xNotReadyForIO") { return fmt.Errorf("detected xNotReadyForIO on Clone operation") } else { Logc(ctx).Debugf("encountered err: %s during volume clone operation", cloneError) return backoff.Permanent(cloneError) } } return nil } cloneExistsNotify := func(err error, duration time.Duration) { Logc(ctx).WithField("increment", duration).Debugf("Clone not yet present, waiting; err: %+v", err) } cloneBackoff := backoff.NewExponentialBackOff() cloneBackoff.InitialInterval = 2 * time.Second cloneBackoff.Multiplier = 1.414 cloneBackoff.RandomizationFactor = 0.1 cloneBackoff.MaxElapsedTime = 30 * time.Second cloneBackoff.MaxInterval = 5 * time.Second // Sometimes it can take a few seconds for the Slice to finalize even though the Volume reports ready. if err := backoff.RetryNotify(cloneExists, cloneBackoff, cloneExistsNotify); err != nil { Logc(ctx).WithField("clone", cloneBackoff).Warnf("Failed to clone volume after %3.2f seconds.", cloneBackoff.MaxElapsedTime.Seconds()) return Volume{}, fmt.Errorf("failed to clone volume: %s", req.Name) } Logc(ctx).Info("Clone request succeeded") if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling CloneVolume API response: %v", err) return Volume{}, errors.New("json-decode error") } return c.WaitForVolumeByID(ctx, result.Result.VolumeID) } // CreateVolume tbd func (c *Client) CreateVolume(ctx context.Context, createReq *CreateVolumeRequest) (Volume, error) { response, err := c.Request(ctx, "CreateVolume", createReq, NewReqID()) if err != nil { Logc(ctx).Errorf("Error response from CreateVolume request: %v ", err) return Volume{}, errors.New("device API error") } var result CreateVolumeResult if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling CreateVolume API response: %v", err) return Volume{}, errors.New("json-decode error") } return c.WaitForVolumeByID(ctx, result.Result.VolumeID) } // AddVolumesToAccessGroup tbd func (c *Client) AddVolumesToAccessGroup(ctx context.Context, req *AddVolumesToVolumeAccessGroupRequest) (err error) { _, err = c.Request(ctx, "AddVolumesToVolumeAccessGroup", req, NewReqID()) if err != nil { if apiErr, ok := err.(Error); ok && apiErr.Fields.Name == "xAlreadyInVolumeAccessGroup" { return nil } Logc(ctx).Errorf("error response from Add to VAG request: %+v ", err) return errors.New("device API error") } return err } // DeleteVolume tbd func (c *Client) DeleteVolume(ctx context.Context, volumeID int64) (err error) { // TODO(jdg): Add options like purge=True|False, range, ALL etc var req DeleteVolumeRequest req.VolumeID = volumeID _, err = c.Request(ctx, "DeleteVolume", req, NewReqID()) if err != nil { // TODO: distinguish what the error was? Logc(ctx).Errorf("Error response from DeleteVolume request: %+v ", err) return errors.New("device API error") } _, err = c.Request(ctx, "PurgeDeletedVolume", req, NewReqID()) return } // DetachVolume tbd func (c *Client) DetachVolume(ctx context.Context, v Volume) error { if c.SVIP == "" { Logc(ctx).Errorf("Cannot detach volume, SVIP is not set.") return errors.New("detach volume error") } return utils.ISCSILogout(ctx, v.Iqn, c.SVIP) } func (c *Client) ModifyVolume(ctx context.Context, req *ModifyVolumeRequest) (err error) { _, err = c.Request(ctx, "ModifyVolume", req, NewReqID()) if err != nil { Logc(ctx).Errorf("Error response from ModifyVolume request: %+v ", err) return errors.New("device API error") } return err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/api.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/api.go
// Copyright 2022 NetApp, Inc. All Rights Reserved. package api import ( "bytes" "context" "crypto/tls" "encoding/json" "io" "net/http" "strings" "time" tridentconfig "github.com/netapp/trident/config" . "github.com/netapp/trident/logging" "github.com/netapp/trident/utils" "github.com/netapp/trident/utils/crypto" "github.com/netapp/trident/utils/errors" ) const httpContentType = "json-rpc" // Client is used to send API requests to a SolidFire system type Client struct { SVIP string Endpoint string Config *Config DefaultAPIPort int VolumeTypes *[]VolType AccessGroups []int64 DefaultBlockSize int64 DebugTraceFlags map[string]bool AccountID int64 } // Config holds the configuration data for the Client to communicate with a SolidFire storage system type Config struct { TenantName string EndPoint string MountPoint string SVIP string InitiatorIFace string // iface to use of iSCSI initiator Types *[]VolType LegacyNamePrefix string AccessGroups []int64 DefaultBlockSize int64 DebugTraceFlags map[string]bool } // VolType holds quality of service configuration data type VolType struct { Type string QOS QoS } // NewFromParameters is a factory method to create a new sfapi.Client object using the supplied parameters func NewFromParameters(pendpoint, psvip string, pcfg Config) (c *Client, err error) { SFClient := &Client{ Endpoint: pendpoint, SVIP: psvip, Config: &pcfg, DefaultAPIPort: 443, VolumeTypes: pcfg.Types, DefaultBlockSize: pcfg.DefaultBlockSize, DebugTraceFlags: pcfg.DebugTraceFlags, } return SFClient, nil } // Request performs a json-rpc POST to the configured endpoint func (c *Client) Request(ctx context.Context, method string, params interface{}, id int) ([]byte, error) { var err error var request *http.Request var response *http.Response var prettyRequestBuffer bytes.Buffer var prettyResponseBuffer bytes.Buffer if c.Endpoint == "" { Logc(ctx).Error("endpoint is not set, unable to issue json-rpc requests") err = errors.New("no endpoint set") return nil, err } requestBody, err := json.Marshal(map[string]interface{}{ "method": method, "id": id, "params": params, }) // Create the request request, err = http.NewRequestWithContext(ctx, "POST", c.Endpoint, strings.NewReader(string(requestBody))) if err != nil { return nil, err } request.Header.Set("Content-Type", httpContentType) // Log the request if err := json.Indent(&prettyRequestBuffer, requestBody, "", " "); err != nil { Logd(ctx, tridentconfig.SolidfireSANStorageDriverName, c.Config.DebugTraceFlags["api"]). Errorf("Could not format API request for logging; %v", err) } utils.LogHTTPRequest(request, prettyRequestBuffer.Bytes(), LogLayerSolidfireDriver.String(), false, c.Config.DebugTraceFlags["api"]) // Send the request tr := &http.Transport{ TLSClientConfig: &tls.Config{InsecureSkipVerify: true, MinVersion: tridentconfig.MinClientTLSVersion}, } httpClient := &http.Client{ Transport: tr, Timeout: tridentconfig.StorageAPITimeoutSeconds * time.Second, } response, err = httpClient.Do(request) if err != nil { Logc(ctx).Errorf("Error response from SolidFire API request: %v", err) return nil, errors.New("device API error") } // Handle HTTP errors such as 401 (Unauthorized) httpError := utils.NewHTTPError(response) if httpError != nil { Logc(ctx).WithFields(LogFields{ "request": method, "responseCode": response.StatusCode, "responseStatus": response.Status, }).Errorf("API request failed.") return nil, *httpError } defer response.Body.Close() responseBody, err := io.ReadAll(response.Body) if err != nil { return responseBody, err } // Log the response if c.shouldLogResponseBody(method) { if err := json.Indent(&prettyResponseBuffer, responseBody, "", " "); err != nil { Logd(ctx, tridentconfig.SolidfireSANStorageDriverName, c.Config.DebugTraceFlags["api"]). Errorf("Could not format API request for logging; %v", err) } else { utils.LogHTTPResponse(ctx, response, prettyResponseBuffer.Bytes(), LogLayerSolidfireDriver.String(), false, c.Config.DebugTraceFlags["api"]) } } else { utils.LogHTTPResponse(ctx, response, []byte("<suppressed>"), LogLayerSolidfireDriver.String(), true, c.Config.DebugTraceFlags["api"]) } // Look for any errors returned from the controller apiError := Error{} if err = json.Unmarshal(responseBody, &apiError); err != nil { Logc(ctx).Errorf("Could not format API request for logging; %v", err) } else { utils.LogHTTPRequest(request, prettyRequestBuffer.Bytes(), "", false, false) } if apiError.Fields.Code != 0 { Logc(ctx).WithFields(LogFields{ "ID": apiError.ID, "code": apiError.Fields.Code, "message": apiError.Fields.Message, "name": apiError.Fields.Name, }).Error("Error detected in API response.") return nil, apiError } return responseBody, nil } // shouldLogResponseBody prevents logging the REST response body for APIs that are // extremely lengthy for no good reason or that return sensitive data like iSCSI secrets. func (c *Client) shouldLogResponseBody(method string) bool { switch method { case "GetAccountByName", "GetAccountByID", "ListAccounts": return false case "GetClusterHardwareInfo": return c.Config.DebugTraceFlags["hardwareInfo"] default: return true } } // NewReqID generates a random id for a request func NewReqID() int { return crypto.GetRandomNumber(1000-1) + 1 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/snapshot.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/snapshot.go
// Copyright 2018 NetApp, Inc. All Rights Reserved. package api import ( "context" "encoding/json" "strings" . "github.com/netapp/trident/logging" "github.com/netapp/trident/utils/errors" ) func (c *Client) CreateSnapshot(ctx context.Context, req *CreateSnapshotRequest) (snapshot Snapshot, err error) { response, err := c.Request(ctx, "CreateSnapshot", req, NewReqID()) if err != nil { if strings.Contains(err.Error(), "xMaxSnapshotsPerVolumeExceeded") { return Snapshot{}, errors.MaxLimitReachedError(err.Error()) } else { return Snapshot{}, err } } var result CreateSnapshotResult if err = json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling CreateSnapshot json response: %+v", err) return Snapshot{}, errors.New("json decode error") } return c.GetSnapshot(ctx, result.Result.SnapshotID, req.VolumeID, "") } func (c *Client) GetSnapshot(ctx context.Context, snapID, volID int64, sfName string) (s Snapshot, err error) { var listReq ListSnapshotsRequest listReq.VolumeID = volID snapshots, err := c.ListSnapshots(ctx, &listReq) if err != nil { Logc(ctx).Errorf("Error in GetSnapshot from ListSnapshots: %+v", err) return Snapshot{}, errors.New("failed to perform ListSnapshots") } for _, snap := range snapshots { if snapID == snap.SnapshotID { s = snap break } else if sfName != "" && sfName == snap.Name { s = snap break } } return s, err } func (c *Client) ListSnapshots(ctx context.Context, req *ListSnapshotsRequest) (snapshots []Snapshot, err error) { response, err := c.Request(ctx, "ListSnapshots", req, NewReqID()) if err != nil { Logc(ctx).Errorf("Error in ListSnapshots: %+v", err) return nil, errors.New("failed to retrieve snapshots") } var result ListSnapshotsResult if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling ListSnapshots json response: %+v", err) return nil, errors.New("json decode error") } snapshots = result.Result.Snapshots return } func (c *Client) RollbackToSnapshot(ctx context.Context, req *RollbackToSnapshotRequest) (newSnapID int64, err error) { response, err := c.Request(ctx, "RollbackToSnapshot", req, NewReqID()) if err != nil { Logc(ctx).Errorf("Error in RollbackToSnapshot: %+v", err) return 0, errors.New("failed to rollback snapshot") } var result RollbackToSnapshotResult if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling RollbackToSnapshot json response: %+v", err) return 0, errors.New("json decode error") } newSnapID = result.Result.SnapshotID err = nil return } func (c *Client) DeleteSnapshot(ctx context.Context, snapshotID int64) (err error) { // TODO(jdg): Add options like purge=True|False, range, ALL etc var req DeleteSnapshotRequest req.SnapshotID = snapshotID _, err = c.Request(ctx, "DeleteSnapshot", req, NewReqID()) if err != nil { Logc(ctx).Errorf("Error in DeleteSnapshot: %+v", err) return errors.New("failed to delete snapshot") } return }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/types.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/types.go
// Copyright 2018 NetApp, Inc. All Rights Reserved. package api import "fmt" // Error wrapper type Error struct { ID int `json:"id"` Fields struct { Code int `json:"code"` Message string `json:"message"` Name string `json:"name"` } `json:"error"` } func (e Error) Error() string { return fmt.Sprintf("device API error: %+v", e.Fields.Name) } // QoS settings type QoS struct { MinIOPS int64 `json:"minIOPS,omitempty"` MaxIOPS int64 `json:"maxIOPS,omitempty"` BurstIOPS int64 `json:"burstIOPS,omitempty"` BurstTime int64 `json:"-"` } // VolumePair settings type VolumePair struct { ClusterPairID int64 `json:"clusterPairID"` RemoteVolumeID int64 `json:"remoteVolumeID"` RemoteSliceID int64 `json:"remoteSliceID"` RemoteVolumeName string `json:"remoteVolumeName"` VolumePairUUID string `json:"volumePairUUID"` } // Volume settings type Volume struct { VolumeID int64 `json:"volumeID"` Name string `json:"name"` AccountID int64 `json:"accountID"` CreateTime string `json:"createTime"` Status string `json:"status"` Access string `json:"access"` Enable512e bool `json:"enable512e"` Iqn string `json:"iqn"` ScsiEUIDeviceID string `json:"scsiEUIDeviceID"` ScsiNAADeviceID string `json:"scsiNAADeviceID"` Qos QoS `json:"qos"` VolumeAccessGroups []int64 `json:"volumeAccessGroups"` VolumePairs []VolumePair `json:"volumePairs"` DeleteTime string `json:"deleteTime"` PurgeTime string `json:"purgeTime"` SliceCount int64 `json:"sliceCount"` TotalSize int64 `json:"totalSize"` BlockSize int64 `json:"blockSize"` VirtualVolumeID string `json:"virtualVolumeID"` Attributes interface{} `json:"attributes"` } // GetAttributesAsMap converts from an interface{} into a map[string]string func (v *Volume) GetAttributesAsMap() map[string]string { result := map[string]string{} if attrs, ok := v.Attributes.(map[string]interface{}); ok { for key := range attrs { // we're only converting string values at this time // the map could have ints, bools, etc // a future enhancement would be to check each type and convert to the string value // but, for now, we only need the string values if value, ok := attrs[key].(string); ok { result[key] = value } } } return result } type Snapshot struct { SnapshotID int64 `json:"snapshotID"` VolumeID int64 `json:"volumeID"` Name string `json:"name"` Checksum string `json:"checksum"` Status string `json:"status"` TotalSize int64 `json:"totalSize"` GroupID int64 `json:"groupID"` CreateTime string `json:"createTime"` Attributes interface{} `json:"attributes"` } // ListVolumesRequest type ListVolumesRequest struct { Accounts []int64 `json:"accounts"` StartVolumeID *int64 `json:"startVolumeID,omitempty"` Limit *int64 `json:"limit,omitempty"` } // ListVolumesForAccountRequest type ListVolumesForAccountRequest struct { AccountID int64 `json:"accountID"` } // ListActiveVolumesRequest type ListActiveVolumesRequest struct { StartVolumeID int64 `json:"startVolumeID"` Limit int64 `json:"limit"` } // ListVolumesResult type ListVolumesResult struct { ID int `json:"id"` Result struct { Volumes []Volume `json:"volumes"` } `json:"result"` } // CreateVolumeRequest type CreateVolumeRequest struct { Name string `json:"name"` AccountID int64 `json:"accountID"` TotalSize int64 `json:"totalSize"` Enable512e bool `json:"enable512e"` Qos QoS `json:"qos,omitempty"` Attributes interface{} `json:"attributes"` } // CreateVolumeResult type CreateVolumeResult struct { ID int `json:"id"` Result struct { VolumeID int64 `json:"volumeID"` } `json:"result"` } // DeleteVolumeRequest type DeleteVolumeRequest struct { VolumeID int64 `json:"volumeID"` } type CloneVolumeRequest struct { VolumeID int64 `json:"volumeID"` Name string `json:"name"` SnapshotID int64 `json:"snapshotID"` Attributes interface{} `json:"attributes"` } type CloneVolumeResult struct { ID int `json:"id"` Result struct { CloneID int64 `json:"cloneID"` VolumeID int64 `json:"volumeID"` AsyncHandle int64 `json:"asyncHandle"` } `json:"result"` } type CreateSnapshotRequest struct { VolumeID int64 `json:"volumeID"` SnapshotID int64 `json:"snapshotID"` Name string `json:"name"` EnableRemoteReplication bool `json:"enableRemoteReplication"` Retention string `json:"retention"` Attributes interface{} `json:"attributes"` } type CreateSnapshotResult struct { ID int `json:"id"` Result struct { SnapshotID int64 `json:"snapshotID"` Checksum string `json:"checksum"` } `json:"result"` } type ListSnapshotsRequest struct { VolumeID int64 `json:"volumeID"` } type ListSnapshotsResult struct { ID int `json:"id"` Result struct { Snapshots []Snapshot `json:"snapshots"` } `json:"result"` } type RollbackToSnapshotRequest struct { VolumeID int64 `json:"volumeID"` SnapshotID int64 `json:"snapshotID"` SaveCurrentState bool `json:"saveCurrentState"` Name string `json:"name"` Attributes interface{} `json:"attributes"` } type RollbackToSnapshotResult struct { ID int `json:"id"` Result struct { Checksum string `json:"checksum"` SnapshotID int64 `json:"snapshotID"` } `json:"result"` } type DeleteSnapshotRequest struct { SnapshotID int64 `json:"snapshotID"` } // AddVolumesToVolumeAccessGroupRequest type AddVolumesToVolumeAccessGroupRequest struct { VolumeAccessGroupID int64 `json:"volumeAccessGroupID"` Volumes []int64 `json:"volumes"` } // CreateVolumeAccessGroupRequest type CreateVolumeAccessGroupRequest struct { Name string `json:"name"` Volumes []int64 `json:"volumes,omitempty"` Initiators []string `json:"initiators,omitempty"` } // CreateVolumeAccessGroupResult type CreateVolumeAccessGroupResult struct { ID int `json:"id"` Result struct { VagID int64 `json:"volumeAccessGroupID"` } `json:"result"` } // AddInitiatorsToVolumeAccessGroupRequest type AddInitiatorsToVolumeAccessGroupRequest struct { Initiators []string `json:"initiators"` VAGID int64 `json:"volumeAccessGroupID"` } // ListVolumeAccessGroupsRequest type ListVolumeAccessGroupsRequest struct { StartVAGID int64 `json:"startVolumeAccessGroupID,omitempty"` Limit int64 `json:"limit,omitempty"` } // ListVolumesAccessGroupsResult type ListVolumesAccessGroupsResult struct { ID int `json:"id"` Result struct { Vags []VolumeAccessGroup `json:"volumeAccessGroups"` } `json:"result"` } // EmptyResponse type EmptyResponse struct { ID int `json:"id"` Result struct{} `json:"result"` } // VolumeAccessGroup type VolumeAccessGroup struct { Initiators []string `json:"initiators"` Attributes interface{} `json:"attributes"` DeletedVolumes []int64 `json:"deletedVolumes"` Name string `json:"name"` VAGID int64 `json:"volumeAccessGroupID"` Volumes []int64 `json:"volumes"` } // GetAccountByNameRequest type GetAccountByNameRequest struct { Name string `json:"username"` } // GetAccountByIDRequest type GetAccountByIDRequest struct { AccountID int64 `json:"accountID"` } // GetAccountResult type GetAccountResult struct { ID int `json:"id"` Result struct { Account Account `json:"account"` } `json:"result"` } // Account type Account struct { AccountID int64 `json:"accountID,omitempty"` Username string `json:"username,omitempty"` Status string `json:"status,omitempty"` Volumes []int64 `json:"volumes,omitempty"` InitiatorSecret string `json:"initiatorSecret,omitempty"` TargetSecret string `json:"targetSecret,omitempty"` Attributes interface{} `json:"attributes,omitempty"` } // AddAccountRequest type AddAccountRequest struct { Username string `json:"username"` InitiatorSecret string `json:"initiatorSecret,omitempty"` TargetSecret string `json:"targetSecret,omitempty"` Attributes interface{} `json:"attributes,omitempty"` } // AddAccountResult type AddAccountResult struct { ID int `json:"id"` Result struct { AccountID int64 `json:"accountID"` } `json:"result"` } type ClusterCapacity struct { ActiveBlockSpace int64 `json:"activeBlockSpace"` ActiveSessions int64 `json:"activeSessions"` AverageIOPS int64 `json:"averageIOPS"` ClusterRecentIOSize int64 `json:"clusterRecentIOSize"` CurrentIOPS int64 `json:"currentIOPS"` MaxIOPS int64 `json:"maxIOPS"` MaxOverProvisionableSpace int64 `json:"maxOverProvisionableSpace"` MaxProvisionedSpace int64 `json:"maxProvisionedSpace"` MaxUsedMetadataSpace int64 `json:"maxUsedMetadataSpace"` MaxUsedSpace int64 `json:"maxUsedSpace"` NonZeroBlocks int64 `json:"nonZeroBlocks"` PeakActiveSessions int64 `json:"peakActiveSessions"` PeakIOPS int64 `json:"peakIOPS"` ProvisionedSpace int64 `json:"provisionedSpace"` Timestamp string `json:"timestamp"` TotalOps int64 `json:"totalOps"` UniqueBlocks int64 `json:"uniqueBlocks"` UniqueBlocksUsedSpace int64 `json:"uniqueBlocksUsedSpace"` UsedMetadataSpace int64 `json:"usedMetadataSpace"` UsedMetadataSpaceInSnapshots int64 `json:"usedMetadataSpaceInSnapshots"` UsedSpace int64 `json:"usedSpace"` ZeroBlocks int64 `json:"zeroBlocks"` } type GetClusterCapacityRequest struct{} type GetClusterCapacityResult struct { ID int `json:"id"` Result struct { ClusterCapacity ClusterCapacity `json:"clusterCapacity"` } `json:"result"` } type GetClusterHardwareInfoResult struct { ID int `json:"id"` Result struct { ClusterHardwareInfo ClusterHardwareInfo `json:"clusterHardwareInfo"` } `json:"result"` } type DefaultQoSRequest struct{} type DefaultQoSResult struct { ID int `json:"id"` Result struct { BurstIOPS int64 `json:"burstIOPS"` MaxIOPS int64 `json:"maxIOPS"` MinIOPS int64 `json:"minIOPS"` } `json:"result"` } type ClusterHardwareInfo struct { Drives interface{} `json:"drives"` Nodes interface{} `json:"nodes"` } type ModifyVolumeRequest struct { VolumeID int64 `json:"volumeID"` AccountID int64 `json:"accountID,omitempty"` Access string `json:"access,omitempty"` Qos QoS `json:"qos,omitempty"` TotalSize int64 `json:"totalSize,omitempty"` Attributes interface{} `json:"attributes,omitempty"` } type ModifyVolumeResult struct { Volume Volume `json:"volume,omitempty"` Curve QoS `json:"curve,omitempty"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/hardware.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/hardware.go
// Copyright 2018 NetApp, Inc. All Rights Reserved. package api import ( "context" "encoding/json" . "github.com/netapp/trident/logging" "github.com/netapp/trident/utils/errors" ) // Get cluster hardware info func (c *Client) GetClusterHardwareInfo(ctx context.Context) (*ClusterHardwareInfo, error) { var ( clusterHardwareInfoReq struct{} clusterHardwareInfoResult GetClusterHardwareInfoResult ) response, err := c.Request(ctx, "GetClusterHardwareInfo", clusterHardwareInfoReq, NewReqID()) if err != nil { Logc(ctx).Errorf("Error detected in GetClusterHardwareInfo API response: %+v", err) return nil, errors.New("device API error") } if err := json.Unmarshal(response, &clusterHardwareInfoResult); err != nil { Logc(ctx).Errorf("Error detected unmarshalling json response: %+v", err) return nil, errors.New("json decode error") } return &clusterHardwareInfoResult.Result.ClusterHardwareInfo, err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/qos.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/qos.go
// Copyright 2019 NetApp, Inc. All Rights Reserved. package api import ( "context" "encoding/json" . "github.com/netapp/trident/logging" "github.com/netapp/trident/utils/errors" ) // Get default QoS information func (c *Client) GetDefaultQoS(ctx context.Context) (*QoS, error) { var ( defaultQoSReq DefaultQoSRequest defaultQoSResult DefaultQoSResult ) response, err := c.Request(ctx, "GetDefaultQoS", defaultQoSReq, NewReqID()) if err != nil { Logc(ctx).Errorf("error detected in GetDefaultQoS API response: %+v", err) return nil, errors.New("device API error") } if err := json.Unmarshal(response, &defaultQoSResult); err != nil { Logc(ctx).Errorf("error detected unmarshalling json response: %+v", err) return nil, errors.New("json decode error") } return &QoS{ BurstIOPS: defaultQoSResult.Result.BurstIOPS, MaxIOPS: defaultQoSResult.Result.MaxIOPS, MinIOPS: defaultQoSResult.Result.MinIOPS, }, err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/capacity.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/capacity.go
// Copyright 2018 NetApp, Inc. All Rights Reserved. package api import ( "context" "encoding/json" . "github.com/netapp/trident/logging" "github.com/netapp/trident/utils/errors" ) // Get cluster capacity stats func (c *Client) GetClusterCapacity(ctx context.Context) (capacity *ClusterCapacity, err error) { var ( clusterCapReq GetClusterCapacityRequest clusterCapResult GetClusterCapacityResult ) response, err := c.Request(ctx, "GetClusterCapacity", clusterCapReq, NewReqID()) if err != nil { Logc(ctx).Errorf("Error detected in GetClusterCapacity API response: %+v", err) return nil, errors.New("device API error") } if err := json.Unmarshal(response, &clusterCapResult); err != nil { Logc(ctx).Errorf("Error detected unmarshalling json response: %+v", err) return nil, errors.New("json decode error") } return &clusterCapResult.Result.ClusterCapacity, err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/account.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/account.go
// Copyright 2018 NetApp, Inc. All Rights Reserved. package api import ( "context" "encoding/json" . "github.com/netapp/trident/logging" "github.com/netapp/trident/utils/errors" ) // AddAccount tbd func (c *Client) AddAccount(ctx context.Context, req *AddAccountRequest) (accountID int64, err error) { var result AddAccountResult response, err := c.Request(ctx, "AddAccount", req, NewReqID()) if err != nil { Logc(ctx).Errorf("Error detected in AddAccount API response: %+v", err) return 0, errors.New("device API error") } if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected in AddAccount API response: %+v", err) return 0, errors.New("device API error") } return result.Result.AccountID, nil } // GetAccountByName tbd func (c *Client) GetAccountByName(ctx context.Context, req *GetAccountByNameRequest) (account Account, err error) { response, err := c.Request(ctx, "GetAccountByName", req, NewReqID()) if err != nil { return } var result GetAccountResult if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling GetAccountByName API response: %+v", err) return Account{}, errors.New("json-decode error") } Logc(ctx).Debugf("returning account: %+v", result.Result.Account) return result.Result.Account, err } // GetAccountByID tbd func (c *Client) GetAccountByID(ctx context.Context, req *GetAccountByIDRequest) (account Account, err error) { var result GetAccountResult response, err := c.Request(ctx, "GetAccountByID", req, NewReqID()) if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling GetAccountByID API response: %+v", err) return account, errors.New("json-decode error") } return result.Result.Account, err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/vag.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/storage_drivers/solidfire/api/vag.go
// Copyright 2018 NetApp, Inc. All Rights Reserved. package api import ( "context" "encoding/json" . "github.com/netapp/trident/logging" "github.com/netapp/trident/utils/errors" ) // CreateVolumeAccessGroup tbd func (c *Client) CreateVolumeAccessGroup(ctx context.Context, r *CreateVolumeAccessGroupRequest) (vagID int64, err error, ) { var result CreateVolumeAccessGroupResult response, err := c.Request(ctx, "CreateVolumeAccessGroup", r, NewReqID()) if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling CreateVolumeAccessGroupResult API response: %+v", err) return 0, errors.New("json-decode error") } vagID = result.Result.VagID return } // ListVolumeAccessGroups tbd func (c *Client) ListVolumeAccessGroups( ctx context.Context, r *ListVolumeAccessGroupsRequest, ) (vags []VolumeAccessGroup, err error) { response, err := c.Request(ctx, "ListVolumeAccessGroups", r, NewReqID()) if err != nil { Logc(ctx).Errorf("Error in ListVolumeAccessGroupResult API response: %+v", err) return nil, errors.New("failed to retrieve VAG list") } var result ListVolumesAccessGroupsResult if err := json.Unmarshal(response, &result); err != nil { Logc(ctx).Errorf("Error detected unmarshalling ListVolumeAccessGroupResult API response: %+v", err) return nil, errors.New("json-decode error") } vags = result.Result.Vags return } // AddInitiatorsToVolumeAccessGroup tbd func (c *Client) AddInitiatorsToVolumeAccessGroup( ctx context.Context, r *AddInitiatorsToVolumeAccessGroupRequest, ) error { _, err := c.Request(ctx, "AddInitiatorsToVolumeAccessGroup", r, NewReqID()) if err != nil { Logc(ctx).Errorf("Error in AddInitiator to VAG API response: %+v", err) return errors.New("failed to add initiator to VAG") } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/config/config.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/netapp/trident/config/config.go
// Copyright 2022 NetApp, Inc. All Rights Reserved. package config import ( "crypto/tls" "fmt" "time" k8sversion "k8s.io/apimachinery/pkg/version" versionutils "github.com/netapp/trident/utils/version" ) type ( Protocol string AccessMode string VolumeMode string VolumeType string DriverContext string Platform string ) type Telemetry struct { TridentVersion string `json:"version"` TridentBackendUUID string `json:"backendUUID"` Platform string `json:"platform"` PlatformVersion string `json:"platformVersion"` } type PersistentStateVersion struct { PersistentStoreVersion string `json:"store_version"` OrchestratorAPIVersion string `json:"orchestrator_api_version"` PublicationsSynced bool `json:"publications_synced,omitempty"` } const ( /* Misc. orchestrator constants */ OrchestratorName = "trident" OrchestratorClientName = OrchestratorName + "ctl" OrchestratorAPIVersion = "1" DefaultOrchestratorVersion = "24.06.0" PersistentStoreBootstrapAttempts = 30 PersistentStoreBootstrapTimeout = PersistentStoreBootstrapAttempts * time.Second PersistentStoreTimeout = 10 * time.Second DockerCreateTimeout = 115 * time.Second DockerDefaultTimeout = 55 * time.Second // CSIUnixSocketPermissions CSI socket file needs rw access only for user CSIUnixSocketPermissions = 0o600 // CSISocketDirPermissions CSI socket directory needs rwx access only for user CSISocketDirPermissions = 0o700 /* REST/HTTP constants */ HTTPTimeout = 90 * time.Second HTTPTimeoutString = "90s" CACertName = "trident-ca" ServerCertName = "trident-csi" // Must match CSI service name ClientCertName = "trident-node" CAKeyFile = "caKey" CACertFile = "caCert" ServerKeyFile = "serverKey" ServerCertFile = "serverCert" ClientKeyFile = "clientKey" ClientCertFile = "clientCert" AESKeyFile = "aesKey" certsPath = "/certs/" CAKeyPath = certsPath + CAKeyFile CACertPath = certsPath + CACertFile ServerKeyPath = certsPath + ServerKeyFile ServerCertPath = certsPath + ServerCertFile ClientKeyPath = certsPath + ClientKeyFile ClientCertPath = certsPath + ClientCertFile AESKeyPath = certsPath + AESKeyFile /* Protocol constants. This value denotes a volume's backing storage protocol. For example, a Trident volume with 'file' protocol is most likely NFS, while a 'block' protocol volume is probably iSCSI. */ File Protocol = "file" Block Protocol = "block" BlockOnFile Protocol = "blockOnFile" ProtocolAny Protocol = "" /* Access mode constants */ ReadWriteOnce AccessMode = "ReadWriteOnce" ReadWriteOncePod AccessMode = "ReadWriteOncePod" ReadOnlyMany AccessMode = "ReadOnlyMany" ReadWriteMany AccessMode = "ReadWriteMany" ModeAny AccessMode = "" /* Volume mode constants. This value describes how a volume will be consumed by application containers. Most Trident volumes (regardless of protocol) probably use the 'Filesystem' mode, where the volume contains a filesystem and is mounted into a container. By contrast, volumes with 'Block' mode always use 'block' protocol and are attached to a container as raw block devices. */ RawBlock VolumeMode = "Block" Filesystem VolumeMode = "Filesystem" // Filesystem types FsXfs = "xfs" FsExt3 = "ext3" FsExt4 = "ext4" FsRaw = "raw" // Block-On-File Filesystem types FsNFSXfs = "nfs/xfs" FsNFSExt3 = "nfs/ext3" FsNFSExt4 = "nfs/ext4" FsNFSRaw = "nfs/raw" /* Volume type constants */ OntapNFS VolumeType = "ONTAP_NFS" OntapISCSI VolumeType = "ONTAP_iSCSI" SolidFireISCSI VolumeType = "SolidFire_iSCSI" UnknownVolumeType VolumeType = "" /* Driver-related constants */ DefaultSolidFireVAG = OrchestratorName UnknownDriver = "UnknownDriver" StorageAPITimeoutSeconds = 90 SANResizeDelta = 50000000 // 50mb // Storage driver names specified in the config file, etc. OntapNASStorageDriverName = "ontap-nas" OntapNASFlexGroupStorageDriverName = "ontap-nas-flexgroup" OntapNASQtreeStorageDriverName = "ontap-nas-economy" OntapSANStorageDriverName = "ontap-san" OntapSANEconomyStorageDriverName = "ontap-san-economy" SolidfireSANStorageDriverName = "solidfire-san" AzureNASStorageDriverName = "azure-netapp-files" AzureNASBlockStorageDriverName = "azure-netapp-files-subvolume" GCPNFSStorageDriverName = "gcp-cvs" GCNVNASStorageDriverName = "google-cloud-netapp-volumes" FakeStorageDriverName = "fake" /* REST frontend constants */ MaxRESTRequestSize = 40960 MinServerTLSVersion = tls.VersionTLS13 MinClientTLSVersion = tls.VersionTLS12 /* Docker constants */ DockerPluginModeEnvVariable = "DOCKER_PLUGIN_MODE" // set via contrib/docker/plugin/plugin.json DockerPluginConfigLocation = "/etc/netappdvp" /* Kubernetes deployment constants */ ContainerTrident = "trident-main" ContainerACP = "trident-acp" ContextDocker DriverContext = "docker" ContextCSI DriverContext = "csi" PlatformDocker Platform = "docker" PlatformKubernetes Platform = "kubernetes" PlatformCSI Platform = "csi" // plain CSI, no other CO present // OS Types Linux = "linux" Windows = "windows" Darwin = "darwin" // Minimum and maximum supported Kubernetes versions KubernetesVersionMin = "v1.24" KubernetesVersionMax = "v1.30" // KubernetesCSISidecarRegistry is where the CSI sidecar images are hosted KubernetesCSISidecarRegistry = "registry.k8s.io/sig-storage" NamespaceFile = "/var/run/secrets/kubernetes.io/serviceaccount/namespace" VolumeTrackingInfoPath = "/var/lib/trident/tracking" // Pod Security Standards PodSecurityStandardsEnforceLabel = "pod-security.kubernetes.io/enforce" PodSecurityStandardsEnforceProfile = "privileged" PodSecurityPoliciesRemovedKubernetesVersion = "1.25" /* Kubernetes operator constants */ OperatorContainerName = "trident-operator" // IscsiSelfHealingInterval is an interval with which the iSCSI self-healing thread is called periodically. IscsiSelfHealingInterval = 300 * time.Second IscsiSelfHealingIntervalString = "5m0s" // ISCSISelfHealingWaitTime is an interval after which iSCSI self-healing attempts to fix stale sessions. ISCSISelfHealingWaitTime = 420 * time.Second ISCSISelfHealingWaitTimeString = "7m0s" // BackendStoragePollInterval is an interval that core layer attempts to poll storage backend periodically BackendStoragePollInterval = 300 * time.Second // NVMeSelfHealingInterval is an interval with which the NVMe self-healing thread is called periodically NVMeSelfHealingInterval = 300 * time.Second ) var ( ValidProtocols = map[Protocol]bool{ File: true, Block: true, BlockOnFile: true, ProtocolAny: true, } MultiNodeAccessModes = [...]AccessMode{ReadOnlyMany, ReadWriteMany} // BuildHash is the git hash the binary was built from BuildHash = "unknown" // BuildType is the type of build: custom, beta or stable BuildType = "custom" // BuildTypeRev is the revision of the build BuildTypeRev = "0" // BuildTime is the time the binary was built BuildTime = "unknown" // BuildImage is the Trident image that was built BuildImage = "docker.io/netapp/trident:" + DefaultOrchestratorVersion + "-custom.0" OrchestratorVersion = versionutils.MustParseDate(version()) /* API Server and persistent store variables */ BaseURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion VersionURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/version" BackendURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/backend" BackendUUIDURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/backendUUID" VolumeURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/volume" TransactionURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/txn" StorageClassURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/storageclass" NodeURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/node" SnapshotURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/snapshot" ChapURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/chap" PublicationURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/publication" LoggingConfigURL = "/" + OrchestratorName + "/v" + OrchestratorAPIVersion + "/logging" UsingPassthroughStore bool CurrentDriverContext DriverContext OrchestratorTelemetry = Telemetry{TridentVersion: OrchestratorVersion.String()} // CSIAccessModes are defined by CSI // See https://github.com/container-storage-interface/spec/blob/release-1.5/lib/go/csi/csi.pb.go#L135 CSIAccessModes = map[int32]string{ 0: "UNKNOWN", 1: "SINGLE_NODE_WRITER", 2: "SINGLE_NODE_READER_ONLY", 3: "MULTI_NODE_READER_ONLY", 4: "MULTI_NODE_SINGLE_WRITER", 5: "MULTI_NODE_MULTI_WRITER", 6: "SINGLE_NODE_SINGLE_WRITER", 7: "SINGLE_NODE_MULTI_WRITER", } // DefaultAutosupportImage default image used by tridentctl and operator for asup sidecar DefaultAutosupportImage = "docker.io/netapp/trident-autosupport:24.06" // DefaultACPImage default image used by tridentctl and operator for acp sidecar DefaultACPImage = "cr.astra.netapp.io/astra/trident-acp:24.06.0" // TopologyKeyPrefixes contains well-known topology label prefixes TopologyKeyPrefixes = []string{"topology.kubernetes.io"} // TopologyRegionKeys contains well-known keys for topology region labels TopologyRegionKeys = []string{"topology.kubernetes.io/region"} // TopologyZoneKeys contains well-known keys for topology zone labels TopologyZoneKeys = []string{"topology.kubernetes.io/zone"} ) func IsValidProtocol(p Protocol) bool { _, ok := ValidProtocols[p] return ok } func GetValidProtocolNames() []string { ret := make([]string, len(ValidProtocols)) for key := range ValidProtocols { ret = append(ret, string(key)) } return ret } func PlatformAtLeast(platformName, version string) error { if OrchestratorTelemetry.Platform == platformName { platformVersion := versionutils.MustParseSemantic(OrchestratorTelemetry.PlatformVersion) requiredVersion, err := versionutils.ParseSemantic(version) if err != nil { return fmt.Errorf("platform: %s , version: %s", platformName, version) } if platformVersion.AtLeast(requiredVersion) { return nil } } return nil } func version() string { var version string if BuildType != "stable" { if BuildType == "custom" { version = fmt.Sprintf("%v-%v+%v", DefaultOrchestratorVersion, BuildType, BuildHash) } else { version = fmt.Sprintf("%v-%v.%v+%v", DefaultOrchestratorVersion, BuildType, BuildTypeRev, BuildHash) } } else { version = DefaultOrchestratorVersion } return version } func ValidateKubernetesVersion(k8sMinVersion string, k8sVersion *versionutils.Version) error { k8sMMVersion := k8sVersion.ToMajorMinorVersion() minSupportedMMVersion := versionutils.MustParseMajorMinorVersion(k8sMinVersion) maxSupportedMMVersion := versionutils.MustParseMajorMinorVersion(KubernetesVersionMax) if k8sMMVersion.LessThan(minSupportedMMVersion) || k8sMMVersion.GreaterThan(maxSupportedMMVersion) { return versionutils.UnsupportedKubernetesVersionError( fmt.Errorf("Trident supports Kubernetes versions in the range [%s, %s]", minSupportedMMVersion.ToMajorMinorString(), maxSupportedMMVersion.ToMajorMinorString())) } return nil } func ValidateKubernetesVersionFromInfo(k8sMinVersion string, versionInfo *k8sversion.Info) error { k8sVersion, err := versionutils.ParseSemantic(versionInfo.GitVersion) if err != nil { return err } return ValidateKubernetesVersion(k8sMinVersion, k8sVersion) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/cmd/vsphere-xcopy-volume-populator/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go
cmd/vsphere-xcopy-volume-populator/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go
package logrus import ( "golang.org/x/sys/unix" ) // IsTerminal returns true if the given file descriptor is a terminal. func isTerminal(fd int) bool { _, err := unix.IoctlGetTermio(fd, unix.TCGETA) return err == nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false